Noise upsetting shift register? - Page 1
Forum section: electronics / beginners

author: dajt
author_rank: Contributor
timestamp: May 14, 2014, 12:22:24 pm
content: Hi,I've been trying to build a circuit using a shift register and I am having trouble getting correct readings from it and am wondering if noise is the problem.I'm onto my third circuit built on various types of prototype board. The circuit is always the same, just different types of board, trying to find one where my soldering should make less difference.I have .1uF caps across the power supply where it enters the board, and from the 74HC165 Vcc to ground.The shift reg D0-D7 are being fed via leads from a breadboard and the /PL, /CE, CP, and Q7 connect to an Arduino Nano clone. They are driven/read from pins next to each other on the Nano board, 9-12, but I have not looked to see if they're all on the same AVR port or not. I think 3 of those pins are SPI but I have only set them to be GPIOs. The Nano is also powered from the breadboard, but also plugged into the USB of my laptop. The Nano ground is connected to the breadboard ground.My Open Bench Logic Sniffer arrived yesterday and I've been trying to find the problem. It seems to occur when there are multiple transitions in the signal coming from Q7 of the shift reg. These transitions often seem to be co-incident with short (~10ns as close as OBLS can measure) pulses on other Nano connected lines. These pulses in turn seem to affect the output from Q7, perhaps acting as short clock pulses for example.When I noticed this I attached the /CE line to ground on the Nano as it seems /CE can be held low permanently if you're controlling when the /PL and CP lines are driven. This didn't help much, if at all.What did help was tying /CE to ground on the breadboard. Doing that seemed to reduce the number of random pulses shown by OBLS, and the ones that did turn up didn't seem to cause trouble. But there were still some there, just not on the /CE line. Eg I am holding another pin low during the function which reads the shift reg for use as a trigger so I can start recording a bit before /PL is strobed, and also see how long the function takes. This pin still sees the spikes occasionally.So, I know breadboards are noisy, and protoboards probably are too, but whole computers seem to run on these setups.Could the Nano clone be shoddy and generating lots of noise on it's GPIO pins? Is that common?The circuit seems to work better on breadboard alone. Am I just crap at soldering?Regards,David.

author: jamesglanville
author_rank: Contributor
timestamp: May 14, 2014, 03:29:15 pm
content: Sounds like there's a problem with grounding if tying the /CE line to ground on the breadboard was different to tying it to ground on the nano. What are you using to power the breadboard? Does the problem go away if you only power everything from USB?

author: Neilm
author_rank: Super Contributor
timestamp: May 14, 2014, 07:00:41 pm
content: It could be that you are getting enough current flow down the 0V connection to upset the counter. Try ensuring that the connection is made of several wires as thick as possible.

author: scientist
author_rank: Frequent Contributor
timestamp: May 14, 2014, 08:17:11 pm
content: Are you running it above the rated clock speed?

author: dajt
author_rank: Contributor
timestamp: May 17, 2014, 02:56:14 am
content: Thanks all. I decided with such a simple circuit and code it just had to be noise, or perhaps dodgy Chinese ICs.I took a punt and soldered a socket onto the protoboard for the Arduino Nano (clone) and got a good result. Then I added the 2nd shift register and it still seems to work so I think there were too many loose wires or something.This latest protoboard was from Altronics and has the pads designed to easily use DIP components rather than just one pad per hole.I'm also beginning to suspect my "power supply" which is a repurposed AT PSU. Either that or my old cheap DMM has finally given up and is giving incorrect readings.As you can see, I'm going all-out on quality for this project.Regards,David.