Using 1 analog input, and 7 resistors
270 ohm between the column pins.
1K ohm between the row pins.
2.7K ohm between, the analog input and ground.
5v is connected to column 0 as follows:
5V--Col0--270--Col1--270--Col2--270--Col3
the analog input is connected to row 3 with a 2.7K resistor between it and ground as follows:
Row0--1k--row1--1k--row2--1k--row3--analog in--2.7K--GND
this will give the following values of resistance divided against the 10k keys listed are from col0, row0 to col3, row3
the Vdrop is the voltage drop across the keypad matrix
Vout is the voltage supplied to the analog input
the analog value is the calculated value the arduino will read
the range is what I figure could be defined as the min max for each button with a bit of a buffer between each range
I used a spread sheet to figure this all out and rounded it
Button R Vdrop Vout Analog Val. Range
1 - 0 ohms 5V 0V 0 0-38
2 - .27k ohms 4.55V .45 93 55-125
3 - .54k ohms 4.17V .83 170 138-190
4 - .81k ohms 3.85V 1.15 236 217-250
5 - 1K ohms 3.65V 1.35 276 270-298
6 - 1.27K ohm 3.4V 1.6 327 306 - 347
7 - 1.54K ohm 3.18V 1.82 371 353 -384
8 - 1.81K ohms 2.99V 2.01 410 399-420
9 - 2K ohms 2.87V 2.13 435 430-450
10 - 2.27k ohms 2.72V 2.28 467 455-480
11 - 2.54K ohms 2.58V 2.42 496 485 - 500
12 - 2.81k ohms 2.45V 2.55 522 515 - 525
13 - 3K ohms 2.37V 2.63 538 530 - 545
14 - 3.27k ohms 2.26V 2.74 560 550 - 565
15 - 3.54K ohms 2.16V 2.84 580 570 - 585
16 - 3.81K ohms 2.07V 2.93 599 590 - 610
perhaps it would be easier to just say Calculated value +/- 10 which is limited by the resolution toward the end of the list. I would think that would be enough of a range.
I haven't tested this yet, but plan to soon; There may be better values of resistors to use, but I think this will work.
Theoretically if there were any concern about the value of the resistors changing they all would likely do so and should keep the same output voltage
If you see any major flaws to my reasoning, please let me know.
-carl
PS i tried using the table tool, but it made little sense and couldn't find info on how to properly use it