May 2015
Is there a simple circuit that would allow a normally open pushbutton to turn on a relay when pressed, and then turn it off when pressed again?
Please log in to post an answer.
When the circuit is first energized, C charges to 1/2 Vcc through voltage divider R1/R2. When the button S1 is pushed, C discharges through the relay coil. It pulls in, and the relay is held closed by the current through R1 and the relay coil. When the button is pushed again, C, now fully discharged by R2, goes across the relay coil making it drop out and returning the circuit to where it started.
It’s funny you should post this request. I just happen to have an article submitted to Nuts and Volts utilizing this exact same situation that will hopefully be appearing in an upcoming issue!
In the meantime, here is the (modified) relevant portion of the schematic as you requested. The 74LS109 is a J-K Positive-Edge Triggered Flip-Flop. The input is tied to normally tied to ground, but when you press the switch that input is momentarily brought high, triggering the flip-flop, toggling the relay between it’s on and off states. R2 and C1 are to debounce the switch and prevent multiple false inputs.
Use the push button switch to toggle a JK flip-flop.
It can't get any simpler than two resistors, one capacitor, and the relay.
Look into a switch debouncer such as the MAX6816 and JK, or T flip-flops to drive the gate of a low side switch on your relay. The output of the switch debouncer could drive the clock of a T, or properly configured JK, flip-flop. Don’t forget the protective diode across the relay in order to clamp the voltage when turning the relay on/off. I hope this helps.
Here are two circuits that should do want you want: Grove-2 @10 from: www.seeedstudio.com (YES, there are 3 e’s) Cebek I-9 @ $4 from www.mcmelectronics.com
Also, there are a variety of electro-mechanical relays available at many sources. These do not need a circuit to latch but when the relay is activated, it toggles a switch from off to on.