5mm RGB LED Common Cathode Diffuse (Pack of 10)
5mm RGB LED Common Cathode Diffuse (Pack of 10)
The 5mm RGB LED Common Cathode Diffuse is a type of light-emitting diode (LED) component that emits a colorful light when an electric current passes through it. This component is specifically designed for use in a variety of applications, including IoT projects, robotics, automotive, and industrial control systems.
The 5mm RGB LED Common Cathode Diffuse component serves as a visual indicator or display device, emitting a range of colors depending on the input signals. The LED has three internal light-emitting diodes, each corresponding to the red, green, and blue (RGB) colors, which can be combined to produce a wide spectrum of colors. The LED can be used to indicate device status, provide visual feedback, or create colorful lighting effects in various applications.
Forward Voltage (Vf) | Red: 1.8-2.2V, Green: 2.8-3.2V, Blue: 3.2-3.8V |
Forward Current (If) | 20mA |
Red | 620-630nm, Green: 520-530nm, Blue: 460-470nm |
Red | 100-150mcd, Green: 150-200mcd, Blue: 100-150mcd |
120
-30C to 85C
-40C to 100C
The 5mm RGB LED Common Cathode Diffuse component is suitable for use in a wide range of applications, including |
IoT projects and prototypes
Robotics and automation systems
Automotive lighting and signaling systems
Industrial control systems and indicators
Home automation and smart lighting systems
Wearable electronics and fashion technology
When handling the LED, avoid touching the component with bare hands, as the oils from the skin can damage the LED. Use gloves or anti-static wrist straps to handle the component.
Ensure proper electrical connections and avoid overloading the LED with excessive voltage or current, as this can lead to premature failure.
Follow proper mounting and soldering procedures to ensure reliable operation and longevity of the LED.
Component Documentation: 5mm RGB LED Common Cathode Diffuse (Pack of 10)
Overview
The 5mm RGB LED Common Cathode Diffuse is a through-hole LED component that combines three individual LEDs (red, green, and blue) into a single package. The common cathode configuration allows for easy connection to a microcontroller or other digital circuitry. This component is suitable for various IoT applications, such as status indicators, lighting effects, and decorative displays.
Pinout
The 5mm RGB LED Common Cathode Diffuse has four pins:
Pin 1: Red LED Anode
Pin 2: Green LED Anode
Pin 3: Blue LED Anode
Pin 4: Common Cathode
Technical Specifications
Operating Voltage: 2.0-3.8V
Operating Current: 20mA per LED
Luminous Intensity: 100-150mcd per LED
Viewing Angle: 30
Operating Temperature: -25C to 85C
Example 1: Basic RGB LED Control using Arduino
In this example, we will demonstrate how to control the 5mm RGB LED Common Cathode Diffuse using an Arduino Uno board.
```c
const int redPin = 9; // Pin for red LED
const int greenPin = 10; // Pin for green LED
const int bluePin = 11; // Pin for blue LED
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Set the LED to display different colors
setColor(255, 0, 0); // Red
delay(1000);
setColor(0, 255, 0); // Green
delay(1000);
setColor(0, 0, 255); // Blue
delay(1000);
setColor(255, 255, 0); // Yellow
delay(1000);
}
void setColor(int redValue, int greenValue, int blueValue) {
analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);
}
```
Example 2: RGB LED Fade Effect using ESP32
In this example, we will demonstrate how to create a fade effect using the 5mm RGB LED Common Cathode Diffuse and an ESP32 development board.
```c
#include <WiFi.h>
const int redPin = 18; // Pin for red LED
const int greenPin = 19; // Pin for green LED
const int bluePin = 21; // Pin for blue LED
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
for (int i = 0; i < 256; i++) {
analogWrite(redPin, i);
analogWrite(greenPin, 255 - i);
analogWrite(bluePin, i);
delay(10);
}
for (int i = 255; i >= 0; i--) {
analogWrite(redPin, i);
analogWrite(greenPin, 255 - i);
analogWrite(bluePin, i);
delay(10);
}
}
```
Example 3: Simple LED Animation using Raspberry Pi (Python)
In this example, we will demonstrate how to create a simple LED animation using the 5mm RGB LED Common Cathode Diffuse and a Raspberry Pi.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
redPin = 17
greenPin = 23
bluePin = 24
GPIO.setup(redPin, GPIO.OUT)
GPIO.setup(greenPin, GPIO.OUT)
GPIO.setup(bluePin, GPIO.OUT)
while True:
GPIO.output(redPin, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(redPin, GPIO.LOW)
GPIO.output(greenPin, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(greenPin, GPIO.LOW)
GPIO.output(bluePin, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(bluePin, GPIO.LOW)
```
Precautions and Handling
When handling the 5mm RGB LED Common Cathode Diffuse, avoid touching the pins or the LED body to prevent damage from static electricity.
Ensure proper voltage and current ratings are maintained to prevent overheating or damage to the component.
Use a breadboard or PCB with adequate spacing to prevent short circuits between pins.