Toggling Lights with a push button

Thread Starter

teenflon5

Joined Apr 19, 2021
27
Hello,

I'm working on a little project to power some old Airbus overhead lights using LEDs and the built in push buttons, however I'm a little stuck on the solution for this.

Essentially the unit has momentary push buttons for toggling the lights on and off. I intend to power some LEDs and toggle them on and off using the existing buttons, but I dont know the right approach.

I tried thinking of using an S/R latch to toggle the LEDs on or off, however connecting the S and R pins to the button at the same time didnt really work, I tried putting some gates in between but that just made things worse!

There must be a simple solution to toggle an output based on pressing momentary push buttons but I'm not aware whats out there. Is there a simple IC or component that can do this?

Thanks
 

Ya’akov

Joined Jan 27, 2019
9,069
You need a bistable multivibrator—that is, a flip-flop. Or, a latching relay.

The advantage of the latter is that power is not consumed when except to change state.
 

crutschow

Joined Mar 14, 2008
34,281
With a flip-flop, you also need a debounce circuit to ignore any contact bounce from the mechanical push-button switch.

LTspice simulation below, of such a circuit using a FF, as mentioned in posts 2 and 3:
R1C1 delays the feedback to the D input (red trace) which prevents more than one output change-of-state (green trace) per button push (as shown by the simulated switch bounces for the first push (yellow trace).

1621947968717.png
 

Ian0

Joined Aug 7, 2020
9,667
You can do it with a couple of inverters (or nand gates or nor gates) like this:
Untitled 1.pngThe switch is a momentary type. (I couldn't find the right symbol in SPICE)
 

eetech00

Joined Jun 8, 2013
3,858
Hello,

I'm working on a little project to power some old Airbus overhead lights using LEDs and the built in push buttons, however I'm a little stuck on the solution for this.

Essentially the unit has momentary push buttons for toggling the lights on and off. I intend to power some LEDs and toggle them on and off using the existing buttons, but I dont know the right approach.

I tried thinking of using an S/R latch to toggle the LEDs on or off, however connecting the S and R pins to the button at the same time didnt really work, I tried putting some gates in between but that just made things worse!

There must be a simple solution to toggle an output based on pressing momentary push buttons but I'm not aware whats out there. Is there a simple IC or component that can do this?

Thanks
Questions:
1. Supply voltage?
2. Output Load (LED current/voltage)?
3. Two buttons or one (for each LED)?
4. button type (1NO?, 1NO+1NC?) or?
5. Retrofit existing wired buttons and LED's? or new?
 

Thread Starter

teenflon5

Joined Apr 19, 2021
27
I finally have come back to this project and want to try and finish it! Thanks all for the suggestions, at the time I also ordered some relays, (SRD-05VDC-SL-C), I seem to remember seeing somewhere that it was possible to use these as a latching flip flop to change an output to on/off based on a momentary pushbutton, however I'm not sure what pins or circuit would be required to make this work. Does anyone know a way to do this or shall I look at other solutions?

I have all the rest of the electronics sorted, it will work of 5v supply with 135ma for each LED (10 ohm resistor for each LED + 27 ohm from the COB LED), just need to figure out this latching switch.
 

djsfantasi

Joined Apr 11, 2010
9,156
A D type flip flop, like a CD4013, can be easily made into a toggle flip flop.
E188DEA2-7C6A-45FA-96E9-4DF8BACC765E.gif
The momentary switch is wired to the CK (or clock) input. The output can either be the Q or ~Q output.

As mentioned before, the push button must be denounced. And the input to CK should be normally low. Depending on how you debounce, you may need a pull-down resistor.

Edit: Tie the unused inputs on the CD4013 to ground.

Edit 2: Don’t exceed the output current limits. You probably need a transistor/MOSFET to drive your lights.

Edit 3: Missed post #5. That’s a complete solution using a CD4013
 
Last edited:

Thread Starter

teenflon5

Joined Apr 19, 2021
27
I have the circuit using 2 relays and one button, i,e, flip-flop.
i.e. No IC;'s.
Yes I’d like to see that too, if I can avoid using an IC that would be easier, but if not will use the D flip flop mentioned above. To me this must be a very common problem with a simple solution but I suppose push buttons are generally used with some sort of IC! I could try and figure out the electronics that were previously used on the overhead light panel but it looks extremely complicated!
 

dl324

Joined Mar 30, 2015
16,845
Here's something to consider from Popular Electronics April 1977:
alternateActionSw.jpgalternateActionSwDesc.jpg
Add an N channel MOSFET to the output to drive the LEDs low side or a P channel MOSFET to drive them high side.
 
Top