Go Down

Topic: Library for TLC5940 16-channel PWM chip (Read 35 times) previous topic - next topic


I'm working on a project where I have 12 TLC's with 5 RGB leds each, all TLC's on separate boards connected through 10cm ribbon cable (power external). I'm trying to drive them with one arduino and this library. I've been able to get 10 boards to work however the last two give problems. As soon as they are connected the first 10 still work but the first one (the one connected to the arduino) starts to flicker and the last two boards just give some random colors. The config file has been changed and the .o file deleted. When I put my finger on the flickering board the flickering gets less. As soon as the two boards get removed the flickering is gone.
Anybody have an idea on how to fix it or what the cause is? Maybe too long leads?
I haven't got my DSLR and camcorder here, but if required I can make a few pics later.

Mike Mc

Maybe the Arduino is not providing enough power to drive all the chips? Have you tried to power the chips from an external supply?


The TLC's are connected to an external power supply (4,4 V) both the VCC and VLED.


The flickering you describe sounds like it's being caused by long wires.  If you have a scope, see if you're getting ringing on the control lines.  Try putting resistors in series with SCLK and XLAT and one of the tlc's.
For example,
Put a 1k between the ribbon cable SCLK and the 10th tlc's SCLK (and same with XLAT). 1k is pretty arbitrary so try other values.

The new millis rollover was introduced with 0013(?) - it's not part of the bootloader.  I updated tlc_fades again, try downloading r012 (http://code.google.com/p/tlc5940arduino/).

1.  Yes, that looks correct.  See the documentation for tlc_setDCfromProgmem.
The funny-looking
Code: [Select]
prog_uint8_t dcArray1[NUM_TLCS * 12]
gets stored in program memory, which is where your sketch goes (if you comment out the array, the sketch size would go down).
You don't have to set DCPRG high - tlc_setDCfromProgmem does this for you.

2.  Yes, it's 120 mA per channel.  You will need cooling if you try to drive that much current - see the datasheet.

Mike Mc:
No, as ReSiStAnCe pointed out, you have to set all the dot-correction at once.

Nothing looks wrong.  The pull-up resistor value doesn't matter much, so 2.2k or 4.7k will work.  If you have access to a scope, see if the tlc is generating pulses to the servo.

Sorry to have been inactive lately - I'll try to check the forums more often.


Thanks, AC! This came just in time ;)

I'll give it a whirl tonight!

Go Up