Introduction
This project describes a small circuit that can be considered as an automatic on/off switch for power amplifiers. A line-level signal is monitored and a power amplifier is switched on, when a signal is detected. When no signal is detected for 20 minutes, the power amplifier is automatically switched off again. The circuit was intended as an extension to use my Mosfet Power Amplifier in an active speaker, which is not supposed to stay on 24 hours a day and is inconvenient to switch on/off with a button. The project can of course be used to switch other equipment other than power amplifiers as well.
Optionally, a DC detection circuit can be incorporated to switch an output (or supply) relay in case of DC voltage on the speaker output. Delayed switch on of the output relay is available to prevent the switch on thumb.
Schematic
The schematic is shown below. The heart of the circuit is a PIC12F675 microcontroller, using the internal oscillator 6 pins can be freely used:
- GP0 and GP1 are used as input for the signal detection using the internal comparator.
- GP2 is an output connected to the comparator led, to give visual feedback if signal is detected.
- GP3 is an input for the DC detction circuit, which is normally high using R13. DC detection circuit pulls this pin low in case of DC detected.
- GP4 is an output for the output relay of the amplifier, which is switched with Q2.
- GP5 is an output for the power relay, which is switched with Q1. This pin is also connected to the power led for visual feedback.
The bottom left part consists of a conventional supply, with an unregulated 12V for the relays and a regulated 5V for the microcontroller. Note that the unregulated supply can depend quite strongly on the transformer load, so resistor R1 and R12 can be used to limit the current through the relays.
The components R2, R4, R5, R6, R11 and C7 are used to generate two stable voltages for the comparator. The voltage difference is set by potmeter R11, which sets the sensitivity. With the current values, sensitivity can be set between 0 and 250mV, which should be fine for most applications. Capacitor C5 prevents high frequency disturbances from triggering the circuit. Using C6 and R7 the line level signal is added to the comparator input. The input impedance of the comparator in combination with resistor R7 make sure that the circuit effectively has no influence on the line level signal.
Software functionality
Most of the functionality is implemented in software:
- After powerup, the Comparator LED starts blinking for 4s to show that the microcontroller is functional
- After detection of a line-level signal the power relay will be switched on. About 4s later, the output relay will be switched on to avoid the switch on thumb when the supply comes in.
- After 15 minutes without signal, both the power and output relay will be switched off.
- If a DC error is detected, the output relay will be switched off and the Comparator LED will be on continuously. The power relay will be switched off as an extra safety feature.
Prototype
A first prototype is ready and working. Pcb's and kits are available. Let me know your ideas/comments by adding a comment below!