WS2812 level translator

WS2812 LEDs are one of my favourite toys. Apart from all the things that you can do with them in terms of lighting, displays or even light painting you can also use them for your projects as indicator lights.

The great advantage comes from the fact that you can use a single pin to drive so many of them and it takes just 3 wires ran across the whole box for practically any number. This in turn comes with the disadvantage of more complex control and problems driving them(5V devices) from a 3.3V microcontroller.

Although the data sheet states that you would need at least 3.5V for them to recognize as HIGH level(70% of 5V), many seem to have no problem being driven from a 3.3V micro. With the signal regeneration that each does, it is only a problem for the first one in the chain. But, as I found out, some LEDs simply don’t work as the first device, and to be safe it is best to use a level translator. Unless you completely forget about it and find yourself in need of driving a display with WS2812 which does not like 3.3V signals.


Luckily there is a simple solution with parts that you have available: just another WS2812 LED (or two) and a diode. The trick is to power the first LED in the chain from 5V via a diode dropping its supply to 4.3V*. At this level the 3.3V signal from the microcontroller is within specifications to be recognized as a high level. As each LED does signal regeneration the output of the first LED will be at a 4.3V level which is in specification for the next LED powered at 5V. If you need a longer cable between the microcontroler board and the LEDs, a second one may be included in on the board which will be supplied by 5V in turn regenerating the control levels to 5V.

 Below you can see the original 3.3V signal and the 4.3V signal after the first LED. Also notice there is stronger ringing on the 3.3V control signal due to longer wire from the microcontroller.3v3_to_4v3

And now the original 3.3V signal and the 5V signal after the second LED:3v3_to_5v

*Datasheet doesn’t specifically say what is the normal supply range for these LEDs, although many specs are provided for 4.5 to 5.5V supply. I found no problem with them at 4.3V in normal ambient conditions.

Be Sociable, Share!

5 comments to WS2812 level translator

Leave a Reply





You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>