Some of you might remember. I've been trying for a while to control 48 RGB LEDs with an Arduino. I'm still running into troubles, but I've learned a lot over the past year of tinkering with this stuff. I am having a problem now with a nice clean setup that I have made. I have put a lot of time into this project, and I would really like to see it succeed. So, read on if you are interested in helping me out. Thanks.
After completing a smaller sized prototype on perfboard, I bought 3 Brilldea LED painters. Here is a circuit diagram. Here are some pictures of my project. I can take more pictures upon request, feel free to ask.
If anyone cares to help me troubleshoot, this is what I did:
-
I populated the painter boards with one 0.1?F capacitor, one 1.0?F capacitor, and one 2.2k? resistor for each TLC5940 chip. I put two 10?F capacitors across the VLED lines of each painter board. (This is suggested on Brilldea's website)
-
I connected the painters in a chain starting from the Duemilanove, so I had something like this:
[Duemilanove] => 2ft of cables => [Painter1] => 3.5ft cables => [Painter2] => 3.5ft cables => [Painter3]
My painter setup is a spitting image of the example on Brilldea's website. -
I connected 16 RGB LEDs to the first and last painters only. Painter 2 had no LEDs connected. It only passed signal and power through to Painter 3.
-
I connected a 12V 500mA power supply to the Duemilanove via the barrel jack.
-
I connected a 5V 2A power supply to the VLED screw terminal on Painter 1 and continued it down the chain to the other two painter boards. (Again, there is not much to the design, I followed the example on Brilldea to a T)
-
The positive lines from both power supplies were connected to a DPDT switch so that both lines would be switched at the same time when the switch is in the ON position. The grounds from the Arduino, VLED, and the two power supplies were all tied together.
-
I used these RGB LEDs. According to my calculations (page 14), using a 2.2 K resistor, each RGB channel should be sinking about 17mA max. That's about what I read for current draw in my prototype. So, assuming all 48x3 channels are drawing maximum current, that's about 2.4 Amps. I just realized that my 5v 2A supply is not sufficient if all of the lights are active. But, I only have 32x3 channels sinking current, since Painter 2 has no LEDs plugged in, right? That equals about 1.6 Amps max which is well below the limits of my 2A supply.
-
I couldn't manage to calculate the power dissipation of the TLC5940s because I am not sure what the value of dPWM is. dPWM is defined as the "duty cycle defined by BLANK pin or GS PWM value" (TLC5940 specs, page 15)
If it helps, the TLC5940s are rated to dissipate 2457mW at or below room temp, so I have:
P[sub]D[/sub] = (V[sub]CC[/sub] * I[sub]CC[/sub]) + (V[sub]OUT[/sub] * I[sub]MAX[/sub] * DC[sub]n[/sub]/63 * d[sub]PWM[/sub] * N)
P[sub]D[/sub] = (5V * 0.5A) + (5V * 0.017A * 4095/63 * d[sub]PWM[/sub] * 144)
Where N = 16*3 channels per board * 3 boards = 144 (This assumes all painter boards are full of LEDs)
So, maybe there's a power dissipation problem? I'll have to figure out the value of dPWM.
So, after all of this was finished. I ran a simple program to turn each channel on and off, one at a time:
#include "Tlc5940.h"
void setup()
{
Tlc.init();
}
void loop()
{
Tlc.clear();
for(int i = 0; i < 143; i++) {
Tlc.set(i, 4095);
Tlc.update();
delay(750);
Tlc.set(i, 0);
Tlc.update();
}
}
Making sure of course, that NUM_TLCS was set to 9 in my tlc_config.h file. Also, testing my Duemilanove with a Blink sketch first to see that it ran okay. I later tested the project using an Arduino Mega, and I noted similar results.
The results were this:
-
I flipped the switch to ON.
-
The lights on the Painter 1 lit up randomly, some channels on, some channels off.
-
The lights on Painter 3 lit up randomly as well, but they were very dim.
This leads me to believe that at the very least there is a power supply issue. That would make sense to me if I had all 3 painter boards populated with LEDs or if I programmed all of the lights to turn on at the same time, but I have done neither of those things.
So, I am stuck. The possibilities I can think of are:
- VLED power supply is insufficient
- Too much power is being dissipated
- TLC5940 chips are bad. (The lights can turn on, but the data is getting garbled somehow)
- Both of my Arduinos are broken.
- Signal cables aren't securely connected to the Arduino
- Something else is going wrong that I don't know how to check for
I've tested all of these to the best of my ability. I will obtain a 5V 3A power supply, but I am doubtful that this will fix anything besides the dim LEDs on Painter 3. If anybody has the slightest clue about what could be going wrong, please let me know. This setup isn't very complicated, and I feel like it really must be a simple error to correct. I am so close! Thanks.
EDIT: I think it would also be good to note that I soldered breakaway header pins to the end of the ribbon cable. I am using those to connect to the pins on the Arduino. The pins feel a bit looser than the wires I normally stick into the Arduino pins, but I don't think that they aren't making a good enough connection.
EDIT 2: I've posted more pictures in that album.