The 1 wire button matrix input

Here is my idea. Why use more then 1 wire to for multiple button input to a arduino? There are plenty of Analog to digital converters on each board :slight_smile:

Messing around with the SparkFun library in Eagle I came up with this simple board

With this you can have many buttons with 1 pin used up on your Arduino :slight_smile:

haven't come up with nice resister values yet

Why has no one thought of this yet?

Nice idea.

There are a lot of people who have implemented this kind of thing. However, the failing grace is sensor noise. Common resistors have pretty sloppy tolerances, and ADCs are susceptible to heat and sensor noise. The values you produce need to be very distinct to work reliably.

The nkcelectronics LCD shield uses this scheme to distinguish among five buttons, and in my experience, it works okay if you're giving it plenty of power at room temperature, but it decodes the buttons wrong if the environment is too cold or I use a not-quite-strong-enough 9V battery.

Digital things like buttons are best implemented as digital circuits, with just two major values, HIGH and LOW. Trying to get analog values to behave in a digital/quantum fashion is flirting with inaccuracy and confusion.

I did something like this as a demo for Dorkbot Bristol:

Imgur

It's a simple chain of resistors and switches, wired as a voltage divider.

Hi!
Could you tell me more about this?
How to read a button state? It connects to a analog pin?

Did you make one already?

Thanks!