4

I am wondering if anyone has ever connected the output of their LED strip back to the Arduino to read and make sure the strip is functioning correctly, kinda like checksum functionality.

I am using the FastLed library and it doesn't appear that this has been done.

The reason why I want to do this is because when an LED breaks on the strip, it causes all of the following LEDs to flicker wildly. I need to be able to shut the LED strip off immediately if it starts flickering because my device is being used as a visual therapy aid in a school.

I am using an Arduino Due with WS2812B LED strip.

  • here is the data sheet .... seeedstudio.com/document/pdf/WS2812B%20Datasheet.pdf .... if you have 20 LEDs, you have to start to load the 21st LED before you see the output from the last one (20th) .... i do not think that you actually have to send 24 bits to the non-existent 21st LED – jsotola May 14 '18 at 22:00
  • the timings are very fast and might be hard to read to inspect for bugs. a CDS on the last LED could detect erratic flashing, ands easy to consume w/MCUs, or maybe even an IC like a 555 missing edge detector. – dandavis May 15 '18 at 0:04
  • 1
    another thought .... maybe use this for the 21st LED (see my previous post).... cdn-shop.adafruit.com/datasheets/WS2811.pdf ..... use three optocouplers instead of LEDs .... always send black to the 21st LED ... if any other values other than zero are received, then one or more of the optocouplers will conduct and cause a reset ............. you could also use a microcontroller to monitor the output of the LED string – jsotola May 15 '18 at 1:36
  • 1
    Maybe the simplest solution would be to always set the last LED to black and place a photo resistor on top of it. If there is ever light output, I will know that the LED strip is malfunctioning. – Jorb May 15 '18 at 14:00
1

Look at timing on sheet 4 of the datasheet, and the times on sheet 3

A Low bit is 400 +/- 150nS wide Low followed by a 800 +/- 150nS wide High

A High bit is 850 +/- 150nS wide High follow by a 450nS wide Low.

To do what you suggest with a checksum, you'd have to send the checksum (minimum of 3 bytes to fake the data for an extra WS2812B for example) first, and see if the 24 bits were received correctly while at the same time the last 3 bytes were being sent out.

A Due might be fast enough to do that. I don't think a 16 MHz Arduino could.

Checking power level is not really feasible, as many strips get power attached to the beginning, middle, and end of a strip to ensure uniform brightness and to keep the strip's power traces from overheating from excess current flow.

0

I don't think LED strips support this feature, however, probably there is a voltage reduction depending on how many LEDs are on. So you could check the voltage at the end of the strip, based on the LEDs which are on (assuming you store this) and compare the values.

  • 2
    WS2812 strips have a data out pin that outputs a copy of every input bit past the (24×n)-th, where n is the number of LEDs in the strip. – Edgar Bonet May 14 '18 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.