Electronic – Control RGB LED without microcontroller

555ledrgbtransistors

I have an RGB LED that I'd like to change from green to red when a circuit is completed. While I know this is very simple with tools like an Arduino, I'd love to not use a microcontroller. Would it be possible using basic components (which can certainly include transistors, diodes or even common ICs like a 555 timer) to achieve this? If so – how would I connect the components?

Clarification: I'm using a common anode RGB LED (a lead for each color plus ground – four in total). I'd like to have it be green when a switch somewhere in the circuit is open (not connected) and red when the switch is closed. The switch is not connected to anything else.

Best Answer

This is the simplest circuit I can think of (2 parts):-

schematic

simulate this circuit – Schematic created using CircuitLab

Input = 5V Red Input = 0 Green

The circuit works because the \$V_F\$ of a Red LED is generally much less than the \$V_F\$ of a Green or Blue LED.

Here is a typical RGB LED datasheet:

And here are the typical plots of \$V_F\$ vs. current:

enter image description here

When the transistor is "off", the Green LED will have a forward voltage of about 3.0V at 10mA. When the transistor is "on", the Red LED will have a forward voltage of less than 1.9V. Referring back to the Blue/Green graph, little current will flow through the Green LED at that forward voltage.

This particular arrangement shows a common-cathode arrangement, however it could be flipped and a similar P-channel MOSFET used. In that case, 0V would select the Red LED, and +V in would select the Green LED.