Keybounce is a mechanical artifact where the metal contacts inside a switch physically chatter against each other for a few milliseconds upon closing or opening. To a fast digital microcontroller, this mechanical ringing looks like multiple rapid button presses, requiring hardware filters or software delays to register a single, clean input.
The interrupt is firing five times per press because you forgot to filter out the keybounce.
A simple RC circuit followed by a Schmitt trigger is the classic hardware solution to eliminate keybounce.
Also heard as
- switch bounce
- contact bounce
Related terms
Debounce
To filter out the rapid, unintended multiple electrical contacts made when a mechanical switch closes.
Bounceless
Designed to transition between states cleanly without mechanical oscillation.
Schmitt trigger
A comparator circuit that uses positive feedback to create hysteresis, converting noisy analog signals into clean digital pulses.