r/FastLED • u/TeliosAE • Jan 05 '24
Support Flickering and weird behavior ws2812B and esp32
Hi everyone, I have been hitting my head against the wall for the past couple days trying to get my leds working.
I’m making a DIY nanoleaf set that is using the following hardware:
- 273 ws2812B pixels (got them from two different sources), sections of 144 LEDs/m
- TTGO T-display esp32 board with GPIO 15 as the output pin
- Meanwell RS-150-5 power supply (5v 26A)
- 330 ohm resistor placed near the first pixel
- dummy pixel close to the esp32 as a poor man’s level shifter (not the ideal solution but this is what I had on hand)
There are seven triangular panels, each having 39 LEDs and each getting their own power from the power supply which also powers the esp32. The panels are only connected between eachother using the data cable. Because a bunch of the LEDs turned out to be dead I had to replace a load of them (the white LEDs in the picture) however the LEDs I used to replace them are a different brand (still WS2812B though).
Now there are two issues that I am running into:
- Some of the LEDs are flickering
- When I try to control more then a certain number of LEDs the first six and the dummy LED don’t seem to ‘count’. So if I want the color to change every 12 LEDs for example the first seven LEDs (including the dummy one) get the same color as the 8th one. So if I say that the color should change every 33 LEDs the entire first panel (that contains 39 LEDs) has the same colour while subsequent panels do behave correctly. This only seems to happen when I address more then about 70 LEDs otherwise it works as expected (with less flicker!).
I am completely lost at this point so if anyone has any pointers it would be greatly appreciated!!
Note: I know the soldering is far from optimal. I will never buy 144 LEDs/m again lol.



4
u/UrbanPugEsq Jan 05 '24
Go back to basics.
Eliminate possible failure points until you isolate the problem.
I suggest that you Set up just one strip with the right number of LEDs and nothing fancy.
See if that works and if your code does what you think it does, then once you get something simple working, keep adding things one at a time and make sure they still work. If not, figure out what broke.
3
u/Yves-bazin Jan 05 '24
Hello can you share the code on pastebin or gist.github.com. Have you look at the serial output of the esp32 to see if there is not unfortunate reboot ?
3
u/TheRuneMeister Jan 05 '24
Start simple. Do you actually need the resistor? For longer cable runs it might not make sense. Also, add a 1000uf capacitor.
3
u/Fotoshopist Jan 06 '24 edited Jan 07 '24
I was looking at your code and decided to write my own with some things that may help you out going forward.
Changes:
Examples: Only one example as I can't seem to upload more than one image...
Party Palette with colRng = 8 (large diff between panels)
CODE: https://pastebin.com/WXkTicW5 (Copy and paste link, Reddit is altering the link to lowercase thus breaking it)
If you have any questions let me know
2
u/CharlesGoodwin Jan 06 '24
OK - with a few LEDs and then goes bonkers with more - I'd check there isn't too much draw on power
1
u/VinacoSMN Jan 05 '24
Could you try to add a delay(50) in your loop ?