NeoPixel Addressable LED Strip (WS2812B)

WS2812B (NeoPixel) addressable LEDs contain an integrated control IC inside each 5050 RGB package.

Actuators8 blocksMicroPythonC++
NeoPixel Strip

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Pins

Pins of this part
PinLabelType
VCC+5VPower in
DINDINSignal in
GNDGNDGround

Properties

What you can change in the Property Inspector.

Properties of this part
PropertyRange or choicesDefault
Pixel Count1 to 608

WS2812B (NeoPixel) addressable LEDs contain an integrated control IC inside each 5050 RGB package. Every pixel in a chain can be individually set to a unique 24-bit color using a single digital data line.


1. Hardware Specifications & Pinout

  • Operating Voltage: 5.0V (requires 5V power supply for long strips; ~60mA per pixel at full white).
  • Data Protocol: High-speed single-wire NRZ protocol (800 kHz frequency).
    • T0H=0.4 μsT_{0H} = 0.4\,\mu\text{s}, T0L=0.85 μsT_{0L} = 0.85\,\mu\text{s} (Bit 0)
    • T1H=0.8 μsT_{1H} = 0.8\,\mu\text{s}, T1L=0.45 μsT_{1L} = 0.45\,\mu\text{s} (Bit 1)
    • Reset pulse: >50 μs>50\,\mu\text{s} LOW.
  • Pin Configuration:
    • VCC / +5V: Power input.
    • GND: Common Ground.
    • DIN (Data In): Connected to any digital output pin (requires 300Ω–500Ω resistor on data line).
    • DOUT (Data Out): Connects to DIN of the next pixel strip segment.

2. How it Works (24-Bit Shift Register Chain)

Data is transmitted sequentially as Green-Red-Blue (GRB) 24-bit packets:

Pixel Data=G7…G0⏟8-bit Green R7…R0⏟8-bit Red B7…B0⏟8-bit Blue\text{Pixel Data} = \underbrace{G_7 \dots G_0}_{\text{8-bit Green}} \, \underbrace{R_7 \dots R_0}_{\text{8-bit Red}} \, \underbrace{B_7 \dots B_0}_{\text{8-bit Blue}}

The first pixel consumes the first 24 bits and passes all subsequent data packets downstream along the DOUT line. Sending a Reset pulse (>50 μs>50\,\mu\text{s} LOW) latches the data into internal PWM registers, causing all pixels to display new colors simultaneously.


3. Component Properties (Property Inspector)

  • Pixel Count (numPixels): Number of addressable pixels in the strip.
    • Default: 8
    • Range: 1 to 60

[!NOTE] There's no "Global Brightness" property on the component — the simulator draws each pixel's color directly from live per-pixel data (set by the Blockly blocks below), not a scripted brightness value. See the Set Master Brightness block's note in Section 4 for what "brightness" actually does and doesn't affect here.


4. Supported Blockly Blocks

Drawing the blocks…

5. Simulator Behavior

  • Interactive Strip Display: Renders an animated LED strip graphic on canvas. Each LED segment lights up independently, its on-canvas color driven live by that pixel's actual set color (from Fill Strip / Set Pixel Color / Animate Rainbow) — not by the Set Master Brightness block, which real hardware honors but the simulator currently does not (see Section 4).
  • Power Sensing: The strip is considered powered based on its VCC pin's real voltage, not simulated current draw — this deliberately avoids a strip appearing to "stay lit" after power is cut. If VCC is present but below 3.5V, a LOW VCC fault is raised.
  • Fault Detection: Total current draw scales with how many pixels are lit and their brightness — exceeding roughly 70mA per configured pixel (a small margin above the real ~60mA/pixel full-white draw) trips an OVERCURRENT fault for the whole strip.
NeoPixel Addressable LED Strip (WS2812B) — OMS Parts