Author Topic: Why Does TLC5940 LED Driver Produces "Smearing Edges"?  (Read 1632 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkwingTopic starter

  • Contributor
  • Posts: 42
  • Country: de
  • Let’s get dangerous!
Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« on: February 13, 2020, 01:57:07 am »
Hi folks!

I have a technical question about the (supposed) misbehavior of a TLC5940 LED driver chip, producing "smearing edges" at its outputs.

The Story
I'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 16ch TLC5940 LED driver chip.

The Problem
I 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 driver
3, 4: some segment pins from the TLC5940

Also here is a Youtube video of 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 ...  :o (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 Question
Does 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!  :)
« Last Edit: February 13, 2020, 02:05:39 am by Darkwing »
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3464
  • Country: us
Re: Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« Reply #1 on: February 13, 2020, 02:54:02 am »
Where are the decoupling capacitors?
 

Offline DarkwingTopic starter

  • Contributor
  • Posts: 42
  • Country: de
  • Let’s get dangerous!
Re: Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« Reply #2 on: February 13, 2020, 03:42:40 am »
Thanks for reply!

I tried 0.1uF on several places ... they don't make any difference at all.  :-//
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« Reply #3 on: February 13, 2020, 05:33:52 am »
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« Reply #4 on: February 13, 2020, 06:34:26 am »
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.
« Last Edit: February 13, 2020, 06:36:23 am by Ian.M »
 

Offline DarkwingTopic starter

  • Contributor
  • Posts: 42
  • Country: de
  • Let’s get dangerous!
Re: Why Does TLC5940 LED Driver Produces "Smearing Edges"?
« Reply #5 on: February 13, 2020, 06:59:21 pm »
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 recommended Arduino library for 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.  :o

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.  ;D

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! :clap:



Question to the decoupling fans: what place would you suggest I should put some caps in?

Thanks a lot!

« Last Edit: February 13, 2020, 07:05:27 pm by Darkwing »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf