Figure 9-2 shows a typical RGB LED with the wiring pinout names. There are three pins, one for each color, and one common pin for positive attachment to a power supply. Like the ordinary LED, the positive and negative pins are wired to the positive and negative points of a DC (direct current) circuit. To illustrate, Figure 9-3 shows three SPST (single pole, single throw) switches wired to control red, green, and blue LEDs. Closing the contacts on SPST switch SW1 will allow the battery’s (VBattery) current to flow through the red LED, turning it on. The other switches (SW2 and SW3) will turn on the green and blue LEDs as well. The individual colors can be lit sequentially or at random using the three SPST switches. The Arduino microcontroller will provide a sequential switching order, allowing the red, green, and blue LEDs to turn on accordingly.

A typical RGB LED with pinout names

Figure 9-2. A typical RGB LED with pinout names

Three SPST switches controlling an RGB LED

Figure 9-3. Three SPST switches controlling an RGB LED

TECH NOTE

A common anode RGB LED has all of the positive leads connected together to one lead.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *