I am interested in creating an LED lit bin system. So there could be up to 8 bins. When a certain event occurs I want the correct bin to be lit via an RGB LED (color specific functions).
I thought I would use a USB connected Arduino Pro Micro to control the LED lights and the “LED - RGB Addressable, PTH, 5mm Diffused (5 Pack)”, https://www.sparkfun.com/products/12986
All wiring examples I have seen show the DO pin wired to DI pin. Is it possible to instead have a 5v rail, a data rail, and a ground rail that each LED is wired to? So each LED would have the following:
Pin 1 connected to the 5v rail
Pin 2 connected to the data rail
Pin 4 connected to the ground rail
Also, I am thinking each wire would be 2 feet long.
I had read the breakout hookup guide but I did not completely understand this statement, but based on your comment it makes sense…
DI – Data from a microcontroller (or another WS2812 pixel) comes into this pin.
•DO – Data is shifted out of this pin, to be connected to the input of another pixel or left floating if it is the last link in the chain.
So the “shifting” is how they all know about each other. That brings me to the next question. Does the system do a initial test to determine the sequence or shift in the chain? In other words each initial boot establishes the chain?
I’m not sure of the exact method, but somehow as the data is passed from one device to the next it increments a counter or something that tells each device where it is in the chain.
If you look at the final page of the datasheet (on the [LED productpage) you’ll see that the first led in the string gets to see all the data on it’s Din pin of all the leds. While it is reading it’s own data (first packet) it does not feed this through to the Dout pin for the other leds. Once the data-packet for that led has completed it feeds through (with pulse shape reconditioning/amplification) whatever comes in on the Din pin to the Dout pin for the next leds. Each subsequent led does the same, it only pays attention to what it needs and does not forward that, but will what is intended for the remainder leds. Eventually the last led only sees the last packet.
Valen, thank you for the additional information. I originally thought it was like an alarm system setup that each device had a MAC address or a specific signature, however then you would have to identify the sequence. In the chain system it definitely simplifies the setup.
Next will be to determine the maximum length between LED that is possible.