|Elliott Sound Products||Project 166|
Push-on, push-off switches are common in many products. In some cases the action is purely mechanical, with a special alternating latching mechanism that holds the switch in the 'on' position, and releases again next time the button is pressed. These switches used to be quite common, but were only ever available with a limited range of button styles. They are less common now, and it's likely that you won't be able to find a style or shape that suits your panel layout.
Momentary action switches are far more common, and come in a wide range of different styles. Some require only a gentle touch to operate, but of course they are not latching. This makes them unsuitable for switching on your equipment. You can use two switches, with one for 'on' and the other for 'off', but this is usually inconvenient and takes up more space on the front panel.
Electronic switching does have one down side, and that's the need for a continuous power supply. In some equipment that can be a problem, and of course a continuous supply means that some current is drawn from the mains all the time. If the supply is designed properly standby current will be very low, and the dissipated power can easily be under 1W with a suitable power supply.
This project will appeal to people who want to build an amplifier or preamp that has a 'modern' feel, using a single button to turn it on and off. As shown here, a mechanical switch is needed, so be aware that it is not a 'touch' switch. Most people won't be bothered by this though, since true touch switches seem to have fallen from favour.
The schematic of the switching circuit is shown below. It uses a single 555 timer and a few passive components. The mains will usually be switched using a relay, either electromechanical or 'solid state', and driven from the output of the switching circuit. See below for more information on relay driving. C3 is not needed if the circuit is close to the power supply (less than 50mm or so). Otherwise, C3 is necessary to ensure that there are no supply 'glitches' when the output changes state. It should be located as close to the IC as possible.
Figure 1 - Push-on, Push-off Switching Circuit
Figure 1 shows circuit of the switching system. When the pushbutton (Sw1) is operated, the output of the 555 timer will alternate between high (12V) and low (0V). The LED is used to indicate the state of the switch, and acts as a power-on indicator. C2 is much larger than is normally used with 555 timer circuits, and is used to force the 555 timer to a 'low' output voltage when power is first applied. This is the default and will be appropriate in most cases. If you prefer the 555 to output 12V when power is first applied, connect C2 between the 'Crtl' pin (pin 5) and the positive supply. The positive lead of C2 must go to +12V if wired this way.
R2 and R3 set the voltage on the 555's 'threshold' and 'trigger' pins to 1/2 the supply voltage - typically 6V. When the output is off (0V), the voltage across C1 will be close to zero, as it is discharged via R1. When Sw1 is closed (momentarily), the voltage at the threshold and trigger pins falls to zero for an instant, and causes the 555 timer's internal flip-flop to change state. The output goes high (12V), the external relay (or whatever is being controlled) turns on, and C1 now charges, reaching close to 12V in a couple of seconds.
The next time that Sw1 is pressed, the threshold and trigger inputs are forced to near +12V, causing the flip-flop to change state again. The output now falls to zero and the external relay turns off. Because of the rather long time constant of R1 and C1, switch contact bounce will not affect the circuit's operation, and spurious or random switching won't happen. If R1 or C1 are too low in value any contact bounce in Sw1 can easily leave the output in the wrong state, having gone high and low several times in a short period. The 1 second time constant used completely eliminates this problem.
If you think that you'll need to operate the switch faster than once a second (very unlikely I would expect), you can reduce the value of C1. Less than 1µF is not recommended.
Figure 2 - Alternative Push-on, Push-off Switching Circuit
The second version [ 2 ] is rather more complex, but it has the advantage that only a single wire is needed to the switch and LED, plus ground, which will usually be the chassis. This reduces wiring, as the first version needs two wires for the switch plus another wire and ground for the LED. That's up to four wires in all, which may be a nuisance to connect. The relay is part of the Figure 2 circuit, so the transistor and relay shown in Figure 3 aren't required, but mains wiring and proper isolation of hazardous voltages is just as important.
Whether you consider the extra complexity to be worth the effort just to save a bit of wiring is up to you. The second circuit is more 'elegant', but there's little to separate the two from a usability perspective, and they will function equally well. Power consumption is negligible for both when off, and is mainly determined by the relay coil current when turned on.
If you are not experienced with mains wiring, do not attempt the following circuits. In some countries it may be unlawful to work on mains powered equipment unless you are qualified to do so. Be aware that if someone is killed or injured as a result of faulty work you may have done, you may be held legally responsible, so make sure you understand the following ...
|WARNING : The following description is for circuitry, some of which is not isolated from the mains. Extreme care is required to ensure that the final installation will be safe under all foreseeable circumstances (however unlikely they may seem). The mains and low voltage sections must be fully isolated from each other, observing required creepage and clearance distances. All mains circuitry operates at the full mains potential, and must be insulated accordingly. Do not work on the power supply while power is applied, as death or serious injury may result.|
For some examples of mains switching, see Project 156, which describes a number of circuits designed for 12V triggered mains switches. Provided you use a relay that doesn't draw too much coil current (most will be fine), you can simply use the output of the 555 to drive the relay directly. Be aware that you must never omit the diode across the coil, and you need a diode in series with the output of the 555 IC as well. This is because the 555 has an active output stage, but the IC's internal circuitry can 'latch-up' if even a small negative voltage is applied to the output pin. See The 555 Timer article for more information about the IC, its uses and limitations.
It's far better to use a transistor to switch the relay. This ensures that the output of the 555 isn't loaded excessively, as loading will cause a voltage drop at the output which may cause the circuit to be unreliable. For the sake of a few cents and the addition of a resistor, transistor and diode, you can be certain that the 555 operates with the least possible external disturbance, and it will be free of any undesirable behaviour.
Figure 3 - Typical Mains Switching Circuit (Figure 1 Only)
The drawing above shows a simple example of a mains switch. This maintains isolation between the 12V supply and mains, so everything connected to the 12V supply can be handled safely. The power supply for the circuit can be a small transformer, rectifier and filter, or you can use the insides of an isolated switchmode plug-pack (aka 'wall wart') supply. There are many possibilities (including the one shown below), and you can have a look at the ESP article 'Small, Low Current Power Supplies' to see some other examples. The supply does not need to be regulated, but it should be reasonably free of ripple which again might cause unreliable operation.
If the switch is insulated to mains standards you can use a transformerless supply, but I never recommend them because they are inherently deadly. A transformer or switchmode supply is safe under most possible conditions, and failure between mains and low voltage circuitry is very rare. Provided the equipment is wired with a protective (safety) earth/ ground, even if there is a major failure, the users are still protected because the house mains safety switch will activate or the fuse will blow.
A suitable power supply is shown below. It's nothing fancy, and uses a small 9V transformer, four diodes and a capacitor. This is virtually identical to the supply shown for several other small ESP projects, and will provide close enough to 12V DC output. When loaded with a typical relay (having a coil resistance of around 270 ohms), the ripple voltage will be about 50mV RMS. You can use a small bridge rectifier IC or module, but I expect most hobbyists will have a stash of 1N4004 diodes already.
Figure 4 - Power Supply Circuit
There's nothing fancy about it, but if you use a transformer from an established supplier it will be safe and will usually last for the life of the equipment. The fuse is optional but recommended. It will typically be permanently wired (and insulated), since if it fails it probably means that your transformer has died. You can also use a switchmode supply (the innards of a plug-pack/ wall-wart for example) which will have a regulated output, but almost certainly won't last as long as the simple linear version shown.
Make sure that all mains wiring uses mains rated cable, and that joins are secure and insulated against accidental contact. If you are unsure about your ability to perform mains wiring safely and to the standards required in your country, then get someone to do it for you. Take careful notice of the red warning above - it's extremely important !
Figure 5 - Alternative Power Supply Suggestion
Some people may prefer to use a small switchmode supply, such as that shown above. These are fairly small, at 83 × 34 × 24mm (L×W×H), so will probably take up less space than a small transformer, rectifier and filter cap. There are many alternatives that also provide proper safety isolation and include mains input filtering. These are a safe and practical alternative to the conventional approach. For example, you can use the PCB taken from a commercially available wall supply (aka plug-pack, wall-wart, etc.), which will usually have safety approvals for the countries where it's sold. Most wall supplies will also comply with minimum energy performance standards (MEPS) if they apply where you live.
If you use a switchmode supply of any type, it will ideally be inside an earthed metal enclosure to minimise electrical noise and to keep it safe from accidental contact. Make sure that the supply is securely mounted with adequate insulation rated for mains voltage, to prevent any short circuit to the case. Where the SMPS lacks EMI suppression components (such as most of the ultra miniature versions you can get), it's recommended that they be added or electrical noise may cause interference to other equipment.
Note that there are other, much smaller SMPS available, but they cannot be used as an isolated supply. The smallest I've come across measures 30 × 20 × 17mm, but they are not recommended! They lack a mains EMI filter, and for safety, both mains input and DC output must be considered to be at mains potential. The PCB track spacing is not adequate to provide a safety barrier as required by the regulations of most countries. This means that wiring to the switch, 555 timer board and relay will all use mains rated cable, and be properly insulated to prevent contact. The 555 board would then also be considered to be at mains potential, and must be enclosed.
Using a push-on, push-off switch adds a small wow-factor, and it is a nice feature if you want to make your gear a little out of the ordinary. Of course you pay for it in extra parts and the need for a full-time power supply (and its attendant losses), but overall it does add something a bit unusual to a home-built project. If you choose a switch with a 'nice' feel, I expect you'll be very pleased with the result.
The circuit is very simple, and standby current is just that drawn by the 555 timer - a few milliamps at most, plus the small idle current of the transformer (or SMPS if you use that alternative). The switching is completely immune from false triggering due to switch contact bounce, and it provides a 'lockout' of around 1 second before pressing the button again will do anything. This can be increased by using a larger cap for C1, but as it stands it's just about perfect.
The output of the 555 timer can also be used as a 12V trigger signal for other equipment you may have, and that increases the functionality of the circuit. Many subwoofer amplifiers have provision for a 12V trigger, as do many power amps. If you build your own, the Project 39 soft-start circuit PCB has provision for using a 12V trigger, and that can be incorporated into your project.
|Copyright Notice.This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is Copyright © 2016. Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro-mechanical, is strictly prohibited under International Copyright laws. The author (Rod Elliott) grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference while constructing the project. Commercial use is prohibited without express written authorisation from the author.|