Ok, another question about reliability of NeoPixels, Teensys, and level shifters.
I'm trying to run 180 NeoPixel LEDs off a Teensy 3.0, using the Adafruit_Neopixel library, as part of a costume, hence it's powered by a lithium battery to be portable and there's a one metre cable between the driver box and the strips. Separate UBECs for the strips and the electronics, of course, make sure the Teensy gets nice clean power.
I'm having a devil of a job making it reliable. Sometimes the strips work just fine and run the animations that I'm expecting, mostly they stall, sometimes the don't light at all. All this is at 400 kHz, 800 kHz is worse. Running the same strips from a 5 V Arduino is very reliable, suggesting that the strips themselves are fine.
Without a level shifter, the reliability was terrible. Touching the cable made the strips stop updating. Putting the cable near the UBECs made the strips stop updating (noise, I presume). So a level shifter is clearly needed. I've tried several level converters to go from the 3.3 V of the Teensy to the 5 V that the NeoPixels like. The best I've found so far, in terms of getting a reliable output, is the PCA9306 (https://www.sparkfun.com/products/retired/10403
). However, the set-up I have is still far from bomb-proof. Now here's something odd. With no LEDs connected to the output of the level shifter, I get the following output on the data line:
Looks pretty good, 5 V high pulses, timing fits the protocol, leading edges slightly rounded but nothing more than you'd expect.
However, attaching the LEDs to the output of the level shifter gives:
And there's something not too good. The pulse height is 3.0 Volts. So no wonder the strips are not happy. The Voltage feeding the LED side of the shifter is a solid 5.0 V.
Here's where I start scratching my head. The level shifter is clearly wired up right, or it wouldn't be producing good pulses when no LEDs are attached. I mean, it's a level shifter, right? Connect ground, V1, V2, data in, data out. Done that, checked that, it works. So I don't think there's a problem there. However, there's clearly a problem when the level shifter is attached to the NeoPixel LED strips. I don't know what that problem is.
Anyone seen anything like this before? (Grasping at straws here, the PCA9306 is bi-directional, so could it be trying to convert reflected data from the 5 V LED side to the 3.3 V Teensy side? Like I said, straws.) Anything I might have overlooked? Any ideas about how to fix this?