1
\$\begingroup\$

I've tried googling, youtube, even chatgpt but I'm not quite finding what I need.

Can you point me in the right direction for how to create a custom circuit similar to an addressable RGB LED, where I can connect multiple outputs to the same 4 pins where I send an address along with the data such as [address, val1, val2, val3] and the specific output only sets its val1, val2, val3/outputs if its address matches? I want to drive arbitrary logic, not actual LEDs.

I know I need some kind of controller/logic gates at each output, but how/what do I need to use. I don't think I want basic multiplexing as I don't want to have many outputs connecting back to the multiplexer, rather daisy chained outputs connecting to each other.

Alternatively, is it possible to "hack" an addressable LED strip and connect to the outputs at each LED, then just control those outputs with an LED control library?

\$\endgroup\$
5
  • \$\begingroup\$ Do you want to drive LEDs with that data (in which case you would buy a ws compatible IC and add your own LEDs) or do you want an address decoder that can drive arbitrary logic? \$\endgroup\$ Commented Mar 27, 2023 at 13:11
  • \$\begingroup\$ @user1850479 I want a similar characteristic as the LEDs (addressable) but I don't actually want to light up LEDs... which I believe would be an address decoder that can drive arbitrary logic, as you described it. \$\endgroup\$
    – tsdexter
    Commented Mar 27, 2023 at 13:52
  • \$\begingroup\$ @winny thanks - I should have been clear, that I want the same concept as the LEDs but not to actually drive LEDs, but arbitrary logic as mentioned in the comment below yours \$\endgroup\$
    – tsdexter
    Commented Mar 27, 2023 at 13:52
  • \$\begingroup\$ look at WS2811 . \$\endgroup\$
    – jsotola
    Commented Mar 27, 2023 at 14:54
  • \$\begingroup\$ I was going to suggest the ws2811, but the output is constant current so maybe not ideal depending on what you're driving. \$\endgroup\$ Commented Mar 27, 2023 at 15:25

1 Answer 1

2
\$\begingroup\$

If you actually want to implement a WS2812 receiver ...

In short, you program a small microcontroller to decode the input signal. It's a little tricky as the pulses are short. The signal is a long low pulse (>50us) followed by a chain of bits, each 1.25 us. Each device uses the first bits it sees, and passes on the rest. I'd do it with an ATTiny, perhaps, depending on what you want to do with the signal.

The WSD2812 datasheet shows the timing (T0H is 0.4 us and T1H is 0.8 us):

enter image description here

But you might well want to read this resources:

  • Detailed timing experiments link
  • Notes about newer timing requirements link
  • Arduino forum entry about this (without code): link

On the other hand, if what you want is something functionally similar, but with no compatability requirements ...

The industry standard for architectural and theatre lighting is DMX512, for which there is a lot of information (including public specification), many vendors, and a lot of open source code for sending and receiving, for Arduino and many other microcontroller platforms. Unless you have a reason otherwise, DMX makes a lot of sense. Not least of which is that, on being on top of RS485, it deals with distance very well, and with RDM you can do things like enumerate the listeners.

DMX is a bus of up to 512 logical channels per "universe", transmitting at 250 kbit/sec. With Artnet protocol (amongst others) you can easily send the data over IP protocol.

It's in general terms a lot better and a lot easier than coopting the WS2812 protocol.

\$\endgroup\$
5
  • \$\begingroup\$ I agree, it seems OP is trying to implement sending data to addressed outputs, using the same protocol as the addressable LEDs. I think it might be worthwhile to just use an existing protocol (SPI, I2C) to interface between multiple controllers, as those can be addressed. While sending data over the PWM is certainly possible, it will require more effort to decipher on the receiving end. \$\endgroup\$
    – md-raz
    Commented Mar 27, 2023 at 13:54
  • \$\begingroup\$ Thanks, I will read up on the links you provided. @md-raz that is correct, I want to address arbitrary logic to specific daisy chained outputs... I am open to any protocol if you can point me toward example circuits/chips to use \$\endgroup\$
    – tsdexter
    Commented Mar 27, 2023 at 13:55
  • 1
    \$\begingroup\$ The industry standard for architectural and theature lighting is DMX512, for which there is a lot of information, many vendors, and a lot of open source code for sending and receiving, for Arduino and many other microcontroller platforms. Unless you have a reason otherwise, DMX makes a lot of sense. Not least of which is that, on top of RS485, it deals with distance very well, and with RDM you can do things like enumerate the listeners. \$\endgroup\$
    – jonathanjo
    Commented Mar 27, 2023 at 14:06
  • \$\begingroup\$ @jonathanjo thanks for the valuable input...following some of your links and reading up some more information, it looks like I'm way overcomplicating it, and I really just need a shift register on each daisy-chained output. \$\endgroup\$
    – tsdexter
    Commented Mar 27, 2023 at 14:18
  • \$\begingroup\$ Simplest is almost always best! Do consider some kind of reset line too. \$\endgroup\$
    – jonathanjo
    Commented Mar 27, 2023 at 14:34

Your Answer

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

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