Electronic – Button debounce ringing

buttoncapacitancedebounceswitches

I have a circuit where I am using a tactile switch to pull 3.3v down to ground and investigating debouncing the button. My relevant part of the circuit is

enter image description here

The 100nF cap does work here my signal has ringing that operates in the undefined region and causes a few false clicks. Increasing the capacitance to 1uf makes it worst. I tried using 10nF which was better. It reduced the ringing time but did not remove it.
Image of scope trace below for 10nF.

enter image description here

This ringing is not really a switch bounce contact problem is it.
What causes this ringing. There is capacitance on the power rail could it be that ?

My best results are with removing the caps entirly.

I know I can use software to solve this issue so it is not a big issue but I am using this as a learning exercise.

My easyeda design:

Top:

top

Bottom:

bottom

Best Answer

The ringing is caused by poor layout (possibly breadboarding is the worst culprit) AND the fact that your button's switch-contact is shorting out a charged capacitor - the instantaneous current flow is (practically) tens of amps and that surge (along with poor wiring and layout creating excessive loop inductance) causes the ringing.

Try putting a 10 ohm resistor in series with each capacitor.