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 Arduino Playground - 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?
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.
Inevitableavoidance:
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.
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 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?
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:
That will increase the power dissipation in the TLC chip.
Then I asked how that would happen.
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)
Inevitableavoidance:
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.
Inevitableavoidance:
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.
Inevitableavoidance:
You then replied:
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.
Inevitableavoidance:
Then I asked how that would happen.
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.
[quote author=Brad Burleson link=topic=99196.msg744146#msg744146 date=1333187444]
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.[/quote]
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.
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
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?
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?
That's where decoupling capacitors can help.
Inevitableavoidance:
By the way, would, theoretically, adding 1000 capacitors to a power source, change anything about the output?
Adding 1000 capacitors doesn't matter. What matters is how much capacitance you have added (or the value of each of those 1000).
You need to strike a balance between having enough and not having too much. If you have too much, there will be a large amount of in-rush current when your circuit turns on, as all of the capacitance is charged. (Too much has a lot of "depends" in it. However, thousands of microfarads is probably a good line to watch.)
A 0.1uF cap near each IC's VCC is helpful to smooth out high frequency demands. Sometimes, it may be necessary to put something larger in parallel, like a 1.0uF. FYI, Even if you have 20 of these caps in your design, that's still less than half the capacitance as the bulk decoupling caps on the Arduino board itself.
Not really, it just points up that it is a decoupling issue. It is probably that the regulation on the power supply is different for the different voltages enabling the existing decoupling to cope with the interference.