Connect with us

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

Discussion in 'LEDs and Optoelectronics' started by felipesalomao, Aug 7, 2013.

Scroll to continue with content
  1. felipesalomao


    Aug 7, 2013
    Power on only green led when toggle switch is on and with toggle switch off, power on only red led

    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:


    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
  2. GreenGiant


    Feb 9, 2012
    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)
  3. Externet


    Aug 24, 2009
    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 :
    (-)-------/\/\/\/-------(C)                      |-------(+)
    Last edited: Aug 7, 2013
  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    Good answer GreenGiant!
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    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.

                                 Red    Switch
                 1k        +-----|>|-----o__o------+
    (+) -------/\/\/\------+                       +---------- (-)
    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.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day