2

How to get a One-Wire address of a given WS2812B pixel? I bought several of these, and I cannot make them light. On the other hand, when I connect the addressable LED strip made of these diodes, I have no problem controlling it.

Here is my set-up:

enter image description here

I tried many programs, e.g. AdaFruit_NeoPixel -> simple, setting number of LEDS to 1, but no effect. No blinks, nothing - as if the diodes were dead.

If every One-Wire device is identifiable by 64 bit ID, how does the Arduino know the correct "order" of the LEDS on the ribbon? How to tell the Arduino the new sequence of the LEDS on the strip that would result if I replace one (broken) LED with another?

2
  • 1
    WS2812B is not a 1wire device. Feb 25, 2015 at 16:14
  • @IgnacioVazquez-Abrams Thank you! I was so sure it was 1-wire, I skipped that part when I read the data sheet. So, I understand, that each WS2812B is identified by its position within the chain relative to the Arduino? So there should be no problem with replacing the LED, providing that I don't mistake connectors. Feb 25, 2015 at 17:54

2 Answers 2

4

The WS2811/2812/2812B is not a 1-Wire device but is in fact a timing-based shift register with 3 LEDs (external in the case of the WS2811) connected to it.

As long as valid bit pulses are sent to the input of one of these devices it will shift the data through it and subsequently out of its data output. Connecting this output to the input of another device will shift data into that device as well, with the latest data sent being transmitted towards the furthest device in the chain.

Provided 24 bits per device are sent before the latch signal, The first 24 bits will be shifted into the first device, the second 24 bits into the second device, and so on until the last 24 bits into the last device in the chain. Once the latch signal is received, the devices will switch to the color indicated by the 24 bits currently shifted into them.

Since all of the devices use the same signaling (the only differences being supply level and the presence of a built-in RGB LED), they can be replaced freely with devices of the same or different make between the three.

1

Just one correction. The the first 24 bits of the data are shifted into the first WS2812. That device loads those 24 bits into its PWM registers. If more data is transmitted, the first WS2812 shifts that out to the following WS2812. So the first data sent stays in the first WS2812, the 2nd data stays in the 2nd WS2812, and so on. This is explained in the data sheet. Data-wise, it's a one-wire device. Power connections don't count.

1
  • 2
    I would be a little more clear abou the difference between a One-Wire (aka 1-Wire) device and a one wire device (a device that only has one data pin). The WS2812s only have one data in pin, but calling it a "one-wire" device is confusing because that is the name of an actual protocol, a protocol that is not implemented in the WS2812s. Everything in your answer is technically correct, I would just re-phrase the last part to be less confusing.
    – Jake C
    Aug 11, 2015 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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