Stufin
Home Quick Cart Profile

RGB Led Module for boards compatible with Arduino

Buy Now on Stufin

Component Name

RGB LED Module for boards compatible with Arduino

Description

The RGB LED Module is a compact, surface-mount device designed to provide a convenient and efficient way to add colorful, high-brightness lighting to Arduino-compatible boards and projects. This module combines three individual LEDs, each emitting a primary color (Red, Green, and Blue), to produce a wide range of vibrant colors and hues.

Functionality

The RGB LED Module is designed to be controlled by an Arduino-compatible microcontroller, allowing users to dynamically adjust the color, brightness, and pattern of the LEDs. By sending distinct digital signals to the module, the Arduino board can control the intensity and color of the LEDs, enabling a wide range of applications, including

Ambient lighting

Indicators and notifications

Color-coded status displays

Interactive art installations

Robotics and automation projects

Key Features

  • Tri-Color LEDs: The module features three high-brightness LEDs, each emitting a primary color (Red, Green, and Blue). By combining these colors in various intensities, a wide range of vibrant colors and hues can be produced.
  • Digital Control: The module is designed to be controlled digitally using an Arduino-compatible microcontroller. This allows for precise control over the color, brightness, and pattern of the LEDs.
  • Compact Design: The surface-mount design of the module makes it ideal for compact and space-constrained projects, while the small footprint ensures easy integration into a variety of applications.
  • Easy Connectivity: The module features three male header pins, making it easy to connect to an Arduino-compatible board using standard jumper wires.
  • Power Efficiency: The module is designed to operate at a low power consumption, making it suitable for battery-powered projects and reducing heat generation.
  • High-Brightness Output: The LEDs are capable of producing high brightness levels, making them suitable for applications where high visibility is required.
  • Wide Operating Voltage: The module can operate within a wide voltage range (3.3V to 5V), making it compatible with a variety of power sources and Arduino-compatible boards.

LED Type

Tri-Color (Red, Green, Blue)

LED Brightness

High Brightness (up to 10,000 mcd)

Operating Voltage

3.3V to 5V

Current Consumption

20mA (max)

Dimensions

15mm x 10mm x 5mm

Weight

2g

Header Pins

3-pin male header (VCC, R, G, B)

Datasheet

Available upon request

Example Code

Arduino library and example sketches available for download

Tutorial and Guides

Detailed tutorials and guides available on the manufacturer's website and online forums.

Pin Configuration

  • RGB Led Module for Boards Compatible with Arduino
  • Pin Description:
  • The RGB Led Module is a convenient and compact component designed to work with Arduino-compatible boards. It features four pins, allowing you to control the color and brightness of the LED. Here's a detailed explanation of each pin:
  • Pin Structure:
  • 1. VCC (Voltage Input) Pin:
  • Function: Power supply pin for the module
  • Voltage: Typically 5V, but can operate with 3.3V to 5V
  • Connection: Connect to the VCC pin on your Arduino-compatible board
  • 2. GND (Ground) Pin:
  • Function: Ground pin for the module
  • Connection: Connect to the GND pin on your Arduino-compatible board
  • 3. R (Red) Pin:
  • Function: Controls the red color channel of the LED
  • Connection: Connect to a digital output pin on your Arduino-compatible board (e.g., Pin 9, 10, or 11)
  • 4. G (Green) Pin:
  • Function: Controls the green color channel of the LED
  • Connection: Connect to a digital output pin on your Arduino-compatible board (e.g., Pin 9, 10, or 11)
  • 5. B (Blue) Pin:
  • Function: Controls the blue color channel of the LED
  • Connection: Connect to a digital output pin on your Arduino-compatible board (e.g., Pin 9, 10, or 11)
  • Connection Example:
  • Here's an example of how to connect the RGB Led Module to an Arduino Uno board:
  • VCC Pin -> Arduino Uno's 5V Pin
  • GND Pin -> Arduino Uno's GND Pin
  • R Pin -> Arduino Uno's Digital Pin 9
  • G Pin -> Arduino Uno's Digital Pin 10
  • B Pin -> Arduino Uno's Digital Pin 11
  • Code Example:
  • To control the RGB Led Module, you'll need to use the pinMode() function to set the R, G, and B pins as outputs, and then use the digitalWrite() function to set the states of these pins. Here's an example code snippet:
  • ```cpp
  • void setup() {
  • pinMode(9, OUTPUT); // Set R pin as output
  • pinMode(10, OUTPUT); // Set G pin as output
  • pinMode(11, OUTPUT); // Set B pin as output
  • }
  • void loop() {
  • // Set the LED to red
  • digitalWrite(9, HIGH);
  • digitalWrite(10, LOW);
  • digitalWrite(11, LOW);
  • delay(1000);
  • // Set the LED to green
  • digitalWrite(9, LOW);
  • digitalWrite(10, HIGH);
  • digitalWrite(11, LOW);
  • delay(1000);
  • // Set the LED to blue
  • digitalWrite(9, LOW);
  • digitalWrite(10, LOW);
  • digitalWrite(11, HIGH);
  • delay(1000);
  • }
  • ```
  • In this example, the LED will cycle through the colors red, green, and blue, with a 1-second delay between each color. You can modify the code to achieve different color combinations and effects.

Code Examples

Component Documentation: RGB Led Module for Boards Compatible with Arduino
Overview
The RGB Led Module is a compact, surface-mount device designed for boards compatible with Arduino. This module features a high-brightness RGB LED, which can produce 16,777,216 different color combinations. The module is controlled using three digital output pins, allowing for precise color control and flexibility in various IoT applications.
Technical Specifications
LED Type: High-brightness RGB LED
 Operating Voltage: 5V
 Current Consumption: 20mA (typical)
 Digital Output Pins: 3 (R, G, B)
 Compatible Boards: Arduino Uno, Arduino Mega, Arduino Nano, and other compatible boards
Pinout Diagram
The pinout diagram for the RGB Led Module is as follows:
| Pin | Function |
| --- | --- |
| R | Red LED Control |
| G | Green LED Control |
| B | Blue LED Control |
| VCC | Power Supply (5V) |
| GND | Ground |
Code Examples
### Example 1: Basic RGB LED Control
This example demonstrates how to control the RGB LED module using the Arduino Uno board. The code will cycle through different colors:
```cpp
const int redPin = 9;   // Pin for red LED control
const int greenPin = 10; // Pin for green LED control
const int bluePin = 11;  // Pin for blue LED control
void setup() {
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}
void loop() {
  // Red
  digitalWrite(redPin, HIGH);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, LOW);
  delay(1000);
// Green
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, HIGH);
  digitalWrite(bluePin, LOW);
  delay(1000);
// Blue
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, HIGH);
  delay(1000);
// Yellow
  digitalWrite(redPin, HIGH);
  digitalWrite(greenPin, HIGH);
  digitalWrite(bluePin, LOW);
  delay(1000);
// Cyan
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, HIGH);
  digitalWrite(bluePin, HIGH);
  delay(1000);
// Magenta
  digitalWrite(redPin, HIGH);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, HIGH);
  delay(1000);
}
```
### Example 2: Fade-in/Fade-out Effect
This example demonstrates how to create a fade-in/fade-out effect using the RGB LED module and the Arduino Uno board. The code will gradually increase and decrease the brightness of the LED:
```cpp
const int redPin = 9;   // Pin for red LED control
const int greenPin = 10; // Pin for green LED control
const int bluePin = 11;  // Pin for blue LED control
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, i);
    analogWrite(bluePin, i);
    delay(10);
  }
for (int i = 255; i >= 0; i--) {
    analogWrite(redPin, i);
    analogWrite(greenPin, i);
    analogWrite(bluePin, i);
    delay(10);
  }
}
```
### Example 3: Color Temperature Control (optional)
This example demonstrates how to control the color temperature of the RGB LED module using the Arduino Uno board. The code will gradually change the color temperature from warm white to cool white:
```cpp
const int redPin = 9;   // Pin for red LED control
const int greenPin = 10; // Pin for green LED control
const int bluePin = 11;  // Pin for blue LED control
void setup() {
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}
void loop() {
  for (int i = 0; i < 256; i++) {
    // Warm white (2700K)
    analogWrite(redPin, 255);
    analogWrite(greenPin, 180);
    analogWrite(bluePin, 60);
    delay(10);
// Cool white (6500K)
    analogWrite(redPin, 120);
    analogWrite(greenPin, 220);
    analogWrite(bluePin, 255);
    delay(10);
  }
}
```
Note: The above code examples are for illustration purposes only and may require modifications to suit specific application requirements.