Accessing 5 buttons through 1 Arduino pin - Revisited

Step 6: Extending it

As I mention in step 4, this could probably be extended to 12 buttons with minimal effort.

With the analog inputs having a 10 bit resolution, that gives us 1023 values between 0V and the reference voltage. If you divide that by 12 buttons, you can see that each button would have to be within a unique range of 85 points. I would call it no more than 40 - 50 to be safe.

If you do this, you would have to use fairly accurate resistors (Or measure them and use the ones that are close to the E12 vaues) and you would quite possibly need a better way to debounce the buttons.

From the fact that all my values are within a maximum range of 11 points, this seems completely doable.
Remove these adsRemove these ads by Signing Up
skylarsa2 years ago
Hi Riaan
Thanks for this Instructable. It makes a lot of sense, and I'd like to try it since the Uno (which I'm using) only supports 2 interrupts via the Arduino IDE. My project requires 3 buttons and a rotary encoder. The latter uses both interrupts and I really needed a dependable solution for the 3 buttons.
My question is this: will your system work with hardware debouncing? I have used the 74HC14 Schmitt Trigger very successfully for debouncing in the past and wondered if I can still use it when using your system to detect button presses.
Christo (Pretoria)