D’oh! About those buttons…

I was going to save doing this next post as “here are the electronics to glue everything together” post… but…

After the last post I placed yet another order for a bunch of resistors, and some “headers” that I’m thinking about using to plug stuff into the Arduino, and for that matter another breadboard seeing as the postage was more than the components, and thought to myself, right that’s it for the electronics. Uhm, yeah that was premature.

There is commonly an issue with pushbuttons, something that might not immediately spring to mind, and that is they “bounce”. You think it’s a clean on/off, especially with a tactile button that resists pressing until suddenly “click” it’s pushed, but it rarely is that simple.

It’s possible to “de-bounce” with software, but it’s also possible to do it with hardware. There are plenty of articles online, but for me, now I’m going down the button route, I think I’ll go for hardware. The method I’ve seen and like the look at works like this.

Take your “current” and run into a resistor (hey look a pull-up resistor), put that into your button and put a capacitor “across” the button, and hooked to ground. Thus the capacitor “charges” when the button is up and discharges when the button is down. To get back to a digital signal (rather than the suddenly distinctly analogue voltage this creates) the “output” of the resistor capacitor series is fed into something called an inverting Schmitt trigger (ooh, at least one more IC). Thus when the capacitor is suitably discharged you suddenly get a “high” meaning “button pressed”.

I have a collection of links to articles, videos, products and the like in Evernote, even “mistakes” and things I’ve decided against, and I think I need to tidy it up and reformat before I miss anything else. At least at this early test/development stage.

B.

Leave a Reply

Your email address will not be published. Required fields are marked *