Turn a regular Arduino Uno into a powerful button bounce analysis tool (detects 62 nanosecond pulses).
You can check out the analysis tool online (on a desktop): https://adamfk.github.io/bouncy-button/bbb-browser/gui.html
I initially started exploring switch bounce with an oscilloscope, but it was just too burdensome to collect enough data for experiments and there was no easy way to analyze and share the data. After a few days of using my oscilloscope, I decided to try and see what a humble Arduino could do because they are already so prevalent, easy to use and low cost. Great for students and hobbyists.
I'm very happy with the results! We can now:
- Collect and analyze switch bounce data easily.
- Interactively inspect bounce waveforms and statistics.
- Share high fidelity bounce data with others.
- Run experiments efficiently without spending too much time.
Special thanks to Jack Ganssle (no affiliation) for showing how interesting buttons and switches can be.
If you just want to see the open source collection of button bounce data, you can find it at the companion bouncy-button-data repo.
- Makes it really easy to collect and analyze switch bounce data.
-> Even better than fancy oscilloscopes (in many ways). - Great for experiments and curiosity about buttons/switches.
- Great for debounce algorithm authors and users interested in performance tuning.
We all know that a healthy button/switch will bounce less than 20ms, right? I used to think that. I learned that 20ms number in high school and never really thought about it again. 20ms always worked... until one day it didn't. At first I thought there was something wrong with my project, the wiring, or the button. I checked everything and swapped out the button with the spare I had (same model, never used) and it also would occasionally bounce well over 20ms.
Most switches available for purchase don't have a bounce specification, but you can generally assume a 50ms debounce period
(works for about 95% of new switches).
Beautiful old rustic switches definitely need to be measured though.
The below 12 minute video gives a brief demo, explains why it is better than oscilloscopes, and why you might want to use it. https://www.youtube.com/watch?v=jE4PtGqRFt0
All you need is a button, some wires and an Arduino Uno/Nano. See ./how-to.md.
This project is divided into two parts:
- Bouncy-Button-Benchmark: the Arduino sketch that records & sends bounce data to a computer serial port.
- Bouncy-Button-Benchmark-Browser: a web page that graphs and analyzes the button bounce data.
https://github.com/adamfk/bouncy-button/