Szymon Kobalczyk's Blog

A Developer's Notebook

  Home  |   Contact  |   Syndication    |   Login
  104 Posts | 6 Stories | 534 Comments | 365 Trackbacks

News

View Szymon Kobalczyk's profile on LinkedIn

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Blogs I Read

Tools I Use

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Friday, November 27, 2009 6:42 PM

Feedback

# re: Adding ambient-light to your TV with Arduino 11/28/2009 8:38 AM Jacek Ciereszko
Nice :)

# re: Adding ambient-light to your TV with Arduino 12/3/2009 1:48 AM Markus
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.

# re: Adding ambient-light to your TV with Arduino 12/3/2009 8:28 AM sysadmn
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.

# re: Adding ambient-light to your TV with Arduino 12/3/2009 1:09 PM macegr
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

# re: Adding ambient-light to your TV with Arduino 12/7/2009 2:32 PM Szymon
@sysadmn Interesting idea with phototransistors. I have a TSL230R light sensor waiting for good use so might try to do just that one day.


# re: Adding ambient-light to your TV with Arduino 12/7/2009 2:34 PM Szymon
@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!

# re: Adding ambient-light to your TV with Arduino 12/28/2009 6:25 PM Coredalae
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?

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

# Hey! 10/21/2010 12:36 PM wireless fence
Thanks for the above information.

# re: Adding ambient-light 11/10/2010 1:13 PM Internet Advertising Agencies
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.

# re: Adding ambient-light to your TV with Arduino 11/17/2010 6:01 AM Tory
Seems this technology will be helpful for millions of people.

Onketing

# Mrs 11/18/2010 11:43 AM green cookware
The video was awesome.It sure is interesting need to give it a shot.

# re: Adding ambient-light to your TV with Arduino 11/22/2010 12:48 PM green cookware
It is really very exciting with all these new technologies.

# Mrs 11/22/2010 12:49 PM cures for hypertrophy
Very well wriiten article on technology.Enjoyed reading it a lot.

# re: Adding ambient-light to your TV with Arduino 12/1/2010 6:17 AM dermatend
Wow interesting blogs really while reading i love it

# re: Adding ambient-light to your TV with Arduino 12/4/2010 6:19 AM Well Pump
This circuit planning and video is very interesting to see and useful information

# re: Adding ambient-light to your TV with Arduino 12/11/2010 6:00 AM First Birthday invitations
Would love to see some more post like this.

# re: Adding ambient-light to your TV with Arduino 12/11/2010 8:09 AM apartment for rent harrisburg pa
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.


# re: Adding ambient-light to your TV with Arduino 12/27/2010 8:08 AM Amish Furniture
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.

# re: Adding ambient-light to your TV with Arduino 12/27/2010 10:25 AM trailers for sale
I am sure this technology wont come to an end.

# re: Adding ambient-light to your TV with Arduino 12/28/2010 10:23 PM dealdoc.com
Thanks.
www.dealdoc.com

# re: Adding ambient-light to your TV with Arduino 1/6/2011 7:59 AM limo hire leeds
the post is just wow, thanks for sharing the amazing and informative video, it is truly very interesting...

# korm 2/1/2011 7:33 AM pa-injurylawyer.com
excellent and usefull information presented in this blog,
reakky interesting,thanks for sharing it.

# re: Adding ambient-light to your TV with Arduino 2/3/2011 6:08 PM stretch carpet
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.

# re: Adding ambient-light to your TV with Arduino 2/6/2011 6:14 PM to get my ex boyfriend back
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.

# re: Adding ambient-light to your TV with Arduino 3/11/2011 6:36 AM custom made cards
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.

# re: Adding ambient-light to your TV with Arduino 3/13/2011 12:36 PM bathroom heat lamp
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.

# re: Adding ambient-light to your TV with Arduino 3/14/2011 7:39 AM hair loss products
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.

# re: Adding ambient-light to your TV with Arduino 3/17/2011 7:16 AM perfumes
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!

# re: Adding ambient-light to your TV with Arduino 3/29/2011 6:06 PM bicyle wheels
wow awesome

# re: Adding ambient-light to your TV with Arduino 4/5/2011 3:47 AM solar collector
I've always been one for arguing things point by point.

# re: Adding ambient-light to your TV with Arduino 4/5/2011 3:48 AM shower room
I think a lot of the posters here are DKos and HP members as well.

# re: Adding ambient-light to your TV with Arduino 4/5/2011 3:49 AM power cable
Please do me the courtesy of reading my post John if you insist on attacking me for it.

# re: Adding ambient-light to your TV with Arduino 4/5/2011 3:53 AM outdoor furniture
I try to do this all the time. Not always successful, but a lot less agita.

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

# Ms 4/20/2011 11:16 AM Jamoes Lito
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

# re: Adding ambient-light to your TV with Arduino 5/17/2011 9:52 AM Lorie Deveaux
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.

# re: Adding ambient-light to your TV with Arduino 5/17/2011 12:33 PM cystitis treatment
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.


# re: Adding ambient-light to your TV with Arduino 5/24/2011 9:22 AM stretch carpet
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.

# Mr 6/3/2011 12:56 PM help for snoring
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.


# re: Adding ambient-light to your TV with Arduino 6/6/2011 8:44 PM Frank Visser
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?



# re: Adding ambient-light to your TV with Arduino 6/21/2011 7:45 AM hair growth shampoo
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.

# very good site. 7/12/2011 8:01 AM how to stop snoring
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.


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

# re: Adding ambient-light to your TV with Arduino 7/23/2011 9:05 AM amenorrhea remedies
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.

# re: Adding ambient-light to your TV with Arduino 7/30/2011 7:33 AM kristopher tuder
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

# Ms 9/20/2011 3:23 PM Samsung RSG257AARS
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.

# re: Adding ambient-light to your TV with Arduino 11/14/2011 1:52 AM bar stools
Good followup, Ira. I'm children carsguessing the newspaper didn't have a staff reporter at the scene, but standby killergot whatever information they printed after the fact from police reports.


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

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: