Close

Driving neopixels with only a ESP8266 & Diode

A project log for Reactive Sub $10 Arduino Christmas Lights

Making holiday lights that turn on when someone is nearby using an ultrasonic (and later PIR) sensor

Edit My ProfileEdit My Profile 12/23/2018 at 21:110 Comments

Individually addressable LED’s, often referred to as neopixels, allow precise control over individual lights in a string, allowing you to program animations and other interesting effects. Because you can control the red, green, and blue value of any LED individually, the variety of colors, patterns, and animations is up to your imagination.

An ESP8266 based device like a D1 Mini or NodeMCU can’t normally control neopixels without a level shifter, but thanks to a clever hack using a diode, we can get around this shortcoming. The reason this problem happens is that the lights take 5 volts of power, and the signal pin from the D1 Mini can only output 3.3 volts.

Because a neopixel will not react until the signal voltage is at least 70% of the supply voltage, we can use a diode to drop the supply voltage down to 4.5, which is low enough to be successfully controlled with the 3.3 volt signal.

Wiring diagram and examples:

Discussions