Introduction: Build Your Own Ambient Lighting With the Raspberry Pi

Picture of Build Your Own Ambient Lighting With the Raspberry Pi

I wanted to build an Ambient Lighting System for my TV ever since i bought the Raspberry Pi one year ago. After I finally managed to order the necessary special WS2801 LED strip, I started the build and everything went better than expected.

This is a tutorial which I splitted in 3 parts for endurable video length and clearer structure.

In the first part I talk about the led strip, how to position it and how to solder it. Also I install the Raspbmc on the SD Card and get everything ready for the Boblight plugin.

The second part is the most complicated one. It is all about configuring the Boblight plugin and connecting the GPIO headers to the strip. After this part you will be able to recreate the project.

The third and final part is all about optimizing. I modify the case and made everything much compacter and user friendly.

Step 1: Watch Part 1!

I think part 1 is very simple and there is not much explaining to do. Just be sure to get the right parts and you can download Raspbmc with this link:

Step 2: Order Your Parts!

Picture of Order Your Parts!

Here is a small list of things you will need.

Raspberry Pi:

Raspberry Pi Kit:

WS 2801 LED strip:


WS2801 LED strip:



Female headers:

Male headers:

Shrinking tube:

5V 3A Power supply:

WS2801 LED strip:


WS 2801 LED strip:
Raspberry Pi:



Female headers:

Shrinking tube:

5V 3A Power supply:
WS2801 LED Strip:


WS2801 LED Strip:

Raspberry Pi:



Female headers:

Male headers:

Shrinking tube:

5V 3A Power supply:


WS 2801 LED strip:

Step 3: Watch Part 2!

This time it is more about the software aspect. Get the necessary software in the next step and configure your Ambient Lighting.

Step 4: Download the Software!

Download the BoblightConfigTool right here. And you can also download my boblight.conf file to use it as a reference. You can download PuTTY and WinSCP with the links:



After this part 2 your project is done. But be sure to check out part 3 to optimize the Ambient Lighting.

Step 5: Watch Part 3!

Take a look at the next step to find more information about the "wire" part.

Step 6: Get the Connections Right!

Picture of Get the Connections Right!

I did not create a schematic for this. But I took a lot of picture so look carefully to get all the connections right.

Step 7: Success!

You did it ! Your very own Ambient Lighting. I hope you liked this project.

Feel free to check out my Youtube channel for more awesome projects:

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information.


Tom De prins (author)2017-10-08

I keep getting the message 'This add-on requires a bynary library'. I installed '' in the usr lib folder but it doesn't work. Hyperion works and connects etc. But boblight keeps hurting my feelings ;p. Anybody who can help me please?

DavidinCT (author)2017-08-31

Looking over the WS2801 strips, there are 2 models, One is $60, one is $35, I cant tell the difference, Is the $60 one much better and how ? The ebay one is $25 but, is only for 1m (3.3 feet), so that wont do.

Tom De prins (author)2017-05-01


Username and password are different in OSMC. So if you use putty use this information.

Username: osmc

Password: osmc

GreatScott, maybe you can edit your instructable and mention this?

i-blaze (author)2017-01-16

Hey guys i wanting to make this for my PC dual monitor setup.

just wanted to know that do i need exactly this same components sine it will be connected to my PC not TV?

Ardutronico (author)2017-01-15

I'll make this project when I have individually addressable LEDs and my Orange Pi (I will hopefully receive it next week). BTW, you should have soldered the strips before pasting them on your TV.

JohnM801 (author)2016-05-23

Nice project. But how do get the video into the raspberry pi? or are you using the raspberry pi to play the video?

SimoneU2 (author)2016-05-21

Hello, I want to do this project, but I do not understand some things, okay the raspberry pi 3 model b? LEDs are fine WS2812B? Best 60 LED / m or 144 LED / m? the system is the same for TV 4k? The system is independent and works with both tv that with the PC?

MichaelG75 (author)2016-04-02

Does anyone know if this is the same led strips just updated? 1m WS2812B RGB LED Strip, 60 Addressable Pixels, 60 per metre, DC 5V

CasperJ7 (author)MichaelG752016-04-16

read this

for Raspberry pi ws2801 is the best :)

KeithC57 (author)2016-04-13

Will this work with a Raspberry Pi 3 (RPi3) Model B?

Humveeforce (author)2015-03-26

I have followed your instructions. Great tut. However, I am using Kodi now and a 50" TV with all 4 sides with LEDs. I am also using PiB+. So, almost everything is slightly different, but theoretically should work. Problem is, I only get the first LED to light. Sometimes red, green or white. I have tested that 5V is going all the way to the last LED so I know it has power. Any ideas?????

keshav2 (author)Humveeforce2016-01-21

hello,did you sort it out? I am having same problem here! I am kind of desperate please help me

Do you have a 5V buffer driving the I/O? If not, I would reckon that the 3.3V RPi I/O is just is not enough for the first WS2801 chip. If you have a buffer, check that your refresh rate (clock frequency) does not exceed WS2801 specs.

Anyway, an oscilloscope is always useful in debugging off-chip signals.

I followed the instructions in this video and the refresh rate is what is stated there and in the boblight wiki.

OK. I fast-forwarded through the videos, but did not see any mention of an output buffer. Thus, the system described here will work only by accident, i.e., depending on the length and thickness of the wires from RPi to the 1st WS2801, process variations, Vcc levels etc.

The WS2801 specs state that Vih=0.8*Vcc...Vcc, i.e., the lowest input voltage that is recognized as a logical one is exactly 4V with a 5-volt operating voltage. As your RPi has (apparently, I have only RPi2) an I/O voltage of 3.3V, the first WS2801 will correctly recognize '1' only by sheer chance. Getting erratic lighting functionality and the inability of the 1st IC to regenerate the input would very much fit an I/O voltage problem.

You can try reducing the Vcc for the LED strip until 0.8*Vcc is somewhere near 3.3V, but this would be rather stupid. I recommend using any 5V buffer IC that has a 3.3V-compatible input (or a lower 'high' threshold). A logic level converter would obviously also work, but I reckon a single 74-series IC harvested from an old junk PCB would be the best DYI solution.

Could you provide the easiest way to install Or set up a 5v buffer. Thanks

single transistor should do the trick

Unfortunately, that won't work. You need a path to drain the charge too. I reckon the absolute minimum would be 4 transistors (two inverters in series). Then again, constructing CMOS pairs with discrete components is risky at best.

See, now i'm a little bit smarter. Thx

Do you have 'eco parts' lying around? I used a 74ACT240PC as it was the first suitable IC i picked up from my stash. Obviously, I had to connect two of the eight buffers in the IC in series, as the function is inverting. Anyway, as I wrote earlier, the only relevant criteria here is the minimum high level input voltage, which is listed in the component's datasheet. The IC does not have to be a buffer, you can e.g. connect two NAND gates in series and get a non-inverting function.

If you have no used components to work with (or interest for a DYI build), I recommend buying a logic level converter, a.k.a., a level shifter. These run at about a dollar a piece shipped. See e.g.

Im new to this. So i shift the di and ci to the strip up to 5v correct? Then i should be able to lengthen the wires to the strip with no issues? Thanks guys

Exactly. Each IC (on the LED strip) will regenerate the signal for the next LED, so if you get the signal correctly to the first LED, the rest will work as well.

If the first signal (RPi output) is no good, well, then the 'garbage in, garbage out' principle will take effect, and the LEDs _might_ start lighting up consecutively, but all data (colors) and timing will be completely random. Logical zero (0V) will obviously always be recognized, but the 3.3V RPi logical one will register correctly only by sheer luck as the minimum Vhi on WS2801 (with 5Vcc) is 4V.

GianS1 (author)2015-11-16

Dear Scott,

I've got a few questions.

1. Do you use RPi A or B? Yours looks more like A but you recommend B.

2. For the SD card, must it be SDHC? I don't really know what the difference is between that and a normal card.

3. What do you use the male/female headers for? How many do I need of those.

Kimberly2000 (author)2015-08-11

Okay, first let me say, "Awesome!" Without these videos and your video on Hyperion, I wouldn't have a working ambilight.

My only problem is that my RPi2 keeps flashing the color square on the screen while playing videos, and after a little reading I found out it is telling me that it is underpowered. This usually only happens during a bright scene in the movie, and last no longer than 2 seconds. However, it can happen any number of times during a single movie or TV show.

I've noticed that this has started to cause playback issues, with video freezing and once paused, I can't resume play.

Here is a list of things I did differently. I'm hoping someone will be able to tell me what corrections I can make to have my project be more successful.

Also, I'm not an electronics person, so dumb it down for me. Thanks!

Instead of cutting the end of the power cord and soldering directly to the RPi2 I used a barrel plug Y adapter. I used two barrel cables with on off switches between the Y adapter and the Pi an and the plug for the light strip. Last I put a barrel to micro USB connector inline with the Pi.

Instead of a 5V 3A power supply I went with a 5V 8A brick we had.

Other than that, everything is the same. I figured the 8A although split would be enough to power both the Pi and the strip.

Is there a simple way to keep the stuff I have and make it work properly, so that it will keep a steady flow of 5V going to the Pi?

ProxyProdigy (author)2015-06-17

In your video you show that you solder your power leads to the solder pads next to the cap. However, your pictures above show that you have 1 lead soldered to the outer solder pad and the other is soldered to TP1. Does it matter which you solder to?

To answer my own question, it appears that it does matter. When I soldered directly to the solder pads, the Pi wasn't getting enough power to turn on. When I moved the lead to TP1, the Pi was able to start.

Ruurdv (author)2015-06-12

Great tutorial. I just received all the needed parts in my mail and can't wait to get up and running.

I noticed that your version of Rasbbmc is not available anymore, they switched to OSMC. I've put OSMC on my SC-card and got it installed succesfully on my Pi, but.. i can't control it. The mouse isnt working at all. The cursor is all wierd, looks like it's stretched? Am i the only one having this problem? Anyone knows how to fix this? I've used multiple mouses!

Code_Runner (author)2015-05-25

Hi there. Can we do this with arduino instead of Raspberry Pi ? (author)2015-04-20

Hi, can i connect a WS2812 led strip like this? I mean, without Arduino. (author)

i've built it with arduino uno and rpi b+, but it's slow and delays. compiling and instaling boblightd on osmc was pain in the butt. going to try Hyperion now, since
it supports ws2812. if it works, i'll make na instructable for dummies (as myself)

Only with Raspberry Pi 1 (A and B models). RPi2 support has been under development for a long time now, so I wouldn't hold my breath for that...

takeabigbyte (author)2015-04-16

Video 3 scares me off a bit, but I am so tempted to try this! I have a computer engineering background but it has been 6 years since I graduated, and I have only done light soldering work since then. I've decided. I AM GOING TO TRY IT!

Can I get a 5V 3A micro USB power supply and just plug it in directly to the Pi if I don't use a dedicated switch?

Why not. Then again, I would not recommend driving much more than 1A through RPi (from the micro USB to the GPIO 5V pin, that is). Besides, RPi has a fuse in the power input (1A in models A and B, and 2A in B+, if I remember right). Don't know about the fuse in RPi2, probably 2A as well.

iceidea (author)2015-04-23

Hi Scott,

Thx for this great Tutorial...

I started this project following every steps, and buying the same stuff except the Led Strip I've got already bought few months ago for experiments.

The Led is a 5050 GRB as shown in the pic of this link

How can I use it in the project? How can I wire the RPI to this led strip with 12v, R, G, B pins?

Thanks in advance,


Iceidea. You need an individually addressable led strip. Meaning one IC per led. For less headaches i would buy the ws2801 strip and be done with it.

javuvy (author)2015-03-27

Great tut! Thanks for sharing

Only one question. What's the final cost of the full installation? I think your system is cheaper than lightberry package, isn't it?

Humveeforce (author)2015-03-26

MarcoH1 (author)2015-03-26

this is really awesome. But after I watched the 3rd part, I think I'll just let it go...

mariosmax (author)2015-03-21

Hello GreatScott,
i want to make a similar prokect but i want to use a raspberry bi 2 and the WS2012b LEDs but i am not sure if thats possible because these kind of stripes do not have clock port. Any ideas ?

DavidL29 (author)2015-02-13

Hi there :-)

Do you thing this tutorial will work with the new Raspberry 2?

GreatScottLab (author)DavidL292015-03-13

I never tried it. But it should be possible with a couple of changes in the software.

MarkusS4 (author)2015-03-10

Hi Scott!

Thanks, this tutorial is great! I also want to build one ambilight.

I have one question regaring the lower side of the TV. You mounted the leds on 3 sides, Does the the boblight config support 4 sides to have full ambilight experience?

PeterF5 (author)MarkusS42015-03-12

In the config-tool you can pic LED's on the buttom as weel, so i think it's pussible :)

GreatScottLab (author)PeterF52015-03-13


housepainter (author)2015-02-13

Thanks for this excellent tutorial!!! Very easy to follow.

As a result of my eagerness I did by mistake buy a led strip of the APA102 model instead of the ws2801.

Is there any chans that I can make it work with the APA102 strip or do I have to buy the ws2801 one?

This is the ebay site of the one that i bought:

real_Napster1 (author)2015-01-07

for any reason my mod isn't working.... :(

Only the frist LED on the ws2801 lights up (white)

Nothing more.. Has anyone an Idea what could be wrong?

I bought this led strip:

Can anyone help me?

I use a 5v 4A power supply for my raspberry Pi B (rev2, Same as in the Video), and atm a led strip of 24Led's for testing.

Wedgec (author)2015-01-03

Hi Scott, really looking forward to starting this tutorial. I'm a newbie with this sort of thing but believe how you've explained it will really help :) I just have a quick question about the LED's. I'm in the UK so was wondering if the below will be OK? I have a 50" TV if that makes any difference.

Thanks :)

GreatScottLab (author)Wedgec2015-01-08

They should work fine!

About This Instructable




Bio: Awesome Electronics Tutorials, Projects and How To´s
More by GreatScottLab:Make Your Own Crude Cocktail MachineMake Your Own Solid State RelayMake Your Own Simple Theremin
Add instructable to: