Flicker w/Last Display in 7 segment LED + Shift Register Daisy Chain - Page 1
Forum section: electronics / beginners

author: Awshua
author_rank: Contributor
timestamp: January 10, 2016, 05:26:06 am
content: 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=0https://www.dropbox.com/s/v5lynigt586evhk/JZUI3516.mov?dl=0Schematic 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.

author: Awshua
author_rank: Contributor
timestamp: January 10, 2016, 05:29:38 am
content: Forgot to mention, the 7 segment LED is the Kingbright SA23-11SRWA (in case it makes a difference).

author: lapm
author_rank: Frequent Contributor
timestamp: January 10, 2016, 07:26:30 am
content: 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..

author: SL4P
author_rank: Super Contributor
timestamp: January 10, 2016, 08:58:26 am
content: 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/orb) 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.

author: dom0
author_rank: Super Contributor
timestamp: January 10, 2016, 09:12:49 am
content: I'm gonna settle with "programming error", too.

author: Awshua
author_rank: Contributor
timestamp: January 10, 2016, 04:31:00 pm
content: Quote from: lapm on January 10, 2016, 07:26:30 amFirst, 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

author: SL4P
author_rank: Super Contributor
timestamp: January 10, 2016, 09:13:30 pm
content: good work finding that... it could have been hard!so all those leads flaying about are susceptible to noise.well done.

author: Awshua
author_rank: Contributor
timestamp: January 12, 2016, 01:12:54 am
content: 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.