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

How to Use WS2812B White LED: Examples, Pinouts, and Specs

Image of WS2812B White LED
Cirkit Designer LogoDesign with WS2812B White LED in Cirkit Designer

Introduction

The WS2812B White LED is an individually addressable RGB LED that integrates a control circuit and an RGB chip into a single 5050 package component. Its ability to be controlled via a single data line makes it a popular choice for creating custom lighting effects in a wide range of applications, from DIY projects to commercial lighting systems. Common applications include LED strips, full-color displays, and decorative lighting.

Explore Projects Built with WS2812B White LED

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Mega 2560 and Raspberry Pi 4B Controlled WS2812 RGB LED Strip
Image of circuit_image: A project utilizing WS2812B White LED in a practical application
This circuit features an Arduino Mega 2560 microcontroller programmed to control a WS2812 RGB LED strip and a white LED, indicating status or providing user feedback. The Arduino and the LED strip are powered by a common 5V supply, and the circuit includes interfacing with a Raspberry Pi 4B for potential communication or coordination between the two boards.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Interactive LED Game with WS2812B LEDs and OLED Displays
Image of Test: A project utilizing WS2812B White LED in a practical application
This circuit is a game system controlled by an ESP32 microcontroller, featuring 20 WS2812B LEDs, 10 arcade buttons, and two 128x64 OLED displays. The LEDs are used for visual feedback, the buttons for user input, and the displays for showing game information such as score and time. The system runs a game where players interact with the LEDs and buttons, with the ESP32 managing the game logic and user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled WS2812 LED Matrix Display with Resistor
Image of esp32 door sign project: A project utilizing WS2812B White LED in a practical application
This circuit features an ESP32 microcontroller connected to a 32x8 WS2812 LED matrix. The ESP32 controls the LED matrix through a 220-ohm resistor connected to its D12 pin, providing data input to the matrix, while power and ground connections are shared between the ESP32 and the LED matrix.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wi-Fi Controlled LED Strip with Wemos D1 Mini and IKEA Trådfri Driver
Image of WLED Diskbänken: A project utilizing WS2812B White LED in a practical application
This circuit is designed to control a WS2812 RGB LED strip using a Wemos D1 Mini microcontroller running WLED software. The circuit includes an IKEA Trådfri LED driver that converts 24V to 5V via an LM2596 voltage regulator, and an nMOS transistor to switch the LED strip's ground connection. The setup is intended for lighting applications, such as under-cabinet lighting in a kitchen.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with WS2812B White LED

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 circuit_image: A project utilizing WS2812B White LED in a practical application
Arduino Mega 2560 and Raspberry Pi 4B Controlled WS2812 RGB LED Strip
This circuit features an Arduino Mega 2560 microcontroller programmed to control a WS2812 RGB LED strip and a white LED, indicating status or providing user feedback. The Arduino and the LED strip are powered by a common 5V supply, and the circuit includes interfacing with a Raspberry Pi 4B for potential communication or coordination between the two boards.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Test: A project utilizing WS2812B White LED in a practical application
ESP32-Based Interactive LED Game with WS2812B LEDs and OLED Displays
This circuit is a game system controlled by an ESP32 microcontroller, featuring 20 WS2812B LEDs, 10 arcade buttons, and two 128x64 OLED displays. The LEDs are used for visual feedback, the buttons for user input, and the displays for showing game information such as score and time. The system runs a game where players interact with the LEDs and buttons, with the ESP32 managing the game logic and user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of esp32 door sign project: A project utilizing WS2812B White LED in a practical application
ESP32-Controlled WS2812 LED Matrix Display with Resistor
This circuit features an ESP32 microcontroller connected to a 32x8 WS2812 LED matrix. The ESP32 controls the LED matrix through a 220-ohm resistor connected to its D12 pin, providing data input to the matrix, while power and ground connections are shared between the ESP32 and the LED matrix.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of WLED Diskbänken: A project utilizing WS2812B White LED in a practical application
Wi-Fi Controlled LED Strip with Wemos D1 Mini and IKEA Trådfri Driver
This circuit is designed to control a WS2812 RGB LED strip using a Wemos D1 Mini microcontroller running WLED software. The circuit includes an IKEA Trådfri LED driver that converts 24V to 5V via an LM2596 voltage regulator, and an nMOS transistor to switch the LED strip's ground connection. The setup is intended for lighting applications, such as under-cabinet lighting in a kitchen.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Supply Voltage (Vcc): 3.5V to 5.3V
  • Operating Current (per LED): 20mA for each color, 60mA total at full brightness
  • Peak Current (per LED): 80mA
  • Operating Temperature: -40°C to +85°C
  • Viewing Angle: ±120 degrees
  • Wavelength (nm) for RGB:
    • Red: 620-625nm
    • Green: 515-530nm
    • Blue: 465-475nm

Pin Configuration and Descriptions

Pin Number Name Description
1 VDD Power supply (3.5V to 5.3V)
2 DOUT Serial data output
3 GND Ground
4 DIN Serial data input

Usage Instructions

Integration into a Circuit

To use the WS2812B White LED in a circuit:

  1. Connect the VDD pin to a 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the DIN pin to a digital output pin on a microcontroller, such as an Arduino UNO.
  4. If chaining multiple WS2812B LEDs, connect the DOUT pin of the first LED to the DIN pin of the next.

Best Practices

  • Use a capacitor (typically 1000µF, 6.3V) across the power supply pins to prevent voltage spikes.
  • Place a 300 to 500 Ohm resistor on the data line to prevent signal reflection.
  • Ensure a common ground across the WS2812B LEDs and the microcontroller.
  • Avoid powering too many LEDs directly from the Arduino as it may exceed the current limit.

Example Code for Arduino UNO

#include <Adafruit_NeoPixel.h>

#define LED_PIN     6 // Digital output pin connected to the DIN of the LED
#define NUM_LEDS    1 // Number of LEDs in the strip

// Initialize the NeoPixel library.
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin(); // Initialize the strip
  strip.show();  // Initialize all pixels to 'off'
}

void loop() {
  strip.setPixelColor(0, strip.Color(255, 255, 255)); // Set the LED to full white color
  strip.show(); // Update the strip with new settings
  delay(1000); // Wait for a second
  strip.setPixelColor(0, strip.Color(0, 0, 0)); // Turn off the LED
  strip.show();
  delay(1000);
}

Troubleshooting and FAQs

Common Issues

  • LEDs not lighting up: Check power supply and connections. Ensure the data line has the correct resistor in place.
  • Flickering LEDs: This may be due to a poor power supply or long wires causing voltage drops. Use a more stable power source or add a power injection point.
  • Incorrect colors: Verify that the data signal is clean and without interference. Check for correct data encoding in the software.

FAQs

Q: Can I control each LED individually? A: Yes, each WS2812B LED can be controlled individually via the data line.

Q: How many LEDs can I chain together? A: Theoretically, you can chain as many as your power supply can handle. However, the Arduino has a limit on how much current it can source, so external power may be necessary for larger arrays.

Q: Do I need to use a library to control the WS2812B with an Arduino? A: While not strictly necessary, using a library like Adafruit_NeoPixel simplifies the coding process significantly.

Q: How do I calculate the power requirement for my LED strip? A: Multiply the number of LEDs by the current draw per LED at the desired brightness level. For full brightness, each LED can draw up to 60mA.