Latching power switch uses momentary pushbutton
Low-current, momentary action pushbutton switches, such as PCB-mount ‘tactile’ types, are cheap, and available in an abundance of different styles. Latching types, on the other hand, are often larger, more expensive, and available only in a relatively limited range of styles. This can be a problem if you need a small, inexpensive switch for latching power to a load. The solution is to convert a pushbutton’s momentary action into a latching function.
Previous Design Ideas have proposed solutions based on discrete components (Ref. 1) and IC-based circuits (Ref.2 and Ref.3). The circuit outlined below, however, requires just two transistors and a handful of passive components to achieve the same result.
The circuit in Figure 1(a) is configured to latch power to a low-side (ground-referred) load. It works in ‘toggle’ mode; that is, the first switch closure applies power to the load, the second removes power, and so on.
To understand how the circuit operates, assume that the DC power supply, +VS, has just been applied, capacitor C1 is initially uncharged, and Q1 is off. The P-channel MOSFET, Q2, is held in its off state by R1 and R3, which work in series to pull the gate up to +VS, such that VGS is zero. The circuit is now in its ‘unlatched’ state, where the load voltage, VL, at the OUT (+) terminal is zero.
If the normally-open push switch is momentarily closed, C1 – being uncharged – pulls Q2’s gate to 0V, thus turning on the MOSFET. The load voltage at OUT (+) now rises immediately toward +VS , and Q1 receives base bias via R4 and turns on. Under these conditions, Q1 saturates and pulls Q2’s gate low via R3, thus holding the MOSFET on when the switch has opened. The circuit is now in its ‘latched’ state, where both transistors are on, the load is energized, and C1 charges up to +VS via R2.
When the switch is momentarily closed for a second time, the voltage on C1 (by now approximately equal to +VS) is transferred to Q2’s gate. Since Q2’s gate-source voltage is now roughly zero, the MOSFET turns off and the load voltage falls to zero. Q1’s base-emitter voltage also falls to zero and the transistor turns off. Therefore, when the switch is released, there is nothing to hold Q2 on, and the circuit reverts to its ‘unlatched’ state, where both transistors are off, the load is de-energized, and C1 discharges via R2.
For more detail: Latching power switch uses momentary pushbutton
This Post / Project can also be found using search terms:
- arduino latch power
- converting momentary switch to latching programming with arduino
- turn led on or off using momentary switch transistors