Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HC165 Shift register reading bad data

Status
Not open for further replies.

xmen_xwk

Full Member level 3
Joined
Sep 12, 2014
Messages
172
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
1,373
I have a shift register HC165 for upto 8 buttons and after soldering it to PCB, it now reads bad data even there is no button pressed.

Everything was working fine when tested on breadboard, but now when everything is installed in a box. It is auto raising button events itself. And when I touch the box(sheet metal), buttons' events start to raise very faster.

I then grounded the whole box but nothing happened. I measured the DC voltage from box to GND and its around 9mV and when I touch the box, it gets to 45mV.

And if I removes the wires of buttons, there is no event. Which seems buttons are doing something wrong ? I even isolated buttons from box still the same problem.

Here is the schematics

schematics.png
 

hello
have you test your circuit on 5v? your circuit is ESD sensitive make better ground of your circuit. also try with pull up resistors instead pull down
 
also try with pull up resistors instead pull down
Won't expect any difference for CMOS logic. You forgot to mention the resistor values. Several k up to 100k seems appropriate.

Like abc_de I suspect an ESD or signal quality problem. Without knowing the hardware details it's difficult to suggest a fix. A standard debouncing algorithm, requiring e.g. 10 to 50 ms stable input state before detecting a key press will be probably able to hide the problem.
 
hello
have you test your circuit on 5v? your circuit is ESD sensitive make better ground of your circuit. also try with pull up resistors instead pull down
I can't use 5v. The microcontroller works with 3v3. How should I make better ground?

Won't expect any difference for CMOS logic. You forgot to mention the resistor values. Several k up to 100k seems appropriate.

Like abc_de I suspect an ESD or signal quality problem. Without knowing the hardware details it's difficult to suggest a fix. A standard debouncing algorithm, requiring e.g. 10 to 50 ms stable input state before detecting a key press will be probably able to hide the problem.
I'm using 10k resistors, what hardware information should I provide?

Thank you.
 

try to prevent ground loops use decoupling capacitors at power supply and inputs.
second suspect is clock line of your circuit also use decoupling at CE pin of ic
 

try to prevent ground loops use decoupling capacitors at power supply and inputs.
second suspect is clock line of your circuit also use decoupling at CE pin of ic
There is a cap of 0.1uF at Vcc of hc165, should I add tantalum cap ? Also as you said use caps on inputs, does that mean 8 inputs of buttons?like 8 caps parallel to respective resistor?
 

Did you really leave pin 10 floating?

You should ground it or random noise will be shifted along the flip-flops.

Brian.
 

yes each pin must have decoupling caps parallel to respective resistors.
another way try to slow down clock of IC and distance between ic and mcu must be low as much possible
 

Did you really leave pin 10 floating?

You should ground it or random noise will be shifted along the flip-flops.

Brian.
Done, still same.

yes each pin must have decoupling caps parallel to respective resistors.
another way try to slow down clock of IC and distance between ic and mcu must be low as much possible
the distance is very low. I will try to slow the down the clock but that would be not good.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top