Spurious errors with Neopixels

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
perbu
Posts: 9
Joined: Thu Mar 26, 2020 7:34 am

Spurious errors with Neopixels

Post by perbu » Tue Apr 07, 2020 4:30 pm

Hello.

I have this bandwidth monitor that uses one of these neopixel rings to display network usage. It is updated 10x per second and it brings me joy to see the pixels blinking. :-)

From time to time I see a random pixel on the array lighting up. I don't see any patterns.

I'm curious if this is an internal esp32-specific issue related to timing (I've issues with timing on other platforms) or if this is some caused by my local setup. Perhaps I have voltage drops that the cap on the neopixels isn't capable of mitigating.

Are neopixels on Micropython rock solid or are there glitches from time to time?

Cheers,

Per.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Spurious errors with Neopixels

Post by jimmo » Tue Apr 07, 2020 11:43 pm

This is a bit of a FAQ -- the neopixel implementation on ESP32 is not rock solid. There is work underway to improve it (using the hardware signal generator (called RMT on esp32)).

RMT support is already available in v1.12 and I believe someone has written a Python wrapper for neopixels (although I understand it had some limitations in terms of memory use per pixel) but hopefully someone else has more info.

perbu
Posts: 9
Joined: Thu Mar 26, 2020 7:34 am

Re: Spurious errors with Neopixels

Post by perbu » Wed Apr 08, 2020 10:19 am

Thanks!

That's all I needed to know. I'll see if I can dig up the RMT lib. I've used the RMT from C++ before and there are other working neopixel libs out there in other languages, so it should be doable to make this work.

seonr
Posts: 43
Joined: Mon Sep 10, 2018 6:54 am

Re: Spurious errors with Neopixels

Post by seonr » Thu Apr 09, 2020 1:02 am

This is the code Jimmo mentioned:
https://gist.github.com/nevercast/9c485 ... 4a22062795

Cheers :)
Seon

Post Reply