Reverse-Engineering A Two-Wire LED Strip Protocol

An LED bulb with integrated controller chip

Although Christmas may be several weeks behind us, various colorful LED contraptions can nowadays be found in our houses at any time of year. [Tim] got his hands on an LED curtain that came with a remote control that allows the user to set not only the color of the LEDs as a whole but also to run simple animations. But these were not your standard WS2812B strips with data lines: all the LEDs were simply connected in parallel with just two wires, so how was this even possible?

An oscilloscope screenshot showing the data protocol used in an LED string
The LED string protocol is very simple, with one address field and one data field.

[Tim] hooked up his oscilloscope to the LED strings to find out how they worked, detailing the results in a comprehensive blog post. As it turns out, the controller briefly shorts the LED strip’s supply voltage to generate data bits, similar to the way old pulse-dialing phones worked. A tiny chip integrated into each LED picks up these pulses, but retains its internal state thanks to a capacitor that keeps the chip powered when the supply line goes low.

After reverse-engineering the protocol, [Tim] went on to implement a similar design using an ATMega328P as a controller and an ATtiny10 as the LED driver. With just a few lines of code and a 100 nF buffer capacitor across the ATtiny’s power pins, [Tim] was able to turn an LED on and off by sending pulses through the supply lines. Some work still needs to be done to fully implement a protocol as used in the LED strings, but as a proof-of-concept it shows that this kind of power-line communication is possible with standard components.

We’ve seen projects that send signals down a two-wire LED chain before, although as an add-on to a more ordinary LED strip. [Tim] is not the first to reverse-engineer poorly documented LED strip protocols, but probably won’t be the last either.

19 thoughts on “Reverse-Engineering A Two-Wire LED Strip Protocol

  1. Not surprising to see this kind of thing in the wild, it’s been around a long time! A few years back I used a powerline-based ethernet plug that had 2 units which you’d connect to 2 outlets in a house to make a temporary ethernet connection. It was always a little spotty, but if I recall correctly, it was party of a larger design by some power company that was sold as a larger system. I personally don’t expect much progress on that front unless we start designing buildings’ power “grids” (nets?) to have better RF characteristics.

    1. Temporary? Ha! My dad has had a set of powerline ethernet adapters in his home for at least a decade now. The old walls block WiFi signals extremely well so this was the only way to get his office connected to the network without needing to run new wiring. The current generation of powerline ethernet adapters are actually pretty fast and stable.

    2. Just hope you don’t have any ham-radio operators around when you use those things. The amount of noise they produce on the radio band is atrocious. And power wires make a great antenna.

  2. Some are even simpler: the Bunnings LEDs are strings of anti-parallel LEDs… pass the current one way, you get the red and amber LEDs illuminating, pass the current the other, and the green and blue LEDs illuminate. PSU does PWM with a ~60V P-P waveform.

    1. heh, data over the power line, or power over the data line? i know dallas 1-wire from the context of temperature sensors (DS18B20). they can operate in a 3-wire mode (pwr, gnd, data) or a 2-wire mode (gnd, data with parasitic power). the thing is, the way a client speaks to the host is by pulling the data line low, so the host has to have a very weak pull-up, which can’t provide much power. so to power the device during the (relatively) high current ADC sampling phase, if it doesn’t have a separate power line then host has to pull the data line high with a high-current supply. so the host has 3 levels for the data line: data low (pulled down), data high (weak pull up) and power high (strong pull up).

      i haven’t done it but i think the more ubiquitous id tag dallas 1-wire devices don’t have any power needs so they just need the data low / data high driver.

      1. Yes and it’s full duplex to, not bad for old tech lol.

        Digital single duplex is easy with some resistors and an analog input.

        Full duplex can work the same but you probably wand to include some op-amps and filtering for high (non-RF) bandwidths.

        And if you want to go RF then it’s power over antenna wires.

  3. A somehow related question. Does anyone know what are those wires called? I’d like to buy some thin wire with transparent… well… coating? insulation? enamel? Generally any wire that doesn’t draw too much attention when stuck onto furniture, corner of the wall, etc. I failed to find it on eBay and AliExpress, but I must be using wrong keywords. Anyone?

      1. I had already tried enameled and magnet wire and I only found different shades of brown. Bell wire seems to be mostly red and white twisted pair. The wires from a LED string I have are tinned copper wire (around AWG36) covered in some transparent insulator, just like the one in the article picture. But when I look for transparent enameled wires or transparent magnet wires, I only get AWG28 stranded wires in thick insulation :-(

        1. Kynar is wire-wrapping wire, and I can’t recall ever seeing any with clear insulation, only translucent. Kynar is also silver colored when stripped, but these wires are thicker and copper colored. Clearly you’ve never seen these type of LEDs in person. I usually find them attached to a small battery case, but this is the first I’ve heard of them having a 1-wire protocol.

          The only thing I’ve been able to guess is maybe the insulation is more of the resin that encases the LEDs, and that they dip the whole thing during manufacture.

Leave a Reply to GarberParkCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.