Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 5 mm RGB LED, Common Cathode (R-G-B Pin Order): Examples, Pinouts, and Specs

Image of 5 mm RGB LED, Common Cathode (R-G-B Pin Order)
Cirkit Designer LogoDesign with 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in Cirkit Designer

Introduction

The 5 mm RGB LED, Common Cathode, is a versatile light-emitting diode that combines red, green, and blue LEDs into a single package. This component allows users to create a wide range of colors by adjusting the intensity of each LED. The "common cathode" configuration means that all three LEDs share a single cathode (negative) pin, while the anodes (positive pins) are separate for each color.

Explore Projects Built with 5 mm RGB LED, Common Cathode (R-G-B Pin Order)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi Controlled RGB LED Array
Image of LED Bank Project: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
This circuit consists of multiple RGB LEDs connected to a Raspberry Pi 5. The common cathode (COM) pins of the LEDs are connected to the ground (GND) of the Raspberry Pi, while the individual red (R), green (G), and blue (B) pins are grouped and interconnected, allowing for synchronized color control across the LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Controlled RGB LED Light Show
Image of Controlling RGB LED With Arduino UNO: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
This circuit controls a common cathode RGB LED using an Arduino UNO microcontroller. The Arduino cycles through various colors by adjusting the intensity of the LED's red, green, and blue channels through PWM on pins D5, D6, and D7, each connected to an LED anode via a 220-ohm resistor. The purpose of the circuit is to demonstrate the creation of different colors by mixing red, green, and blue light in varying intensities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi LED Control System
Image of IOT: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
This circuit consists of multiple LEDs (red, yellow, and green) connected to a Raspberry Pi 5, with each LED's anode connected to a specific GPIO pin and all cathodes tied to the ground. The Raspberry Pi is programmed to control the LEDs, although the provided code does not specify any particular behavior.
Cirkit Designer LogoOpen Project in Cirkit Designer
Interactive RGB LED Control Circuit with Pushbuttons
Image of rgb circuit: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
This circuit features a 9V battery connected to a voltage regulator, which likely steps down the voltage to a lower level suitable for driving an RGB LED. Three pushbuttons are connected to the output of the voltage regulator, each controlling one color channel (red, green, and blue) of the RGB LED. A resistor is connected in series with the common cathode of the RGB LED to limit the current through the LED.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 5 mm RGB LED, Common Cathode (R-G-B Pin Order)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of LED Bank Project: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
Raspberry Pi Controlled RGB LED Array
This circuit consists of multiple RGB LEDs connected to a Raspberry Pi 5. The common cathode (COM) pins of the LEDs are connected to the ground (GND) of the Raspberry Pi, while the individual red (R), green (G), and blue (B) pins are grouped and interconnected, allowing for synchronized color control across the LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Controlling RGB LED With Arduino UNO: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
Arduino UNO Controlled RGB LED Light Show
This circuit controls a common cathode RGB LED using an Arduino UNO microcontroller. The Arduino cycles through various colors by adjusting the intensity of the LED's red, green, and blue channels through PWM on pins D5, D6, and D7, each connected to an LED anode via a 220-ohm resistor. The purpose of the circuit is to demonstrate the creation of different colors by mixing red, green, and blue light in varying intensities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IOT: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
Raspberry Pi LED Control System
This circuit consists of multiple LEDs (red, yellow, and green) connected to a Raspberry Pi 5, with each LED's anode connected to a specific GPIO pin and all cathodes tied to the ground. The Raspberry Pi is programmed to control the LEDs, although the provided code does not specify any particular behavior.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of rgb circuit: A project utilizing 5 mm RGB LED, Common Cathode (R-G-B Pin Order) in a practical application
Interactive RGB LED Control Circuit with Pushbuttons
This circuit features a 9V battery connected to a voltage regulator, which likely steps down the voltage to a lower level suitable for driving an RGB LED. Three pushbuttons are connected to the output of the voltage regulator, each controlling one color channel (red, green, and blue) of the RGB LED. A resistor is connected in series with the common cathode of the RGB LED to limit the current through the LED.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Decorative lighting and displays
  • Status indicators
  • DIY electronics projects
  • Color mixing experiments
  • Arduino and microcontroller-based projects

Technical Specifications

  • Package Size: 5 mm
  • Configuration: Common Cathode
  • Forward Voltage:
    • Red: 2.0V - 2.4V
    • Green: 3.0V - 3.4V
    • Blue: 3.0V - 3.4V
  • Forward Current: 20 mA (per color)
  • Viewing Angle: 20° - 30°
  • Pin Order: Red (R), Green (G), Blue (B), Cathode (-)

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 Red (R) Positive terminal for the red LED
2 Cathode Common negative terminal for all LEDs
3 Green (G) Positive terminal for the green LED
4 Blue (B) Positive terminal for the blue LED

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the Cathode: Connect the cathode pin (Pin 2) to the ground (GND) of your circuit.
  2. Connect Resistors: Use current-limiting resistors (typically 220Ω to 330Ω) for each color pin (R, G, B) to prevent excessive current from damaging the LEDs.
  3. Control the Colors: Apply a voltage to the red, green, and blue pins to light up the respective LEDs. By varying the voltage or using pulse-width modulation (PWM), you can mix colors to achieve the desired output.

Important Considerations and Best Practices

  • Resistor Selection: Always use appropriate resistors to limit current. Calculate the resistor value using Ohm's Law:
    ( R = \frac{V_{supply} - V_{forward}}{I_{forward}} ),
    where ( V_{supply} ) is the supply voltage, ( V_{forward} ) is the forward voltage of the LED, and ( I_{forward} ) is the desired current (e.g., 20 mA).
  • Heat Management: Avoid exceeding the maximum current rating to prevent overheating.
  • Polarity: Ensure correct polarity when connecting the LED. Reversing the polarity may damage the component.
  • PWM Control: Use PWM signals from a microcontroller (e.g., Arduino) to control brightness and mix colors dynamically.

Example: Connecting to an Arduino UNO

Below is an example of how to connect and control the 5 mm RGB LED using an Arduino UNO.

Circuit Diagram

  • Connect the cathode pin (Pin 2) to GND on the Arduino.
  • Connect the red, green, and blue pins (Pins 1, 3, and 4) to Arduino digital pins 9, 10, and 11, respectively, through 220Ω resistors.

Arduino Code

// Define the RGB LED pins
const int redPin = 9;   // Red LED connected to pin 9
const int greenPin = 10; // Green LED connected to pin 10
const int bluePin = 11;  // Blue LED connected to pin 11

void setup() {
  // Set the RGB pins as outputs
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}

void loop() {
  // Example: Cycle through red, green, and blue colors
  setColor(255, 0, 0); // Red
  delay(1000);         // Wait 1 second
  setColor(0, 255, 0); // Green
  delay(1000);         // Wait 1 second
  setColor(0, 0, 255); // Blue
  delay(1000);         // Wait 1 second
  setColor(255, 255, 0); // Yellow (Red + Green)
  delay(1000);           // Wait 1 second
  setColor(0, 255, 255); // Cyan (Green + Blue)
  delay(1000);           // Wait 1 second
  setColor(255, 0, 255); // Magenta (Red + Blue)
  delay(1000);           // Wait 1 second
  setColor(255, 255, 255); // White (Red + Green + Blue)
  delay(1000);             // Wait 1 second
}

// Function to set the RGB LED color
void setColor(int redValue, int greenValue, int blueValue) {
  analogWrite(redPin, redValue);   // Set red brightness (0-255)
  analogWrite(greenPin, greenValue); // Set green brightness (0-255)
  analogWrite(bluePin, blueValue);  // Set blue brightness (0-255)
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. LED Not Lighting Up:

    • Cause: Incorrect polarity or loose connections.
    • Solution: Double-check the wiring and ensure the cathode is connected to GND.
  2. Dim or Flickering Light:

    • Cause: Insufficient current or poor connections.
    • Solution: Verify resistor values and ensure secure connections.
  3. Incorrect Colors:

    • Cause: Miswiring of the RGB pins.
    • Solution: Confirm the pin connections match the pin order (R-G-B).
  4. Overheating:

    • Cause: Excessive current through the LEDs.
    • Solution: Use appropriate resistors to limit current.

FAQs

  • Q: Can I use the RGB LED without resistors?
    A: No, resistors are essential to prevent excessive current, which can damage the LEDs.

  • Q: How do I create custom colors?
    A: Use PWM to adjust the brightness of each color channel. Combine different intensities of red, green, and blue to achieve the desired color.

  • Q: Can I control the RGB LED with a 3.3V microcontroller?
    A: Yes, but ensure the forward voltage of each LED is compatible with the 3.3V supply. Adjust resistor values accordingly.

  • Q: What is the lifespan of the RGB LED?
    A: With proper usage (e.g., current limiting), the LED can last for tens of thousands of hours.

This concludes the documentation for the 5 mm RGB LED, Common Cathode.