bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

WS2812 changed timing requirements #680

Closed joy-it closed 4 years ago

joy-it commented 4 years ago

The timing requirements for the ws2812 board changed in newer controllers. The old timings in libraries bring the LEDs into an unstable state (flickering, turning off suddenly). Especially when using mixed colors or white.

The datasheet infos can be found here: New timings (page 3, data transfer time): https://datasheet.lcsc.com/szlcsc/2006151006_Worldsemi-WS2812B-B_C114586.pdf Old timings (page 4, data transfer time): https://cdn-shop.adafruit.com/datasheets/WS2812.pdf

The newer LEDs can not be used successfully with the ws2812 and neopixel library. Is there any way to change the bit-timings manually? Or can the libraries be updated with the new timings?

Best regards Nils

image

joy-it commented 4 years ago

Hi,

we already found the problem. It was not timing related.

The solution is, that the delivered WS2812B doesn't correspond to the provided datasheet. According to the datasheets "Typical application", no capacitors in front of LEDs are necessary. However, if there is no capacitor (e.g. 100nF) directly in front of the LED, the LED controller crashes when more than one color of the pixel is switched on.

Best regards. Nils