Elliott Sound Products | Project 239 |
Main Index Projects Index |
The circuit described is simple way to turn on a sub-woofer or some other piece of audio equipment, simply by sending it a signal. This ability is fairly common in commercial subs and some other gear, but there are few workable circuits on the net, and they are unavailable as an add-on device.
The original version of the project (Project 38) was published in 1999, and while it still works perfectly, some constructors have had problems with some amplifiers (notably Hypex). I don't have one of the affected amps, and I'm not entirely sure what the problem is, but it's something strange that the amp does - the circuit works perfectly otherwise. This new version is a bit more complex, and it uses a Schmitt trigger after the timing network that should provide higher reliability with 'odd' amplifiers.
In addition, a buffer stage can be included that will prevent any signal coming from the amplifier's input circuitry from interacting with the signal sensing. This is not something I can guarantee, as I don't know exactly what causes the problem. I've had two reports from readers who were both using Hypex amps, but neither has responded to my request for further information.
However, there's only one real explanation, which is that the input stage outputs a transient when power is turned off. Some amps have an input stage using a single 5V supply (for further processing with DSP etc.), and when power is removed that will output a small negative-going transient. Because the auto-switch is very sensitive by design, the transient may be enough to re-trigger the detector, leading to an endless loop of switching off, then back on again. The revised circuit addresses this with two approaches - a 'lock-out' circuit, and a buffer stage that completely isolates the detector's input from the external amplifier.
Some amplifiers may have an 'always-on' supply that you can use, but if you do use it, make sure that it is absolutely free from glitches or transients when power is removed. If it isn't completely glitch-free, then that will cause problems. It's up to you to ensure that there are zero disturbances on any supply that you use if it's not one of those shown here.
The circuit presented here will operate with a signal of only 5mV (RMS), which will be adequate for all but the quietest listening. 5mV represents a typical power of about 1.6mW into an 8Ω speaker with a typical amplifier. That means a sound level of less than 50dB SPL with typical speakers. It is possible to make it more sensitive - I tested it to 1mV, but at this level even tiny amounts of mains hum or other noise will trigger the circuit.
Using cheap and readily available parts, the unit will switch the most powerful amplifier as long as you select the correct relay. You can even use a small relay to operate a larger one, so you could switch anything you wanted to - so there are few limits.
WARNING: This circuit requires experience with mains wiring. Do not attempt construction unless experienced and capable. Death or serious injury may result from incorrect wiring. |
The circuit will not operate when power is applied (because of the 'lock-out' stage). This was not intentional, so the 'Test' switch lets you power the connected equipment. When you connect a piece of equipment that doesn't have a mains switch (or when you first turn it on), you expect it to work, not just sit idly doing nothing. After the initial 'Test' operation, if there's no audio signal the circuit will switch off again after the time-out period. This provides a level of confidence that everything is functional without having to connect an audio lead.
Please Note: This circuit is designed for use with conventional electromechanical relays, but the relay switching is very fast so it may be able to be used with a solid state relay (SSR) if preferred. The fast switching minimises problems and possible damage to the SSR and/or the following circuitry. The external circuit (subwoofer amp for example) will be idle because there is no signal, and a solid state relay may not have enough current to function properly - a standard electromechanical relay is almost always a safer option.
There is also an option to use the circuit as a sound activated switch. By using an electret microphone capsule at the input, the circuit will detect noise above a preset threshold and turn on the relay. This can be used to turn on a light, activate a video recorder, or anything else you wish. That's not shown here - please see the original Project 38 for the details. The lock-out circuit probably won't be necessary for a sound-activated switch.
The switch detector unit is shown in Fig. 1, and uses an LM358 dual opamp and a handful of other low cost parts. The relay switching device is a MOSFET, selected because of the high input resistance that doesn't load the timing circuit. The 2N7000 shown is recommended because it is fairly cheap, but virtually any MOSFET will work just as well. Alternatives are BS170, BS270, VN2222, etc. An MTP3055 can also be used - it's complete overkill, but cheap. The opamp must be an LM358 (or similar) as shown. While you can use various others, the outputs of most common opamps cannot reach zero volts - the worst case minimum is about 2V. The LM358 is recommended because its output voltage goes to zero volts, ensuring that Q1 can turn off.
The circuit uses a reference voltage line (R8, D1 and C3, nominally +5.1V) to bias the opamp inputs and provide a comparator reference voltage. Since the same supply is used for both, regulation is not critical as any variation will be applied both to opamp input and comparator, so the two will track properly over a wide voltage range. Voltages shown are typical - they could vary depending on the actual supply voltage.
A signal feed is taken from both Left and Right channels via R1 and R2 (leave out one input resistor for a mono source such as a sub-woofer). This is amplified by 100 by U1A, and the output is supplied to the comparator U1B. When the amplified signal falls below the comparator threshold (~4.6V), the output of U1B goes high momentarily, and current is sent to the timing cap (C4) via D2 and R9. After a few cycles, the gate threshold voltage for Q1 is reached and it will turn on, energising the relay. Verify that the voltage at the output of U1A (pin 1) is more positive than the voltage at the non-inverting input of U1B (pin 5). With the values shown the circuit will activate within around 250ms, but this depends on the signal - it could take longer.
When power is removed after the timeout, Q2 is turned on by the positive-going voltage on the drain of Q1. Q2 will remain on for about 10 seconds - long enough to ensure that any residual signal is well past the 'danger zone'. While I expect that the values shown will be more than sufficient, C5 can be increased if you wish (33μF should be more than enough, but it depends on how quickly the supply falls in the connected equipment). This extra bit of circuitry provides a 'lock-out', where any 'errant' input signal won't cause the circuit to re-apply power to the connected amplifier. D3 is included to prevent a possibly destructive negative signal on the base of Q2. The lock-out circuit has another benefit as well - it makes the turn-off time of Q1 much faster (it's almost instantaneous).
Note: There was an error on the drawing showing the base of Q2 wired to the gate of Q1. Corrected May 2023. My thanks to the reader who spotted the drawing mistake.
Note that operation of the 'Test' switch at just the wrong moment may look like it will damage Q2, but because of the high value of the base resistor the worst-case current will only be 20-30mA, and to obtain that you'd have to press the 'Test' switch at exactly the moment that the circuit is turning off. One reader expressed concern over this, but it's very unlikely that it will ever happen, and even if it does, 30mA is well within the transistor's capability. The absolute maximum base current is 100μA, so worst-case transistor collector current is I b times hFE. In practice you'll be hard-pressed to get more than 3-5mA, even if you do manage to press the switch at exactly the right (wrong?) time.
Should it be found that the circuit is too sensitive, increase the value of R6 - this makes the comparator less sensitive, so more signal will be needed. Likewise, to increase sensitivity reduce the value of R6 - use a 20k trimpot for a useful sensitivity range. The comparator is triggered by negative transitions from U1A, so the output of U1A has to fall below 4.6V for the comparator to produce a high output. R9 was was originally 100Ω, but that makes the detection very fast. Using 10k means that signal has to be present for ~500ms before the relay is activated. You can make R9 larger if preferred (no more than 22k though - about 500ms). The turn-on time depends on the signal level - it operates faster with a higher input voltage.
Note that the above circuit is intended for signal levels, NOT speaker level. If the signal to be switched is speaker level, it must first be attenuated so that even at full power, no more than about 2 Volts is applied to the circuit inputs. High signal levels may destroy the input circuit of the opamp. See Fig. 4 for a modified version of the input stage for speaker level signals.
After the audio signal is removed, it will take some time for C4 to discharge through R10, and after about 5½ minutes Q1 will switch off again, and disconnect power from the amplifier. The time can be varied by changing either C4 or R10 - increase either to make the time longer or vice versa. Even a small amount of leakage on a circuit board (especially Veroboard) may reduce the time delay, so the junction of the cathode of R9, C4, R10, the collector of Q2 and the gate of Q1 can be 'skyhooked', i.e. suspended in mid-air. Because C4 will most likely be an electrolytic type, make sure that you use a low leakage part or the delay time might be much shorter than expected. Don't use a tantalum caps in the circuit, as they are the most unreliable caps ever produced, and I never recommend them for anything.
The diodes can be 1N4148 or 1N4004 types (I'd use a 1N4004 or similar across the relay coil), whichever is the easiest to find (or is already at hand). They are not critical, so other types will be just as suitable (I shall leave this to the reader). Note that any leakage through D2 will reduce the 'on' time, so do not be tempted to use a Schottky diode (they have much greater leakage than 'ordinary' types).
When I tested the circuit, I used a 100nF cap for the timer (instead of 33µF), and no discharge resistor. I got tired of waiting for the relay to release, so it is possible to get very long (but unpredictable) times even with small capacitance values. Q1 will turn off when the voltage across C4 has fallen to about 3V (this varies a little with different MOSFETs)
If this unit is to be used to power existing equipment and will be in its own case, use the input circuit shown in Fig. 2 to allow the signal to pass through the switching unit. There are no electronics in the signal path, so the signal will not be impaired. The 10k input resistors may introduce some crosstalk if the drive amp has high output impedance, but this is unlikely to cause a problem with the majority of preamps. If you have a valve preamp with an output impedance of more than 1kΩ, you might want to use only one input and leave the other disconnected.
An alternative is to increase the value of the resistors (R1 and R2), but bear in mind that this will reduce the system's sensitivity. It might be necessary to increase the gain of U1A (reduce R4) to compensate, as well as install a 20k trimpot in place of R6 (Fig. 1) to allow you to set the sensitivity.
Note: The point marked 'C1' on this circuit connects to C1 in Fig. 1. R1 and R2 in this diagram are the same as in Fig. 1 and are not an addition. As noted above, the buffers are necessary with intractable cases, where the lockout circuit still can't prevent re-triggering. The supply needs to be well filtered to ensure that no noise is injected into the opamp inputs or via the supply pins.
If all of the above doesn't help, the only remaining solution is to isolate the amplifier's input from the source. An opamp buffer is used for each channel, and that prevents any signal from the amplifier from interacting with the switching circuit. The buffers are shown in Fig. 2 as optional, and they have to operate from a single supply unless a negative voltage is provided. Some people may object to the added caps and opamps, but in reality they will not affect the sound in the slightest.
The buffers convert the preamp's output impedance to a very low value (close to zero for the summing resistors R7 and R8). Any disturbance from the amplifier is effectively grounded by the opamp outputs. 1Meg resistors are included to ensure that there is no DC at the input or output of the circuits. The 100Ω output resistors ensure opamp stability by isolating the output from capacitive interconnect cables.
The values shown are intended as a guide, and the opamp you use is up to you. Some will be happy with a TL072, while others will expect a minimum of an LM4562 or something more exotic. They are buffers, and any contribution to 'the sound' will almost certainly be imagined. Of course, this is based on good wiring practice and proper opamp bypassing (not shown - use 100nF ceramic caps between +VCC and -VEE (pins 8 and 4 respectively). If this scheme is used, I recommend a linear supply with regulation to eliminate all ripple.
If the buffers are not needed, just use the Fig. 2 circuit.
The power supply for this circuit must be on permanently (predictably), so I suggest that a quality transformer be used to prevent the possibility of fire or other failure. This point cannot be overlooked, as a cheap tranny may not have the build quality of a good one and may pose a genuine hazard. A transformer with an integral thermal fuse provides added peace of mind.
The alternative is to use a good quality switchmode supply, typically the 'wall transformer' (aka 'wall wart') style. These are readily available from most electronics outlets, but steer clear of any that don't have genuine approvals from the appropriate regulatory agency where you live - e.g. CE, UL, FCC, CSA, Veda, ASNZS (C-Tick or RCM for Australia), etc. A certain auction site has plenty on offer, but many are not approved (despite the claims made) and some are positively dangerous - see Dangerous Or Safe? - Plug-Packs (aka 'Wall Warts') Examined. The output needs to be 12V DC, at a current of 100mA or more. Since it will be on permanently, choose one that has a very low idle power (less than 1W). Standby current for the circuit is less than 5mA.
Even a 'traditional' supply is very simple. It does not need to be regulated, and the detector will work quite happily from 9 to 15 Volts. A plug-pack ('wall-wart') supply is quite suitable (including switchmode types), and most of these are well protected against internal failure. Since it expected that a 12V relay (coil voltage) will be the most commonly available, I suggest a supply of 12V. The bridge rectifier shown can be made using 1N4004 diodes, as the current is low and standard diodes will be quite satisfactory. A 1A bridge rectifier will be more than sufficient to power the circuit.
The relay must have contacts rated at the full mains voltage (240 or 110 V AC, as appropriate), and with sufficient current rating to suit the amplifier being powered. Typically a 10A relay will be more than sufficient, but bear in mind that some large power amps draw a massive current when switched on, so make sure that the relay is capable of high surge current (most are, but if you are not sure, ask your parts dealer for advice). There are two supply options, with the second used only if the buffers (Fig. 3) are included.
The secondary circuitry (after the transformer) does not need to be connected to earth, however it is safer to do so. The 10Ω resistor (R11 in Fig. 1) is designed to prevent any earth loop hum, so connecting the secondary circuitry to mains earth should not cause a problem with hum or other noise. If noise is heard, it may be necessary to disconnect the -12V (Gnd) terminal from the mains ground.
All mains wiring must be done using approved mains cable (do not use normal hook-up wire), and any exposed terminals must be securely shrouded using heatshrink tubing or similar. Do not use insulation tape, as this has a tendency to come undone and leaves sticky stuff all over everything. Use an approved mains outlet if the unit is to be used as a peripheral device to existing equipment. In this case, see Fig. 2 for pass through connector wiring.
Make sure that mains wiring is properly separated from input wiring and other low voltage wiring. The relay must be mounted securely, and well away from the signal input wiring. The terminal marked 'Act' is the active/ live/ hot mains lead, and as seen goes to the transformer (via the fuse) and to the normally open switching contacts on the relay. The neutral lead is connected to the transformer, and to the outlet (lower three connections on the left of the diagram). The earth (ground) should be connected to prevent electric shock, and is connected to the chassis (assuming a metal case). If a plastic case is used, the earth should be connected to the mounting bracket of the transformer (assuming a 'open frame' type).
To ensure that there's no interaction between the switching circuit and the audio, I suggest a dual regulator and a higher voltage transformer if the buffer stage is included. A 12V transformer will have an unloaded DC voltage of 16-18V (across C1), which is regulated for each part of the circuit. I suggest a small heatsink for U1, as it will dissipate up to 500mW when the relay is activated. U2 will have very low dissipation, as it only powers a dual opamp. Keep the ground connections separate - they should join at the negative terminal of C1 only!
If the unit is to be operated by detecting speaker level signals, some changes are needed to the front-end circuitry. The level must be reduced, and protection is needed for the opamp input, otherwise the high signal level would damage the opamp. Fig. 4 shows the needed changes.
The zener diodes prevent high level signals from causing damage, and the signal is attenuated and current limited by using 100k input resistors. The opamp is run with a gain of ten - reduce the value of R4 to increase the gain if needed. With the circuit set up as shown, a speaker level of about 200mV on each speaker line (equivalent to 5mW into an 8Ω speaker) will trigger the circuit.
The remainder of the circuit is unchanged from that shown in Fig. 1.
Whether the addition of Q2 and associated parts is expected to make the circuit far less likely to be re-triggered by an 'odd' amplifier input circuit, this cannot be guaranteed. No-one has bothered to get back to me to let me know what was found with the 'errant' Hypex amps, so I was forced to work out the most likely reason for re-triggering by myself. The issue is almost certainly caused by an input stage using a single supply (5V or 12V). How long the signal detector has to be locked out depends on how quickly the supply in the powered equipment takes to fall to zero.
The extra bit of circuitry forms a Schmitt trigger, but it adds the ability to forcibly prevent re-activation until the secondary timeout (C5, R11) has elapsed. The Schmitt trigger makes the turn-off time for Q1 almost instant, something that the original circuit could not do. That didn't prevent it from working properly with most amplifiers, but this revised version is more 'elegant'.
I ask that anyone who has a problem with a published circuit, please let me know. Also, be prepared to respond if I suggest a fix or ask for more information. It's all well and good to complain, but if you don't supply me with info I can use to help solve the problem it's just 'bitching-and-moaning'. Anyone can do that (and they do it regularly) but you will never get a solution to your problem, and you won't learn anything.
Main Index Projects Index |