Skip to content

adamfk/bouncy-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turn a regular Arduino Uno into a powerful button bounce analysis tool (detects 62 nanosecond pulses).

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:

  1. Collect and analyze switch bounce data easily.
  2. Interactively inspect bounce waveforms and statistics.
  3. Share high fidelity bounce data with others.
  4. Run experiments efficiently without spending too much time.

Special thanks to Jack Ganssle (no affiliation) for showing how interesting buttons and switches can be.


You can check out the analysis tool online (on a desktop): https://adamfk.github.io/bouncy-button/bbb-browser/gui.html

quick-graph-then-zom


Open Source Database

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.

image


Main Reasons To Use

  1. Makes it really easy to collect and analyze switch bounce data.
    -> Even better than fancy oscilloscopes (in many ways).
  2. Great for experiments and curiosity about buttons/switches.
  3. Great for debounce algorithm authors and users interested in performance tuning.

20 ms Bounce Or Less, Right?

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.


Introduction Video

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

image


Simple To Use

All you need is a button, some wires and an Arduino Uno/Nano. See ./how-to.md.

image


Organization

This project is divided into two parts:


Source Code

https://github.com/adamfk/bouncy-button/


MORE