Make Your Own Ambilight for $60

Ads by Google

Ambient lighting that reacts to the image on your TV is easier and cheaper than you think – and it makes for a great upgrade to your home cinema experience.

Originally developed for Philip’s TVs in 2002, the feature is still only available in a limited number of models – and as a result, a lot of people have tried to make their own Ambilight that didn’t involve buying a new TV. Until now, they’ve been relatively expensive or low resolution (just a few pixels on each edge) – I even made a single pixel version a few years ago. Now a new generation of affordable, programmable LEDs has arrived – and you too can build a high resolution Ambilight clone for as little as $60. Interested?

Step 1: Demo

First, a demo of what we’re making. In case you’re curious, the video playing is Electric Sheep, a 3-hour long psy-trance trip – it’s a perfect match to demonstrate the Ambilight. Of course, not all video is going to produce the same pleasing results – many movies are just too murky, or are presented in cinema format resulting in black bars (and consequently, no colour data). I found the best results with the bright, vivid colours in most animations, as well as action movies with elaborate CG effects.

At the moment, it only works with some signal processing on the computer side – so it’s great for things like VLC, Popcorn Time, Kodi (formerly known as XBMC), or PC gaming. Unfortunately, processing generic HDMI input is more difficult – at the very least, we would need an HDMI splitter, and some kind of converter to a more readable analog format. I’ll leave that for a future project – for now, this only works with a computer.

Step 2: You Will Need

Ads by Google

The parts list is short – no complex electronics here:

The main part of this ambilight clone is a string of individually addressable WS2812B LEDs. Each LED has it’s own chipset and single line is used for communication.  I bought mine from Aliexpress for $52 including shipping – that was for a 5-meter reel (150 LEDs), which is more than enough for the largest of TVs – and a lot cheaper per LED than the $50 string that Adafruit sells. A standalone 5V/10A power supply can be bought for around $10, but I used an old ATX power supply that I’d previously converted into a bench supply. If you have a huge TV and are planning to join multiple strips because 5 meters isn’t enough, be sure to work out your exact power requirements at 60mA per LED.

Step 3: Wiring

Let’s test the lights first to ensure the power supply is sufficient and the basic communication is working. Connect pin 6 from the Arduino to the DIN on the LED strip – your strip should have a breakout lead on one end, so use a male-female jumper wire. Also connect the GND pin from the Arduino to GND on the strip. Do not attempt to provide power to the strip by the 5V pin on the Arduino. You will fry the Arduino, very quickly. Instead, use an external 5V power supply. A desktop PSU will happily power the full 5-meter strip for testing (assuming you’ve followed our bench supply conversion guide). Calculate at 60mA per LED; so in my case, 114 LEDs at 60mA is just under 7A. If you’re thinking, “7 amps sounds like an awful lot!”, it’s because this runs at 5 volts – 7 amps at 240 volts would be a lot more!

Note that these strips have a specific direction in which the signal must flow, indicated by arrows. If you’re connecting multiple strips, you may also need to re-inject the power midway to avoid voltage drop – I found this was unnecessary with just 5 meters though.

Step 4: Load the Arduino code and Test

There’s both an Arduino and Processing part to the project. First ensure you’ve added FastLED to your Arduino libraries directory, then download this code. Modify line 7 for the number of LEDs you have; and if you find the colour profile is broken, modify line 47. For the strip I purchased, it’s using chipset WS2812B and colour order of “GRB”. See the FastLED documentation on how to calibrate to your strip – but the default should be fine if you bought the same LEDs.

Lastly, you need the Processing components from the Adafruit project code. For testing, open up Colorswirl.pde. Again, modify the number of LEDs on line 29; and the serial device on line 44. If Arduino is the only COM device plugged in, Serial.list()[0] is fine. If not, try Serial.list()[1]. Run the app and with any luck, your strips will show a beautiful swirl of colours.

Note that you’re not limited to Processing – anything which is compatible with the Adalight (such as Prismatik) can also be configured to work with this – but we’ll only be covering the setup procedure for Adalight in this tutorial.

Step 5: Measure and Cut To Size

Pull your TV off the wall or turn it around, and measure up. I’m assuming you’ll be sticking the strips directly to the TV, but if that’s not the case you’ll need to build a frame. Try to ensure you get a pixel directly in each corner, but otherwise this step should be easy. Go ahead and cut the strip into shorter lengths – cut only between the copper pads where the dashed line indicates; and apply 3M double-sided sticky tape to each length. Don’t use cheap, generic tape like I did – it just won’t stick.

If you need to leave a gap at the bottom due to a TV stand, do so, but make sure your strip starts on either side of that and not in the corner – you can configure those missing pixels later in the software side of things.

Step 6: Trim the Plastic


If your strip is contained within an outer waterproof plastic case, trim this away.

Carefully apply a little solder to each copper pad before you affix this to the TV – it’ll make joining the pieces a lot easier later on.

Step 7: Attach to Your TV and Join


Go ahead and stick the strips to the back of your TV, remembering that each strip has a direction that the signal must follow. It doesn’t matter which corner or which side of the TV stand you start from.

To join the corners, simply connect each of the 3 pads to their counterpart in the next strip. Again, applying a little solder to the wires before you attempt to join it to the pads is a lot easier. Leave the final strip as is – don’t connect it back to the start!

Step 8: Test Again

Let’s make sure we didn’t mess up the soldering there – load up the color swirl app again and check. Once you’re happy, return your TV to the right position and tidy up the wires. Let’s move on to configuring the software.

Step 9: Configure Adalight

The is the most tedious part of the project – each individual LED must be defined in the software. Load up Adalight.pde in Processing and first change the variable that defines the number of pixels along the sides and top (ignore any missing ones for now) – this is on line 87. In my case, I used 35 pixels on the top and bottom, and 22 at the sides, so this was defined as {0,35,22}.

Just underneath this is where you’ll find the “per-LED information” – a long list that defines every single LED around the TV. Each LED is defined as a set of 3 numbers:

  • Monitor number (I assume 0, but yours might be otherwise)
  • X coordinate – 0 being the left (facing the TV screen)
  • Y coordinate – 0 being the top (facing the TV screen)

Thankfully, one of our incredible readers – James Rankin – has developed a useful online utility which does the hard work for you. Just enter the size of your matrix and the start position, then copy/paste the generated matrix definition into the Adalight Processing app. He’s also posted a quick fix for dealing with widescreen movies, where the Processing code would normally evaluate the black bars at the top and bottom of the screen to mean display no lighting effect. Thanks James!

If you get errors when compiling, it means you’ve missed a comma somewhere or have too many curly braces – double check your code.

Step 10 Sit Back, Watch a Movie!

Run the code and launch a movie with your favourite software – the debug console of Processing tells me my computer manages a good 15 frames per second (that’s the refresh rate of the LEDs, not the video playback) – any modern computer should be able to handle that. There’s a few more variables you can adjust such as minimum brightness and the fade delay between refreshes – as ever, you’re encouraged to read through the code, understand it, and modify.

Congratulations, you now have an awesome DIY Ambilight system for $60 (and some LEDs left over, probably). Questions or problems – get in touch in the comments and I’ll do my best to help. Also tell us – what would you like to make with the remaining LEDs?

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Raspberry Pi Projects
Raspberry Pi Projects
560 Members
DIY Tech Projects
DIY Tech Projects
375 Members
Arduino Projects
Arduino Projects
338 Members
Home Entertainment
Home Entertainment
93 Members
Affiliate Disclamer

This article may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
New comment

Please login to avoid entering captcha

Log In