I want to keep my circuit on after a push button is pressed and released. Trying to do this I stumbled upon soft latch circuits, but they are too complex and I don't need the turning off feature. What is the simplest possible way to keep my circuit on after a momentary trigger, like that of a push button?
-
1\$\begingroup\$ Describe what aspects of your search results were 'too complex'. For instance, do you want to avoid adding a mechanical relay? Would you rather use a solid-state (chip) solution? Is you application battery powered? Provide more details to get more results... \$\endgroup\$– Chris KnudsenJun 18, 2020 at 13:02
5 Answers
You can use MOSFETs to build a soft latch circuit.
Q1 is a P-Channel MOSFET. Q2 is an N-Channel MOSFET, resistor values really depend on your requirement (you want a strong or weak pull-up/pull-down resistor?).
When you press the switch SW1, the Q1 will be driven low allowing current to flow, thus driving Q2 up and keeping the Q1 Gate low.
Please note that Q1 and Q2 both have Rds(on), giving a burden voltage. So for a voltage-sensitive load, this may not be suitable.
-
\$\begingroup\$ At power on, will the state of this switch be random (like a bistable circuit made with, say, two not gates) ? \$\endgroup\$– AJNJun 18, 2020 at 15:14
-
1\$\begingroup\$ When the circuit is powered on, the Vout will be guaranteed (by design) to be off until SW1 is pressed. Please note that SW1 should be pressed long enough so the output get latched (longer that mosfet rise time, usually in nanoseconds order) \$\endgroup\$ Jun 19, 2020 at 13:55
I stumbled upon soft latch circuits, but they are too complex and I don't need the turning off feature.
This is the simplest relay contact latch circuit I know of. Basically the closed relay contact self-latches the relay by shorting out the start button. Picture from here.
A simplified schematic of the same idea is this: -
Have you looked at using a one-shot? Also known as a monostable multivibrator, this is a circuit that outputs a single pulse of a set length when it detects a rising or falling edge. You can make it yourself with discrete components (lots of examples on Google), but you can also buy ICs that make it much easier. For example the Analog Devices LTC6993 can output a pulse of a duration from 1 us up to 33 s, after detecting a rising edge. The duration of the pulse can be determined by resistors. See the datasheet here. In the example below the IC is set to output a 16 us pulse on detecting a rising edge.
If your application involves a microcontroller, you can also connect the switch directly to a digital input on the microcontroller and debounce in software (although this probably doesn't meet your "simple" requirement).
Use a readily available, latching 'push-to-on/push-to-off' switch.
Search for 'compact locking push-on/push-off switch for flashlight'.
I don't know if you have a clock in your circuit, but perhaps a T flip-flop might be what you're looking for. On a clock edge, it switches state when there's an input, but if there's no input, then it holds the previous state.