-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Neopixel data timing too slow on Samd51 M4 boards #1083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The strip is RGBW so the script needs to be modified to handle 4 values per pixel. |
Thanks, |
i have also tested this example form here And there is also an output freqency of 280 kHz, seems to me something is wrong with the basic timing generating the output for the neopixel |
Hmmm. I’ll try to reproduce this later today. |
Did you try pixel_off=bytearray([0,0,0,0]) |
Yes, |
FYI -- I connected an 8 LED strip https://www.adafruit.com/product/2869 to my itsybtsy m4 express and I do see the 280kHz data rate, but the strip works fine on both my itsybitsy m4 and feather m4 -- note that this test
toggles the first pixel on the strip RED (not green) but the doc indicates that ignores the pixel ordering, so I think this is expected. |
also - FYI - I am powering the strip from the Itsybitsy 3V output and have it connected to D13. |
ah -- interesting -- I can reproduce your issues if I power the strip from VUSB (or VHi) and use D5 for the data signal!! |
Thanks for detecting this problem. We'll look at the timing code. There are some loops that were calibrated to give the correct timing, but it seems like something is wrong with the measurements. Also, there is a instruction/data cache on the M4, and there may be an issue with its state when the |
sorry - hit wrong button -- did not mean to close. |
might be waveform shape, rise/fall time on the level converter vs not |
OK -- there are some big negative spikes when using 5V that are not there at 3V. It's not clear to me that the data rate is the issue. Its something to look at , but may not be related to the performance. My quick glance at the neopixel data sheet referred to maximum rates, but was less clear about minimum rates. never-mind -- it does say minimum 400 for the WS2812, but it is not specified for the SK6812 |
@Thomasinator could you test a new build from here: https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/itsybitsy_m4_express/ Its commit 2e80. |
Short test, the NeoPixel Ring 12 works fine, the strip same failure. |
I did some measurements, the frequency is now 632 kHz for sending an OFF (0,0,0,0) to a pixel and 700 kHz for sending full ON (255,255,255,255). The example with green blinking is working for the ring but not for the strip. To supress the positiv/negativ spikes i use a 150ohm series resistor, the signal is clear as of a 3,3V digital output pin but with the 5v level. Here the measured timing and the deviations to the datasheet timings
nom. = Time as described in datasheet I attached a screenshot from oscilloscope after the 150ohm resistor at first neopixel from strip. |
EDIT: apologies, never mind, I didn't read far enough back. |
Sorry for the closing, tapped wrong on Smartphone |
Its weird that its still not working for you. I reproduced the problem and it went away when I tightened up the timings. I don't expect it to be 800khz though since its being bitbanged. Would you mind experimenting with the numbers yourself like I did in b0dd645 ? Thanks! |
Sorry, I don't know how to do these changes and get an .uf2 file to update my ItsyBitsyM4. |
Instructions on building CircuitPython are here: https://learn.adafruit.com/building-circuitpython I can't do much more myself since its fixed for me. |
PR #1132 worked on my ITSY BITSY M4 express -- but I did find that I had to improve my wire connections to get it to work reliably. |
SK6812 on 5v is pickier than WS2812 on 5v. Hopefully fixes #1083.
I believe this is fixed. @Thomasinator please let me know if it's still an issue for you. |
I discovered a problem driving a neopixel strip from adafruit. Whatever color, even all off, i send to the strip. The leds appear in a flickering full white. Driving a neopixel ring with the same script works fine.
I have an ItsyBitsy M4 with CircuitPython 3.0.0 installed and the Library bundle 3.x 20180802 on it.
I used the example from here
At work i could measure the output on D5 with an oszilloskop and the output is at a frequency at around 280 kHz. Normally it should be at 400 or 800 kHz.
Driving it with an Arduino UNO and the C-Library for NeoPixel from Adafruit produces an Output of 800 kHz and the Strip is working fine.
In the descriptions of the strip and the ring i have found only one difference, the ring could be with WS2812 or SK6812, the strip is only made from SK6812.
So it could be i have a ring with WS2812 and they work with the 280 kHz signal fine, and my strip is from SK6812 and won't work with the 280 kHz signal
So i think something is wrong with timing the output, or processor is running at lower frequency than it should.
Or am i make something wrong?
Adafruit NeoPixel Digital RGBW LED Strip - Black PCB 60 LED/m
PRODUCT ID: 2837
NeoPixel Ring - 12 x 5050 RGBW LEDs w/ Integrated Drivers - Natural White - ~4500K
PRODUCT ID: 2852
The text was updated successfully, but these errors were encountered: