Author Topic: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain  (Read 4153 times)

0 Members and 1 Guest are viewing this topic.

Offline AwshuaTopic starter

  • Contributor
  • Posts: 10
  • Country: us
First, forgive me if this is a basic question I should just be able to Google and figure out, but I've spent hours messing with this, searching for possible solutions, and have come up with nothing that works.

I'm building a display using an Arduino, 7 Segment LEDs, and some TLC5916 constant current LED driver shift registers. I work in the computer industry so the programming aspects of this projects are not an issue, and while I grew up tinkering with basic electronics and am an avid watcher of Dave's Youtube Channel, when it comes to the EE part of this am a self taught home gamer total noob.

The basic circuit is just an arduino connected to 4 identical boards with the LED driver and 7 segment LED (each chained to the next). Everything works fine, except one annoying glitch. Whichever board is the last in the chain has a persistent flicker to it, but it always flickers in exactly the same way. If I add a 5th board to the end then the 4th now works fine and the 5th exhibits the exact same issues. 

At first I though maybe this is an impedance issue (and maybe it still is, I'm not sure I 100% understand the concept to be honest), but I think that would go away if I changed the frequency with which I was toggling the Clock, Data, and Latch lines to the shift registers. I slowed it way down by adding a 50ms delay after each action (set data high, wait 50ms, set clock high, wait 50ms, set data low, wait 50ms, etc...) and the issue persists.

I  capture 2 "Slow mo" videos (with it slowed down) with my iPhone where you can clearly see the difference. Any ideas on what to next to test things out or outright fix the problem would be greatly appreciated.

Links to the videos here:
https://www.dropbox.com/s/e8cw12wmb4qf1k5/GFSX4828.mov?dl=0
https://www.dropbox.com/s/v5lynigt586evhk/JZUI3516.mov?dl=0

Schematic is attached (ignore the transistor and the parallel resistors, it was going to drive a 5mm LED and I didn't have the correct wattage resistors in my parts bin so I designed around dual 1/8th watt resistors that I did have, but they are not used and just held low by the micro).

Thanks in advance for any help / advice anyone can give.
 

Offline AwshuaTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #1 on: January 10, 2016, 05:29:38 am »
Forgot to mention, the 7 segment LED is the Kingbright SA23-11SRWA (in case it makes a difference).
 

Offline lapm

  • Frequent Contributor
  • **
  • Posts: 564
  • Country: fi
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #2 on: January 10, 2016, 07:26:30 am »
Could it be termination issue of digital lines? Adding extra board that moves the problem seems to indicate this.. And this is where oscilloscope would be handy when checking wave forms between cards and end of chain..
« Last Edit: January 10, 2016, 07:34:09 am by lapm »
Electronics, Linux, Programming, Science... im interested all of it...
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #3 on: January 10, 2016, 08:58:26 am »
Since the display is 'essentially' ok, you may want to check that -
a) you're sending the correct number of LED segment bits (too many?), and/or
b) you're clearing / or latching the shift-register somewhere that it isn't needed (perhaps immediately after the last digit is displayed) - before shifting out the next digit.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #4 on: January 10, 2016, 09:12:49 am »
I'm gonna settle with "programming error", too.
,
 

Offline AwshuaTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #5 on: January 10, 2016, 04:31:00 pm »

Could it be termination issue of digital lines? Adding extra board that moves the problem seems to indicate this.. And this is where oscilloscope would be handy when checking wave forms between cards and end of chain..

First, thanks immensely to everyone who responded. 

It looks like it may be something along this line of thinking. After poking around a bit more with the logic probe, I noticed spurious transitions on the latch line on the last module. Adding a small (100nf) cap between the latch line and ground on the last module fixes the issue. I guess I'm fine with the empirical "it works" part of this solution, but I'd really like to know the "why" (other than the cap absorbing the short spikes).

This doesn't happen/isn't needed on the similar set of boards with 4 digit displays driven from the same routine on different pins. I'm only guessing (you're certainly right a scope would be handy here), but could it be as simple as poor PCB layout and the clock or data line inducing a signal into the latch line once pcb trace/connecting wires are long enough? The problem doesn't appear with only 1, 2, or 3 boards attached (and I only made 1 spare so I don't know if it still happens with more than 5). And the clock and data lines are right next to the latch line.

At first I thought it may be a reflection on the latch line, but it seems to happen during the clocking of data (not during the latch) even slowed way down and having a huge (2 sec) delay after clocking the data before latching.

Ultimately, it seems to be an analog type problem in my digital circuit, so I may not know until I can either borrow or eventually buy a descent scope, but for the sake of learning, what would be the "proper textbook" termination? It's clearly not a concept I understand fully. Prior to adding the cap the only thing on the ends of any lines were the micro at one end and the empty connectors to plug in another board at the other.

Thanks again.


Sent from my iPhone using Tapatalk
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #6 on: January 10, 2016, 09:13:30 pm »
good work finding that... it could have been hard!
so all those leads flaying about are susceptible to noise.
well done.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline AwshuaTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain
« Reply #7 on: January 12, 2016, 01:12:54 am »
Thanks, this is by far the most major undertaking so far for me as far as electronics projects go. I've certainly learned a lot by doing it (most notably how much I have left to learn). I'd certainly do the PCB and interconnections different next time around, but in the short term I will certainly be shortening up the lead wires between the boards. Thanks for the advice.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf