TLC5940 Flickering

First, I'm an electronics noobie. I've daisy chained 4 TLC5940s on a breadboard exactly as shown on the Arduino TLC5940 Library page and a total of 21 RGB LEDs. One diversion from that setup is that I used a 2.2K resistors instead of 2K resistors (my local Radio Shack didn't have 2K resistors).

It works pretty well expect that sometimes one or two of the TLC5490s flickers it's LEDs. Any ideas?

Thanks!

How long are the connections between the tlc's?

Also, which tlc's are the ones flickering? The last two on the chain or is it random?

I suspect you have no decoupling capacitors on the TLC5940s.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

kbates666:
How long are the connections between the tlc's?

Also, which tlc's are the ones flickering? The last two on the chain or is it random?

Four TLCs altogether. Usually happens on the 2nd and or 3rd TLC. Connections are about 3 inch jumpers.

Grumpy_Mike:
I suspect you have no decoupling capacitors on the TLC5940s.
[De-coupling](http://www.thebox.myzen.co.uk/
Tutorial/De-coupling.html)

Thanks Mike. I'm an electronics beginner so some of your tutorial was over my head but I think I got a rough understanding. So the VCC and GRD on are pins 21 and 22 on the TLC5940NT. Would I run a 0.1 µF capacitor between those two pins on each IC, correct?

Would I run a 0.1 µF capacitor between those two pins on each IC, correct?

Yes that is correct.

I have also the problem with random flickering for my 5940, and it happens on the first tlc already at OUT10 onwards. The first few output pins are ok though.

I have the 100nF between Vcc and GND. What else could be the problem? I'm using the Fades example code from the tlc5940 library.

konjurer:
First, I'm an electronics noobie. I've daisy chained 4 TLC5940s on a breadboard exactly as shown on the Arduino TLC5940 Library page and a total of 21 RGB LEDs. One diversion from that setup is that I used a 2.2K resistors instead of 2K resistors (my local Radio Shack didn't have 2K resistors).

It works pretty well expect that sometimes one or two of the TLC5490s flickers it's LEDs. Any ideas?

It's 99% certain to be a decoupling problem. Lots of LEDs switching on simultaneously causes voltage drops on the logic parts.

Continuing from my problem previously. I do have the decoupling 100nF capacitor on all my tlc's, and the problem still stands. Now I switched from a UNO board to a Nano 168 board and strangely the problem disappears. But the fading speed also becomes much slower. Again, I'm using the example Fades in the tlc5940 library.

So why the speed is different? Is it because of the faster clock speek on UNO? But I thought the example would have taken this into account when I change the board setting in the arduino menu.

And why the flickering disappears on the Nano but not the UNO?

thanks

darknails:
So why the speed is different? Is it because of the faster clock speek on UNO?

Probably.

darknails:
But I thought the example would have taken this into account when I change the board setting in the arduino menu.

It's not guaranteed. There's plenty of ways to code a sketch that make it depend on a particular clock speed (in fact getting timing right is one of the most difficult parts of Arduino coding).

darknails:
And why the flickering disappears on the Nano but not the UNO?

The clock/data signals to the TLCs will be running half as fast. Slow is more reliable for communication links.

I still say it's a decoupling problem. Where are you getting the 5V for the LEDs from? Try adding decoupling there.

This topic is kind of old but I'd like to share my information.

For workaround, I put a small low pass filter between the first SOUT and the second SIN, second SOUT and third SIN, and so on. This magically worked and flickering vanished out.
I succeeded in controlling several servos and LEDs with 10 TLC5940 serially daisy chained.
I am using TLC5940n DIP package.
Please look at the video in the post below.

Many people encountered the same problem: more than two ore three TLC5940 make the farther LEDs more flickering.
And they could not found any answers after all, as long as I crawled over several forums.

I had the same problem, and I wandered why no "big" project using lots of LEDs with TLC5940 exists.
Many applications are using WS2801 modules because its more reliable and widely spread.

I am not 100% sure, but I suspect the flickering problem everyone encounters stems from the "output timing" of the TLC5940.
This is not the voltage or any signal integration problem, but it comes from its specs.

As you know, TLC5940 accepts its SIN signal as SCLK signal triggers high.
Simply put, SIN signal should be already HIGH (or LOW) when SCLK gets high.

However, SOUT signal of the first TLC5940 changes its value almost SIMULTANEOUSLY as SCLK gets high.
This would be confusing the second and latter TLC5940's SINs and make the total mess.
I don't know this is the spec of the TLC5940 because TI does not tell this in their datasheet.
Please refer to the timing chart in モノを作りたくなるブログ: TLC5940 の SOUT の変なタイミング

Other problems may be coming from energy consumption of TLC5940.
TLC5940 draws fairly large power (5V,100mA, etc.) with careless programming implementation.
This causes instant drop of the voltage and makes flickering.
This voltage drop sometimes cannot be compensated by 0.1uF capacitor, especially when you are using a small voltage regulator.
At this time, you should monitor the voltage drop with your oscillo while you change the values of capacitors.
In my case it worked with 10uF and 47uF capacitors.

I hope this helps .

I had this same flickering problem with the second (last) TLC in my chain and while adding decoupling capacitors to all the chips, I noticed my first TLC in the daisy chain was missing a connection to VCC causing a flicker on LEDs connected to the second TLC! How and why everything worked (except with flicker) when the first TLC had no VCC is a mystery to me, but adding that line to VCC fixed it -- no flicker now and it looks great. There are a lot of wires in these circuits and I just missed one, simple mistake. I suggest verifying all your VCC's are properly connected as well.

It worked because the chip was being parasitically powered by the signal lines.

All the problems are caused by lack of adequate decoupling. There is no need to filter he signals, if you think that is a cure you are deluding yourself.

bufon:
Other problems may be coming from energy consumption of TLC5940.
TLC5940 draws fairly large power (5V,100mA, etc.) with careless programming implementation.
This causes instant drop of the voltage and makes flickering.
This voltage drop sometimes cannot be compensated by 0.1uF capacitor, especially when you are using a small voltage regulator.

Hi bufon,

Can you please provide some for information regarding the energy consumption of the TLC5940 you discussed in the quote? Perhaps a simple example of good programming and possibly an example of careless programming would be helpful.

Thanks in advance.