I have been struggling with some strange behavior using a teensy 3.1 board and

I have been struggling with some strange behavior using a teensy 3.1 board and ws2812b 60 LED/meter strips (approx 300 pixels) for a bike project. After much back and forth I’ve discovered the following behavior. If I’m powering a simple example FastLED rainbow sketch off of USB power from my laptop I can run the sketch for a strand of 30 LEDs fine. When I attempt to use a 5v battery to power the Teensy 3.1 and the LEDs I get no animation or color changes. If I slowly scale the number of LEDs addressed in the sketch to 20 or fewer everything appears to work correctly using USB power or an external battery or power supply.

Finally after many hours of wondering what sort of hardware issues I may be running up against and swapping out several LED strands and teensy 3.1 boards I tried a different sketch that uses the Adafruit_NeoPixel library and went through the same battery of tests. So far I am unable to reproduce this problem with that library so I think it may be a FastLED issue. Has anyone seen behavior like this? I’ve been working off of the FastLED2.1 branch.

Interesting. If the battery wasn’t providing an expected full 5V would that somehow cause this? I have no idea or how that would possibly cause animation or color changes to stop working, but voltage seems like one of the few variables if all you’re doing so going from USB power to battery power.

What battery are you using? And what pins are you using on the Teensy when powering it with the battery?

I thought it was voltage or bad hardware but I’ve swapped teensy controllers and get identical behavior. I’m measuring 5.2v on the vin and ground pins when using external power.

I’ve had problems with the timing that I’m using in FastLED when the voltage to the LEDS is above 5v when coming from a 3.3v MCU - oddly enough - my timing is too accurate/tight. I need to adjust the timing to allow for slop in power.

The behavior is consistent when I’m not plugged into a laptop usb port for power. If I use a 5v usb battery into the teensy usb port, an SLA battery or even a power supply with a barrel jack connecting to vin and ground I get the same limiting behavior. Anything over 20 pixels and the sketch goes static.

Change libraries and run sketches off battery, wall power and usb and there is no issue.

Again - my timing is too tight so anything that is causing a shift in the clock in the LEDs throws things off - I’ve actually been able to recreate and mitigate it by varying voltage. What I haven’t had time to do yet is pad out/adjust the timing to account for this.

Also I made these problems on the due go away completely using 3.3v to 5v level shifters.

Ok I will research level shifters. Hopefully i can solve the issue that way. I have an octows2811 board that has a built in level shifter. Perhaps that would fix this.

I do want to spend more time with a logic probe, the timing, and get rid of this flip - it’s just a matter of getting the time - in the meantime, I’ve either put an extra buck converged on the 5v line brining it down to 4.9-5.1v or a 3.3-5v level converter.

I will also try to finally get this nailed down to work around the voltage issue - this and some intermittent problems people are having with the WS2801 on some platforms, are the only things really keeping me from calling 2.1 done.