I have tried Jasser's solution to toggle LED's using a single transistor at "Use transistors for controlling two LEDs"
Aim is to use it as a power indicator, using a 3 legged bi-color LED (red=off, green=on), but I fail to see the feasability.
The red and green (separate) LEDS have already been switched and I understand the math to put the right resistors in. This much works! I'm lost when it comes to the bi-colour LED's common cathode.
Any suggestions? Common anode perhaps? Or PNP?
Rephrase:
In a model railroad I want to be able to choose between a traditional AC transformer (powersupply 1) or digital control (powersupply 2).
The switch (rotation) that I'm using for this has 2 separate channels:
- one is used to power the rails,
- the other could be used to indicate which powersupply was selected.
I plan to use either +3.3 or +5V DC (not decided yet) to drive bi-colour LEDS (to save space).
I want both leds to always be on (either red or green). A simpler solution to only power the "selected" led wouldn't properly visualise which powersupply was selected in a when in the dark. Basically, a LED should be red, unless selected (powered) by the switch (=green).
The original scheme worked for me when using separate LED's for red and green, but when I tied the cathodes together to simulate a bi-color LED, powering green did not switch off red. The new scheme works for me!