Ambilight TV





Introduction: Ambilight TV

Raspberry Pi Contest

Runner Up in the
Raspberry Pi Contest

I have been always amazed by Philips Ambilight TV. Unfortunately they were pretty expensive, and this is why I have looked for an easy cheap solution to be able to create the same user experience. This was my first Raspberry Pi project, and it's pretty simple and good for beginners. Everything is based on different materials I have found online, especially with the help of the guys of the raspbmc project (today OSMC).

Sit tight, read carefully, and prepare yourself for one of the greatest TV hacks exists :)

Step 1: Gather the Right Supplies

  • Raspberry Pi (35$+) - My pi runs raspbmc, but it is also possible with OSMC, openelec, and any other media service. There are tons of tutorials for setting up a pi with any of the above. In case you run any problem - just let me know.
  • WS2801 LEDs Chain (30$/60$) - I have built it for my 32" TV so I used a chain with only 50 LEDs. In case your TV is larger, you can order two chains (total of 100). A 50 LEDs chain costs about 30$.
  • 5V 2A PowerSupply Unit (PSU) with output plug of 5.5mm (8$) - A good PSU is important, you should also let it use enough current so the colors will be correct. For example, a good way to see if your PSU is not strong enough is if the white light is a bit pinkish or blueish. In case you use only one chain, 5V 2A should be find, otherwise, get 2A for each chain you use (even 2.5A).
  • Female 5.5mm jack (1$) - In order to connect the chain to the power supply we need this jack. Connect a red wire to the '+', the blue to the '-'.
  • Board the size of the TV - You can use an old TV box. We will talk a bout the board in the next steps.
  • Jumper Wires

Step 2: Connect the Pi to the LEDs

It's time to connect the LEDs chain to the pi. I have used a raspberry pi 1 (the second version with the 512MB), but I will state the names of the ports we need to connect the wires to, so googling "raspberry pi gpio diagram" with the version you have will show you the details.

I have used the diagram that can be found on:

  • Connect the blue wire of the chain to GND (pin6) - That will provide us a ground potential.
  • Connect the green wire of the chain to SCLK (pin23) - That provides the slave (==chain) clock.
  • Connect the white wire of the chain to MOSI (pin19) - That provides the data.

Step 3: Configure Boblight on the Pi

Now, on a system with boblight installed, we will configure it to match our chain. We might go back to this step again later on, after connecting the chain. If you get everything right there's no need to.

We need to create couple of files:

  • boblight.conf - The file that hold the configuration of the LEDs. It uses percentages to show the exact position of each LED. Think about it such that each LED shows the average color of a square of the screen. The square is defined by the numbers you see in this file. Later that will help us position the LEDs. This file should be placed in /etc/boblight.conf.
  • boboptions.txt - There is no further editing necessary for this file, you can copy mine. This file should be placed in your user directory.

More information about the configuration file can be found here:

There are many online boblight.conf generators you can find, just google `boblight conf generator` and use your favorite one.

After everything is ready we can test to see that it really works by running the command (from terminal):

sudo boblight-constant 0000FF

That should light the LEDs in blue (all of them). The color is given by RGB format, you can use an online converter to try any other color you like. I recommend test the PSU with white color, see if you get a bright white, if so - the PSU is good :)

Step 4: Prepare the Board

The board is the most important and complicated part. There can be many versions for that, such as wood board, metal or even carton as I used. All last and good.

  • Pick up a board and cut it in the shape of your TV.
  • As explained at the previous step, mark all the places where LEDs should be placed. I have taken each square we average (at the configuration file) and chose to place the LED right in its center.
  • On the sides of each mark, make a hole about 2mm to each side. I have used a thin screw driver to do that.
  • Around each mark, use a zip tie that will be used to connect the LEDs to the board.
  • Connect the LEDs, make sure that you start from the correct position and go counter or clock-wise, depends on your configuration file.

Now we are ready for connecting the pi.

Step 5: Make Them All Work Together...

I have made a place for the pi, and eventually connected everything together.

Now when you run your Kodi, the LEDs will change their color depends on the screen.

Step 6: How to Improve It ?

Be creative.

You can use it not only for your TV.

Take the idea of ambilight, control any LEDs chain you would like, and hook it up with any sensor or controller. For example a nice project can be these LEDs chain that changes the light depends on the music played in the background. You can actually build the Hue if you'd like.

Just look around your home, and I'm sure that you can find awesome places that can be automated :)

Step 7: Future Plans

The ambilight receives its input from the raspberry pi, as well as the TV. That means that the ambilight won't work on any video playing not from the raspberry pi. I have seen a demand for such a thing, and I will try to look and see if it's doable. I have seen some cheap Chinese HDMI processor, I will see if there's something to do with it and if it's possible to create an ambilight based on an HDMI probe. If anyone wants to be part of it, drop a comment.

Also, If you have any questions, or need any help with anything, let me know.
and.... VOTE for me if you like it,


Aviv Mussali (@avivmuss)



  • Epilog Challenge 9

    Epilog Challenge 9
  • Gluten Free Challenge

    Gluten Free Challenge
  • First Time Author Contest 2018

    First Time Author Contest 2018

We have a be nice policy.
Please be positive and constructive.




This sounds like an awesome and quite simple project. Can you help me understand how the Pi gets signal from the TV? Sorry I am a proper rookie and after second read I am still unable to understand it. Thanks in advance!


The pi doesn't get a video signal from the TV but provides an input to it. The pi's role is a streamer, so whatever it plays on the TV it also creates the ambilight.


The PI provides an input to the TV ? Serieusement ?

How could the ambilight match the TV picture if there's no link between TV signal and PI ?

As Aviv stated above, the Raspberry Pi is acting as a media center. The video is coming from the Raspberry Pi

Fantastic project by the way.

Fantastic Project. Just wanted to inquire about the quality of video through kodi py Im stuck between this and going with the arduino on my htpc. Ty

I am a noobie to this project, and i plan on trying this out. But before i start ordering supplies i must know. does this project only work through a media player or can i play a video game on my ps4 with ambilight working?

I have a 43" tv and in a few months probably a 55".

Now for the 43 I'm doubting weather to buy 50 leds or 100.

I assume I can't install like 75 leds with the bundle that you suggest?
If (because later on I'll have a 55") I install 100 leds now, will that fit the 42" tv? or are that too many leds next to each other?

I think you should go with a 100 chain for wach tv. I have used 50 less for my 32" and I think a bigger tv needs more.. Else the ambilight won't be as impressive...
Let me know if you're facing any troubles during the preparations. I'm available for anything.

What a quick reply! thanks!

Question about the PSU. I have an adapter but it matter if plus is on the inside or outside. Do you know for these leds if plus is inside or not?

Also I came across this tutorial which looks nice and easy (and very easily configurable)

can you tell me why I would go for your method or the other?

I can't open the link you've provided. Anyway - all tutorials should be the same, configuration can be done in several ways. I actually coded a tool that converts between the different configurations (boblight/hyperion), you can find it on github.

As for the +/-, less are diodes, connecting them the opposite way can damage them.. Just check for that before you connect, a multimeter should do the job ;)