Has Arduino software debouncing

Debouncing buttons

If you're a professional electronics designer, chances are your boss won't even let you work in hardware. The reason is simple: if your production batch is large enough is , is Software practically free while hardware has to be paid for for every unit you produce. And while resistors and capacitors are dirt cheap, mounting them on a circuit board can cost 20 times their purchase price.

Whether you are debouncing in software or hardware, you still need to choose high quality pushbuttons. The infamous 157ms button from the article is easy for no Application suitable.
I usually try the button in Intervals of 32 ms which is enough to bridge the debounce time of a good key. I'm quite a fan of the Alps SKQG TACT switches.

On the few devices I've tested, it had an initial bounce time of less than 10 ns. While it has a life of 100,000 cycles, we tested it for 200,000 cycles and even then the 32 ms debouncing was sufficient. (I think I should have measured the actual degree of debouncing, but our main concern at the time was the behavior of the final product. Anyway, we used it out of spec.)

If you really want a hardware solution, I support the SR flip-flop solution mentioned in the article as the technically best solution:

The flip-flop can be built with a dual NAND gate, which is available in a small VSSOP8 package, for example. The main disadvantage of this solution is that you need an SPDT push button where SPST is available much more frequently.