Arduino Based PC Ambient Lighting

[royboy] from the Arduino forum has recently made a post showing off his Arduino / PC ambient light system. The system is simple to wire up and easy to use, as long as your video is being sent from a PC, which for many of us that use “home theater pc” systems is very convenient. Using a sparkfun red/green/blue (non addressable) led strip, an ULN2003A, an Arduino, and a short sketch written for processing the project is easy to toss together and very effective too.

The processing sketch continuously takes screen captures and then takes the resulting pictures and averages all the colors together. That average color is fed down to the Arduino over its stock serial connection, where it is output to 3 of the pwm capable outputs. Those outputs are connected to the 2003 Darlington transistor array to switch the 12 volt led strip.

It may seem like it would be slow, as processing is an interpreted Java based language, plus serial communication, plus Arduino overhead, but its actually very responsive and completes its task with little or no lag. Join us after the break for a quick video to see for yourself.

[youtube=http://www.youtube.com/watch?v=Am55k0k9eq8&w=450]

20 thoughts on “Arduino Based PC Ambient Lighting

  1. Probably mentioned this the last time we saw one of these ambient light systems, but I still think it would be simpler and more effective to simply run the analog output values of a VGA or DVI connector through a low-pass filter. Might not work for HDMI, but HDMI is a totally unnecessary standard whose sole purpose is to provide the hardware interface layer for DRM-encumbered video.

  2. Cool project! This is like the Philips Ambilight HDTV. I don’t know if the Philips Ambilight is the original invention, but it’s the first one I heard of.

    Interesting links:
    – Philips Ambilight .
    – “Ambilight” for your PC .
    – A simple static ambient lighting solution .

  3. @M4CGYV3R

    There is a button that says “Tips” that’s where you contact HaD with links to your project. I’m sure Caleb does a bit of project searching himself – but i’d bet that most of them are tips from people.

  4. @MrX
    If you use the XRender extension, you can scale down the root window to a pixmap, then read that out with XShmGetImage, the scaling is done in hardware (at least on nvidia), so you have a lot less pixels to read back to system ram.
    Sadly on nvidia this doesn’t work on fullscreen opengl applications when flippin is enabled, it seems to always grab from the same color buffer, so about half the time you get the backbuffer with only half the things drawn on it.

  5. I would love to do this with my mac. I have one of the planar XScreens that I have often thought would be perfect since there is a gap between the glass screen and the bezel that surrounds it.

    I think there was a plugin for PC VLC to do ambient?

  6. Cool project! This is like the Philips Ambilight HDTV. I don’t know if the Philips Ambilight is the original invention, but it’s the first one I heard of.

    Interesting links:
    Philips Ambilight. The one to which everyone seems to refer. The original???
    DIY Ambilight clone on a PC using an AVR, some ULN2803’s, DirectX, and serial port communication between the device and the PC side. (Russian language.) Translated to English (note! terrible translation). It was interesting to read that he chose to illuminate three sides only because the bottom side interfered with the keyboard, etc. and he thought it looked bad.
    A simple static ambient lighting solution. Not nearly as cool as the ambient lighting that adapts based on current on-screen scene, however.

  7. P.S. sorry my original post earlier lost the links, but these are better links anyway!

    Hackaday really needs a preview button! Or at least remind us to use HTML for links, not plain text. BTW, what other formatting can be put in comments? I don’t see any info on the supported syntax.

  8. A while ago I started work on a similar project using a USB micro controlling I2C drivers like the TI TLC59116.

    Got some of the I2C code written but moved on to another project before I wrote the USB bridge code and client software. Or built enough modules to implement what I wanted (at least 4 RGB segments, possibly 6).

    Nice work anyway, goes to show that the quick and simple hack that you actually finish is worth more than the proper design you don’t.

  9. I’ve been wanting to do something like this for awhile. It would be nice to use a video decoder chip or something so you could take the video from HDMI or component, and it could work with anything, not just the computer. I haven’t found anything to do this that isn’t surface mount though

Leave a Reply to Prof. GeisstCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.