Geeks With Blogs

News
View Szymon Kobalczyk's profile on LinkedIn

Szymon Kobalczyk's Blog A Developer's Notebook

I’ve came across this interesting thread on Arduino forum about using IKEA DIODER and other RGB LED strips to build mood/ambient light. This allows you to create the same effect that you can now find on some TVs. I thought it would be a fun little project to do, and here is a short clip to show you the result:

In case you would like to build it yourself here is how I did it.

The Hardware

To get multicolor LEDs some people are hacking IKEA DIODERs but it’s quite expensive, so I followed the advice found here and ordered two RGB Multicolored 1-Meter LED strips from DealExtreme. Those are flexible plastics strips with 30 multicolor LEDs on each (you can also get it as a bar). It has 4 wires with +12V common anode and separate cathodes for RGB channels.

To control the lights I adopted the circuit shown in Markus post. I put it together on Adafruit’s Proto Shield for Arduino (which is nice because it had the IC pattern for the chip). 

P1140742

Instead of multiple transistors this circuit uses the ULN2003 chip, so that each PWM pin from Arduino is connected to one side of the chip and the RGB channels from LEDs are connected to the other side. Because LEDs require 12V voltage there is a separate power connector (Arduino is still powered from USB). Since I had only a 16V power supply I’m also using a 12V voltage regulator. Next to it I have a push switch to turn the LEDs on/off quickly. The 10K potentiometer on the other side is used to select color hue for one of the manual modes. One push button is wired to Arduino reset pin, and the other is used to switch modes.

I know it could be made prettier but I yet have to learn how to design and produce a custom PCB (please contact me if you’d like to help). If you don’t want to solder this yourself here are some other alternatives that you might consider:

For initial testing I used the Arduino sketch written by Markus. It has three modes: specific color selected by a potentiometer, pulsate the specified color, and smooth transition between random colors. You can find more details in his post.

The Software

Of course it would be hard to get ambient light working for every video source you feed to your TV, but its lot easier to do it when signal is going through a PC. This summer I build a new HTPC based on a Zotac ION-ITX board (cause its super small and quiet). Recently I ditched Windows 7 Media Center in favor of open source XBMC, mostly to get hardware accelerated VDAUP playback. Here are the steps to run it on a minimal Ubuntu install (but I admit I took me three days to figure out how to do it properly).

Apart from the video player we also need additional piece of software that will constantly sample the image visible on screen and produce average color for each LED strip. Thankfully there are existing programs that can do this for us. One of them is called Boblight and turns out to work quite well both in Windows and Linux (but again you get a little speed boost on the later).

In essence Boblight runs in backgrounds, accepts color input from clients and converts them to commands that it sends to the devices. I have to say I was pleasantly surprised to see how flexible it is, and how easy it was to configure it for my setup. You can find more details on the configuration on this page, and my config file is included in the download below.

The final piece is the code running on the Arduino that will translate these commands to corresponding light levels for each channel. Boblight uses a simple serial protocol called LTBL (Let There Be Light) that is described here. In the download you will find my sketch that handles this communication.

Currently I have Boblight setup to automatically start before XBMC loads so it will turn on the lights on startup (some advice can be found here). This setup serves me well, but as I said Boblight runs Windows too. And you can also try other software like Momolight, AtmoLightVLC Media Player, and other projects found at Ambilight4PC.

Posted on Friday, November 27, 2009 6:42 PM | Back to top


Comments on this post: Adding ambient-light to your TV with Arduino

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Nice :)
Left by Jacek Ciereszko on Nov 28, 2009 8:38 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Nice project! I'm really proud to have inspired something like this!
My own project have been on ice for a while but lately I finally got the time to solder a prototype, however it's not quite finished yet.
Left by Markus on Dec 03, 2009 1:48 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Nice Hack!
If you wanted to coordinate the color with the color on the screen, how might you?

My best guess would be 3 phototransistors, with R, G, and B filters, pointed at the center of the screen.
Left by sysadmn on Dec 03, 2009 8:28 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Here's a video of an Ambilight system one of my customers made using ShiftBars and some other Dealextreme LED bars: http://www.youtube.com/watch?v=tYq9G0Bt6Ns
Left by macegr on Dec 03, 2009 1:09 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
@sysadmn Interesting idea with phototransistors. I have a TSL230R light sensor waiting for good use so might try to do just that one day.
Left by Szymon on Dec 07, 2009 2:32 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
@macegr I've already ordered some of your products and can't wait for tham to arrive. I'll try to upgrade my boblight sketch to work with both configurations.

Keep up the great work you doing!
Left by Szymon on Dec 07, 2009 2:34 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
ok this is awsome, i got my 2 philips livingcolor lights hooked up to my ardruino, and it seems to work fine except for 1 thing:

my leds need value's from 255 - 0 instead of from 0 - 255.

this is pretty simple to add if i only knew where i can find the final output values in the arduino sketch. could you point me into the right direction?
Left by Coredalae on Dec 28, 2009 6:25 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Haha that sure is very interesting. Will try it on mine.
Left by Drain Clearance on May 10, 2010 5:17 AM

# Hey!
Requesting Gravatar...
Thanks for the above information.
Left by wireless fence on Oct 21, 2010 12:36 PM

# re: Adding ambient-light
Requesting Gravatar...
I have also done one project using LED.I think this information will be very helpful to me i will use it in my next project.
Left by Internet Advertising Agencies on Nov 10, 2010 1:13 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Seems this technology will be helpful for millions of people.

Onketing
Left by Tory on Nov 17, 2010 6:01 AM

# Mrs
Requesting Gravatar...
The video was awesome.It sure is interesting need to give it a shot.
Left by green cookware on Nov 18, 2010 11:43 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
It is really very exciting with all these new technologies.
Left by green cookware on Nov 22, 2010 12:48 PM

# Mrs
Requesting Gravatar...
Very well wriiten article on technology.Enjoyed reading it a lot.
Left by cures for hypertrophy on Nov 22, 2010 12:49 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Wow interesting blogs really while reading i love it
Left by dermatend on Dec 01, 2010 6:17 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
This circuit planning and video is very interesting to see and useful information
Left by Well Pump on Dec 04, 2010 6:19 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Would love to see some more post like this.
Left by First Birthday invitations on Dec 11, 2010 6:00 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Thanks for providing such useful information. I really appreciate your professional approach. I would like to thank you for the efforts you made in writing this post. I am hoping the same best work from you in the future as well.
Left by apartment for rent harrisburg pa on Dec 11, 2010 8:09 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I really don't agree with everything in this written piece, but you do make some very good points. Regardless it absolutely was a rightly thought out and great read therefore i decided I would leave you a comment.
Left by Amish Furniture on Dec 27, 2010 8:08 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I am sure this technology wont come to an end.
Left by trailers for sale on Dec 27, 2010 10:25 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Thanks.
www.dealdoc.com
Left by dealdoc.com on Dec 28, 2010 10:23 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
the post is just wow, thanks for sharing the amazing and informative video, it is truly very interesting...
Left by limo hire leeds on Jan 06, 2011 7:59 AM

# korm
Requesting Gravatar...
excellent and usefull information presented in this blog,
reakky interesting,thanks for sharing it.
Left by pa-injurylawyer.com on Feb 01, 2011 7:33 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
This blog gives the light in which I can observe the reality. This is very nice one and gives useful information. Thanks for this nice blog.
Left by stretch carpet on Feb 03, 2011 6:08 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Searching good blog is not an easy task because number of blogs with exaggeration is available but the information on this blog is completely based on research. It will help you in getting information and gaining knowledge.
Left by to get my ex boyfriend back on Feb 06, 2011 6:14 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I would like to convey my appreciation of your writing skill and also ability to make reader, see the whole thing to the end. I would really like to read more of your blogs and to write about my views with you. I will be your frequent website visitor, that’s for sure.
Left by custom made cards on Mar 11, 2011 6:36 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Hey great stuff, its a pleasure and a great experience to watch this blog..thank you for sharing this useful information and i will let know my near and dears.
Left by bathroom heat lamp on Mar 13, 2011 12:36 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I have been searching all over for this website...i believed I had book-marked it a week ago but could not find it and it was a pain to find your site once again..google sucks.
Left by hair loss products on Mar 14, 2011 7:39 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Nice instructable. I have to say that I am not a real fan of ambient lighting behind the TV but lighting (maybe a strobe) behind the toilet sounds like a winner!
Left by perfumes on Mar 17, 2011 7:16 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
wow awesome
Left by bicyle wheels on Mar 29, 2011 6:06 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I've always been one for arguing things point by point.
Left by solar collector on Apr 05, 2011 3:47 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I think a lot of the posters here are DKos and HP members as well.
Left by shower room on Apr 05, 2011 3:48 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Please do me the courtesy of reading my post John if you insist on attacking me for it.
Left by power cable on Apr 05, 2011 3:49 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I try to do this all the time. Not always successful, but a lot less agita.
Left by outdoor furniture on Apr 05, 2011 3:53 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Just don't give up your wonderful, edgy writing style... if they're too stupid to get it, fuck em.
Left by crystal figurines on Apr 05, 2011 4:00 AM

# Ms
Requesting Gravatar...
I absolutely enjoy just reading through all your blogs. Simply wanted to let you know that you have individuals like me who value your work.
scalp hair growth
Left by Jamoes Lito on Apr 20, 2011 11:16 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I remember thedinning chairs burgeoning dread as the day went on,dinning chair and the stone that seemed to settle permanently in my stomach when my parents called and told me not to let my little brother near the TV before they got home.
Left by Lorie Deveaux on May 17, 2011 9:52 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Interesting post and thanks for sharing. Some things in here I have not thought about before.Thanks for making such a cool post which is really very well written.will be referring a lot of friends about this.Keep blogging.
Left by cystitis treatment on May 17, 2011 12:33 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
wow! this is a very interesting article. it may take some time for me to try this one as i have to buy the hardware for it. But surely a good informative post that i can come back reading in the future.
Left by stretch carpet on May 24, 2011 9:22 AM

# Mr
Requesting Gravatar...
Your blog page is excellent. Thank you truly for sharing a huge amount of powerful ideas. I will bookmark your web site and will be without a doubt coming back. Again, I appreciate all your work and supplying much priceless info for the many people.
Left by help for snoring on Jun 03, 2011 12:56 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Hey, thanks for this amazing thread.
I'm 14 years old and from the Netherland and I'm considering to buy 3 led stript and the other hardware. If you still read this can u please send me by email everything you need? Or in different words: everything you used?

Left by Frank Visser on Jun 06, 2011 8:44 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Interesting articles are published here. By reading it I acquired great deal of knowledge on various subject. Very good comments to read and recommend others. Thank you for sharing with us.
Left by hair growth shampoo on Jun 21, 2011 7:45 AM

# very good site.
Requesting Gravatar...
Interesting post and thanks for sharing. Some things in here I have not thought about before.Thanks for making such a cool post which is really very well written.will be referring a lot of friends about this.Keep blogging.
Your blog page is excellent. Thank you truly for sharing a huge amount of powerful ideas. I will bookmark your web site and will be without a doubt coming back. Again, I appreciate all your work and supplying much priceless info for the many people.
Left by how to stop snoring on Jul 12, 2011 8:01 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I brought into the house for an after work drink was gone by the next day. It got tiring. YOU are not a hypocrite!
Left by leather sofa on Jul 15, 2011 8:30 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
It's my first time visiting here. I discovered countless intriguing stuff within your weblog especially the on-going conversation. From the tons of comments on your articles, I guess I'm not the only person relishing reading your website. Carry on the good work.
Left by amenorrhea remedies on Jul 23, 2011 9:05 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Admiring the hard work you put into your blog and detailed information you present. It's nice to come across a blog every once in a while that isn't the same out of date rehashed material. Fantastic read! I've bookmarked your site and I'm including your RSS feeds to my Google account.
cityville cheats that work
Left by kristopher tuder on Jul 30, 2011 7:33 AM

# Ms
Requesting Gravatar...
Many thanks for providing such handy information. I seriously value your expert approach. I would like to thank you for the efforts you made in writing this particular post. I am hoping the same from you in the future as well. This code snippet is very beneficial.
Left by Samsung RSG257AARS on Sep 20, 2011 3:23 PM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Very, very interesting. I will make this my second Arduino based project.
Left by Lúcio on Jan 15, 2012 5:13 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Very nice, please check the setup I have. Adalight, Arduino, LightPack. Simpler way for doing this.

https://www.youtube.com/watch?v=Ky_S7PxXwYg
Left by Mike on Jan 17, 2013 4:46 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
Adalight setup, check it out.
Left by Hyperveoo on Jan 17, 2013 5:00 AM

# re: Adding ambient-light to your TV with Arduino
Requesting Gravatar...
I stumbled on your piece of creating and felt it terribly practical. Your weblog article is very intersting and fanstic,at the same time the blog site concept is unique and perfect,good work.
Left by Sale Karen Millen Ireland on Jun 07, 2013 4:50 AM

Your comment:
 (will show your gravatar)


Copyright © Szymon Kobalczyk | Powered by: GeeksWithBlogs.net