0

Why Capacitors Don’t Fix It

Switch-Bounce-Black-Panel-Mount

Why Capacitors Don’t Fix It. It’s an debate as old as the desert sands – hardware or software debouncing? We are fans of software debouncing but old-schoolers like hardware. Here are some of the pitfalls of hardware debouncing. Ed writes –

As part of our discussion around those Hall effect switches, I cautioned our Larval Engineer that she can’t use capacitors to “smooth out” mechanical switch bounce, even though all of her cronies and (most likely) her profs will advocate doing exactly that. The subject also came up at the local hackerspace when she showed off her project, so I should explain why capacitors don’t solve the problem.

Check out our handy code with interrupt-based debouncing here!


Join 5,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — The first step in making: a PCB

Wearables — Try maximum twinkling

Electronics — Behold…the power of pseudocode.

Biohacking — All Day EEG Recording Tools

Python for Microcontrollers — PyCon US 2018 Rocked!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



4 Comments

  1. You can actually solve this in hardware if you need to. One way to do so is with a monostable multi-vibrator.

    It is more flexible to solve the problem in software, but sometimes hardware solutions are the best way to go.

  2. Hardware debouching IC…. easy as pie

  3. smigit trigger also could work….

  4. Hardware debouncing ICs are expensive — in many cases costing more than the microcontroller itself.

    A schmitt trigger isn’t going to help — switch bounce has a full swing, so you’ll just end up buffering (and delaying) the bounce signal, not eliminating it.

    The monostable strobe Nick mentioned has worked well for me in the past for discrete logic (7400) circuits. These days it’s easier to debounce in software when working with a micro, though the strobe idea is still good when you need robust debouncing with low latency and execution time, or if you can’t spare the cycles to debounce in software.

Sorry, the comment form is closed at this time.