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.
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
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
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.
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?
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
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