Hi all,
My project involves a matrix of 49 LEDs powered by 4 daisy-chained TLC5490's. I'm using an Duemilanove as my controller. The TLC5490s are wired using the instructions that come with Alex Leone's Arduino/TLC5490 library, and each LED is directly driven by a TLC5490 output (no multiplexing). I've run the "knight rider" test program that comes with the Arduino/TLC5490 library, which just lights up the LEDs individually one at a time (actually 3 at a time, with the middle one the brightest and one dimmer one on each side to improve the animation). This all works as expected either powering the Arduino over USB or via a compatible wall-wart that I purchased from Adafruit. When I light up all of the LEDs at once at 1/4 power, they're each drawing 6.6mA as evidenced by my multimeter, which means that my total draw is around 6.6 * 49 + a little bit for the Arduino, which comes out to around 325 mA, which my computers USB port should have no problem with, which it doesn't -- the whole board lights up. What's weird is that when I light them up using a program which turns on the next LED in the sequence with a delay of 500ms before moving on, it acts normally, but then after lighting about 30 LEDs, the rest of them turn on very rapidly -- not instantaneously, but with only a few ms delay between and it doesn't seem to be consistent. The code is very simple; the main loop is:
int pins[] = {
54,51,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,30,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,53,55,59,49,47,43};
void loop(){
for (int channel = 0; channel < sizeof(pins); channel++) {
Tlc.set(channel[pins], 1024);
Tlc.update();
delay(500);
}
}
This turns on one more LED every 500 ms at an intensity of 1024 (out of 4095). Why they suddenly start lighting up very rapidly after lighting up 20 LEDs seems very strange to me. It doesn't matter which 30 LEDs it is, either -- if I run the loop the opposite direction, it lights up the 30 LEDs on the other end of the board before doing the same behavior. This is unexplained strange behavior number one.
The second thing I can't figure out is if I power the board with my wall-wart, running the same program. This time, the board lights up LEDs as expected until it hits the 20th LED or so, at which point the Arduino seems to reset -- the next light doesn't come on, sometimes there's some weird light flickering, and then they all go off and it starts over again with the matrix completely unlit and the lights start coming on again one at a time. I have measured that my wall-wart is putting out a constant 9.3V (under no load, just using the voltmeter on the circular plug, and VCC remains at a steady 5V throughout the entire process, from power on through lights coming on to the Arduino resetting to it starting the sequence over again. When I measure the voltage when its powered by USB from my computer, it starts at around 4.97V when no LEDS are on, and slowly drops as the lights come on, ending up around 4.82V when the whole board is lit up.
I'm a bit stumped. Any suggestions on what I should test or any indications of what the problem might be would be most welcome. Thanks!