Why Does TLC5940 LED Driver Produces "Smearing Edges"? - Page 1
Forum section: electronics / projects

author: Darkwing
author_rank: Contributor
timestamp: February 13, 2020, 01:57:07 am
content: Hi folks!I have a technical question about the (supposed) misbehavior of a TLC5940 LED driver chip, producing "smearing edges" at its outputs.The StoryI'm trying to multiplex some segment displays. Multiplexing is done with shift registers (CD74HTC4094) and a source driver stage (MIC2981), because the displays are common anode. As current sink driver I'm using the 16chTLC5940 LED driverchip.The ProblemI was wondering why I have some ghosting on the display digits, that means: some segments of one digit lit up shortly on the next digit. After thorough inspection, I found out, that the TLC5940 itself outputs some kind of "smearing edges", like it is somehow oscillating in timing. I measured that this "oscillation range" is about 1ms wide.Here is a picture from the scope:1, 2: edges from the multiplexing source driver3, 4: some segment pins from the TLC5940Also here is aYoutube videoof this in action:You can see, that the edges are "moving".This behavior is very unfortunate because it prevents me from multiplexing very quickly — because I need to "wait" around 1ms (=1.000µs = 1.000.000ns !) to be safe to switch to the next digit.I understand that there is a propagation delay with 16 bits shifting into the TLC5940 registers – but reading the switching characteristics in the datasheet, I don't see why this delay should sum up to 1.000.000ns; it should be 500ns or maybe 3.000ns ...(I'm also shifting 16 bits to the shift registers and the source driver respectively – this also produces clean, non-moving edges. So the crux must be the TLC5940.)The QuestionDoes anyone know why the outputs are "oscillating" in such a way? Is there a remedy to this or is this normal behavior of this chip?Btw, here is a view of the breadboard, that you can get an idea of how it all looks like:Hoping for help!Thanks y'all!

author: edavid
author_rank: Super Contributor
timestamp: February 13, 2020, 02:54:02 am
content: Where are the decoupling capacitors?

author: Darkwing
author_rank: Contributor
timestamp: February 13, 2020, 03:42:40 am
content: Thanks for reply!I tried 0.1uF on several places ... they don't make any difference at all.

author: james_s
author_rank: Super Contributor
timestamp: February 13, 2020, 05:33:52 am
content: Between the long wires on a solderless breadboard without any decoupling I'm actually kind of amazed that it works as well as it does.

author: Ian.M
author_rank: Super Contributor
timestamp: February 13, 2020, 06:34:26 am
content: If you don't pulse BLANK while loading (not shifting in) the new data to reset the PWM counters, I would expect 4096/30MHz = 1.37ms of XLAT to LED output propagation delay jitter as your load event isn't (and cant be) synchronised to the free-running PWM cycle.

author: Darkwing
author_rank: Contributor
timestamp: February 13, 2020, 06:59:21 pm
content: Thanks, good tip!! Looking more closely at the BLANK edges, it opened a can of worms for me – but I think I solved it now!I noticed that the several output edges of the TLC5940 chip itself were kind of asyncronous. I'm using the recommendedArduino libraryfor it. It internally calculates all its timings by assuming that the PWM frequency (of timer 2 at pin 3) is 976.5625 Hz – but for some reason it fails to set this, although it is the default.Anyway, I tweaked some values in the library source code, changed the PWM frequency and suddenly I have syncronous edges.This pointed me to the next problem: I had to syncronize my own multiplexing of digits with the XLAT edges of the TLC5940. Luckily I was able to do this in software, with just a line of code at the right place.Et voilá: I have sycronized outputs, ghosting and flickering ist gone!Here is a closeup:As one can see, the range of jitter is reduced to round about 260µs. But even if it were bigger: the most important thing, is that the outputs are syncronized now.So thank you! This almost tripled my refresh rate!Questionto the decoupling fans: what place would you suggest I should put some caps in?Thanks a lot!