Promiscuous Ambient Light
Introduction: Promiscuous Ambient Light
I love shiny. So a television ambient light was an obvious project to spend some time (probably more than I should) and dollars (not many actually).
There are many choices depending on your hardware and budget, but I had some restrictions:
* It should work with any HDMI input. I have been a Kodi+Raspberry pi user for years, but recently I have moved to a Roku device as it was the only reasonable option to have a local media player plus the stream applications that I usually use all centralized (Netflix, Prime, AppleTV+, Youtube). So far I am happy with it, but knowing me it is just a matter of time to start using a different rig, so I wanted something that could work with any HDMI output (hence the promiscuous name)
* It should be cheap. Let´s be honest, I don´t need any of these.
So I searched the web for options, (There are some very good tutorials over there like the one in <PERSON> lab) and the most appealing was to use a Raspberry pi to capture the images to be displayed in the screen, process them, and interact with a strip of leds.
* Pros: works with (almost) any HDMI output and it is cheap
* Cons: nothing beyond that it requires fiddling with wires and some raspberry kung-fu
Supplies
This is the list of supplies. The prices are approximate and based in the components that I bought.
As part of the fun was to select the different components, I will include more accurate information and the links to the stores along the different steps.
* A TV. You probably have one already, its main function in the project is to serve as a surface where to stick the leds.
* A Raspberry Pi. Between $5 and $70, depending on the model.
* An HDMI splitter. $20 (you can probably do better than this)
* A USB HDMI video capture card. $12
* An individually addressable RGB led strip. 51
$15
* A power source with enough wattage. $15
* A JST connector with the same number of pins that your led strip uses (and the opposite gender). $2
* A couple of short HDMI cables (apart from the one that your TV already has)
* Electric cable, and some other random stuff that you probably have around.
* Iron solder (probably) and some basic tools.
Step 1: How Everything Fits Together
The basic idea is to get the HDMI signal coming from a media center (in my case a Roku device) and feed it at the same time to the TV (you still want to keep watching your series) and the Raspberry for processing. You can do that easily with a HDMI splitter, a device that takes one HDMI input and generates two or more identical HDMI outputs.
To get the HDMI signal into the Raspberry we need a HDMI to USB capture card. These devices work surprisingly well for the low cost that they have, they connect to the USB and create in your computer a video capture device that can be used by different software.
The Raspberry has to process the image, and determine what are the relevant colors to send to the led strip, this is done through a very nice software called Hyperion that can do all that for you.
Obviously, the led strip has to be connected to the Raspberry, that is done using of the pins in its GPIO interface.
Finally, you need to power all this. The important part is to have an idea of how much power the leds could draw so you can select a power supply with the right watts.
Step 2: Capture the Signal
One of the fun things of DIY projects is that you learn things. In my case, one of the things I learned is that there is something called High-bandwidth Digital Content Protection (HDCP) that is used to prevent copying HDMI audio and video as it travels through the connections.
From a practical point of view and for what we want to do, this means that all the devices that the HDMI signal crosses have to be HDCP compliant. In my case, I learned that the hard way when after connecting this splitter, I got a message about it in my TV. I had a small panic attack that drove me to buy a compatible replacement as soon as possible and ended up with this one, significantly more expensive, and with some features I do not need (four outputs instead of two), but hey...
In any case, when you buy yours, make sure that it is HDCP compatible and it provides one input to two simultaneous outputs (there are some splitters that let you decide to what output do you want to send the signal to).
Using the USB capture card shouldn't be a trouble. Just make sure that it works. 98