Make Your Own Ambilight for $60

Written by

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?


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 1 / You will need

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 2 / 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 3 / 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 4 / 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 5 / 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 6 / 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 7 / 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 8 / 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.

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?

Comments (157)
  • Stefan

    Hi, can I use RGBW LED bulb? I have one with full colors. It use bluetooth as controll. Is there any way to make ambilight with that bulb? Thanks!

    • James Bruce

      Well, in theory, sure. But in practice, I don’t think anyone’s tried this. Bluetooth latency is bad, so your bulb will always be behind the on-screen action, and you’d need a Bluetooth adapter on your PC.

    • Stefan

      Ok, thank you for answer. I have BT adapter for PC. Also, I have RPi and Arduino (and Arduino advanced kit). Can I combine all that to make something close to ambilight? :) I don’t care for latencay, .5-1 sec is fine, just to work :)

    • James Bruce

      This project would be more relevant:

      Instead of sending the colour value to 3 pins, you’ll need to work out hwo to send over Bluetooth to your bulb. Does it have an API? Without knowing how to send those, it’ll be tough.

  • Herman

    Very nice project, I will build it, but there is something not clear to me. I understand the output part of this, but I don’t see the input, where does the arduino get it’s input. In other words how is the movie information connected to the Arduino?

    • James Bruce

      The Processing app on your PC examines the screen and send the edge pixel data to the Arduino over USB.

      This doesn’t work for generic HDMI input, as that would require a Raspberry Pi, video capture card, and HDMI splitter.

  • Noah

    Id prefer to buy the LEDs elsewhere so what should I search for specifically? Also which arduino uno should I get for this? If you could provide a link that would be great! Thanks!

    • James Bruce

      “WS2812B” or “Neopixels”

      Any Arduino Uno, but dont waste money on an official. I would provide a link to AliExpress, where I buy everything, but since you don’t like that site…

  • Patrick


    Did you solder 2 wires on the Ground and +5?

    • James Bruce

      No, mine came like it. One pair goes to a DC adapter. The rest go to a three-pin plug.

  • Spencer Powell


    First of all, awesome tutorial! I’m working on this for a school project. I decided to make a scaled down version on my macbook pro laptop (12 columns and 8 rows).
    I’ve got everything soldered and the lights work when I’m using adalight’s strand test.
    After uploading the Adalight sketch to the arduino, I run the Adalight in processing and I get this error:
    “The size of this sketch could not be determined from your code.
    Use only numbers (not variables) for the size() command.
    Read the size() reference for more details.”

    Any ideas how to solve this issue?

    • James Bruce

      I believe latest version of processing changed a lot, and make the code incompatible – try the older version, or look for updated code by Adafruit.

Load 10 more
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