Maker Pro
Maker Pro

power on 2 leds (red or green) on toggle switch (2 positions: on and off)

Goal:
Power on only green led when toggle switch is on and with toggle switch off, power on only red led

Problem:
When toggle switch is on, both green and red leds power on at same time, this way light is about orange color, when power switch is off, it works perfectly, with only red led on, i know that problem in in middle pin when conect red light together negative signal, but i dont know how to solve it, if you can, please try make more simple solution possible, because i will have to repeat this on several power switches, thanks a lot

See diagram bellow of what i tried:

diagram.png


i am from brazil and my english isnt too much good, if not understood my problem, answer me that i will try explain better.. Thanks for help
 
The problem is that your red is always being powered, when you switch it so that both are on you are connecting them.

What you want to do it move the connection from the red leg 1K resistor to the top connection of the switch and connect the return (black wire from the power supply) to the center pin on the switch.

This will give you either red on, or green on (this is if it is a spdt switch meaning when it is "on" there is a connection between one leg and the center, and when it is "off" there is a connection between the other leg and the center)
 
Felipe :
The switch on your drawing has 3 pins. The central pin is called common (C). The others are normally closed (NC) and normally open (NO).

Connect -12 to one end of a single 1K resistor and the other end of the resistor to (C)
Connect the red led cathode to NC
Connect the green led cathode to NO
Connect the led anodes to + 12V

That is it :
Code:
                        (NO)---------------|<|---
(-)-------/\/\/\/-------(C)                      |-------(+)
                        (NC)---------------|<|---
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
There is another trick. If the red and green are swapped over and a single resistor is placed in series with the common anode, the green LED will be turned on when the red LED is powered. The lower Vf of the red LED will be insufficient to light the green one.

That's theory, in practice the green LED will likely turn on a little.

Code:
                             Red    Switch
             1k        +-----|>|-----o__o------+
(+) -------/\/\/\------+                       +---------- (-)
                       +-----|>|---------------+
                            Green

This trick will work far better with red/blue or red/white where the difference in Vf is much greater (but it sounds like you're using a combined red/green LED.
 
Top