Enough about that old one.
At the end of this instruction set you will have a low cost (?) ambilight clone, with as many channels as you like. I will, for instance, show you how to build a 30 channel LED TV light, which adapts to the colors of your screen. If you are impatient, checkout the last step of this tutorial to see the very low quality video.
Hardware you will need:
- LED RGB SMD strip
- Microcontroller (Arduino Duemilanove Clone for example)
- (Two) TLC5940 PWM Unit
- maybe a cooler or a heatsink
- 12V power supply
- a few resistors
- electronic stuff (cables, soldering iron, breadboard, ...)
Software it takes:
- Boblight
- Windows or Linux
- Programming Software for your micro controller
Skills you will need:
- ability to solder
- maybe the skill to think a little bit technically, so you don't ask that many questions here in the comments :-)
This project is perfect for users that didn't have to do anything with electronics yet, but want to make something useful and uncomplicated to get started with.
I promise, this project is realizable for everyone who has got the attendance to follow my instructions step by step. It is really easy and if you only have some electronic skills and this is not your first project, it is even easier and you can modify it as you like.
So let's get started...
First of all, I want to explain the main principle of the completed unit.
1. You connect a computer to your TV and to the ambilight unit via USB.
2. You start the Boblight software
3. You start a movie.
4. Boblight analyzes your screen image and calculates some mean values of specific areas of your screen
5. Boblight sends these color-values via USB to your ambilight unit.
6. The micro controller within that unit takes the received color-values
7. According to the values the micro controller changes the LED strip colors
Steps 4 to 7 will be repeated up to about 50 times / second until you tell Boblight to stop.
Remove these ads by
Signing UpStep 1: LED Strips
Before we can start soldering all the stuff together we have to order it. Let's start with the LED strips responsible for the illumination. We need to control the color of the strip. By adjusting only three colors (Red, Green, Blue) it is possible to create many many colors. Your TV works similar. Google for RGB if you want to know more about that. So we will need LED strips which have got 3 channels. One for color red, one for color green and one for color blue. If you power up the red channel, the strip will glow in red, if you power up the red and the blue channel it will be pink or something (mix of blue and red). By adjusting the voltage of the channels it is possible to create all the colors we need.
There are so many different RGB LED strips out there: 60 LEDs per meter, 30 LEDs per meter, common anode, common cathode, waterproof, length of 3 meter, length of 5 meter, etc.
Common anode or common cathode?
You HAVE to take common anode (all 3 channels share 12V) because of the TLC5940 and that is really important. You could destroy the TLC5940 chip if you try to connect it to 12V.
Waterproof?
As long as your TV isn't waterproof and you don't want to use your new ambilight under water, there is no real necessity to buy waterproof LED strips. It may be better because of insulation issues. You will tape the strips onto the back of your TV so make sure, you either buy waterproof strips, or the back of your screen is not conductive, because otherwise you could get in big trouble as soon as the contacts of the strips short curcuit. My screen backside is not conductive, because it is painted, so I decided to save the money and use non-waterproof strips.
60 or 30 LEDs per meter?
Another question is, how many LEDs you want per meter. The TLC5940 chip, which will control the color of the strips, is capable of serving 120mA per channel. I would not exceed that value.
I measured 15 LEDs on one strip. Here are my results: If you power up all three channels completely, the strip takes 240mA and glows completely white. The red channel takes 90mA, green and blue 75mA each. 90mA is close enough to 120mA maximum, and we still have a little buffer of 30mA. So the TLC5940 chip is capable of driving 15 LEDs on one channel without getting too close to the maximum.
Now back to the question what to buy.
If you want to use a strip with 60 LEDs per meter, the maximum length of one strip is 25cm, because than you have exactly 15LEDs. If you decide to buy a strip with 30 LEDs per meter, you can double the length of one strip to half a meter to have 15 LEDs. Shorter strips, of course, are always possible. It's not just a question of current flowing, but of brightness. Maybe your room is often dark and you don't want that many LEDs shining behind your tv. In such a case 30 LEDs per meter would be completely okay and you don't have to pay the extra price for 60 LEDs per meter. To get to the point, I used strips with 60 LEDs per meter, because I ordered them to compare both solutions.
After all of your ordered LED strips arrived, one of the first things you have to do is to cut the LED strips into smaller pieces and solder cables to the ends.
Here is my setup:
I have got a 127cm (50") TV screen.
The outer dimension:
Width: 118cm
Height: 74cm
I wanted to have 10 areas all in all so I had to cut the whole long thing (5 meters) into 10 shorter strips. The question was how long shell they be? Just to get an idea, I attached an image so you can see where I taped the strips to the backside of my tv screen after I finished the project. As you can see, one piece has to have the length of 25cm to make sure there is enough light, small distances between two strips and they do not overlap. That corresponds to the results I measured for the maximum current. So at the end I still had 2.5 meters of LED strip left, which was resold on ebay.
Power Supply
As already precalculated each one of these strips takes 240mA on full white light. If you multiply that value by 10 strips, we get 2.4A.That is pretty much in my opinion: About 30 Watt.
I ordered my 12V power supply from Ebay. It can serve up to 5A and only costed 9 euros. Now I have a nice security buffer and the device doesn't overheat.
Soldering cables to the strips
My strips can be cut every 3 LEDs (so 5cm) and there are premade solder joints. Look at the second image I attatched to this step just beside the letters B R G on the strip. Sometimes there is even some solder on it so you don't need to care about that. If not, just take a needle and make a small hole into each of the joints and the solder will hold really good.
Just solder one cable to each channel and one cable for common anode (12V). Every strip has to have four cables. I used old network cable because it was long enough to cut it into pieces and has got 8 cables in it. That is very good because we need 4 cables per channel and I wanted to make pairs to cut down the number of cables behind my tv. The cable also has got a nice coating so I only have one bigger cable instead of 8 individual ones per pair. Now I have got four pairs of strips and two single (bottom). Make sure your chosen cables are long enough so the controller unit doesn't float behind your screen.
You can either leave the other side of the cable as they are and solder them directly to the controller unit or solder some pins to it so the strips are exchangeable, if one gets destroyed. That's up to you.






































Visit Our Store »
Go Pro Today »




If someone who has this running can give me some quick guidelines on how the sections are wired to the TLC5940s, I'd greatly appreciate it.
I ve been working on this project for a while while waiting my necessary items form ebay.
And I wonder if the project will work if I use 470 ohm resistors instead of 390 ohm ones?
I will apriciate the answer :) Thank you.
I started an ambientlight project few months ago. I have done the same steps as you have. My system is working fine except for one strip, it doesn't get the blue signal in. The address of the colour is ucon 22. Every other colour of all the strips work just as they should. The problem is not mechanical and the strip is working fine. Can you help me with my mysterious problem? My arduino is same as yours Duemilanove Atmega328.
Thanks
Was anyone able to get their ambilight working with Mega 2560, I don't seem to get it working even after trying various connection. I am a n00b so would really appreciate any help.
thanks in advance
If i understood you right, then each of your area (each stripe) can have only one color at a time. So your 10 areas shine with a maximum of 10 colors behind the screen?
I compared your solution to the adalight project, you posted the link somewhere in the comments. this solution uses 25 single LED pixel which can be controlled individually, so there are at max 25 different colors at the same time? This is done without the need of the TLC5940, just by connecting 3 wires to the arduino. How is that possible?
I am am little bit confused. In your project you have to wire each channel to an TLC5940 out. In summary you will have much more LEDs shining which gives you more brightness, but the adalight project gives you an higher resolution with just 3 wires?
Maybe you can shed light on this?
Thanks
Is this unit still functioning as intended though? I see that you installed a cooling fan, but it still seems like the TLC5940 chips would overheat regularly, especially when showing a bright white color.
Page 15 of the TLC5940 datasheet shows the power dissipation calculations. In order to stay within the 2.456W allowed by the chip, i would expect that your voltage on each of the 15 channels (per chip) averages out to no more than 1.5V. Is this true?
I understand if you don't feel like measuring that right now, but if you can say that it's still working as built, that's good enough for me! Maybe I'm reading the datasheet incorrectly? Thanks for the help.
I don't have any of these on my own any more and I'm not going to build another one. As I say to everyone, if you just want an Ambilight, just build Adalight's solution. If you want to build something and learn about electronics try my tutorial.
I had misplaced a couple wires to the Mega board but now it's smooth and shiny. Still needs some tweaking but at least it works now.
I've a Mega board and I get no light at all, which ports you used to connect?
You used some capacitor with 10uF like someone did some comments below?
Thanks in advance.
First of all I want to say that I love this project and it's my favorite one. =)
Ok, now I've everything assembled and I've a problem that I can't figure out.
I ordered one Arduino Mega 2560, I read that there is some people with problems with it and I'm one of them.
For the reason that the Arduino is not the same of yours, I have connected by a different way. So on the breadboard everything's connected by the same way, but for the reason that your assembly is not working for me, instead I used different connections between Arduino and the breadboard.
I opened the folder pinout from TLC librarie and checked the Arduino_Mega.h, so I've tried without sucess this connections:
VPRG (Mega pin 50) -> VPRG (TLC pin 27)
XERR (Mega pin 10) -> XERR (TLC pin 16)
SIN (Mega pin 51) -> SIN (TLC pin 26)
SCLK (Mega pin 52) -> SCLK (TLC pin 25)
MOSI (Mega pin 51) -> SIN (TLC pin 26) //Just don't get this two connections
SCK (Mega pin 52) -> SCLK (TLC pin 25)
OC1A (Mega pin 11) -> XLAT (TLC pin 24)
OC1B (Mega pin 12) -> BLANK (TLC pin 23)
OC2B (Mega pin 9) -> GSCLK (TLC pin 18)
What can be wrong? I get no light at all.
Thanks in advance!
btw, great job
I believe that I am having a problem with my Tlc5940, but I'm not sure.
The problem that I'm having is that every time I try to run the program, my LED strip stays a bright white color. I have tried changing what is on the screen, but this has not helped.
I am only using 5 LED strips and 1 Tlc5940, so I have changed all files as described in this Instructable.
When I try to run the example sketches for the Tlc5940, I have the same problem.
Any help would be greatly appreciated. Thank you
Actually I do not know what your problem is. Can't you find the source code of boblight? If so, use this svn and compile it yourself.
svn checkout http://boblight.googlecode.com/svn/trunk/ boblight-read-only
If you are using Ubuntu (incl. LinuxMint) or Backtrack just search for it in your repositories:
sudo apt-cache search boblight
Or just use the software center.
According to your problem finding the arduino code:
It's located in the attached zip-file within the main folder and called ambilight.pde. Arduino changed its file extension after my project was finished to *.ino, so *.pde is the old file extension.
I hope I could help you and you enjoy my project.
Actually I do not know what your problem is. Can't you find the source code of boblight? If so, use this svn and compile it yourself.
svn checkout http://boblight.googlecode.com/svn/trunk/ boblight-read-only
If you are using Ubuntu (incl. LinuxMint) or Backtrack just search for it in your repositories:
sudo apt-cache search boblight
Or just use the software center.
According to your problem finding the arduino code:
It's located in the attached zip-file within the main folder and called ambilight.pde. Arduino changed its file extension after my project was finished to *.ino, so *.pde is the old file extension.
I hope I could help you and you enjoy my project.
I fix the problem "error com1 channels 30" by add "" between "com1 chanel 30"
Now i have an other error message : wrong channel value 5 for device uCon on light left_lower.
Can someone tell me that it's a probleme or the error message appears because i don't have the TLC5940 chips connected and the led strip.
I just have the arduino for now, i didn't want to buy LED strip already. I want to test the boblight and be sure it work.
I hope its not too late too...
The only thing I changed in the config file, is the number of the Com connection. The rest is the same as what I find it in the zip.
I thank you for helping me.
here is the config file:
[global]
interface 127.0.0.1
[device]
name uCon
output "COM7channels 30"
type momo
interval 20000
prefix FF
rate 115200
[color]
name red
rgb FF0000
[color]
name green
rgb 00FF00
[color]
name blue
rgb 0000FF
[light]
name left_lower
color red uCon 5
color green uCon 6
color blue uCon 4
hscan 0 20
vscan 50 85
[light]
name left_upper
color red uCon 1
color green uCon 3
color blue uCon 2
hscan 0 20
vscan 15 50
[light]
name upper_left_left
color red uCon 8
color green uCon 9
color blue uCon 7
hscan 0 25
vscan 0 20
[light]
name upper_left_right
color red uCon 11
color green uCon 12
color blue uCon 10
hscan 25 50
vscan 0 20
[light]
name lower_left
color red uCon 15
color green uCon 14
color blue uCon 13
hscan 0 33
vscan 80 100
[light]
name upper_right_left
color red uCon 17
color green uCon 18
color blue uCon 16
hscan 50 75
vscan 0 20
[light]
name upper_right_right
color red uCon 20
color green uCon 21
color blue uCon 19
hscan 75 100
vscan 0 20
[light]
name right_upper
color red uCon 22
color green uCon 24
color blue uCon 23
hscan 80 100
vscan 15 50
[light]
name right_lower
color red uCon 25
color green uCon 27
color blue uCon 26
hscan 80 100
vscan 50 85
[light]
name lower_right
color red uCon 28
color green uCon 30
color blue uCon 29
hscan 67 100
vscan 80 100
output "COM7channels 30"
This section is not correct. I just used it with Linux and didn't test it out at all on windows, sorry. It has to be
name uCon
output "com7"
channels 30
as you could read in the other comments posted.
When I start bobligh.exe, no more error messages but the boblight windows is just a black windows, like a msdos command window.Is this normal?
I'm asking you because I built a first ambilight system, base on boblight, two years ago. But the boblight has a graphic integration .
I search about boblight deamon, and ii look like my config file is correct.
But I wonder if it can work fine with your arduino programe too?
Thanks for all your help. This is really nice of you
Here, the first part of my combine config file, the rest is exactly the same as yours.
[global]
timeout 20
interface 127.0.0.1
port 19333
interpolation on
proportional 5.0
saturation 3.0
value 10.0
valuerange 0.0 1.0
use yes
method average
threshold 20
[device]
name uCon
type momo
output "com7"
rate 115200
channels 30
interval 20000
prefix FF
[color]
name red
rgb FF0000
gamma 1.0
adjust 1.0
blacklevel 0.0
[color]
name green
rgb 00FF00
gamma 1.0
adjust 1.0
blacklevel 0.0
[color]
name blue
rgb 0000FF
gamma 1.0
adjust 1.0
blacklevel 0.0
And I correctly placed "channel 30", I have the same error message.
This is not a problem obviously.
I tried to change the number of "uCon" for left lower . Same error message, just the number is changed.
I tried to change left lower config with left upper to get an increase of number on the script.
But steel not working.
I assume the code is good until "light". Because anything I put after light appear as an error. Do you have any idea ?
I tried on linux but too much complicated. I'm note very familiar with linux.
I don't understand how you make it run on linux, because the boblight.exe file that you provide in the zip is a windows program???
Does anyone know what I could try to get Boblight on?
So after a lot of tinkering, I finally got things working, however, the colors are not reacting the way they should. I realized the boblight.conf file that is provided in the zip file, may have its formatting screwed up once you download it, depending on your pc, operating system, etc. At least in my case this is what happened.
What I did was overwrite this file, with the boblight.conf downloaded from http://blogger.xs4all.nl/loosen/articles/408184.aspx
And then I just changed the settings to match this project. This was what solved getting error messages from boblight and timeout message from boblight-getpixel.
Can someone please explain the difference between the author's setup and the one from the tlcarduino google page. I have attached both images to this post. The one from the tlc arduino google page has a wire going from + to ground (bottom right hand corner), basically the right side of both images differ a little. Can someone elaborate on this Please>>>
I am using the Arduino Uno Rev 3, and I am finally got the lights reacting and changing when I start boblightd and boblight-getpixel, but its not corresponding correctly to the colors on the screen like yours is. I am using the exact setup you used, except, my leds are the 30/meter, but I did what you recommended and just doubled the length to get the same number of leds and I put 3 strips on top & bottom and 2 on left and right side. I did adjust the hscans and vscans accordingly.
Other than that, to lessen chance of mistakes, I followed, checked and re-checked & my setup matches yours step by step. I even changed the led strips to make sure they were not the issue. I am using Win 7 64-bit
Do you think its any change I need to make to the Arduino pde file?
Any other suggestions you can make?
P.S. I didn't have a 390 ohm resistor, I used a 360 ohm resistors...that should be okay, right?
Thank you so much for your help. I have posted an image of my setup. I have the 10 +12v led wires and the long thin black wire (as the ground) going to the female power connector. The led wires from the first channel of the 1st tlc, I have connected as blue, green, red, blue, green red, etc. etc.
Sorry for the long post, just wanted to list everything. If I need to clarify or post anything else, please let me know.