Maker Pro
Maker Pro

Simple light toggle design.

Hi,

I'm new to the electronics world, so i am still overwhelmed when i'm trying to design... Well, anything really.

I need help to design a project i'm about to start.

To improve the experience of a card game, i'm building a table with built in lights. The lights need to change colour when a player has an advantage over the other.

So i will have a set of red LEDs and blue LEDS, and both players must have a switch that can toggle between the two. (Its important that each button can select between both red and blue LEDs)

I have no idea how to route this.

Any help?
 

Harald Kapp

Moderator
Moderator
Welcome Lewis to our forum.

Your idea can be realized with a simple Toggle Flipflop. A Toggle Flipflop in turn can be easily built from a D-Flipflop or a JK-Flipflop. Both buttos are in parallel and connected to the clock input. Whenever a button is pressed, the Flipflop will toggle and another set of LEDs will light. Here is the basic schematic (you'll have to elaborate detailed part values):
toggle-png.13652

V1 is your power supply, e.g. 5V
R6 ensures a defined low on the clock input when the button is not pressed.
R5, C1 are a low pass filter to debounce the button.
The Flipflop can be e.g. one out of two in a 74HC74. In this case tie CLR and PRE (SD and RD in the datasheet) to Vcc. Tie alll unused inputs of the second Flipflop in the 74HC74 to GND or VCC, do not leave inputs open.
R3 and R4 limit the current through the LEDs, read our tutorial on how to design these resistors.
Q1 and Q2 can be any general purpose NPN transistor as long as it is suitable for the currrent you want to drive through the LEDs.
R1 and R2 limit the current into the base of the transistors Q1 and Q2. R1 should be approximately R3/50, R2=R4/50, depending on the DC gain of the transistor.
 

Attachments

  • toggle.png
    toggle.png
    235.1 KB · Views: 237
Last edited:
A ubiquitous 555 in it's bistable configuration is another option. Each player would have two momentary switches, one for red and one for blue corresponding to the set and reset inputs of the bistable.
 
Just popping back to update.
It was extremely simple, I have no idea how I didn't see this before.
If player 1 has a SPDT switch, and player 2 has a DPDT switch, I can route the power like this...


LED switchover.jpg
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
you need a resistor in the circuit somewhere to limit the led current. Preferably you'd use two, one in series with each led.
 
Top