Introduction: DIY PC Ambient Lighting Using Arduino and WS2812b LEDs

Picture of DIY PC Ambient Lighting Using Arduino and WS2812b LEDs

Wanted some more depth for my gaming/movie viewing experience so here's how I installed my ambient lighting.

Before we begin, this project requires you to know how to use a soldering iron and some other basic tools. If you're not comfortable soldering, you can get somebody to do it for you... or learn how :)

Note: I'm making this after I finished the project so the pictures shown will be from the finished product.

Note2: Since this seems to be a point of confusion. This project works on computers that can run the Ambibox software. The LEDs are controlled using this software, so using this setup for regular TV viewing won't work.

Now that that's out of the way, let's begin with the parts list:

1. WS2812b LED strip (5m, 300 LEDs, waterproof (not necessary but I like the sleeve).

Link: http://www.ebay.co.uk/itm/WS2812B-5050-RGB-LED-Str...

2. Arduino board. I used an Arduino Leonardo 16MHz

Link: http://www.ebay.co.uk/itm/Leonardo-Pro-Micro-Ardui...

3. An old computer power supply. (Got from the office, if you can't find just ask around somebody's bound to have an extra one somewhere)

4. Double sided tape. I use the Wurth automotive tape since it doesn't leave any residue.

5. Soldering iron, solder, some scrap bits of wire, basic tools

Step 1: Measuring and Cutting the LED Strip

Picture of Measuring and Cutting the LED Strip

So first things first, measure the size of your monitor from behind, just to see how many LEDs from the strip you need to cut. When measuring leave about 1cm from each edge, just to make sure the strip won't show when attached to the monitor.

Once you're satisfied with your measurement, cut the LED strip to length. Each of these LEDs is individually addressable so you can cut after each LED at the marked cutting point (shown in the picture).

Go ahead and cut all 4 strips. Once done move to the next step.

Step 2: Soldering the Strip

Picture of Soldering the Strip

Once you've cut all your strips to size, it's time to re-connect them to act as a single 'flexible' strip.

I used some stranded wire from a piece of Cat6 network cable. Simply solder the +5v to the next +5v rail, the DIN to the next DIN and the GND to the next GND.

Once you've done that the strip should all be connected together in 4 parts.

TIP: Unsleeve some of the rubber cover to expose the solder joints.

Important TIP: Ensure that the led strip direction arrows are pointing in the correct orientation, otherwise nothing will work.

Step 3: Connecting the Ends of the Strip

Picture of Connecting the Ends of the Strip

Once you're done soldering the strip together it's time to connect the ends, this part needs a bit more patience.

Solder some black wire to the GND pins at the beginning and end of the strip.

Solder some red wire to the +5v pins at the beginning and the end of the strip.

Hint: Soldering the power connection in this way allows for better power distribution in the LED strip giving more even brightness.

Solder a green/white cable to the Din at the BEGINNING of the strip (otherwise nothing will work).

Once this is done you can connect the black and red power wires to a molex connector, then to the PSU.

Caution: Make sure your connections are correct before you go to the next step as you might fry something if they're not.

Finally you can turn the PSU on by placing a jumper (I use a bit of solder) between the green and black pins of the ATX connector. This 'fools' the PSU into thinking that the computer is asking for power and thus switches it on.

Once this is done the LED strip should flash momentarily and then go off. This is normal as the LEDs have no input to tell them what to do. That's where the arduino comes in.

Step 4: Connecting the Arduino

Picture of Connecting the Arduino

Connect the DIN pin to pin number 3 on the arduino board. Mine came with some headers which I soldered on.

In the image I accidentally used a white wire for the ground and a black for data. Don't get confused, the data wire from the strip needs to connect to the 3rd pin on the board.

Optional: You can connect the GND pin from the arduino to the PSU GND, this is useful if you're using a separate power source from your PCs PSU.

Next connect the arduino to your PC and install the necessary drivers (if any).

Assumption: You know how to compile the code to your arduino. If not search the countless tutorials online :)

Use the arduino programmer to compile and program the arduino board with the following code:

https://pastebin.com/9UGAQrTy

Step 5: Setting Up the Software

Picture of Setting Up the Software

Download and install ambibox

http://www.ambibox.ru/en/index.php/Download_AmbiBo...

Start the software and configure your board as an 'Adalight' board using the appropriate COM port (find from device manager).

Set the Device Type to Adalight.

Set the number of zones according the quantity of LEDs you have

Finally use the wizard (click show zones first) to configure the capture zones. These zones will be what determine the colour of the light.

Once this is done you should be good to go, turn the 'use backlight' switch on and enjoy the colours :)

Step 6: Stick the Strip to the Monitor and You're Good to Go

Picture of Stick the Strip to the Monitor and You're Good to Go

Finally, use some double sided tape to attach the strip to the monitor. I used the Wurth stuff because it's strong.

Simply place some tape along the strip then line it up and stick it on.

Voila you've got yourself some ambient lighting for games.

Hopefully this tutorial helped you ascend.

#pcmr

Comments

apsteinmetz (author)2017-08-18

Again, the color changes are controlled by software reading the PC screen pixels. Try this, https://www.instructables.com/id/Ambilight-System-for-Every-Input-Connected-to-Your/, for a more general solution that works on any input. The more general solution requires more hardware, An HDMI splitter, HDMI-to-analog box , analog video capture to USB box and finally a Raspberry Pi which controls the LED strips. You'd think the hardware wonks in Shenzhen would be selling an HDMI pass-through with a USB breakout for this purpose by now.

HinkePank (author)2017-08-15

Can you please explain, how the arduino gets the right colors ?

Does 'ambilight' - software gets the information somehow ( from internet ?? ) and send it to the arduino ?

That would mean, I need to connect a PC always to the arduino.

I hope, I'm wrong with this ( but maybe think of a raspberry ... )

apsteinmetz (author)HinkePank2017-08-18

This project only works on a PC, or a TV being used as a PC monitor.

Smees69 (author)2017-08-14

Maybe I missed it, but does this project automatically change colors to match the dominate color on the television?

tintii (author)Smees692017-08-15

indeed it does :) depending on how you configure the software that is.

Smees69 (author)tintii2017-08-15

Thanks for the reply tintii. I think I have a new project to tackle! I currently run LED strips behind my television. I can change the color, but it's static, until I change it again. I usually keep it red, but it would be nice to have auto-changing colors. I also run a 16' strip over an arch between rooms. Could I set this up to affect that source as well?

tintii (author)Smees692017-08-16

I think the software allows you to control multiple input sources if you like, or have a static/dynamic colour on a primary/secondary strip. Just make sure that the type of LEDs you're using are fit for the job :)

Malaky95 (author)2017-08-11

This is really something interesting, I would ask can we power it with an other 5v (like a smartphone usb cable)

I don't really want to put this inside my pc ^^

tintii (author)Malaky952017-08-11

Well it's unlikely. Each LED uses about 50mA at full load, so for every 20 LEDs you need 1A of power from your outlet.

What I did is connect it to the PSU inside my computer using an elongated Molex connector, that was the easiest way to avoid having an extra PSU. Just make sure your power calculations are done correctly before connecting stuff, you dont want to damage your PSU accidentally ;)

Gautierl (author)tintii2017-08-14

You can buy a small power supply such as this one for example : https://www.amazon.ca/12-Volt-Power-Supply-Standar...

Swansong (author)2017-08-09

That looks really pretty! Great lighting feature :)

About This Instructable

4,561views

102favorites

License:

Bio: I'm an engineer.
More by tintii:DIY PC Ambient Lighting Using Arduino and WS2812b LEDs
Add instructable to: