The GMOD-WS2812B is a smart RGB LED module manufactured by PCBCUPID (Part ID: GM006). This module integrates an RGB LED with a built-in driver, enabling individual control of each LED's color and brightness. It operates via a single data line, simplifying wiring and control. The GMOD-WS2812B is widely used in applications such as:
Its compact design and ease of use make it a popular choice for both hobbyists and professionals.
Below are the key technical details of the GMOD-WS2812B:
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5.5V |
Operating Current | ~20mA per LED (at full brightness) |
Communication Protocol | Single-wire (WS2812B protocol) |
LED Color Depth | 24-bit (8 bits per channel: R, G, B) |
Maximum Refresh Rate | 400 Hz |
Operating Temperature | -25°C to +80°C |
Dimensions | 5mm x 5mm (per LED module) |
The GMOD-WS2812B module has three pins, as described in the table below:
Pin Name | Pin Number | Description |
---|---|---|
VDD | 1 | Power supply input (3.3V to 5.5V) |
GND | 2 | Ground connection |
DIN | 3 | Data input for controlling the LED module |
Note: The module also supports chaining multiple LEDs by connecting the
DOUT
pin of one module to theDIN
pin of the next.
VDD
pin to a 5V power source and the GND
pin to ground. Ensure the power supply can handle the total current draw of all LEDs in the chain.DIN
pin to a microcontroller's digital output pin. Use a resistor (330-500Ω) in series with the data line to reduce noise.VDD
and GND
pins to stabilize the power supply.DOUT
pin of one module to the DIN
pin of the next.Below is an example of how to control the GMOD-WS2812B using an Arduino UNO and the Adafruit NeoPixel library:
#include <Adafruit_NeoPixel.h>
// Define the number of LEDs in the chain
#define NUM_LEDS 8
// Define the pin connected to the DIN pin of the GMOD-WS2812B
#define DATA_PIN 6
// Create a NeoPixel object
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin(); // Initialize the LED strip
strip.show(); // Turn off all LEDs initially
}
void loop() {
// Example: Cycle through colors
for (int i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(255, 0, 0)); // Set LED to red
strip.show(); // Update the strip
delay(100); // Wait 100ms
}
delay(500); // Pause before the next cycle
}
Important Notes:
- Install the Adafruit NeoPixel library via the Arduino Library Manager before uploading the code.
- Ensure the Arduino's 5V pin can supply sufficient current for the LEDs. For larger setups, use an external power supply.
LEDs Not Lighting Up
Flickering or Unstable Colors
Only the First LED Works
DOUT
pin of one module and the DIN
pin of the next.Colors Are Incorrect
NEO_GRB
).Can I control the GMOD-WS2812B with a Raspberry Pi?
Yes, the GMOD-WS2812B can be controlled using a Raspberry Pi. Use libraries like rpi_ws281x
for Python.
What is the maximum number of LEDs I can chain? Theoretically, you can chain hundreds of LEDs, but the practical limit depends on the power supply and microcontroller's memory.
Do I need a heatsink for the GMOD-WS2812B? No, the module is designed to operate without a heatsink under normal conditions. However, ensure proper ventilation for large arrays.
By following this documentation, you can effectively integrate the GMOD-WS2812B into your projects and create stunning lighting effects!