HackSpace_-_April_2020

(Frankie) #1
FIELD TEST

magazine kit box). We connected the data pin to various NeoPixels
through a level shifter. We then ran an animation on the NeoPixels,
while gradually turning down the voltage on the level shifter to see
at what point it stopped working.
We wanted to test two things – do different strips of NeoPixels
from different suppliers have different voltage limits, and does it
make any difference how long the strip you try to control is?
All official WS2812B LEDs come from WorldSemi, but in
practice, unless you’re buying from a reputable supplier, there’s a
very high chance that you have non-genuine LEDs. This isn’t
usually a problem for makers, as there’s a wide range of clones
that speak the same protocol and can be used interchangeably.
We tested out an array of LEDs from a range of suppliers – the
results are in the table to the right. The LEDs in WS2812B batch 2
weren’t randomly selected, but a batch that we suspected of
having problems.
The gist of these results is that many strips will quite happily
operate with a signal voltage of 3.3 V (and even a bit below), but
occasionally you’ll come across a strip that won’t. What does this
mean for makers? Well, most of the time you can drive NeoPixels
with 3.3 V microcontrollers and still have some headroom, but
occasionally, you’ll come across some hardware that won’t work.
What does this mean for us? We’ll continue to recommend that
people use some way of taking this into account because we can’t
be sure what hardware people will be working with.


PROBLEMS NEED SOLUTIONS
There are two basic solutions to the problem of driving NeoPixels
with 3.3 V microcontrollers. One is to increase the signal voltage
using a level shifter; the other is to drop the input voltage
Dropping the input voltage is the simplest option for small runs of
NeoPixels. A regular diode has a voltage drop of 0.7 V usually, so


putting one of these in-line on the input
(see Figure 1) will reduce the input
voltage to 4.3 V, and since
0.7*4.3=3.01 V, you can then drive the
strip of NeoPixels with 3.3 V without
exceeding the data sheet specification.
However, this does put the full
power draw of all the LEDs through the
diode. This isn’t a problem for small
runs that aren’t very bright, but can be
a problem for larger displays. We keep
a stash of 1 A diodes for just this
purpose which is definitely fine for
strings of 15 or fewer LEDs, and can be
fine for much larger displays depending
on brightness and colour. If you’re
drawing this level of current, you
probably want to think a little about
your power supply anyway as this
exceeds what most microcontrollers
can supply on their 5 V pin.
You can sidestep this problem a little by only driving the first
NeoPixel with 4.3 V, and then supplying the full 5 V to LEDs after
this (see Figure 2). The first NeoPixel will output data at 4.3 V to
the second NeoPixel, which can then operate without problems.
The two caveats to this are that wiring is a little more complex as
you have to power the first NeoPixel differently, and the first will
also be a little less bright than the others in the strip.

Batch Number of LEDs signal voltageMinimum^

Through-hole
(WS2812B) batch 1^1 2.7 V
Through-hole
(WS2812B) batch 2^1 2.6 V

WS2811 1 2.5 V

WS2811 7 2.5 V

WS2812B batch 1 1 2.5 V

WS2812B batch 1 7 2.5 V

WS2812B batch 1 30 2.5 V

WS2812B batch 2 1 3.6 V

WS2812B batch 2 30 3.6 V

Figure 2
The wiring’s a mess,
but the results are
clear: these WS2811s
(with added
ping-pong balls) will
quite happily operate
at well below their
stated limits
Free download pdf