3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED TV LIGHT

MAJOR UPDATE:

Hey Guys!

A lot of things have changed since I began my  project and I didn't expect so many ideas, comments and improvements.

Because it is much easier to build an Ambilight than in my instruction, I decided to update my instructable. First of all, there are, of course, many other solutions out there. Checkout this link, it's easy and really cool:

http://hackaday.com/2011/10/05/adalight-ladyadas-ambilight/

THIS instructable is not up to date. If you want to find out about my new approach of building a 30 channel ambilight just search for my other instructable dealing with this topic or click this link:

http://www.instructables.com/id/30-channel-LED-RGB-Ambilight-Clone/
 
Remove these adsRemove these ads by Signing Up
 

Step 1Java Microcontroller LED TV Ambient Light

Java Microcontroller LED TV Ambient Light
«
  • IMG_20110301_194925.jpg
  • IMG_20110228_233818.jpg
  • mainapp.png
This instruction is intended to explain a simple and cheap way to build your own dynamic LED Ambient Light.

First of all I want to let you guys know that my English is not that good (I am from Germany, so... ). But I guess you'll understand enough to follow these instructions. I think my results are pretty cool, so I let you guys know how to rebuild this stuff.

If you want to see the final result check out this video:


INSPIRATION

A few weeks ago I came across a blog entry by SiliconRepublic (Roy). His original post can be found here:

http://siliconrepublic.blogspot.com/2011/02/arduino-based-pc-ambient-lighting.html

The author wrote a small Processing sketch that sums-up all RGB values of his computer display, calculates the mean values and sends them via serial connection to a micro controller (in his case an Arduino). The Arduino controls a strip of RGB LEDs.

That is an easy assembly and really useful at the same time. It appreciates your way of watching movies a lot. My aim was to enhance his ideas so I could have something like the Philips Ambilight: Different colors on different positions of the screen. I also wanted a little user interface so I could easily change parameters without changing my source code.

Because I am not familiar with Processing I used pure Java in this project. I guess you can easily transfer my program to Processing due to the fact that Processing and Java are really similar.

Beside that Java application the other main component you need to accomplish this task is a micro controller (perhaps two?) to operate the LED strips.
« Previous StepDownload PDFView All StepsNext Step »
65 comments
1-40 of 65next »
Sep 22, 2011. 7:42 AMGeneRalf says:
Please help,
I am desperate with my MEGA2560 and the SW for this project.

There is a package in all of the java-files "package de.zucizu.ledlights" which can not be found by the compiler. So I deleted this in every file and the compiler is actually doing his job.
Everything seems to work however the LED / PWM is not working at all with the provided Arduino-SW.

If I am using a port-sniffer I can see, the RGB values sent by the Java app to the arduino, I do also see the flickering of the Rx LED... but the brightness is not changing.

Using a terminal programm and send it manully it is working fine at least for LEDpin 13 (not testest the other outputs yet)

Is this because of the missing package "package de.zucizu.ledlights" ?
Or is there anything else what I miss here ?

Thanks for your help

Sep 23, 2011. 2:59 PMGeneRalf says:
Even with the SW for the MEGA2560 I am experiencing the same problem that the LED/PWM is not switching according to the transmitted data from the JAVA app while sending the data via a terminal program it works fine.

I am wondering, how the synchronization is working anyway ?

Let say the PC is sendingcontinously some data ...
00 00 FF 00 00 00 FE 00 00 00 00 ...
You don't know the exact timing when the uC starts reading the data.
If the uC missed the e.g. FF for the left - lefttop side, the next FE which was actually meant as a color value is miinterpreted as start value for right - top right.

So to avoid this we need to adjust the max value in the JAVA app of the sent data to 253 instead of 254 and 255.

And even the JAVA is not sending FE and FF as color value anymore, we still do not know when the inputBuffer of the uC is loaded with just color values

Sep 24, 2011. 3:56 PMGeneRalf says:
I am still haveing issues but I am able to narrow it down.

So everything is working fine with the following method
(I am using eclipse for the JAVA)

0. Put a breakpoint in the JAVA before the RGB data are written to the Outputstream
1. start the app with the debugger
2. select in the JAVA app the COM port and activate the port

>> Now here I am experiencing that LED13 goes ON and remains ON even
no data is sent ?

3. Wait a couple seconds (e.g. 10s) and let the debugger run for another
turn

>> All LEDs are ON respectively on the level what was sent

I am using a Arduino Mega2560 and progrmam it with the IDE from www.arduino.cc and program the uC via USB.
So there is a bootloader on it..is the bootloader turning on the LED13 ?
Does this might cause the problem? Even the Java is sending for 10sec. the uC is not doing what expect. with the break I have mentioned here it is working fine ..

Any idea ?
Sep 26, 2011. 7:08 PMGeneRalf says:
I am almost 100% positiv that LED is. Set by the bootlloader, not from you java app. When activating the com port in thd java,led13 turns on. So the uc is receiving the rgb data and is doing nothing with it since the crc is prob,@ably always wrong. Thats way it is working perfect once i stop the java with a breakpoint and let it run after 10s have ellapsed. It would help jf you could add a start sequence sent by the uC eg 0xAA 0x55 to the java. Once this sequence was received the uc us ready to go otherwise still he us still busy in the bootlader. It is independent of win7 becauze same behavior with xp.


Thx
Oct 4, 2011. 11:25 AMSoulforger says:
Hi,

First of, thank you very much for a very nice instructable!

Unfortunately I too have the same problem that only blue light is showing from the pin 13 and that's it. Nothing else is happening even though I see that the Java app is sending data to the Mega.

Did you guys figure this out or is it still a work in progress?

Thanks for your time and I too hope that this problem can be solved!
Oct 9, 2011. 5:47 PMGeneRalf says:
Try my Python program. My Arduino Mega2560 runs perfectly fine with it now
http://db.tt/vguZrVVH

Everybody else who want to check out this program let me know how to improve it. This is actually my very first Python program ;-)

Nov 16, 2011. 1:26 PMaborsciov says:
Thank you for the Python program. At the moment I tested it just on breadboard with the multimeter and the pwm pins vary the voltage.
I had the same problem with pin 13 and it seems to be because of the serial communication but I don't know how to solve it.

boblight does not work for me at all.

I hope that after I get all my parts everything will work fine with this python program.
Great job!

I struggled a bit though to find and install all libraries that were necessary.

Is there a posibility to compile it to an executable? so I don't have to open it in python all the time.
Nov 16, 2011. 6:08 PMGeneRalf says:
Once the libraries and Python are installed you can have a shortcut on your Desktop and doubleclick the Python script and it starts automatically.
Or you can start it from the comand line python yourscript.py

But I will post you an exe-file soon.

Regarding the functionality of boblight and ledtvlights original JAVA program, I am pretty sure it is because of the different Serial-Port-conections on the different Arduino boards.
Some are having the FT232 chip, some of them are having a ATMega8 with bootloader which needs an extra second before respectively is making an Auto SW Reset .. look here for some details
http://arduino.cc/en/Main/ArduinoBoardMega2560
Nov 17, 2011. 3:26 AMaborsciov says:
I know about the different chips, I have mega2560 which has ATMega8 and yes it causes problems.
I read many posts about this and found out that there is actually a new firmware supposed to correct this. I flashed it on my arduino using the FLIP utility from Atmel, but I'm not completely sure it changed sth. I mean the log showed that the update was successful but I'm not sure if it changed sth, the bootloader version that I have now is 1.2.0 and I don't know which is the original one.
It is tricky to reset the board and put it in DFU mode for the flash update but I managed to collect several pieces of information from different forums.

I tried again the JAVA application with no success. Your application works now just if I change the delay value in it to 0 vs 4 the default that you put.

I still need to receive the uln2003a ICs and then I will be able to fully test it with LEDs.
Your app is fine now, I managed to launch it directly so it's all right.

With boblight the problem comes because I don't quite understand how to change the config file for my needs, thus it gives me an error on launch that it cannot access the com port, although in the config file I modified it.

I can't wait to finish the whole thing, maybe then we can give the creator of this topic some info about some tweaks that need to be made in order for it to work.
I would like to have the JAVA app running as well or at least boblight but the only solution I find is to order a mega1280.
Oct 31, 2011. 1:07 PMGeneRalf says:
" ... The Mega2560 differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial converter ..."

could this be the root cause in combination of the Auto-Reset when the controlling PC opens the com port ?
After Reset (Com port opening) it takes about 1s before the Arduino is ready to receive and control the PWM ...
Oct 5, 2011. 9:10 AMn3v says:
Really nice project, I came across it when looking into the Software side, since I cam up with an own HW design, using a TLC5940. Its been working really nice under Linux with boblight. However, under Windows it seems that the config file does not allow having two bytes for synchronising (works perfectly fine in ubuntu) and because of this i keep getting flashing colors, as the FF value is sent as a color directly to the LEDs.
I was wondering if anyone else has had such problems, or if it has something to do with windows7 dropping serial data. I'm using a FTDI FT232RL for the usb to serial.
Sep 11, 2011. 9:44 AMWes1180 says:
This looks like a really cool project, I am considering doing it and so I have a couple of questions.

How long should the strips be for a 22" screen?

I have never done anything like this before so what sites should I look at to get similar prices to what you did?
Sep 17, 2011. 1:35 PMWes1180 says:
So I had a search and came across these.

http://bit.ly/nQLrz4 (arduino mega)

http://bit.ly/nhN9HI (ULN2003)

http://bit.ly/n8KYSy (LEDs)

A person in the comments of the LED page mention 3 parts where you can cut off, is that going to be a problem saying this requires 4 parts, should I consider getting a different one?

Also what type of power supply am I getting, I know 12v with at least 1amp but would it be one of these?

http://bit.ly/nEdEr1

And I'd just like to say that I really appreciate your help, especially since I am new to all of this and may be asking some silly questions :)
Sep 27, 2011. 8:53 AMWes1180 says:
First I'd like to say thanks for being patient with me.

I am considering getting a 3 screen setup, so would you suggest using 6 strips, 2 on the top of each screen and non on the sides becuase of the positioning. (this would be half a meter on the top of each screen as they are only 22")

Can the arduino mega support 6 strips?
And can your program support 3 screens?

The resolution would be 5760 x 1080
Oct 4, 2011. 1:11 PMWes1180 says:
I don't think i'm going to be getting the three screens, but i would donate if I could, but unfortunately I don't really have enough money at the minute, one of the reasons why I haven't gotten any of the stuff for this yet, sorry.
Oct 4, 2011. 3:08 PMWes1180 says:
I was just wanting you to know that if I could, I would donate as I like the stuff you have done
Oct 2, 2011. 1:53 AMLassiVV says:
Hello, first of all awesome project thanks to you :) I make hardware ok, but no i dont get boblight to work anyway. With you own java program all works ok, but i want use boblight because you recommend that.

I try change boblight config file. I can change all com port, channels pcs and other settings ok. But no light light up my arduino board. And tx/rx leds no blinking when i start boblighttd and after that getpixel progman. Both programs shows only black (black) Windows CMD -window.

Can you copy/paste or upload config file what works with your arduino code? Or explain can i change arduino code/or boblight config file right.

I am very thankfull if you can answer to me with this problem :) I can c/p some picture/video with my setup when i get that working, if that ok.
Aug 4, 2011. 11:22 AMdesol007 says:
I am not sure how to install boblight. I have your software working but I can not get boblight to work. I have win7, arduino mega and uno. I am not sure how or where to put the boblight.conf file at. Thanks for any help
Sep 22, 2011. 9:33 PMdesol007 says:
Thanks, I was confused now I got it
Apr 17, 2011. 12:10 PMgacorda says:
You could use tlc5940 chip which can prevent the use or pucrchase of another arduino.
Jul 12, 2011. 2:21 AMStrRipedZ says:
This project soooo interesting for me..~!!
Uhmmm, I'm wondering if i could use 4 RGB strips with only 1 arduino and 1 power supply and using ULN2003 chip instead of transistor and resistors?
How many uln2003 chips i need?
Can you post more picture on how you wire those RGB strips into the chip?
Sorry if i ask too many questions, its because i have zero background about electricity and engineering..
Cheers, kevin..
Jul 12, 2011. 8:47 AMStrRipedZ says:
Uhmm, i forget to ask another thing..
Would 1 Arduino Mega with ATmega1280 chip will work properly??
Because i found its cheaper than ATmega 2560 chip..
Jul 12, 2011. 6:08 PMStrRipedZ says:
So, lets say im going to use Arduino Mega, and 4 RGB led strips (left, upper left, upper right, and right side).. I just need to connect each RGB led strips into 4 uln2003 chips (into uln2003 pin 16,15 and 14), is that correct? And the next step is to connect each pin from uln2003 (pin 1,2 and 3) into pwm pins on my arduino, is that correct as well?
What about the code? Do i need to configure specific code, or just plug and play it?
1-40 of 65next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
9
Followers
2
Author:ledtvlight