I built this latching switch circuit: https://www.edn.com/design/power-management/4427218/Latching-power-switch-uses-momentary-pushbutton
When I connected it to my project (~140 LEDs) I found that I could switch the circuit on but (often) not off. A more careful reading of the article told me that this is expected because "If the load impedance contains active devices such as LEDs, the load voltage at the instant Q2 turns off may be large enough to bias Q1 on via R4, thereby preventing the circuit from turning off properly. The presence of R5 pulls the OUT (+) terminal down to 0V when Q2 turns off, thus ensuring that Q1 turns off rapidly, and allowing the circuit to revert to its unlatched state in a proper manner."
I swapped out the 10K on R5 for 5K and the switch works reliably with my project, but I don't understand this explanation. What was happening when I pressed the button but the circuit didn't turn off?
- Vs = approx. 4.5V from three alkaline AA batteries
- Q1 = BC847C NPN transistor
- Q2 = TSM2307CX P-channel mosfet
- load = several strings of LEDs, in parallel. Strings are one colour of either white, blue or purple. They are different lengths (20-50 LEDs). I added a 15R to each of the longer strings because that's what I found in the original battery boxes that I removed, and a 56R to each of the shorter ones so they'd have roughly similar brightness.