Extreme Ambilight System Using [ws2801 + Arduino Uno]




About: Computer Engineering @ASU in JO.

the colors in reality are 99% true , the whites in this video were more purple since im recording using my iphone :D

so, here it's guys, the ultimate ambilight clone you can make.

what are we trying to accomplish is scanning the edges of a screen and determining the average color of those spots, then apply those colors to the leds, in a fast way that we shouldn't notice any delay while watching a videos

to make this possible we need:

*addressable leds, to be exact we need the ws2801, they come in many shapes, i got the 5m strip from:


*arduino uno microcontroller with usb cable, u can find it easily, no need to buy it online..:)

*a windows pc, i have tested this only on windows 8.1 pro x64, and lately with windows 10 pro x64

*a power supply to power the leds, in this case im using the pc power supply to get the 5 volts, DON'T use the power from the arduino or usb, it wouldn't work.

the whole project normally costs around 70$, if you are getting the whole 5m of the led strip.

let's connect those wires .. :)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Wires Connections Diagram

connect everything from the IN side on led strip and not the out side, since this strip is not analog, it's digital, direction of data is important

the ws2801 has 4 wires to be connected, let's start with the ground, ground the led strip GND to the arduino and the powers supply ground, very important to prevent flickering.

next thing is connecting the arduino to pc, easy, using a usb cable.

to power the led strip we need 5v, tab into any not used molex connecter in your spower supply, usually 5v is the red wire, check it with a volt meter, if it's, connect it to the 5v in the led strip

two wires are lift, the SD is the data, connect it pin 11 on the arduino

last wire is the ck wire, which is the clock wire, connect it to pin 13 on arduino.

thats about all about the connections

some note:

setup your led strip around the screen, u can either have it go all around the screen, or just the main 2 sides and the top as i did, since usually the bottom of the screen isn't far from a table, it would look much better if your screen is on a wall, the closer to the wall the better.

Step 2: Code,software and Downloads

first, download arduino IDE, install it.

download this library:

fastled library downlaod

import the zip library to arduino IDE.

you need to know what com port your arduino is connected to, you can find that using the device manager.

download the sketch and upload it.

on pc, we need the capturing program, i've tested 3 programs, ambibox is the best so far, specially if you are on windows 10, it has the ability to capture your desktop and full screen apps and games, so no worries :)

Ambibox Downlaod

last thing is to install ambibox, select adalight as a device, select your com port.

count how many leds you have used around your screen, setup your scanning box, and you are good to go.

note that some strips have different color orders, the one i got is BGR so you can select that also.. :)

also note that the arduino sketch isn't the same as the one on adalight site, i found this modified faster version that works with me flawlessly

for capturing method select windows 8, even if you are on windows 10.

you can modify you color settings such as gamma and saturation to make the colors match the screen.

ambibox has many other features such as constant color and mobile control along with creating profiles for certain moods such as letterbox movies and full screen videos.

thats about all, don't forget to comment and give feed back.

7 People Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

32 Discussions


3 years ago

if you're interested in using a custom pc client for this project please visit my new post for the new and super fast ambilight software



Question 11 months ago on Step 1

Hi just wondering does this need to be connected permanently to a pc or can I download the settings to uno then run uno on my tv

1 answer

Answer 3 months ago

No sir, here the software Ambibox constantly sends signals to the arduino UNO ... so If you want to use this ambilight setup on your TV then maybe you should use a HDMI cable to connect your pc display to your TV and then maybe you can stick the LED strip on the back of your TV .....In a nutshell you need to have a PC running ..... or you may watch Great Scott's videos on ambilight DIY where he used raspberry pi .... if you want a link to that video just tell


1 year ago

I have added fastled library via zip library add on to my Arduino. However, when it said “download the sketch and upload it”. I don’t get it.

Where can I find the sketch and upload it? Fastled library consists of many example sketches. But which one is it?

I am newbie here. I know nothing about electronic stuff. I was happy enough to connect my RGB LED WS2801 to Arduino, and power on. Now is to comprehend the instruction to download the sketch and upload it, then learn about ambibox.

Somebody> help me on this pls?

1 reply

Reply 1 year ago

Download the sketch attached to this post and upload it to your arduino. to clarify more, fastled library consists of examples sketches to preview how the library work which in our case is already figured out and implemented in the sketch attached in the post which makes your life a bit easier.


1 year ago

have added fastled library via zip library add on to my Arduino. However, when
it said “download the sketch and upload it”. I don’t get it.

can I find the sketch and upload it? Fastled library consists of many example sketches. But which one is it?

am newbie here. I know nothing about electronic stuff. I was happy enough to
connect my RGB LED WS2801 to Arduino, and power on. Now is to comprehend the
instruction to download the sketch and upload it, then learn about ambibox.

help me on this pls?


2 years ago

I'm the only one that the arduino stops working after 10 seconds? just freeze the leds


2 years ago

Hi. I done step by step from yourstutorial but. when i instaled ambibox run adruino nothing happend should i do something in arduino program ? i instaled 2812b tape 180 leds.


3 years ago

Os there a difference between the IP30 and the IP67 on this link? Its a bit cheaper. https://m.aliexpress.com/item/32679373493.html#autostay


3 years ago

I think this project causing shorts to my pc PSU. Can anyone familiar with this phenomena? One of the symptoms is a PC restart loop.
I have 5v/10A PS connection to one LEDS end and to the other LEDS (2812b) end, I connected the data and GND to the Arduino, which is connected via usb to the pc.
Hope someone can help on this.

1 reply

Reply 3 years ago

also connect the external gnd to the arduino gnd .. might help ..


3 years ago

OMG thank you for this. i was having trouble with every other code i tried with led flickering with my 61 ws2801 strip when changing colors. switched to this and typed in my led number that was it and it works flawlessly now no flickering or wrong colors.


3 years ago

I used an Arduino Nano powering the led strip using usb power and it seems to be working fine. Is that all right?


3 years ago

hi there,

I love the idea of this project. But unfortunally I run into a problem when I try to upload it. It gives me this error. I have the same Arduino and the ws2801 leds. Does anyone know what I am doing wrong?

Thanks in advance!

1 reply

Reply 3 years ago

thats not the code i've posted.. also you should download fastled.io from there site which is fastled.io, go to sketch -> include library -> add a .zip file. then try to upload.

also this post is old and this is the better solution



3 years ago


This is a great tutorial and easy to read.

I will challenge with 130 inch diagonal screen with this method.

In my case, it will take around 10 meter of LED.. So, huge power is needed aroun 100 watt.

By the way, it looks like the power source should be distributed in a parallel(?) way to LEDs following to the adalight site (https://learn.adafruit.com/adalight-diy-ambient-tv...

Do you have any advice for this? I have no idea what would be the best wiring in this case such as "how many parallel lines?", "what would be the ideal distance between powers?"

One more question, do you think it will be better to have two power supplies instead of having a one big power supply?

Any advice would be very helpful. Thx in advance!

2 replies

Reply 3 years ago

first .. u should consider the software limits before the hardware limits ..

if u r goin 10 meters .. with 32 led/m wire, u r talking about 320 leds ,the maximum of ambibox is 300 boxes (not sure though), i guess .. next thing u should consider .. is ur pc gonna be able to handle the processing 300 spots on ambibox..besides the pc, u got the arduino, which isn't fast at all for such a thing, and will cause a noticeable delay in writing the data to the led wire, so using something faster than the arduino ,i recommend the "teensy 3.2" , that mp is allot faster than the arduino, it's 72mhz..

after all this .. powering the wire, i don't have much knowledge in this area, but with trail and error u can make it, from the page i bought my leds it says 7-9W / meter, 7 is when running a single color (ie.Red) and full brightness, 9w is with all colors on (white) , so u need at least 90 watts power supply .. u can buy a 90w ps, or better u can use an old pc psu and hook it up with a jumper on the atx to keep it on and use dat psu for as many leds as u want, in both cases u get to use only one psu from any end u want, no need for the adafruit hassle (wiring leds and daisy chain the power), thats all i can help u with .. :) hope it works well for u, don't forget to show me what goes on with u .. :)


Reply 3 years ago

Thx very much.
Yes, teensy 3.2 I've already ordered.
As you mentioned, teensy 3.2 with OctoWS2811 Adaptor will be perfect for my project.
I will upload when it's done. Thx again:)


3 years ago

i have already bought ws2812b led strip, can i use them for this project? what changes would i need to made?

1 reply

Reply 3 years ago

Basicly, what you need to change is in the arduino code, see the first line the void setup function "FastLED.addLeds<WS2801,....".

try to replace it with "WS2812B" and see how it reacts to it, if that didn't work see how to declare your type of strip in the fastled.io library ..

i don't think there's any changes required in the PC software ..