Go Down

Topic: TLC5940 Woes (Read 8468 times) previous topic - next topic


@mike: Oh, and were you suggesting putting a pull up resistor between the last pin's Signal Out and Vcc? Or which pins exactly? I wish I had a scope, but I won't be able to get my hands on one for a few weeks at best.

Not serial out but serial in and also the clock and load pins. This is because the signals get weak at the ends.


@defsdoor: Thanks for the link. I just read through that post, and I'm hesitant to make those changes for two reasons:
1) The poster talks about changing the XLAT and BLANK pins on the Arduino, but I don't see where he changes their pins in the code. I don't want to start making guesses on what I should be changing, since most of the timing code is over my head. :/
2) I think he is using the multiplexing library.

It sounds like the changes could be beneficial, but I'm not confident enough to make those changes myself. Do you think that this could be causing a problem? The library seems to work well when I'm using 3 TLCs. It only gives me problems when there is a significant length of wire between the TLCs.

@mike: Ahh, yes I understand. Putting 10k pull-up resisitors from a signal wire to Vcc right before it enters the painter should help boost the signal if it's getting too weak as it travels across the wire. Is that right? Again, thank you. This project is soo close to coming together!


Pull ups on the signal lines, all of them really. Those tiny surface mount ceramics are better than the large ones with leads. If you have any more try putting then on top of the original ones to add extra capacitance. If you have them ceramics of 1uF or larger would be good.
Eight inches is a long way in electronics, the trouble I was having recently with spurious oscillations on the LED lines was caused by that sort of distance. Attached is a photo of what was happening.


Feb 12, 2011, 02:35 am Last Edit: Feb 14, 2011, 12:13 am by AlexXx Reason: 1
I tested out two painters again. I added 0.1?F caps across each chip. I also put a 10k pull-up resistor between each of the signals and Vcc just before they entered the painter boards.

When I ran the program, the two LED arrays were more closely matched than they were before, but the first painter didn't work perfectly like it did the first time. Hmm. I not sure what to make of this.  :/

EDIT: I tested the two painters once more, this time with a really short signal cable between them. I didn't really see any different results from before.

Can anyone explain to me what changes need to be made to the TLC code library? I can add that "IMPORTANT BIT" into the ISR function, but I'm not quite clear on what I need to do with BLANK and XLAT. Do I plug them into Analog Inputs 0 and 1 of the Arduino? If so, then isn't it bad thing to set their pinModes to OUTPUT? And, shouldn't the new pin numbers be assigned to BLANK and XLAT in the code? It just isn't very clear in that post. :/

Thanks once more for your help. I'm running out of possible problems, which is a good thing. There has to be a point where I have checked everything that could be going wrong. I can post a video of the painters in action if anyone cares to see it, just let me know.


The new pin must be declared, BLANK and XLAT are connected to analog 0 and 1, but used as digital pin 14 and 15. Fede
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com


Federico and I have been exchanging PMs, and it seems that we are both having troubles figuring out the modifications to the TLC5940 library found in this post. Would anybody care to explain in a bit more detail? Thanks.



The thing is, I already have 0.1?F and 1.0?F SMD caps across Vcc/Gnd for each chip, but they are very tiny. I could barely pick them up with a tweezers. I soldered them with a 15W iron, do you think I might have burned them up? Anyway, I'm considering putting 0.1?F caps in parallel across the smd caps on each chip.

If they are ceramic caps, no you can't burn them up!  And if they are not ceramics they should be.  Basically you are switching high currents at logic speeds, lots of decoupling right next to the IC is needed - both a 0.1uF and a 1uF ceramic right next to the chip, and 220uF on the supply rails (between Vcc and gnd) per board would be a good start, but be prepared to increase these.  Remember that series resistance and inductance are key parameters of decoupling caps, a 0.1uF cap is NOT redundant if a 1uF is present - it has better high-speed performance.

Just for example if you switch 200mA at CMOS speeds (say 5ns), that's a dI/dt of 40MA/s - unless the decoupling caps are right next to the chip the inductance of the PCB traces will lead to spikes of several volts on the supply pins, causing malfunction (and even possible damage).

In general when boards are strung out like this it is most reliable to have voltage regulators per board (the regulators can react to load changes directly).  Alternatively increasing the large decoupler per board can help (say 1000uF).  Check that you aren't getting too much Vcc supply droop between the boards (measure the voltage at each board with all LEDs on).  Beef up the supply wires if necessary.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Feb 18, 2011, 03:33 am Last Edit: Feb 18, 2011, 03:41 am by AlexXx Reason: 1
Thanks for the reply Mark, I'll make sure to look into decoupling a bit more.

I made an interesting discovery today. I decided I would try to hook up my Arduino Mega to one of the painter boards, so I could at least have two boards running at the same time. Again, each painter board has 3 TLC5940s and 16 RGB LEDs. I hooked up the Arduino Mega to only one board, disconnecting all other boards. I also got a different power supply for both VLED and the Arduino Mega, since I wanted to use the other supplies with a different painter.

The LED power supply was 5V 1A switching.
Each LED channel pulls 17mA max, so the total current draw for the LEDs should be (17mA) * (16 RGB LEDs) * (3 channels per LED) = 0.816 A
So, I should have a 200mA comfort zone when all of the LEDs are on at the same time.

The supply for the Arduino Mega was 12V 350mA unregulated.
I thought that this would be more than enough to power the Arduino Mega and 3 TLC5940s.

When I ran a sketch, I got similar results to what I was seeing when I connected two boards with my old power supplies. The sketch would run, but only parts of the sketch would actually show up on the LEDs.
So, then I replaced those power supplies with the power supplies I was using earlier (5V 2A switching, 12V 500mA unregulated) and everything on that painter worked again.

Given this new data, do you think that my power supplies could be insufficient to power 2 painter boards? I mean, that is the easy conclusion to make. I just don't see where I went wrong in my power supply calculations. 5V 2A switching, 12V 500mA unregulated works on one painter but not two. 5V 1A switching, 12V 350mA doesn't work on even one painter.


It could be that the supply ripple is too much when you drive it close to the current limit. Ripple often increases as power draw increases.
This then could cause interference. You need to check the ripple on the rails with an oscilloscope.



Iam new here so hello to everyone :D

Have you tried puting a termination resistor on the last LedPainter board?

He shows it in the datasheet : http://www.brilldea.com/assets_files/LEDPainter/LED_Painter-Datasheet-Rev010.pdf

on page 6

Go Up