[DIY] Ambilight Project – WS2812B LEDstrip + Arduino Leonardo

Discussion in '[DIY] User Showcases' started by HomeY, March 6, 2014.

  1. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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
     

    Attached Files:

    Last edited: December 14, 2014
    • Like Like x 7
    • Thank You! Thank You! x 2
    • Creative Creative x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,422
    Likes Received:
    2,503
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,166 / 13
    Home Country:
    France France
    Show System Specs
  4. edterbak
    • Team MediaPortal

    edterbak Test Group

    Joined:
    March 4, 2008
    Messages:
    2,114
    Likes Received:
    736
    Gender:
    Male
    Occupation:
    Researcher
    Ratings:
    +1,178 / 5
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Great work!
    Also my compliments for your endurance. :):):) The result must be a sweet reward.
     
    • Thank You! Thank You! x 1
  5. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    TNX!

    Prrrrrrrrrrrrrrrrrrrrrrrrrttt!!! :D
    And it's still working fine (still scared.... :cautious: )
     
    • Like Like x 1
  6. alan wang

    alan wang New Member

    Joined:
    August 25, 2014
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    China China
  7. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
  8. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,422
    Likes Received:
    2,503
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,166 / 13
    Home Country:
    France France
    Show System Specs
    APA 102 seems to be quite similar to WS2811 ...
    but seems working on 12V
     
    • Agree Agree x 1
  9. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
  10. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,422
    Likes Received:
    2,503
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,166 / 13
    Home Country:
    France France
    Show System Specs
    Ah, yes 5v.
    but have 4 wires. I dont know if the picture , is thd good one.
    Ws2811 and ws2812b have 3 wires.
     
    • Agree Agree x 1
  11. alan wang

    alan wang New Member

    Joined:
    August 25, 2014
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    China China
    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
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!