RGB LED with Arduino

In this project we are going to interface 5 RGB (Red Green Blue) LEDs to Arduino Uno. These LEDs are connected in parallel for reducing PIN usage of Uno. Arduino-RGB-LED

The RGB LED will have four pins as shown in figure.

PIN1: Color 1 negative terminal or color 1 positive terminal

PIN2: Common positive for all three colors or common negative for all three colors

PIN3: Color 2 negative terminal or color 2 positive terminal

PIN4: Color 3 negative terminal or color 3 positive terminal

RGB-LED-Pins

So there are two types of RGB LEDs, one is common cathode type (common negative) and other is common anode type (common positive) type. In CC (Common Cathode or Common Negative), there will be three positive terminals each terminal representing a color and one negative terminal representing all three colors. The internal circuit of a CC RGB LED can be represented as below.Common-Cathode-RGB-LED

If we want RED to be on in above, we need to power the RED LED pin and ground the common negative. The same goes for all the LEDs. In CA (Common Anode or Common Positive), there will be three negative terminals each terminal representing a color and one positive terminal representing all three colors. The internal circuit of a CA RGB LED can be represented as shown in figure..

If we want RED to be on in above, we need to ground the RED LED pin and power the common positive. The same goes for all the LEDs.

In our circuit we are going to use CA (Common Anode or Common Positive) type. For connecting 5 RGB LEDs to Arduino we need 5×4= 20 PINS usually, by we are going to reduce this PIN usage to 8 by connecting RGB LEDs in parallel and by using a technique called multiplexing.

Components

Hardware: UNO, power supply (5v), 1KΩ resistor (3 pieces), RGB (Red Green Blue) LED (5 pieces)

Software: Atmel studio 6.2 or Aurdino nightly.

Read More:  RGB LED with Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top