I made this for about $100 with a Raspberry Pi and no soldering:
I’ve always thought that Philips Ambilight TVs were cool. They do what you see in that video: shine the edge colors past the TV. But it was always a “nice to have,” so when I was buying my TV I prioritized other features. Later, Philips launched the Hue Play HDMI Sync Box, which would let you create an Ambilight effect with Hue light strips. Again, cool, but not $300-and-tied-to-a-proprietary-system cool.
BTW, the generic name for “Ambilight” is “bias lighting,” so I’m going to start writing that instead. Aside from looking cool, I’ve had some eye strain issues with my TV and heard that bias lighting could help with that. After using it for about a week I can say that yes, it does!
I’ve also known that LED light strips are really cool to work with, but it’s been years since I soldered anything so it was all pretty intimidating. Also intimidating: flashing microcontrollers like the ESP32. I’ve always felt more comfortable with a Raspberry Pi because it’s a Unix system; I know this. When I found out that I could build a bias lighting system for about $100 with a Raspberry Pi and no soldering, I jumped on it. It started with this video guide from DrZzs:
The magic behind it is Hyperion, an open source system for doing bias lighting based on an HDMI input source. I had no idea something like that existed, and now it’s glued to the back of my TV. As a bonus, there are a bunch of fun effects so you can use it as an ambient RGB light when your TV is off. I can also control it with Home Assistant!
Here’s what I wound up buying:
DrZzs recommends these 150 LED/5m strips but I bought these 300 LED/5m version. In retrospect, the 150 LEDs would probably have been better because they are lower power and we don’t need very high resolution for this. I have a 55″ TV and used 212 LEDs from the strip.
Someone on reddit suggested a 20W power supply to go along with the higher power usage for a 300 LED/5m strip. I prefer the 10W power supply that DrZzs linked to for two reasons:
- The 20W supply requires you to wire your own power cord in
- The 10W supply comes with a barrel connector that makes plugging everything in easy
Remember, I’m threading the needle between “excited for bias lighting” and “too complicated to bother with,” so convenience matters.
I was worried that the 10W supply wouldn’t be enough for the 300 LED strip, and technically it isn’t. The conservative estimate for amperage is 0.06A/LED, so 300 LEDs could need as much as 18A. Also I followed DrZzs tip around 15:30 to power the Raspberry Pi from the same power supply, which recommends 2.5A. However, the more realistic calculation for LEDs is 0.02A/LED and 350mA for the Pi, so my final power estimate is about 4.5A. Plenty of power from a 10A supply.
The HDMI Capture Loop that DrZzs linked to in his description is sold out on Amazon so I went with a solution I found in the reddit comments. DrZzs’s recommendation is a capture loop – it sits inline with the HDMI between the source and TV, and sends a capture to the Pi via USB.
I got this 4K HDMI splitter and this 1080p USB capture card. It means more HDMI cables behind my TV, but also helps with my cable management because my TV’s inputs are separate from the TV. So the HDMI splitter sits in my media console while the Pi is on the back of the TV.
These little wires are actually a huge part of what makes this project accessible to me. When I’ve seen LED projects before, you’ve had to solder wires to a ESP32 and then to the tiny contact strips. What I like about this project is that I grab a female-to-female wire, plug it in to a GPIO pin on the Pi, and plug it on to the male connector of the LED strip. Done. Connected.
These corner connectors are great for making the LED strips sit flat. When I was roughing the LEDs in, I just made loops at the corners to get a bend, but these make it look much better. It took me a few tries to figure out that the corners and strips go under the pins, but I got there eventually. Also the pins weren’t perfectly aligned with the copper bits on the LED strip, at least until I nudged them into place.
I did run in to some problems, or at least went off script from the tutorial video. First, instead of using Raspbian and manually installing Hyperion like in the video, I used a Pi image put out by Hyperion called Hyperbian. Download the image, flash it to an SD card, set up the WLAN and it’s good to go.
Second, the LED strips on the Pi just did not work right when I connected the data pin to GPIO 18. I think DrZzs glosses over the importance of having the Pi and the LED light strip share a common ground. The lights were fuzzy and not powering all the way until I grounded the LEDs to the Pi. Just like I have a wire going from the GPIO 18 pin on the Pi to the data pin on the LEDs, I added another wire going from the ground pin on the LED strip to a ground pin on the Pi. Suddenly everything lit up perfectly.
The last gotcha was that there was quite a bit of lag between the TV screen and the LEDs. If you don’t notice latency, don’t go looking for it. You will be cursed with the knowledge that it’s there. I’m not going to mention it to my family so they don’t notice it. I did make good progress on reducing the latency though, and I’ll outline how in a future post.
This was a fun project and I’m much more comfortable with LED strips now. I’m looking for other places in my house to install them. It’s also been fun to see which scenes have been really enhanced by the lights. I’ll end with one of my favorite examples so far, from Mary Poppins:
2 responses to “Open Source Ambilight LEDs on a Raspberry Pi for $100”
This is sooo cool! I’m putting it on my projects list.
Nice! I’ve had a Hue Sync Box for about a year and it’s been so buggy, I was ready to try this out, but recently Hue finally released an LED strip that did different colors in different zones, and it works a lot better now. Good to know this is still possible if I ever get tired of Hue nonsense.