The WS28xx (WorldSemi) series consists of addressable RGB LEDs that integrate a driver IC and LED chips into a single package or circuit. These LEDs allow for individual control of color and brightness through a single-wire digital signal, making them popular for custom lighting projects.
The SK6812 is an individually addressable LED driver IC often considered the direct successor or “upgraded version” of the WS2812B. While it shares the same single-wire control protocol, it introduces a dedicated fourth channel for true white light (RGBW) and operates at a higher PWM frequency for smoother dimming.
Code Compatibility
If you swap a WS2812B (RGB) strip for an SK6812 (RGBW) strip, you must update your code. The controller needs to send 32 bits instead of 24. If you don't, the colors will “shift” down the line, appearing as static or incorrect.
Popular WS28xx Models
The series uses a common communication protocol, but models vary in voltage, control accuracy, and reliability.
Technical Comparison
| Feature | WS2811 | WS2812B | WS2813 | WS2815 | SK6812 |
|---|---|---|---|---|---|
| Voltage | 12V / 24V | 5V | 5V | 12V | 5V (mostly) |
| Color Channels | 3 (RGB) | 3 (RGB) | 3 (RGB) | 3 (RGB) | 4 (RGB + White) |
| Data Length | 24-bit per pixel | 24-bit per pixel | 24-bit per pixel | 24-bit per pixel | 32-bit per pixel |
| PWM Frequency | ~400 Hz | ~400 Hz | ~2.0 kHz | ~2.0 kHz | ~1.2 kHz |
| Addressability | 3-LED segments | Individual | Individual | Individual | Individual |
| Backup Data | No | No | Yes (Dual signal) | Yes (Dual signal) | No |
| White Quality | Mixed (Blue-ish) | Mixed (Blue-ish) | Mixed (Blue-ish) | Mixed (Blue-ish) | Pure (Dedicated chip) |
| IC Location | External | Built-in | Built-in | Built-in | Built-in |
Selection Guide
Choosing the right model depends on the scale and complexity of your project:
Inrush Current & Buffer Capacitor
Turning on the power supply causes a massive, sudden spike in current. This voltage surge can immediately fry the control IC of the first few LEDs.
The solution: Place a 1000 µF (or at least 470 µF) electrolytic capacitor across the positive (+) and negative (-) rails. Position it as close to the start of the LED strip as possible to smooth out voltage spikes.
Logic Level Voltage Issues (3.3V vs. 5V)
The article focuses almost entirely on 5V Arduino boards. It completely overlooks that modern 3.3V microcontrollers (RP2040, ESP32, Raspberry Pi) are out of the official WS2812B specification for a logical “high” signal.
The solution: Without a fast hardware Level Shifter (like the 74HCT125), the data signal will be highly unstable, leading to flickering, wrong colors, or no light at all.
Software Interrupt Conflicts
The WS2812B single-wire protocol requires strict nanosecond timing. On standard AVR chips (like Arduino Uno/Nano), libraries completely disable interrupts while executing the data transmission (strip.show() or FastLED.show()).
The consequence: If your code relies on background routines—like reading I²C/SPI sensors, monitoring serial data, or tracking button presses with interrupts—you will suffer data loss or frozen animations. (Note: Using the RP2040's hardware PIO solves this by bypassing the CPU entirely).
Frame Rate (FPS) and Strip Length Bottlenecks
The protocol transmits at a fixed speed of 800 kHz. Sending data for 1 bit takes exactly 1.25 µs. Therefore, a single 24-bit RGB LED takes 30 µs, plus a 50 µs reset latch signal.
The limitation: Long strips introduce physical refresh bottlenecks. For example, a strip with 1,000 LEDs takes ~30.05 ms to update just once. This caps your maximum possible fluid speed at roughly 33 FPS. For longer setups, you must split the load across multiple GPIO pins in parallel.
SK6812 White-Blending Inefficiencies
While the article notes the dedicated white channel of the SK6812, it skips a software efficiency loophole.
The consequence: Basic code often mixes Red, Green, and Blue to achieve white light. This wastes energy and generates excessive heat. Advanced firmware utilizes explicit White Blending to turn off the RGB elements entirely and use only the dedicated white phosphor chip, significantly slashing overall power consumption.
If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.
Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.
LEDs Addressing
The WS28xx series uses a daisy-chain addressing mechanism where each LED (or group of LEDs) has no fixed hardware address. Instead, they are indexed by their physical position in the chain.
The communication follows a “data-stripping” or “self-addressing” protocol:
To control WS2812B LEDs with an Arduino, the FastLED and Adafruit NeoPixel Libraries are the most popular options. Both require you to define the data pin, the number of LEDs, and the color order (usually GRB for WS2812B).
FastLED is highly optimized and offers advanced color control features like HSV (Hue, Saturation, Value).
#include <FastLED.h> #define LED_PIN 6 // Pin connected to Din on the strip #define NUM_LEDS 10 // Number of LEDs in your strip #define BRIGHTNESS 50 // Set brightness (0-255) #define LED_TYPE WS2812B // Model type #define COLOR_ORDER GRB // Standard for WS2812B CRGB leds[NUM_LEDS]; // Initialize the LED array void setup() { // Power-up safety delay delay(3000); FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS); FastLED.setBrightness(BRIGHTNESS); } void loop() { // Simple "Larson Scanner" effect for(int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB::Blue; // Set current LED to Blue FastLED.show(); // Update the strip delay(50); leds[i] = CRGB::Black; // Turn it off for the next frame } }
Important Hardware Considerations
To control SK6812 RGBW LEDs, you must account for the fourth white channel. If you use standard RGB code, the colors will “drift” because the strip expects 32 bits per pixel instead of 24.
The Adafruit NeoPixel Library is the easiest way to handle the extra white channel on Arduino.
This script cycles through Red, Green, Blue, and then the Dedicated White chip.
#include <Adafruit_NeoPixel.h> #define PIN 6 // Data pin #define NUMPIXELS 10 // Number of LEDs // IMPORTANT: Use 'NEO_GRBW' for SK6812 RGBW models Adafruit_NeoPixel strip(NUMPIXELS, PIN, NEO_GRBW + NEO_KHZ800); void setup() { strip.begin(); strip.setBrightness(50); // Set brightness (0-255) strip.show(); // Initialize all pixels to 'off' } void loop() { // 1. Pure Red colorWipe(strip.Color(255, 0, 0, 0), 50); // 2. Pure Green colorWipe(strip.Color(0, 255, 0, 0), 50); // 3. Pure Blue colorWipe(strip.Color(0, 0, 255, 0), 50); // 4. Pure White (Using the dedicated 4th channel) colorWipe(strip.Color(0, 0, 0, 255), 50); // 5. Warm Mix (RGB + White) colorWipe(strip.Color(100, 50, 0, 200), 50); } // Function to fill dots one after the other with a color void colorWipe(uint32_t color, int wait) { for(int i=0; i<strip.numPixels(); i++) { strip.setPixelColor(i, color); strip.show(); delay(wait); } }
Key Differences in SK6812 Code:
Hardware Tip for SK6812
Since SK6812 strips have four emitters per pixel, they draw more current than WS2812B strips. Ensure your 5V power supply can handle roughly 80 mA per pixel if you plan to run both RGB and white channels at full brightness simultaneously.
This page has been accessed for: Today: 2, Until now: 278