Ambilight TV

80K92856

Intro: 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

  • 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: http://boblight.googlecode.com/svn/wiki/diagram.pn...

  • 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: https://github.com/timsat/boblight-lightpack/wiki/...

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,

Thanks,

Aviv Mussali (@avivmuss)

54 Comments

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!

Hey,

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.

Hey,

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.

First of all, congratulations!!
Can I use the WS2811 or WS2812B strip led with 60 led/meter?
Or maybe WS2811 led chain >> encurtador.com.br/deMQW
I'm from Brazil and it's almost impossible to find this enderesed leds.
Thanks.

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)

http://awesomepi.com/part-2-let-there-be-light-ins...

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

Any help appreciated.

I ordered this power http://www.aliexpress.com/item/free-shipping-1-Pcs-5V-6A-30W-Voltage-Transformer-Switch-Power-Supply-for-Led-Strip-Light/32437570302.html and these leds http://www.aliexpress.com/item/DC5V-5M-WS2801-32leds-m-5050-RGB-Addressable-LED-Strip-Arduino-development-ambilight-TV-12mm-led/32595888388.html

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.

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!

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.

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.

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.

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 libboblight.so or something.

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

More Comments