Closed-loop Neopixel control?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
EngineeringNinja
 
Posts: 2
Joined: Sun Nov 06, 2022 3:48 pm

Closed-loop Neopixel control?

Post by EngineeringNinja »

As I understand it Neopixel control is currently entirely open-loop. The microcontroller is spitting out a waveform and it has no ability to tell if it even has anything connected to it - let alone how many LEDs are connected or if there are control problems.

Has anyone experimented with closed-loop control, where the output of the last Neopixel is fed back into the micro? That should allow you to feed in a bit pattern until you see it come back out again. The number of shifts before you see output tells you how many pixels are attached. If the pattern comes out garbled or not at all then you know something is wrong somewhere. Once you know how many pixels there are you can send one extra check pixel with every refresh that the micro can verify. I would probably use a sequence number stored in green and a Fletcher-16 checksum of all of the previous bytes stored in red and blue.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Closed-loop Neopixel control?

Post by adafruit_support_bill »

Such an approach could confirm that you have data continuity through the strand and the correct number of pixels. You would not get back all the data, so a checksum would be of limited value.

In operation, each pixel consumes one pixel's worth of data and forwards the remainder. So if you defined one extra pixel in addition to the actual number in your strand, you would get just that one pixel's data out at the end.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”