Go Down

Topic: Glitching TLC5940 (Read 4817 times) previous topic - next topic

So i've made this big 1.2x1.2meter panel with 256led's:



It consists of strings of 4 (3v) leds in series, 4 strings next to each other, 16 strings "deep".
1   **** **** **** ****
2   **** **** **** ****
...
16 **** **** **** ****

I was trying to use 4 TLC5940's to control the 4 colomns of strings, but it was super 'glitchy', blocks of leds randomly turning on and off.

So i tried the same with 2 TLC's, but it's still kind of glitchy.

I'm using the http://www.arduino.cc/playground/Learning/TLC5940 library. And i've wired it up as the example for 2 tlc's shows, with 0.1 uF decoupling transistors between the vcc and ground from the tlc's.

What I mean with glitchy is; some strings go off instead of on, and some just go on and off randomly.

I'm planning on building the same thing 6 times as big, with 12 tlc's, and i've got everything i need so i'd really want it to work eventually, can anyone please help me?

Nick Gammon

I think to solve "glitchy" we would need to see the actual code you are using, and the way you have wired it up. Not just vague descriptions. It could conceivably be a power supply problem.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

#2
Mar 30, 2012, 11:44 pm Last Edit: Mar 30, 2012, 11:50 pm by Nick Gammon Reason: 1
I'm using the "basicuse" example from the library, but with this void loop instead:

Code: [Select]
void loop()
{
 for (int channel = 0; channel < NUM_TLCS * 16; channel++) {
   Tlc.set(channel, 4095);
 }
 Tlc.update();
 delay(1000);
 for (int channel = 0; channel < 16; channel++) {
   Tlc.set(channel, 0);
 }
 Tlc.update();
 delay(1000);
}


Row "30" is inversed and row 31 is randomly going on and off.

I've got it wired the exact same way the picture the example shows, but with 12v and 4 leds instead of just one led..

If there is any more information i could give you i'd be more than happy to give it to you


Moderator edit: [code] ... [/code] tags added. (Nick Gammon)

Brad Burleson


I've got it wired the exact same way the picture the example shows, but with 12v and 4 leds instead of just one led..


So does that mean your powering the TLC5940's from the Arduino 5v?

I've ran several TLC5940's direct from an Arduino like that and had no problems, but I'm usually only driving 4 LEDS at near 100% (for about 140mA peak).

If the unmodified BasicUse example works as expected, the next step would be to power the Arduino and TLC5940's from an external 5v source.

I hope this helps,

Brad.




James C4S

Did you give each TLC5940 it's own decoupling capacitor?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Grumpy_Mike

Quote
with 0.1 uF decoupling transistors between the vcc and ground from the tlc's.

I think you mean capacitor not transistor.

Each chip needs a ceramic capacitor, not any other type, and it needs to be as close to the chip as possible. Also a single large value capacitor across the supply, something like 100uF will help as well.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Also short wires between the TLC and arduino help. Use a scope to look at the signals out of the TLC, is there any oscillation on the signals?

I meant capacitors, my bad.

I rewired the two TLC's from 2 breadboards to one, that seemd to solve it for the most of it, but that won't work with 12 TLC's with the bigger project. I'm powering the leds with a 12v power supply, and the TLC's with the 5v from the arduino, which is powered by usb.

Do i need to put the 100uF capacitor over the 12v power supply, or over the arduino's?

Brad Burleson


I'm powering the [...] TLC's with the 5v from the arduino, which is powered by usb.


That's probably a bad idea.  It would be better to use something like a 7805 fed from 12v and then passed to VIN on the arduino and TLC5940's.

Powering the TLC5940 from the Aduino is fine for a demo application but not what you should do in the real world.

FWIW,

Brad.

Thanks for the advice, would it be a problem if i used the 12v from the leds? or would that cause even more interference?

Grumpy_Mike

Quote
would it be a problem if i used the 12v from the leds?

That will increase the power dissipation in the TLC chip.

Quote
I'm powering the [...] TLC's with the 5v from the arduino, which is powered by usb.

To me that is fine, the TLCs don't take that much, as long as it is decoupled well.

Quote
Do i need to put the 100uF capacitor over the 12v power supply, or over the arduino's?

Well both would not go amiss, but put it on the 5V for preference.

I've only got 2 working TLC's atm, i'll recieve more monday, so I can't really test it now.

How would using 12v, with a 7805, like Brad said, increase the power dissipation if I may ask?

And if I would do that, could that cause more glitching since i'd be using the same power supply as the leds?

Grumpy_Mike

You said that
Quote
I'm powering the LEDs with a 12v power supply,

I took that to mean the anodes of the LEDs were being connected to 12V.


I'm a bit confused..

The anodes of the led's are connected to a 12v adapter.
The arduino is powered by usb.
The TLC's are powered by the arduino.

My question was:
Would using the 12v adapter with a 7805 to power the TLC's cause more glitching, since i'd also be powering the led's with it.

You then replied:
Quote
That will increase the power dissipation in the TLC chip.


Then I asked how that would happen.  :P

I'm now only using two TLC's on 1 breadboard and it's more or less glitchfree.
(I had 4 TLC's at the start, but damaged 2, so there's only 2 left.
New TLC's will arive monday.
There are 4 TLC's total supposed to be on this board, in the bigger end project, there will be 12)

James C4S


I'm a bit confused..

It appears everyone on this thread is confused.


The anodes of the led's are connected to a 12v adapter.
The arduino is powered by usb.
The TLC's are powered by the arduino.

That's critical information that should bring everyone up to speed.


Would using the 12v adapter with a 7805 to power the TLC's cause more glitching, since i'd also be powering the led's with it.

Your glitches are caused by lack of decoupling not lack of power.


You then replied:
Quote
That will increase the power dissipation in the TLC chip.

Mike made the assumption your LED's were originally connected to 5V and that you were asking about connecting to 12V.  He attempted to correct himself, but may not have been clear that is what he was saying.



Then I asked how that would happen.  :P

The TLC5940 is a constant current source.  It will drop whatever voltage is left over after the LEDs drop their forward voltage.  The amount of current that flows through each output is the same.  So if you had changed the LED's supply voltage then the TLC5940 would be dissipating more Power (Voltage * Current).   This doesn't appear to matter in your case since you have always been powering the LEDs from 12V.  The comments just caused confusion.


That's probably a bad idea.  It would be better to use something like a 7805 fed from 12v and then passed to VIN on the arduino and TLC5940's.

Don't misunderstand how the TLC5940 operates.  It does not draw current from its Vcc to power the LEDs.  It controls the amount of current allowed to flow through its outputs.  All of the "high current" comes from whatever supply the LEDs are connected to, not the TLC5940.  There's no reason to add another regulator when the Arduino's on-board regulator (or USB supply) can handle powering dozens of TLC5940s.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Wow, thank you a lot for making everything clear again. :)

But, in the end, I won't have an arduino on usb anymore.
I'll just have an atmega328 on a board somewhere which I'll need to power, with maybe the same 12v source.

What I thought when I said
Quote
Would using the 12v adapter with a 7805 to power the TLC's cause more glitching, since i'd also be powering the led's with it.

was that the leds wil be going on and off a lot, so i thought that might interfere with other circuits running from the same 12v source.. or won't that be a problem?

By the way, would, theoretically, adding 1000 capacitors to a power source, change anything about the output?

Go Up