Hardware debounce and noise

would this work?

i have it working without the capacitor ( resistor is for pull down).
was wondering if this would help with debouncing.

i also have analog inputs from a potentiometer,
would do same circuit, instead of switch, output of potentiometer and a capacitor towards ground,
to reduce noise…

yes, i’m new… :slight_smile:

thx, Roman

Sort of (*) - you might need more hysteresis in noisy environments.

The component count for using the built-in pullups and software debouncing is zero, note, which
is a big advantage. However the built-in pullups are very weak and not really up to remotely mounted
switches, just PCB mounted ones.

(*) the time constant of 1ms is too short for most mechanical switches.

hi Mark,
thank you very much.

does that mean i need to increase the value of the capacitor?
as far as i know, a 10k for pulldown is ok...

about the analog inputs,
a 0.1uF capacitor towards ground will work?

i tested it on a breadboard temporarily with my real circuitry, it seem to be an improvement.

i don't have an oscilloscope, nor a clue how to use it...

thx, Roman