[DIY] Ambilight Project – WS2812B LEDstrip + Arduino Leonardo (1 Viewer)


Test Group
  • Team MediaPortal
  • February 23, 2008
    Netherlands Netherlands
    Country flag
    First of all a BIG TNX to both Lightning303 & azzuro for helping me out setting this up properly.

    Since we already have a great DIY AmbiLight thread using LED Strings, i thought i’d share my ambilight project which uses LED strips. It’s using the latest WS2812B LEDs and is driven by an Arduino Leonardo. Since the LEDstrips run on 5V, and the Arduino can’t handle the current drawn from the LEDs, i bought a Mean Well power supply to power them. This PSU gives an output of 5V and can handle up to 20 Amps current, which is more than enough, but remember: the ‘bigger’ the PSU, the cooler it will stay. I’ve seen people use an old USB hub or cellphone power supply, but this all depends on the amount of LEDs you’re going to attach to your TV.

    My setup has a total of 173 LEDs (68 Top, 39 Left + Right and 27 on the bottom). Based on this amount of LEDs (and the specs for the LEDs) when all LEDs are full on, the strip can consume up to 10.4 Amps. Max. 20 mA x RGB == 60 mA per LED. 173 LEDs on a strip with 60 LEDs/m = 173 x 60 mA = 10.4A). Make sure you also buy wiring that can handle these currents!

    I’ve chosen for LEDStrips because they are very easy to attach to the back of my TV, which is hanging on the wall with a max. distance of about 5 centimeters in between.

    I ordered my LEDs of ebay (great seller btw!) but you can also find them on alibaba.com if you don’t mind ordering in China.

    The LEDs were shipped the same day i ordered them, and received within 3 days! They were shipped on a reel, in an anti-static bag. JST Connectors were already soldered on the strip (start + end) and i got 1 extra in the bag.

    Package.jpg LEDs Reel with connectors.jpg LEDs Connector.jpg
    (Sorry for the rotated pictures, known issue on the forum)

    The great thing about the WS2812B LEDs is that they’re brighter than their previous version (the WS2812) AND have a reverse connect protection. Attached to this post you’ll find a comparison between the 2 versions, as a WS2812B datasheet.

    I’ve been having a lot of struggles with the LEDs, since they’re very sensitive. Once i had the correct sketch and the Arduino and strip connected to the PSU, the first results are there:

    ArduinoDirectlyToPSU.jpg FirstResults!.jpg

    Tip: When nothing happens, measure voltage on the strip. Because of the sensitivity of the Strip, it is possible that you burned out the LED driver. Simply removing the first LED of the strip often resolves the problems.

    I had some issue with the wiring on the back of the TV at first, because AtmoWin starts counting your Channels (LEDs) from top left (front view). My Arduino only fits on the bottom of the TV, so that means a long DATA cable between the Arduino and first LED, which should be prevented, if possible. If you start your DATA input somewhere else, you’ll have to do some channel mappings in AtmoWin. My primary setup had a long distance between the Arduino & first LED:


    In the end I connected the Bottom strip first, which reduced the 1.4 meter cable to only 10 centimeters (unfortunately no pictures).

    Some pics of the LEDstrips on the back of the TV:

    LEDs_Left.jpg LEDs_Bottom.jpg LEDs_Right.jpg
    Note: The wiring has been changed after these pictures were taken. First DATA input was done on the bottom strip, to keep the distance between the Arduino and the first LED to a mimimum.

    After double checking all my wiring and solder connections, it was time to upload a test sketch to the Arduino. A nice rainbow of colors is what I was expecting, and this was the result:


    That was looking great! So I updated my Arduino sketch for communication with AtmoWin, turned on the PSU, connected the Arduino to USB and told AtmoWin to turn on the LEDs:


    Sweeet !!! :D

    So that works. Then finish the wiring off, make sure you don’t leave any wires lose on the TV, because when the LEDs are on, you’ll get a nice line on the wall if the wire is in front of the LED. ;)

    Placed the TV back on the wall and turned on a fixed color:


    Let there be AtmoLight! :)

    After setting up the proper channel assignments and doing some more calibration in the AtmoWin settings, the end result is great.

    Good luck with your ambilight project!

    Adafruit NeoPixel Überguide (Awesome guide!!)
    Pololu website (Great if you're looking for a US located seller!)
    Tweaking4All.nl (Dutch)
    Tweaking4all.com (English)

    Arduino library for addressable RGB LED strips from Pololu

    My settings:


    Last edited:


    Test Group
  • Team MediaPortal
  • May 10, 2007
    France - IDF
    France France
    Country flag
    Ah, yes 5v.
    but have 4 wires. I dont know if the picture , is thd good one.
    Ws2811 and ws2812b have 3 wires.

    alan wang

    New Member
    August 25, 2014
    China China
    Ah, yes 5v.
    but have 4 wires. I dont know if the picture , is thd good one.
    Ws2811 and ws2812b have 3 wires.
    YES,they are 5V ,APA102 is similar as ws2801,but can be build in ic , APA104 have same function and shape as ws2812b ws2811,and can be compatible with them , but APA104 is stable all of them is 5V ,and APA102 Have 2 shape, one is make China Mainland , another is make in China Taiwan
    you can have a look
    APA102 LED Made in China Mainland
    APA102 LED Made in China Taiwan

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom