Hi All,
Is it possible to interface the arduino with multiple buttons? Specifically, I'd like to interface it with 32 independent pushbuttons. Is this possible? Is an external IC required?
Thanks,
mrbook
Hi All,
Is it possible to interface the arduino with multiple buttons? Specifically, I'd like to interface it with 32 independent pushbuttons. Is this possible? Is an external IC required?
Thanks,
mrbook
One trick is to hook up to one analog input a bunch of push-buttons in a voltage-divider chain with various resistors. I think you can read 10 or so pushbuttons on one input, but I don't know the exact circuit. Maybe someone else has more details?
@mrbook,
if you look in the PLayground you will find an article called "customers design with their fists". Describes a company that used single chips to encode 16 sensors each. they have posted the schematics. Very cheap solution.
D
Have you considered hacking a PS2 keyboard? It already has a matrix of switches, an IC that debounces the switches and a buffer for multiple inputs. Downside is that it doesn't always handle simultaneous key presses in the way you'd expect.
The PS2 protocol is easily interfaced to the arduino with a couple of pins. Google for the protocol and it will tell you about keycodes and how to read them. There's an article in the playground about hooking up a PS2 mouse, which is very similar.
Just a suggestion.
@ckiick,
good idea ![]()
The Playground code says it will work on keyboards too
http://www.arduino.cc/playground/ComponentLib/BarcodeScanner
D
using 6 digital outs and 6 digital ins you can make a 36 button matrix and "only" using 12 pins on the arduino.
Why not just use this design?
I bought 10 of the CD4021B registers because I need to monitor 80 switches, I haven't wired it up yet as I've been busy playing with 10 595's and 80 LEDs ![]()
There's nothing wrong with the CD4021B design, is there?