RGB Circuit Board

Welcome to the VTSU Electrical Engineering Technology Dept. webpage for the RGB circuit board. Check out the Main Page for links to EET programs available at VTSU which include courses that cover all the topics below and much more as well and printed circuit board (PCB) and project design. 

Site Manager: contact@vtelabs.com

What does this circuit do?

When you press the buttons on this PCB the LEDs light up red, green, or blue with the corresponding button.

However, LED1 will only illuminate one color at a time while LED2 allows multiple colors to be illuminated to create different colors.


What is an LED?

An LED (Light Emitting Diode) is a semiconductor device that emits light when current flows through it. An LED is basically a PN Junction Diode, which emits light when forward biased. (source: Electronics Hub)

What is the difference between LED1 and LED2?

There is no difference between the LEDs (they are identical parts); the difference is in the circuit design. Both LEDs are  tri-color 5mm LEDs. They combine individual red, blue, and green LEDs in one package. Within the package, each color LED shares a common anode (positive terminal), but the cathode (negative terminal) is exclusive to each color so they can be illuminated independently. That's why these LEDs have 4 legs. Observe this PCB and its circuit in the schematic below (note the component names on the schematic match the labels on the PCB):

Both LED circuits are powered by the same 3-volt coin cell battery but operate separately. For both LEDs each button is connected to the cathode of the corresponding color and the anode is connected to the positive terminal of the battery. When a button is pressed, the cathode of the LED is connected the negative terminal of the battery allowing current to pass through the LED causing it to illuminate. Resistors are included to limit the current through the LEDs to control the brightness and keep them from burning out. The circuit for LED1 uses one resistor to limit current at the anode, and all the LEDs are in "parallel" (forcing all LEDs to a common voltage), while LED2 uses three resistors to limit the current at each cathode (allowing each LED to go to its optimal forward voltage).

As a designer, you have to weigh the pros and cons of every design. The design on the left allows your circuit to show the 3 basic colors but is less expensive (only 1 resistor), but if you want your design to be able to "mix" colors, you must use the circuit on the right.

Why does LED1 only illuminate one color at a time but LED2 allows multiple colors?

Here is a voltage-current graph of each color for the LEDs on this demonstration board. 

This graph was created using a curve tracer which is a machine students use in our lab experiments to characterize semiconductor devices like LEDs.

You only get color mixes on LED2 because:

Each color operates at a different forward voltage and current. So with the circuit for LED1, when multiple buttons are pressed, the LED with the lowest forward voltage will always conduct all the current and the higher voltage LEDs will never see any current (because they are in "parallel"). But with individual series resistor in the circuit for LED2, each branch receives some current. The old adage is true: Current takes the path of least resistance.

How does a resistor limit current in series with an LED?

Ohm's Law states that Resistance equals Voltage divided by Current, or R=V/I. 

When an LED in series with a resistor is connected to a voltage source, the forward current can be chosen by calculating the size of the resistor using Ohm's Law.

The LED's forward voltage (Vf) at a certain forward current (If) is determined by the voltage-current curve which can be found in the manufacturers datasheet. 

The supply voltage (Vs) minus (Vf) at the current we want to operate at (If) equals the voltage across the resistor. 

Because current through a circuit is the same for all devices in series, (If) is the same through the resistor and the LED.

Therefore R=(Vs-Vf)/If

(source: Electronics Tutorials)

The amount of current through an LED determines it's brightness. Unlike a resistor, because LED's are semiconductor devices the voltage across the LED is not linear relative to the current. The current through an LED is referred to as the Foward Current (If). The voltage across an LED at a specific forward current is referred to as Foward Voltage (Vf). 20mA is a common operating current rating for LEDs in a 5mm package.

(source image: Electronics Tutorials)

LEDs that emit different wavelengths of light (or colors) are created by using several semiconductor compounds such as Gallium Arsenide (GaAs), Gallium Phosphide (GaP), Gallium Arsenide Phosphide (GaAsP), Silicon Carbide (SiC) or Gallium Indium Nitride (GaInN). 

This is why different color LEDs have different operating characteristics.

Here are typical operating characteristics for some LED colors:

Check out this great video on the creation of the blue LED from Veritasium on YouTube: