{"id":135016,"date":"2022-01-31T21:22:33","date_gmt":"2022-02-01T05:22:33","guid":{"rendered":"https:\/\/lifeboat.com\/blog\/2022\/01\/reverse-engineering-a-two-wire-led-strip-protocol"},"modified":"2022-01-31T21:22:33","modified_gmt":"2022-02-01T05:22:33","slug":"reverse-engineering-a-two-wire-led-strip-protocol","status":"publish","type":"post","link":"https:\/\/lifeboat.com\/blog\/2022\/01\/reverse-engineering-a-two-wire-led-strip-protocol","title":{"rendered":"Reverse-Engineering A Two-Wire LED Strip Protocol"},"content":{"rendered":"<p><a class=\"aligncenter blog-photo\" href=\"https:\/\/lifeboat.com\/blog.images\/reverse-engineering-a-two-wire-led-strip-protocol2.jpg\"><\/a><\/p>\n<p>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?<\/p>\n<p>[Tim] hooked up his oscilloscope to the LED strings to find out how they worked, <a href=\"https:\/\/cpldcpu.wordpress.com\/2022\/01\/23\/controlling-rgb-leds-with-only-the-powerlines-anatomy-of-a-christmas-light-string\/\" target=\"_blank\">detailing the results in a comprehensive blog post<\/a>. As it turns out, the controller briefly shorts the LED strip\u2019s 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.<\/p>\n<p>After reverse-engineering the protocol, [Tim] <a href=\"https:\/\/hackaday.io\/project\/183709\" target=\"_blank\">went on to implement a similar design<\/a> 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\u2019s 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [\u2026]<\/p>\n","protected":false},"author":662,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1523,38,1512],"tags":[],"class_list":["post-135016","post","type-post","status-publish","format-standard","hentry","category-computing","category-engineering","category-mobile-phones"],"_links":{"self":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts\/135016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/comments?post=135016"}],"version-history":[{"count":0,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts\/135016\/revisions"}],"wp:attachment":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/media?parent=135016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/categories?post=135016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/tags?post=135016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}