Monday, December 21, 2009

How to build your own AtmoLight setup

The whole thing consist of a Arduino Duemilanove, one ShiftBrite Shield by macetech, a couple of Shiftbars also by macetech, a bit of cable, 12V LED RGB light strips from DealExtreme and a nice strong 12V powersource.
I use the 12V line of my computers powersupply, but any 12V notebook adapter with at least 3 Amps should do the trick.

Arduino Duemilanove
ShiftBrite Shield
Shiftbar
cable for the ShiftBars
12V LED RGB light strips



The first thing you need to do is to estimate how much light strips you need and order them. My setup will have 2 light strips for each side of the TV, so i need 8 light strips, 8 ShiftBars and 8 cables to connect everything. But you could also do a setup with 2 lights on the sides and 3 lights each on the top and the bottom plus some lights for a "sum" channel.
This is the nice thing about my solution, you can add as many lights as you like to your setup.

But remember when you order on DealExtreme.com it will take at least 2-3 weeks to ship your order, Macetech will be a bit faster.
!!! You will need the same amount of ShiftBars as you have light strips, because one ShiftBar can only drive one light strip.!!!

If you finally have all the hardware ready, just put it all together.
Here you find the documentation for the ShiftBars and ShiftBrite Shield.

After you finished plugging in the cables you need to programm the arduino with my litte piece of software, which translates the atmolight protocol and drives the shiftbar modules.

You can find a ZIP file with the arduino sketch on my google code site
--> arduinoatmo.zip <--

But before you transfer the software to the arduino you need to do some adjustments in the code.

first ... the number of ShiftBars you are using, just change the constant "NumLEDS" to the number of modules you have connected


second ... the channelorder ... just look a the picture below, should explain it self

REMEMBER ... the channelorder array should be the size of "NumLEDS", so if you have 8 modules
the line should read "byte channelorder[8]={2,2,3,3,1,1,4,4};"

Now you are ready to upload the sketch.

To test the system you can use AtmoWin also found on my google code site, but this is just for Windows.

Other ways to connect are via
boblightd = works on windows and linux
and my favorite videolan using the included atmolight module = works on all videolan supported platforms, but only if the OS also supports the usb to serial converter on the arduino

How to setup videolan (VLC) to use Atmolight

47 comments:

  1. is it possible to order one ready AtmoLight from you?

    ReplyDelete
  2. sorry no, but the solution i present here is very easy to build and you won't need a pre made kit.

    but if you want a kit you could buy it from the original creator of atmolight
    http://ca.rstenpresser.de/shop.php?l=de
    or any of the many similar projects

    ReplyDelete
  3. Can you be more specific on how to connect the power to the Shiftbars? Does the ShiftBrite Shield need to be connected to a power source? I've never done anything this technical before, so please forgive my ignorance.

    ReplyDelete
  4. no problem ...
    you can connect the Shiftbrite Shield to a powersource and it can power the modules in the chain and the arduino itself. But you need to be aware of the voltage drop along the chain.
    I now feed power (12V) from both sides of the chain (8 modules) after i have seen some power loss in modules at the end of the chain.

    ReplyDelete
  5. Can you recommend a power source other than my PC? Will I need multiple power sources then? I'm really fuzzy on the details here.

    ReplyDelete
  6. Good project..

    One question is it possible to use this with MediaPlayer Classic ???

    Best Regards

    ReplyDelete
  7. It'd be really great to add an ADC to this setup so you could just use a video out on a TV... for those of us that don't watch all of our content from a computer. Unless I'm missing something?

    ReplyDelete
  8. Really good project, and very nice presentation. Looks like very simple to set up. Thanks a lot.

    One question: is it possible to light the leds (with a signle color) without a PC and with another power source ?
    Can the arduino works without the pc ?

    Best regards

    ReplyDelete
  9. @phil.downey
    any DC power supply with 12V and at least 3 amps will work ... for example a notebook power supply
    @Doc
    don't really know, if your player uses overlay it's always tricky to get it to work ... i would say it won't work ... maybe you want to try VLC, there is a module included which connects directly to a atmolight ... works best

    @Nathan
    there are some solutions which can do this, but this here will only work with a PC ... i would like such a thing too, but i can't build something like that. it's just beyound my skills.

    @sam
    sure ... the arduino it self is a little "computer", just give it some power and it will run the programm which flashed into it ... so, yes it will run without a pc ... it is also possible to light the led's with a single color or any combination ... a friend would like to use this setup to light up his livingroom ... i will build a extension which accepts IR signals from a simple TV remote and allows to change the color and intensity of the LED's via the remote.

    ReplyDelete
  10. Would it be possible to use this hardware with the windows media center program?

    ReplyDelete
  11. Thanks very much! I just finished this setup and it works perfectly in VLC. I can't understand the atmolight software (i dont suppose there's an english alternative?), and boblight has little to no documentation that i can find for windows.

    Any suggestions for simple tasks like setting colors or fades?

    ReplyDelete
  12. So I actually figured out how to set up atmowin despite my lack of German, but now I'm trying to understand how to use AtmoWin and VLC in conjunction.

    I see that I can choose to either use the external AtmoWin driver, or the internal VLC driver, but regardless of my settings, it seems like only one will work at a time (VLC or AtmoWin).

    Ideally I'd have atmowin running a color or a fade, and then when I started VLC it would switch to the movie sampling, then when I quit VLC it reverts to the AtmoWin mode. Does that make sense?

    ReplyDelete
  13. Hey, does this also works on the desktop or only with VLC?

    ReplyDelete
  14. I am buying a new 40" lcd tv and want to build and use this unit. Maybe a stupid question but how does the unit know how and when to change colour when the tv image changes...what is the input from the tv image??

    ReplyDelete
  15. @Tim
    this also works on the desktop or any other app incl. games
    but you should the new atmolight version for windows
    http://arduinoatmo.googlecode.com/files/atmoWin_0.47.zip

    @Enfermero
    you need to attach a pc to it and run a supported software which will calculate everything and drives the atmolight "unit"
    but it will only work with video running on the same machine
    so for example a PS3 or any other external input device will NOT work

    ReplyDelete
  16. @Jeremy
    sorry, that it took so long ...
    yes, either the atmowin software or vlc will work at the same time ... because they need to open a COM port to the arduino and if atmowin is running vlc won't be able to open the same port
    so you need to close atmowin first
    i don't have a good solution for that, but so that you know i have the same problem

    i need to think about this ...

    ReplyDelete
  17. Why is it necessary to use VLC for movie sampling? If AtmoWin (or correct me if I'm mentioning the wrong program) can sample the screen at any given time - whether you're watching a VLC movie, playing a video game, browsing the web - Can't you just have AtmoWin ALWAYS running which will do the movie sampling for you?

    ReplyDelete
  18. @BPCivicSi
    you can always just use the AtmoWin software, but it will not be in perfect sync with the video, because it just polls the screen at a fix rate and then updates the lights.
    also it uses up much more CPU time

    With VLC you can adjust for the delay and have the video and lights in near perfect sync.

    ReplyDelete
  19. Thank you very much for your replies. I just wanted to clarify some things before jumping in so I get a near-perfect setup. I also noticed your post on djwill31's Video:

    http://www.youtube.com/watch?v=xu6P4BflbTI

    I love this thing he has going on. I also came across this site in which he was doing some commenting, but it's in French...I don't know French, but Google Translator helped some. Maybe it can help you tweak some things.

    http://www.homecinema-fr.com/forum/viewtopic.php?f=1058&t=29909373&sid=d7569fe5d872ab8f3dc5a65da16c485f

    ReplyDelete
  20. Hello, where can you buy ShiftBars and a ShiftBrite shield if you are from Europe?

    ReplyDelete
  21. sorry, i have no idea ... but macetech will be happy to send it any where in europe ...
    it will just take a bit longer

    ReplyDelete
  22. ok thanks, i'll try.
    But if I buy an alternative LED driver instead of ShiftBar, I probably won't be able to use AtmoLight right?

    ReplyDelete
  23. Hi,

    Do you have any pictures of your system? Forgive my ignorance, but I don´t know how to modify or connect a 12V notebook power supply to the ShiftBar modules.

    I´ve found a picture of another project, but i think it´s pretty much the same. http://www.flickr.com/photos/macetech/4025201638/#/

    To I have to close the module chain?

    Sorry again, but this is my first project.
    Thanks for your help.

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. Hi
    Can I use also RGB 5050 LED Stripes with 60LED/1m
    The whole setup would be 3.4meters and a power consumption of aprox. 28W.Like those"http://www.theledlight.com.cn/704-flexible-led-strips-TF-60-W-5050-N.html"

    Thanks, regards

    ReplyDelete
  26. @Melhiat ...
    sorry, but you can't use these LED Stripes ... they draw too much current and will certainly fry the shiftbars. ... each macetech shiftbars can only support a maximum of 150mA per channel and yours will be around 1100mA

    ReplyDelete
  27. Hi, I have an assignment for school where to capture the screen writing a project in C# and pretty much do the same as what Atmowin and Atmolight already does. I have the Arduino Duemilanove already which I use quite often for embedded stuff so I figured it would be nice to use it for this project as well since you already did so much work on the hardware side. So basically i just went ahead and ordered the Shiftbrite shield together with 4 shiftbars and a bunch of cables. I already have 12V LED RGB strips so i'll use those to hook up to the shiftbars. My setup will be a left right top bottom. I modified the C code that you provide to run on the Arduino and it compiles so I Think we're good on that. I'm planning on just bitbanging my collected C# data over the serial port once my project is finished. I haven't really had the chance yet to look into the arduino C code so could you maybe tell me what the arduino wants on the serial line in order to run?

    Thank you so much and nice work by the way...

    ReplyDelete
  28. @oled ...
    this sounds like a nice project.
    for the data, just push simple structs on to the serial port ... you don't need any setup or control commands ... the arduino simply looks for valid color data frames and parses it ...
    i did a short color data frame summary here ...
    http://fun3md.blogspot.com/2009/07/atmolight-technical-post.html

    each frame consists of a header
    0xFF 00 00 0F
    and 5 times RGB data
    0x[RR] [GG] [BB] and then the next frame

    ReplyDelete
  29. That's all i needed. Thanks, i'll share the result with you later on when it's finished. I have about 4 weeks.

    ReplyDelete
  30. Hello!,

    This seems so easy and cool! One questions, the Duemilanove board seems to be replaced by a board named UNO. Do you know if it is possible to use that board without any problems?

    ReplyDelete
  31. Joel it's fine to use uno, It supports all the "shields ect" just a different usb controller really and new firmware

    ReplyDelete
  32. Hi, after some playin around i got this setup working in VLC on behalf teh fact that the bottom LED isn't working. I've switched shiftbars to check if they're ok. Which they are. And no matter what settings i change, the bottom led bar won't light up. The connected led strips are very smal, just 3 leds each so power couldn't be it either i presume.

    Please advise

    ReplyDelete
  33. Did you change to constant #NumLeds and the array "channelorder" to match you setup?

    ReplyDelete
  34. Isn't Arduino Duemilanove just two channel board?

    ReplyDelete
  35. hi mate,
    i decided to make my own atmolight.
    has bought everything the same, except the arduino which i have bought the arduino uno.
    i have connected the uso to arduino, put the shiftbrite shield on top with the power jumper out,
    connected my LED strips to the shiftbars and have my shiftbar connected to a power.
    i am able to upload the atmoarduino, changed to 4 LED, and put channelorder[6]={2,4,1,3};
    couldnt make it work.
    once i start boblight and put a contant of 0000ff nothing happens.

    sometimes, even with the usb disconnected, the strips light up red.
    any ideas ????
    do you have an email so i can email you photos and details.
    would really appreciate your help

    ReplyDelete
  36. Hello
    I’ve a Sony 46” ex 500 and the dimensions is 1127X676. The LED RVB light has a length of 500mm.
    If I want to do the atmolight how many 12V LED RGB lights strips I need? I think 6 at all 2 for up 2 for bottom 1 left and 1 for right…. It is right?
    or I must do 1127+1127+676+676=3606/500 so I take 8
    so my question is 6 or 8 or other?
    sorry for my bad English :)

    ReplyDelete
  37. Hi,

    is this project under development?

    ReplyDelete
  38. it's more like inactive ... it works, but could use some cleaning up and improvements ... but sadly i can't find time to work on it

    ReplyDelete
  39. hi,
    is there a possibility to get the whole code, so i can try to improve it ?
    i have seen some large delays when using 1080p, some other red blinks out of nowwhere, etc.
    have found on google projects, but cant have access to svn.

    ReplyDelete
  40. @Froes & fun3MD: do you think this lag can be solved? Did you tried with boblight? Do you think it could be due to your PC? It's important for me to understand if I can use this software with Bluray (under Ubuntu) because the device is about 200$.
    @fun3MD: Do you think that I can use this led stripe: http://www.dealextreme.com/p/rgb-300x5050-smd-led-multicolored-light-strip-5-meter-dc-12v-41522 ? I need strips of 20-30cm that are flexible so I would want to cut this big stripe in more sections because my Tv is 122cmX80cm and I want 16channels.

    @fun3MD: Can I use strips of different lenght for different channels?


    Thanks you!

    PS.: I hope Froes can help you improving this great and simple project.

    ReplyDelete
  41. I am very confused as there are overlapping configuration options inside both vlc and the amtowina.exe application that seems to automatically get run. What's the simplest configuration to get VLC to work -- i.e. can I only copy the .dll file and not specify the path to the application or something?

    Also, I've tried two tests that have failed. 1. using the dummy target in the atmowina.exe to display the color from vlc on some test window -- it seems unresponsive. 2.try getting atmowina.exe to output random color patterns to the arduion (nothing happens, but with the dummy driver you see the colors change).

    Any suggestions?

    ReplyDelete
  42. Hi

    I’m a little bit noob in electronic but I’ve bought everything to do your project… I’ve one shiftbrite shield I’ve cute one USB cable (1 side go to my PC and the other go to the shiftbrite) and I’ve 4color 1 black 1 green 1 white and 1 red.

    I think I must use the PIN 11(DI) 9(LI) 10(EI) and 13 (CI) but which color of my usb cable go on which PIN?

    ReplyDelete
  43. The particular constructing a enterprise provides is frequently the initial effect which is still left inside the brain of your potential consumer. A contemporary constructing in which sparkles echoes with a enterprise which is concerned with building a beautiful initial effect and definately will create a lot more trips when compared to a constructing which is grungy, unclean, and also ignored. https://pressurewasherguides.com/how-to-build-a-pressure-washer/

    ReplyDelete
  44. Thanks for sharing good article. If you want more information.Please visit my website. just click on this.
    RGB Light Strip

    ReplyDelete
  45. Thanks for sharing good article. If you want more information.Please visit my website. just click on this.
    lighting in Perth

    ReplyDelete