How to wire up a circuit with a button that cancels other circuits

buttonled

What I really want to do is slightly more complex than this but I can distill it down to the following concept. Let's say I have 4 buttons and 4 LED lights. Each button turns on 1 LED light. If any other lights are on when a button is pressed then they will automatically shut off.

I'm pretty new to electronics so the following will not be using technical terms if you can provide any in the response so I can tell the electronics store what I need that would be appreciated.

Ideally the buttons should be single action buttons i.e. no "down state". Considering that I'm assuming the momentary press of the button will have to trigger some kind of switch to turn the circuit for the LED on so that the LED will stay on. Do these switches exist and if so what are they called? Also can the button press to turn one light on also simultaneously "cancel" the other three switches for the other lights?

EDIT: Alternatively could you explain a way to have two momentary press switches and an LED. Where one switch turns the LED on and another turns it off.

Best Answer

Input selector in one of my amps worked that way (until I blew the chip up and had to recreate the selector since I could not get another chip).

I do not particularly like programming microcontrollers (why else would I make a dual frequency counter with a lot discrete logic chips?), so I always look for a way to avoid using one. enter image description here

I made this with real buttons in mind (so I added debouncing). If you actually want to control this with logic output from some detector or chip (that does not need debouncing) you can get rid of R1-R4 and C2-C5. If your control signal is active low ("0" when the button is pressed) then leave the inverters. If your control signal is active high ("1" when the button is pressed) then you do not need to use U2C-U2F and just connect the control signals to the anodes of D1-D4.

How this works: When "1" appears on the anode of, say, D1, it also goes to the input pin of U1. The flip-flop is triggered by the riding edge of the clock. To allow for the input pin voltages to settle to their final values, a circuit made of U2A, R5, C1 and U2B delay the riding edge by a few ms. Actually, you could probably get rid of R5 and C1 too, the propagation delay of U2A and u2B would probably be enough, but I have no way of testing it without building it.

R7 and C6 reset the flop-flop to "0" (all LEDs off) state when the power is turned on, otherwise at each turn on it would get a random state.