One of my friend needed a three color indicator(as shown in the picture) for his underground parking lot management system. However, the original hardware has only two wires(including power) that can be spared for the indicating light.
However, I found a similar product which uses a very smart design to achieve this function. The schematic is as shown in the following figure.
The trick is a voltage detecting circuit consists of two transistors Q1 and Q2. If the supplied voltage is lower than 3.5 volt, Q1 will conduct and excites Green LEDs (The red LEDs are inseries, 3.5volt is two low for them to conduct.)
If the supplied voltage is higher than 3.5volt, let’s say 5 volts. Q2 will conduct, and Q1 blocked. Green LEDs will be shutdown, and red leds have gained enough voltage to conduct.
Flip the voltage poles, Blue LEDs will conduct.