Introduction: Ambilight TV

Picture of Ambilight TV

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

Picture of 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

Picture of 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

Picture of 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

Picture of 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...

Picture of 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)


aarghdanii (author)2015-08-18

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!

Aviv Mussali (author)aarghdanii2015-08-18


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.

rafununu (author)Aviv Mussali2015-08-20


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.

VincentV40 (author)2016-08-20

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

calebr13 (author)2016-07-01

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?

Vince35 (author)2016-03-11

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?

Aviv Mussali (author)Vince352016-03-11

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.

Vince35 (author)Aviv Mussali2016-03-11

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?

Aviv Mussali (author)Vince352016-03-11

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 ;)

Vince35 (author)Aviv Mussali2016-03-24

Any help appreciated.

I ordered this power and these leds

after installing it only half of the leds burn.

strangely the very last LED also burns!

So it’s total 90 leds but only the first 45 burn and the very last led (number 90).

what can this be!?

half of the leds work fine also with hyperion. i can change the colors with the app as well. the last led always has the same color.

is it a power issue? ground issue? other issue?

Thanks for a quick response.

ThijssjihT (author)2015-08-18

This is very awesome! Thanks for this instructable.

I voted for it, but I have to say I did unvote it too.
I voted for it, because it is an easy project, with great results. I saw it, and immediately decided I was going to make this.

I unvoted it, because this instructable lacks some explaination. Step 3 and 4 only has some global explaination about how it works, but I need some exact explaination to customize it for my tv.

"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."

Does it mean I need to use 50 [light] sections, 1 for each led? So will I need 100 [light] sections for 100 leds? I'm not sure. I'm only seeing 3 sections in the picture.

How do I know how many leds I should buy?

I think, with some more information, you could have a winner for the contest. I will definitly visit this instructable again.

I will try this project, and upload some results.

Again, thanks for sharing this cool project!

Aviv Mussali (author)ThijssjihT2015-08-18

Hey, thanks for the detailed comment.

As I said in the beginning, I used 50 leds chain for a 32" TV, I think that for larger TVs you should use two chains of 50 (total of 100 LEDs).

As for the configuration file, there is an online tool that generates the configuration file automatically, so you don't really need to think about squares and such, I explained it so people will get the feeling what happens behind the scene. If you would like I can point you to these tools so it'll be helpful for you :)

I can also send you my configuration files, which fits a 32" TV, or even try to generate a 50" TV file, with 100 LEDs.

Let me know how can I help you :) and I'd appreciate a vote :)

I added also to the instructable under the config file section a link to a deeper explanation about the config file (for some power users, such as you), and also an explanation about online free conf file generators.

Let me know if you need any help with it. Also where I can provide more explanations to this instructable.

ThijssjihT (author)Aviv Mussali2015-08-18

Thank you very much. That is very helpfull.

I think I misread part of the instructable, so sorry for any unnecessary (although well meant) critisism.

As I said before, I will try this, and upload pictures of the result.

Aviv Mussali (author)ThijssjihT2015-08-18

Looking forward for the results, and again - if you encounter any problem or misunderstand anything, let me know - so I can revise it and add additional explanations.

ThijssjihT (author)Aviv Mussali2015-11-06

I can't get it to work. I couldn't find how to install boblight at first. You skip ahead on the install: probably the hardest part of the project.

But I finally managed to install boblight, but now I can't start it. In SSH it's saying it can't acces or something.

Aviv Mussali (author)ThijssjihT2015-11-06

Sounds like an installation problem... Did you look at this tutorial:

It sounds like you've missed a part in it..

JohnM123 (author)Aviv Mussali2015-08-18

@avivmuss This is pure COOL! I wonder would you entertain the idea of making one and shipping it to me? I have arthritis and can't do tiny (relatively) circuits any more.

I have a 32" class set, so it would be almost identical (A Vizio).

I have the cardboard box and power supply already, in my parts bin...

DavidR123 (author)2015-09-04

For anyone wondering about the possibility of getting it to use any HDMI input... It is possible! look into running Hyperion on osmc (raspbmc's new Distro). osmc supports some USB capture cards out of the box (such as easycap capture cards)

I have seen some instructables on this but they are mostly outdated or don't account for the 4 or so versions of the easycap cards that are sold (outlined here: )

for anyone that wants to attempt this the basic signal flow is this

HDMI--->HDMISplitter(the second output goes into the TV)-->HDMI to RCA converter-->USB_CaptureCard-->PiRunning osmc and Hyperion

some resources to learn more:



Slightly outdated instructable:

MattiR (author)2015-08-30

Would a teensy 3.1 be powerful enough for this? I just wonder, its cheaper and at least seems kinda powerful and its a lot smaller which I like. Or whatabout a C. H. I. P. when they come out for real, would those be able to do the job? How much powah does this need?

Aviv Mussali (author)MattiR2015-08-31

Looks like it's possible... The thing is that you need a device which can implement a serial protocol. From what I have seen teensy 3.1 should be good with it (using Wire lib).

elias.alberto (author)2015-08-24

Do you have to install any plugin to Kodi? Is it possible to use it with OSMC? Does Kodi work as a TV tuner if I get one of those RTL-SDR usb sticks? If it does, we could just tune the tv channel right on the raspi, without having to input hdmi signal to it.

In raspbmc the pluging came already installed on later versions, but even without the plugin installed, you can compile and install it very easily (i'll look for some tutorial online).

With a RTL-SDR usb stick, you can enjoy the ambilight effect while watching TV. What you say is correct. It's not that difficult to connect the tuner and configure it to work with Kodi on OSMC/raspbmc and the ambilight is the same anyway.

StephenL6 (author)2015-08-23

Use the pi camera and point it at the TV. Get the pie user to draw lines on the screen where the tv is in the image. Get the pie to use the camera to tell it what colours to display on the baclight from narrow strips on the edges of the TV screen you calibrated the camera too in the first step.

Aviv Mussali (author)StephenL62015-08-23

That's actually a pretty cool idea :P

sartha (author)2015-08-23

hello dear
can we talk direct for this project
message me on
i need more info about abilight and its working

JosephG10 (author)2015-08-20

Hi Aviv, I love this project and would like to make it my first Pi project and I did give you a vote. For the inexperienced, you instructions are lacking detail. I was hoping you could draw up a quick schematic of the components and where all of the wires are going. It is hard to tell in the picture and I like schematics =). Mainly I am curious if the media is coming from an SD card in the Pi or if your BR player is plugged into it or what. A little more guidance would be appreciated.

Thanks, JD

Aviv Mussali (author)JosephG102015-08-22

Hey joseph,

There a schematic of wiring directed by a link inside the wiring step. As for the whole system it's pretty simple:

Raspberry Pi HTMI Output <=> TV HDMI Input

Raspberry Pi GPIO <=> LED Chain

iamdarkyoshi (author)2015-08-21

Could this be used on a 34in 1440p ultrawide with good enough latency to not be a destraction while gaming?

On a 34" - Yes, it can fit any TV.

The TV input comes from the raspberry pi, so good news are that it doesn't affect gaming latency, bad news - it can't play any other input.

gormly (author)2015-08-18

Thanks for the instructable but you are missing one very important thing here.

You neglected to tell everyone this must be run through XBMC (Kodi) the very last sentence has a very quick and non sourced reference to it. You are assuming people know what this means.

Kodi is a media player formerly named XBMC, this device will ONLY work with content streamed through the device itself, in other words, networked media stored on a computer (or media stored on an SD card) on the RaspberyPI and played through Kodi.

This is a VERY important step. It's misleading not to tell people this.

To everyone else. If you have networked media, or SD cards full of media, this will work when played through the Raspberry PI, it will NOT do anything with say a DirectTV/Cable connection or anything not being played directly via the Raspberry PI.

JosephG10 (author)gormly2015-08-20

Ah, didn't see this comment before I asked about that. Thanks for the clarification! I don't think I will be building this now =(

rafununu (author)gormly2015-08-20

OK !

Thanx for your comment. I didn't understand how the link could be established. I left a post about that.

Thanks again.

Aviv Mussali (author)gormly2015-08-18

Thanks for the input. I answered and featured a question that was asked regards this, so people will be able to follow. Once I get more things, I will update the instructable as well. If you read at the materials part, you can find that the raspberry pi's is recommended to run any media server OS version. Still, to play out with boblight you don't need XBMC, and you can write a simple python script that can control it, if you decide to use it with a sensor for example. Cheers.

The Black Python (author)2015-08-19

Awesome progect!!

DonD10 (author)2015-08-18

I'd love to do this on a PC ... any thoughts as to how to make that work? I'm thinking walking around in games, walk through well-lot area, room lights up a bit, darker areas, room dims (for starters) :)

Perhaps something like DaAwesomeP was saying, but to a full PC?

mr_J (author)DonD102015-08-19

Maybe prismatik

Aviv Mussali (author)DonD102015-08-19

It is possible to do this with a pc as well, but you need a serial connection so you can speak to the LEDs. This kind of port doesn't exists on pc's but does exist on Arduino which you can get on ebay for about 8$. Once you connect this to your pc you can have the same experience.

tomcatlyons (author)2015-08-18

This is grrrrrreat! I like colored lights. What a cool idea. Thanks for the well illustrated instructions. Problem is. I live in a dust bowl area. Lake Havasu city in Arizona. Were about 100 klicks so of Las Vegas. We had a radio shack but, they left town without notice. Guess I can order it online.

Aviv Mussali (author)tomcatlyons2015-08-19

I got all the supplies from eBay, I'm sure you can find these on amazon prime as well... I found eBay to be the cheapest and the best :)

Treknology (author)2015-08-18

I've seen commercial third-party versions of this.

Yours is significantly cheaper and way more awesome.

DaAwesomeP (author)2015-08-18

Does boblight have a mode to work over serial. My Kodi media center is a little more powerful than a Raspberry Pi, but it's a real computer. I was thinking that I could use an Arduino to communicate with the LEDs and then back to the computer with serial over USB.

Aviv Mussali (author)DaAwesomeP2015-08-18

Yes, there is an option to use an arduino and run an ambilight. Not sure if it's going to be boblight, but probably there's another solution for that. I recommend you to google and find an online tutorial for that. I have seen some, but never really made one.. If you encounter any trouble, let me know and I can try to help remotely :)

JohnM123 (author)2015-08-18

@avivmuss This is pure COOL! I wonder would you entertain the idea of making one and shipping it to me? I have arthritis and can't do tiny (relatively) circuits any more.

Aviv Mussali (author)JohnM1232015-08-18

Hey John,

Sorry to hear about your problem. I think shipping a board might be too much of a problem (as it might get broken on the way). Still, if there's anyone that can help you with the work, I'm willing to help as much as possible remotely.

JohnM123 (author)Aviv Mussali2015-08-18

All I need any help with is the electronics. The board and the assembly of the lights and the controller to the board. I CAN do. The cardboard (or plywood (likely Lauan or other thin stuff) I can do. I have cardboard and the power pack - plenty of those. Willing to swap supplies if I have enough heavy ones.) Glad to pay costs of parts & assembly, and shipping.

stevenvachon (author)2015-08-18

Question: how do we hook it up to the TV to get video input to the pi?

Looks like HDMI, now that I really look at it. You might want to document this, though.

stevenvachon (author)2015-08-18

Awesome! Much cheaper than buying a commercial product that achieves the same thing, and doesn't require x86/x64 computer hardware! Will be much quieter and cooler too as a result.

About This Instructable




More by Aviv Mussali:DIY Laser EngravingThe QuadcopterLinkIt ONE Music Player
Add instructable to: