Skip to main content

Chapter 15: Using and Configuring WS2812 Addressable LED Strips

Connect the WS2812 LED strip using the three wires GND, 4~7V, and IN. Terminate them in a 2.54 mm 3-pin DuPont connector and plug it directly into a PWM servo output. Eight illuminated LEDs consume approximately 100 mW, so the load on the flight controller servo 5V supply is low.

The following example uses the flight controller PWM6 output as the WS2812 LED strip interface.

Set the following parameters in the full parameter list:

SERVO6_FUNCTION 120 (default: 0; SERVO X corresponds to the matching PWM output number)

NTF_LED_LEN 8 (8 is the number of LEDs on the connected strip; the theoretical maximum is 32, but the practical maximum has not been fully tested)

NTF_LED_TYPE 455

NTF_LED_OVERRIDE 0

0 (when the flight controller is armed, the LEDs remain solid blue; when disarmed, the LEDs flash blue)

2 (when the flight controller is armed, the LEDs remain solid red; when disarmed, the LEDs remain solid green)

3 (when the flight controller is armed, the LEDs flash red; when disarmed, the LEDs flash yellow)

Testing confirmed that two WS2812 strips can be connected in series, but a third strip does not operate. The test used straight WS2812 strips with eight LEDs each. For two eight-LED strips connected in series, set NTF_LED_LEN to 16.

Multiple PWM outputs can also be used as LED strip interfaces. Testing confirmed that three eight-LED WS2812 strips connected to PWM 6, 7, and 8 (corresponding to SERVO6, SERVO7, and SERVO8) operate normally when each corresponding FUNCTION parameter is set to 120.