Simple Soft Latch Switch using Push-Button
Latching Toggle switches are one of the most popular kinds of switches, from their use by kids in basic electricity classes to their use in prototypes and more advanced products, they provide a familiar and reliable way to close or open a circuit. This makes them the go to switch for designers in most applications but while they may be perfect for switching your device on/off in a low volume project, their price does not make them worthy for use in large scale projects as they can be expensive (usually over a dollar depending on the current rating you require), comparing the fact that you could buy a microcontroller and other components for that price. Due to these costs, designers, have been replacing (where possible) the toggle switch with the momentary push buttons which are way more cheaper especially when you are trying to get the cost down on your product.
For today’s project, I thought it will be a good idea to look at the latching toggle switch to see if we can create a cheaper alternative which can be used for ON/OFF switch operations in devices in large scale production. One of the major factors behind the cost of the latching toggle switch is that they are mechanical in nature, thus for our solution, we will ensure we don’t turn the same part by creating a soft latching switch circuitry but we will use a push-button instead.
As with any design, we will start out by outlining the requirements for our Soft Latching Switch. All of the requirements are geared towards ensuring the cost is kept low and performance is either greater or of the same quality with the mechanical latching toggle switch. The requirements are:
- Standalone; The circuitry should be independent of the system in which it is to be deployed.
- Minimal Parts; It should use very little components to keep the size small and cost as low as possible.
- Basic Parts Only; We won’t be using any special/dedicated modules
- No current drawn when Off
- Cheaper than the mechanical latching toggle switch.
Designing the Switch
For today’s design, we will draw inspiration from a design by David Jones. The switch circuitry (shown in the schematics below) is made up of two transistors which could either be PNP or NPN. The transistors work hand in hand such that the flow of base current to turn “ON” one of the transistors turns ON the other transistor. To explain better, consider the schematics below.
When the circuit is initially powered up, a chicken and egg kind of situation will be experienced as the transistor T2 will be off because there is no base current flowing through T1 (T1 is off) since the switch S1 has not been pressed. When the “on” Switch(S1) is pressed, current flows through the base of transistor T1, turning “on” the transistor and allowing the flow of current IC1 which then becomes a base current for transistor T2 (IB2). Both transistors are now “on”, thus the output is turned “on”. Because transistor T2 is connected in parallel to S1 it ensures the circuit stays on even when S1 bounces off, thus the system remains in its “on” state.
To turn the system off, the second momentary switch S2 needs to be pressed. S2 grounds the base of transistor T2 effectively turning the transistor off. This, in turn, breaks off the flow of the base current from transistor T1 to ground, turning off the transistor and effectively turning off the whole system.
While this circuit works and looks really simple, it doesn’t quite meet the requirements for our design as it requires 2x momentary switches instead of one, We want something similar to the Mechanical switch in operation, thus, there is a need for us to re-design this and remove the second switch. To do this, a few more components were introduced to arrive at the schematics below.
We start the redesign by changing transistor T1 from a PNP BJT in the previous circuit to a N-channel FET transistor. While the BJTs can do the job, FETs have better response and are more suitable for use in switching applications. The gate of the FET is tied to the input via resistor R2 to ensure it is not floating and the system stays off when switched off.
The second change is replacing the location of the switch and altering the design so switching is achieved using a single switch. This is done by the addition of transistor T3 to the circuit.
T3 is connected in such a way that when the switch is pressed for the first time, current (through the yellow wire) flows from the input to the base of transistor T2 through the switch(S), turning “on” T2 and creating a conduction path for the gate of T1, effectively turning “on” the system. Current is continuously supplied to the base of T2 through the resistor R1 after the switch is pressed.
The process of turning on the system also gets it ready to be turned off the next time the switch is pressed. As soon as the system is turned “on”, current is supplied to the base of Transistor T3 via resistor R3, turning “on” the transistor which shorts the current from the input (yellow wire) straight to ground. Thus, the next time the switch is pressed, the base of transistor T2 is grounded via the switch, turning “off” T2 which also turns “off” T1, effectively turning off the entire circuit. Because of the speed at which analog circuits responds and the possible slow speed at which the switch will be pressed by a user, a capacitor was used to allow the user enough time on each button press and to also serve as a debouncing mechanism for the switch. A LED is attached at the output to provide visual on/off feedback to the users.
With the design ready we can now select the required components for it. While the values of resistors could be varied, it is important the values are sufficiently selected so current draw is enough and are symmetrical to keep the system balanced.
Based on the design, the following components are required;
- IRF9110n x1
- 2n3904 x2
- 100k Resistor x
- Resistor x 1
- 0ohms Resistor (1)
- 47uF Capacitor
- Jumper Wires
- Momentary Pushbutton (1)
For the transistors, I believe you can use any NPN BJT transistor with similar characteristics to the 2n3904 and for the N-Channel FET, the IRF9110 can be replaced with any other similar transistor, just ensure the Vgs of the transistor is compatible with the operating voltage.
With the design done, its time to test things out. Connect the components as shown in the main schematics. You should see the LED go on and off in line with the switch press.
That’s it, this could easily replace mechanical latching toggle switch in your project. Try experimenting with the resistor and capacitor values to observe performance under different conditions.
Feel free to reach out to me via the comment section with questions or general comments on the project.
$18 Welcome Bonus for new registrations Now https://jlcpcb.com