Go Down

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

James C4S

You are updating the TLCs way too often.  Set your values and then update once (after the for loop sets all the values).
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Ah, that explained a lot, but it's still glitching for a bit now..

By the way, i connected a 7805 to power the tlc's, but the wire from the 5v-out from the arduino was still connected to the powerlane in the breadboard, and now the 7805 is powering the arduino through the 5v out pin on the arduino. Can that cause any damage or anything?

James C4S


Ah, that explained a lot, but it's still glitching for a bit now..

Can you post a hardware schematic of how you wired the TLC5940?


By the way, i connected a 7805 to power the tlc's

Not necessary, but I understand why you did.


the wire from the 5v-out from the arduino was still connected to the powerlane in the breadboard, and now the 7805 is powering the arduino through the 5v out pin on the arduino. Can that cause any damage or anything?

This is undesirable when the Arduino is being powered on its own.  With either USB or Vin/Barrel jack, there is already 5V present on the 5V pin.  You are causing two regulators (either inside your PC or the arduino regulator) to fight with the external 7805. 

7805 stuff aside, please post a schematic of how you wired the TLC5940.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Pretty much exactly like this: http://tlc5940arduino.googlecode.com/svn/wiki/images/breadboard-arduino-tlc5940.png
But with a 100nF capacitor between vcc and ground next to the TLC's, and 10uF at the power in on each breadboard. The TLC's are all on a separate breadboard.

James C4S

#34
Apr 02, 2012, 05:40 pm Last Edit: Apr 02, 2012, 05:42 pm by James C4S Reason: 1

Pretty much exactly like this

Any differences?

Did you follow the directions to modify tlc_config.h and make sure TLC5940.o is deleted afterwards?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Yes, I did.

And I don't know how, but the glitching disappeared..!

I'll leave it as it is for now, and i hope there won't be any glitching in the final bigger project.. :)

Grumpy_Mike

Quote
and make sure TLC5940.o is deleted afterwards?

You haven't had to do that for several releases now because the libraries are automatically compiled every time.

The glitching is back, the difference is that the power source is giving me one Volt extra atm.
The led's were only getting 2.5mA because they were getting insufficient voltage.. so i upped it a bit.

How is this affecting the TLC's..?

At the moment the TLC's are being powered by the arduino, which is powered by usb. The anodes of the strings of 4 leds are connected to the (variable) 12v supply.

There's no glitching whatsoever, even without capacitors, if I power the power supply down to ~11v.
There's a lot of glitching, even with capacitors, when I power the power supply up to ~12v and above.

Are there any more things I can try to get it to work..?

Grumpy_Mike

Quote
The led's were only getting 2.5mA because they were getting insufficient voltage.

So what current had you set the TLC5940 for?

Quote
There's no glitching whatsoever, even without capacitors, if I power the power supply down to ~11v.

I assume that is because you are switching very little current.

Quote
There's a lot of glitching, even with capacitors, when I power the power supply up to ~12v and above.

I presume this is because the current being switched is larger and it is generating interference and you have insufficient decoupling on the supply to cope.

Quote
So what current had you set the TLC5940 for?

I have a 1.8K resistor on each TLC, so that would be 21.7mA per channel, right?

Quote
I presume this is because the current being switched is larger and it is generating interference and you have insufficient decoupling on the supply to cope.

But I already have .1uF capacitors at each chip, and 10uF at all breadboards.
How can I, preferably step by step, decouple the noise I've got now?

Grumpy_Mike

Quote
But I already have .1uF capacitors at each chip, and 10uF at all breadboards.

Well what ever you have is not enough, either in the terms of layout ( bread boards are bad ) or in how you have applied them. They need to be ceramic caps and they need to have short leads and they need to be as close to the chip as possible. You might try a star distribution arrangement, where the wire supplying power to each chip is connected to one point. I suspect you have them chained at the moment.

Quote
How can I, preferably step by step, decouple the noise I've got now?

Each situation is different, no one can give you a step by step guide, this is not cookery it is electronics. No amount of decoupling capacitors can rescue a bad layout. It is a matter of trying to understand what you are doing.

How about posting a photograph of your setup?

Quote
No amount of decoupling capacitors can rescue a bad layout.

I actually thought that was possible..

The layout I had with the glitching was:



I have now however rewired everything to be a bit more compact, but I can't test it yet, since the wires from the LED's aren't long enough at the moment.


Grumpy_Mike

Quote
The layout I had with the glitching was:


:smiley-eek-blue:   :smiley-eek-blue:   :smiley-eek-blue:

Ah well you will struggle with that. Not only will there be trouble on the TLC chips but the long leads from the LEDs will also cause you trouble. I had a bit of trouble when these were only a foot on this project:-
http://www.thebox.myzen.co.uk/Hardware/Hexome.html
and I had to put some very small capacitors on the end of the LED run. Look at the scope traces on that page.
I think you will need a scope to get to the bottom of this.

Quote
I have now however rewired everything to be a bit more compact,

A lot better but still very iffy, those long loops connecting the chips are just asking for it.

No one ever told me you can't just use meter long wires for everything..  :smiley-roll:

Quote
and I had to put some very small capacitors on the end of the LED run.


From where to where exactly did you place those?

And I haven't got access to a scope at the moment, I guess there isn't a simple/relatively cheap alternative for it? (record a random voltage as audio and look at the waveform? or is that waaaaay simple to work?)

Go Up