DIY PC Ambient Lighting Using Arduino and WS2812b LEDs

32,799

131

29

Introduction: DIY PC Ambient Lighting Using Arduino and WS2812b LEDs

About: I'm an engineer.

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.

Note3 (thanks to RostislavK): If you're having trouble with the arduino code, you can use the following instead: https://github.com/dmadison/Adalight-FastLED/releases

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

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

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

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

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

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

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

Be the First to Share

    Recommendations

    • Tiny Things Speed Challenge

      Tiny Things Speed Challenge
    • Hide It Challenge

      Hide It Challenge
    • Laser Challenge

      Laser Challenge

    29 Comments

    0
    Malaky95
    Malaky95

    4 years ago

    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 ^^

    0
    PodyP
    PodyP

    Reply 7 months ago

    small problem phone charger can only give 1amp u need 5

    0
    tintii
    tintii

    Reply 4 years ago

    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 ;)

    0
    Mousepotato01
    Mousepotato01

    4 years ago

    Ok I am kind of lost do I instal this software and the code in my nano or just AMBIBOX. Please explain this is all new to me? Thank you in advance for any help you may lend with this issue. Also can I use NANO or do I need UNO?

    0
    PodyP
    PodyP

    Reply 7 months ago

    nano uno same board

    0
    tintii
    tintii

    Reply 4 years ago

    you can use either the nano or the uno, you just need to know which pins to use as output. regarding flashing the software, there are plenty of tutorials on how to do that :)

    but in a nutshell you need to load up the arduino ide (dev environment), connect ot the board via the correct COM port and compile the software

    this guide should give you all the necessary instructions:

    https://github.com/arduino/Arduino/wiki/Build-Process

    0
    Mousepotato01
    Mousepotato01

    Reply 4 years ago

    I think I was misunderstood??? What software do I install into my ARDUINO the code from https://pastebin.com/9UGAQrTy or this http://www.ambibox.ru/en/index.php/Download_AmbiBo.. I am unsure what to program my arduino with. Then I see other links like this one https://www.instructables.com/id/Ambilight-System-for-Every-Input-Connected-to-Your/ in the other messages so please what code links do I follow that need to be programmed into the microcontroller?

    0
    tintii
    tintii

    Reply 4 years ago

    This project uses the code from the pastebin link ;) im sure you can make it work with others if you're up to the challenge.

    0
    RostislavK
    RostislavK

    4 years ago

    Hello there, I have followed your tutorial and everything works. But sometimes leds starts flashing, changing colors quickly while I am using AmbiLight software. Any idea how to fix it?

    0
    PodyP
    PodyP

    Reply 7 months ago

    turn down brightness or add resistor to data pin

    0
    tintii
    tintii

    Reply 4 years ago

    can't say i've had this issue. could be you have too many LEDs in the strip? Does it happen if you set the software to display a single colour or mood light? Maybe it's related to the capture, i set it to win8 mode.

    0
    RostislavK
    RostislavK

    Reply 4 years ago

    Thanks for reply. I tried official arduino ambilight code from dmadison's github (https://github.com/dmadison/Adalight-FastLED/releases) and now its working flawlessly. Would you mind adding that link to your post for people with the same problem?

    0
    tintii
    tintii

    Reply 4 years ago

    done, thanks for the link :)

    0
    rafaelalmeida18
    rafaelalmeida18

    Question 3 years ago

    its work in led strip 6803

    IMG_0312.JPG
    0
    PodyP
    PodyP

    Answer 7 months ago

    yes

    0
    jakel104
    jakel104

    Question 3 years ago

    So how do I use the .rar file for the ardunio?

    0
    PodyP
    PodyP

    Answer 7 months ago

    unzip iot it

    0
    RamzM1
    RamzM1

    Answer 2 years ago

    you have to unzip the file

    0
    askfriends
    askfriends

    Question 1 year ago

    i Just made it and its really looking awesome but i have a problem!
    Some leds wont respond according to color pixels in screen, i looked closely at them they do turn on but have very low brightness and wont change color correctly. So what could be the reason??
    I am using 104 Leds setup and 6A external power adapter.