This article describes the 5V version of a previous 12V transistor soft latch push on, push off switch circuit. It also incorporates an improvement over the 12V version that provides for better switch de-bouncing, as well as an inverting output stage, so that the circuit defaults to “off”. The parts list and picture of the breadboard can be found in the original article as linked below. The only changes are to resistors R3, R1, and R4. The original article can be found at https://breadboardcircuits.com/transistor-push-on-push-off-switch/ and the YouTube video at: https://youtu.be/5_GvxUTos_U . The output of this circuit can drive up to 50mA if you remove the output LED and replace R5 with 100 ohm resistor. You can also use a 5v relay that has a coil resistance of 100 ohms or greater. An optocoupler is also an option, depending on your design objectives. Please note that this circuit is for entertainment purposes only, and is not intended to be used by the general public or for any critical applications.

Design

Original Circuit

Below is the schematic of the original circuit. The resistors that will be changed are circled. Also the added output stage is enclosed in a dotted line.

9V - 12V Push-on, Push-off, Soft Latch Circuit
9V – 12V Push-on, Push-off, Soft Latch Circuit

5V/USB Version

Below is a schematic of the 5V/USB version, with the improvements.

5V/USB Powered Push-on, Push-off, Soft Latch Circuit
5V/USB Powered Push-on, Push-off, Soft Latch Circuit

Description of Changes

Simply decreasing the voltage of the 12V version resulted in an unstable circuit. Because of the PN junctions of the transistor, the effect of the voltage decrease on key currents in the circuit was in part, non-linear. As well, this changed the time constant of the charging/discharging of the state storage capacitor C1. An additional change was made to one of the components to promote better de-bouncing of the switch. Thus, the following components were changed to accommodate the lower supply voltage.

R1: Changed from 68k to 100k (improved de-bouncing)

R3: Changed from 15k to 10k (maintain Q2 collector current)

R4: changed from 330k to 150k (maintain bias voltage at the base of Q1)

How the Soft-Latch Circuit Works

This circuit is the transistor equivalent of a two-inverter latching circuit where the states of Q1 and Q2 invert with respect to each other upon each button press. Referring the basic circuit diagram, the circuit operates as follows:

Assume that transistor Q2 is “off” (cutoff state). As such, the voltage at the collector of Q2 is very close to 5 volts. This voltage causes enough current to flow through R4 to turn transistor Q1 “on” (saturation state). Since Q1 is “on”, the voltage at its collector will be close to zero volts. Capacitor C1 stores this low voltage value via R1. Since Q2 is “off” the base of Q3 is pulled high, which puts Q3 into saturation, and LED1 is energized. The circuit is now latched in its “on” state.

When the pushbutton is pressed, the low voltage value on C1 causes the base of Q1 to turn “off”. This is because you can’t discharge a capacitor instantaneously. When Q1 is turned “off” the voltage at its collector rises from approximately zero volts, to 0.7 volts, which is the maximum value that the base to emitter junction of Q2 will allow. This action forward biases that junction, and turns Q2 “on”. The voltage at Q2’s collector now drops to approximately zero volts, which causes current to flow through R5. This causes the voltage at the base of Q3 to drop below 0.7v, which turns Q3 off. The LED now has no current flowing through it. The circuit has now latched into its “off” state. Since Q1’s collector is 0.7 volts, capacitor C1 charges to this value via R1.

When the pushbutton is again pressed. The 0.7 volts at capacitor C1 is pushed into Q1’s base – switching it on. Once this happens, Q2 is turned off, and the cycle continues.

Conclusion

The circuit described in this article is that of a 5V powered push-on, push-off soft latch. It can be used to energize a load that draws up to 50mA. This could be a relay, optocoupler, LED, or any load of your choice – depending on your target application. Please note that this circuit is for entertainment purposes only. It is copyrighted and may be used only for personal use.

Please see the matching video for this article on our Youtube Channel below.

5v Soft Latch Circuit on Youtube – BBCircuits

For a better experience building breadboarded circuits, please see the recommended breadboarding equipment and tools page. Also, don’t forget to review the recommended safety procedures to follow when building and testing breadboarded circuits.

Finally, for other interesting breadboarded circuits please visit the home page here or our YouTube channel hereSM

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.