0

July 13, 2012 AT 11:07 am

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!


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

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!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!


Maker Business — Limor Fried featured in NYC’s HER BIG IDEA!

Wearables — Get concrete solutions

Electronics — Probe Compensation

Biohacking — Dr. Rita Levi-Montalcini was a Centenarian Gonzo Biohacker

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.