3
\$\begingroup\$

I'm trying to drive a strip of WS2812B LEDs with a Beaglebone Black(revC). Because the LEDs expect a data signal at 5V and the BBB outputs at 3.3V, some sort of level shifting is required.

However, when using either a 74LVC245 or a 74AC245 chip to adjust the voltage level, the strip begins flashing erratically, as if the signal were corrupt or not at the right level.

The strip works if I connect it directly to the 3.3V output because 3.3V is just high enough to register as a one, but the signal fades after about 160 LEDs and the random behavior resumes.

Things I've tried:

  • Connecting 3.3V and GND to the level shifters and confirmed that the output 5V and GND, respectively.
  • Adding a 100uF capacitor between the power and ground lines to smooth the power supply.
  • Touching the ground plane. I found this by accident, but it appears that I can actually fix the flashing issue by touching the ground plane of the circuit. I suspected that this was due to me introducing capacitance into the circuit, which is why I tried adding a smoothing capacitor.
  • Powering the LEDs both from the same 5V at 2A power supply, and from different power supplies.

Altogether, I'm stumped. I've already tried everything that comes to mind, but none of it has worked.

\$\endgroup\$
  • \$\begingroup\$ LVC family is for 1.8-3.3V except for PicoGate parts \$\endgroup\$ – venny Aug 22 '14 at 20:39
0
\$\begingroup\$

If you take a look at 74AC245 datasheet, guaranteed limits of V_iH, it specifies 3.15V fo 4.5V Vcc and 3.85V for 5.5V Vcc. You should use the 74ACT family with TTL input levels (0.8V V_iL, 2.0V V_iH regardless of Vcc).

In other words: reliable interfacing between 3.3V and 5V CMOS logic is not possible. But between 3.3V CMOS and TTL(which is always 5V) it is easy.

Or use a dual-supply translator.

\$\endgroup\$
  • \$\begingroup\$ This was it, thanks! I hadn't realized from reading the datasheets on the two chips they were designed to shift to 3.3V. After I ordered a 74ACT family chip and tried it out, it worked fine. \$\endgroup\$ – GGreenwood Sep 2 '14 at 8:08
3
\$\begingroup\$

The data line in a string of WS2812B chips is not a shared bus as it might appear. Instead, each WS2812B retransmits each bit it receives down the line at full Vcc voltage so there really is not any "fade" with respect to voltage as you go down a string. If the first pixels is seeing enough voltage to see the bit, then all the other pixels downstream should see it too.

First, I'd make sure you have enough power injected along the length of the string. You can test for this by driving the string dimly with less than, say, 20 brightness for all three colors. If it works fine with the dim colors, then you almost certainly do not have enough power getting to the end of the string because of the voltage drop on the power lines (not data lines). Those flexible PCB strings have relatively high resistance, and WS2812B chips can use up to 0.25 watt each, so the voltage drop along a string of pixels can be high enough that the pixels at the end do not have enough power when the current demands (and therefore the voltage drop on the power lines) go up. Easiest way to fix this is to add wires going from the strip back to the power supply every 2 meters or so.

If you still get flakeyness at the end of the string even using dim colors, then the next place I would look is at the timing of the signal coming out of the Beagle-Bone. You might possibly not have enough room between your bits as described here...

http://wp.josh.com/2014/05/16/why-you-should-give-your-neopixel-bits-room-to-breathe/

One way to test for this is to connect the string to an Arduino and use some time-tested code to try driving it. If this works, then I'd look at your signal timing on the BeagleBone and try adding maybe 100ns of low after each bit.

Report back with what you find!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.