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

HomeY

Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    47
    ::1
    Home Country
    Netherlands Netherlands
    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:

    TV_BackWiring.jpg

    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:

    Rainbow.PNG

    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:

    IMG_20140226_175619.jpg

    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:

    LetThereBeAtmoLight!.jpg

    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!

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

    Libraries:
    FastLED
    Adafruit_NeoPixel
    Arduino library for addressable RGB LED strips from Pololu

    My settings:
    AtmoWin_Settings.PNG
     

    Attachments

    • WS2812B Datasheet.pdf
      260 KB
    • WS2812B_VS_WS2812.pdf
      111.4 KB
    • Atmoduino_HomeY.zip
      781 bytes
    Last edited:

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,892
    5,549
    France - IDF
    Home Country
    France France
    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
    2
    0
    32
    Home Country
    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
    http://www.szledcolor.com/productshow.asp?id=878&sid=199
    APA102 LED Made in China Taiwan
    http://www.szledcolor.com/productshow.asp?id=892&sid=199
     

    Users who are viewing this thread

    Similar threads

    Read elsewhere that flickering may be an issue with the lan port of the Pi. Anyone else had this problems? Could be my issue as the problems startet when exchanging lan cabling.
    Read elsewhere that flickering may be an issue with the lan port of the Pi. Anyone else had this problems? Could be my issue as the...
    Hey guys, inspired by @Lightning303 I am trying to find my way to build my individual ambient lighting system. Will try to find...
    Replies
    201
    Views
    20K
    DC12V is the correct power. The LC8808 is a 3-channel constant current LED drive with resumable data transfers and internal display patterns. There are three open-drain constant current outputs, with a build-in PWM of gray scale. The range of input power is from +9V to +15V, and voltage-endurance of LED port is +12V. There is a...
    DC12V is the correct power. The LC8808 is a 3-channel constant current LED drive with resumable data transfers and internal...
    Introduction Over time there have been many Windows alternatives to Atmowin and under Linux there is Bobilight however there is...
    Replies
    352
    Views
    194K
    Hello guys , i have a little question about this project. I really want to use this project with the software "aurora" but i want to use it by USB connection (so without the ESP8266), and i'm wondering if it's possible. I plan to use it only with my computer so the USB is not a problem. I also plan to replace the LED by a LED strip ^^
    Hello guys , i have a little question about this project. I really want to use this project with the software "aurora" but i want...
    Hi, I would like to showcase a project of mine, that I have been working on for quite some time. What is it? AtmoOrb is a lamp...
    Replies
    50
    Views
    54K
    MP1 MP2 WS2812B DE
    // AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1 #include <FastLED.h> // Set the number of leds in the strip. #define NUM_LEDS 188 // type of the LED controller #define LED_TYPE WS2812B // data and clock pins #define DATA_PIN 10 CRGB leds[NUM_LEDS]; void setup(){ Serial.begin(115200); FastLED.addLeds<LED_TYPE...
    // AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1 #include <FastLED.h> // Set the number of leds in the strip. #define...
    Hello guys. For a long time now i was thinking of getting myself a new project :) Well recently i decided to start the ambilight...
    Replies
    14
    Views
    4K
    0.6.1 and up firmwares should be supported soon enough, made a fix for it and let dev know so with any luck this will get included :) Can follow issue here if you want: conflicting declaration 'typedef volatile uint8_t RwReg' · Issue #15 · focalintent/FastLED-Sparkcore · GitHub
    0.6.1 and up firmwares should be supported soon enough, made a fix for it and let dev know so with any luck this will get included...
    Introduction Since Hue had its fair share of limitations due to the protocol and it not being well suited for fast Ambilight...
    Replies
    87
    Views
    43K
    Top Bottom