Everything for Electronics

Tech Forum





May 2015

On/Off Circuit

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?

#5153
Isaac Wright
Maumee, OH



Answers

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.

Mike Callaghan
via email

In essence, this is a flip-flop. Push the button and the state of the flip-flop will change. Adjust the values to your needs.

Al Jaszek
Needham, MA

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.

Derek Tombrello
Columbiana, AL

Use the push button switch to toggle a JK flip-flop.

Lance Corey
via email

It can't get any simpler than two resistors, one capacitor, and the relay.

Mike Callaghan
La Crescenta, CA

Here is a simple circuit that can be used to toggle a relay using one switch. A relay with a 12 VDC is used however the relay contacts can control a larger voltage if needed.

Craig Kielhofer
Wheeling, IL

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.

Justin J
King City, CA

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.

Michael Herman
LaQuinta, CA