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.

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.

@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.

Looks just like the amblone project. Maybe an easier way to do the same exact thing if you’re a beginner like myself. I was able to build it and have it up and running in a couple of hours. Cost was less than $50.

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.

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.

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