diff --git a/3x4_4pin.png b/3x4_4pin.png new file mode 100644 index 0000000..e784a5e Binary files /dev/null and b/3x4_4pin.png differ diff --git a/3x4_4pin.sch b/3x4_4pin.sch new file mode 100644 index 0000000..e2280fc --- /dev/null +++ b/3x4_4pin.sch @@ -0,0 +1,192 @@ +v 20130925 2 +N 46300 41900 46300 48000 4 +N 43500 43700 43500 48000 4 +N 44300 47200 48300 47200 4 +N 44300 46200 50000 46200 4 +N 44300 45200 50000 45200 4 +N 44300 44200 49100 44200 4 +N 44900 43000 44900 48000 4 +B 46800 48400 1200 400 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 +T 47100 48500 9 10 1 0 0 0 1 +buttons +T 41700 44700 9 24 1 0 0 0 7 +1 2 3 + +4 5 6 + +7 8 9 + +* 0 # +C 43300 48000 1 270 0 switch-diag.sym +{ +T 43700 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 47700 5 10 0 1 270 0 1 +clock=clk +T 43900 47800 5 10 1 1 0 0 1 +refdes=S1 +} +C 44700 48000 1 270 0 switch-diag.sym +{ +T 45100 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 47700 5 10 0 1 270 0 1 +clock=clk +T 45300 47800 5 10 1 1 0 0 1 +netname=S2 +} +C 46100 48000 1 270 0 switch-diag.sym +{ +T 46500 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 47700 5 10 0 1 270 0 1 +clock=clk +T 46700 47800 5 10 1 1 0 0 1 +netname=S3 +} +C 43300 47000 1 270 0 switch-diag.sym +{ +T 43700 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 46700 5 10 0 1 270 0 1 +clock=clk +T 43900 46800 5 10 1 1 0 0 1 +refdes=S4 +} +C 44700 47000 1 270 0 switch-diag.sym +{ +T 45100 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 46700 5 10 0 1 270 0 1 +clock=clk +T 45300 46800 5 10 1 1 0 0 1 +netname=S5 +} +C 46100 47000 1 270 0 switch-diag.sym +{ +T 46500 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 46700 5 10 0 1 270 0 1 +clock=clk +T 46700 46800 5 10 1 1 0 0 1 +netname=S6 +} +C 43300 46000 1 270 0 switch-diag.sym +{ +T 43700 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 45700 5 10 0 1 270 0 1 +clock=clk +T 43900 45800 5 10 1 1 0 0 1 +refdes=S7 +} +C 44700 46000 1 270 0 switch-diag.sym +{ +T 45100 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 45700 5 10 0 1 270 0 1 +clock=clk +T 45300 45800 5 10 1 1 0 0 1 +netname=S8 +} +C 46100 46000 1 270 0 switch-diag.sym +{ +T 46500 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 45700 5 10 0 1 270 0 1 +clock=clk +T 46700 45800 5 10 1 1 0 0 1 +netname=S9 +} +C 43300 45000 1 270 0 switch-diag.sym +{ +T 43700 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 44700 5 10 0 1 270 0 1 +clock=clk +T 43900 44800 5 10 1 1 0 0 1 +refdes=S* +} +C 44700 45000 1 270 0 switch-diag.sym +{ +T 45100 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 44700 5 10 0 1 270 0 1 +clock=clk +T 45300 44800 5 10 1 1 0 0 1 +netname=S0 +} +C 46100 45000 1 270 0 switch-diag.sym +{ +T 46500 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 44700 5 10 0 1 270 0 1 +clock=clk +T 46700 44800 5 10 1 1 0 0 1 +netname=S# +} +L 51200 48000 50000 48000 3 0 0 0 -1 -1 +L 50000 48000 50000 42200 3 0 0 0 -1 -1 +L 50000 42200 51200 42200 3 0 0 0 -1 -1 +L 49900 43100 50000 43000 3 0 0 0 -1 -1 +L 50000 43000 49900 42900 3 0 0 0 -1 -1 +T 50200 42700 9 10 1 0 0 0 22 +uP + + + +D0_out + + + + +D1_out + + + + + + +D3_in + + + +D4_in + +N 43500 43700 50000 43700 4 +N 50000 43000 50000 43100 4 +N 44900 43000 50000 43000 4 +N 46300 41900 48300 41900 4 +C 48600 44200 1 90 0 diode-1.sym +{ +T 48000 44600 5 10 0 0 90 0 1 +device=DIODE +} +C 49300 44200 1 90 0 diode-1.sym +{ +T 48700 44600 5 10 0 0 90 0 1 +device=DIODE +} +C 47400 42800 1 270 0 diode-1.sym +{ +T 48000 42400 5 10 0 0 270 0 1 +device=DIODE +} +C 48100 42800 1 270 0 diode-1.sym +{ +T 48700 42400 5 10 0 0 270 0 1 +device=DIODE +} +N 48300 42800 48300 43700 4 +N 47600 43000 47600 42800 4 +N 48400 45200 48400 45100 4 +N 49100 45100 49100 46200 4 +L 49900 43800 50000 43700 3 0 0 0 -1 -1 +L 50000 43700 49900 43600 3 0 0 0 -1 -1 +L 50100 45100 50000 45200 3 0 0 0 -1 -1 +L 50000 45200 50100 45300 3 0 0 0 -1 -1 +L 50100 46100 50000 46200 3 0 0 0 -1 -1 +L 50000 46200 50100 46300 3 0 0 0 -1 -1 +B 43100 43900 4400 4400 12 1 0 2 100 75 0 -1 -1 -1 -1 -1 +L 41800 43500 41800 42200 3 0 0 2 50 10 +C 48100 46900 1 0 0 ground.sym diff --git a/3x4_5pin.png b/3x4_5pin.png new file mode 100644 index 0000000..2c3ffa4 Binary files /dev/null and b/3x4_5pin.png differ diff --git a/3x4_5pin.sch b/3x4_5pin.sch new file mode 100644 index 0000000..bed12ec --- /dev/null +++ b/3x4_5pin.sch @@ -0,0 +1,184 @@ +v 20130925 2 +N 46300 42300 46300 48000 4 +N 43500 43700 43500 48000 4 +N 44300 47200 48300 47200 4 +N 44300 46200 50000 46200 4 +N 44300 45200 50000 45200 4 +N 44300 44200 49100 44200 4 +N 44900 43000 44900 48000 4 +B 46800 48400 1200 400 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 +T 47100 48500 9 10 1 0 0 0 1 +buttons +T 41700 44700 9 24 1 0 0 0 7 +1 2 3 + +4 5 6 + +7 8 9 + +* 0 # +C 43300 48000 1 270 0 switch-diag.sym +{ +T 43700 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 47700 5 10 0 1 270 0 1 +clock=clk +T 43900 47800 5 10 1 1 0 0 1 +refdes=S1 +} +C 44700 48000 1 270 0 switch-diag.sym +{ +T 45100 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 47700 5 10 0 1 270 0 1 +clock=clk +T 45300 47800 5 10 1 1 0 0 1 +netname=S2 +} +C 46100 48000 1 270 0 switch-diag.sym +{ +T 46500 47900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 47700 5 10 0 1 270 0 1 +clock=clk +T 46700 47800 5 10 1 1 0 0 1 +netname=S3 +} +C 43300 47000 1 270 0 switch-diag.sym +{ +T 43700 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 46700 5 10 0 1 270 0 1 +clock=clk +T 43900 46800 5 10 1 1 0 0 1 +refdes=S4 +} +C 44700 47000 1 270 0 switch-diag.sym +{ +T 45100 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 46700 5 10 0 1 270 0 1 +clock=clk +T 45300 46800 5 10 1 1 0 0 1 +netname=S5 +} +C 46100 47000 1 270 0 switch-diag.sym +{ +T 46500 46900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 46700 5 10 0 1 270 0 1 +clock=clk +T 46700 46800 5 10 1 1 0 0 1 +netname=S6 +} +C 43300 46000 1 270 0 switch-diag.sym +{ +T 43700 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 45700 5 10 0 1 270 0 1 +clock=clk +T 43900 45800 5 10 1 1 0 0 1 +refdes=S7 +} +C 44700 46000 1 270 0 switch-diag.sym +{ +T 45100 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 45700 5 10 0 1 270 0 1 +clock=clk +T 45300 45800 5 10 1 1 0 0 1 +netname=S8 +} +C 46100 46000 1 270 0 switch-diag.sym +{ +T 46500 45900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 45700 5 10 0 1 270 0 1 +clock=clk +T 46700 45800 5 10 1 1 0 0 1 +netname=S9 +} +C 43300 45000 1 270 0 switch-diag.sym +{ +T 43700 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 43300 44700 5 10 0 1 270 0 1 +clock=clk +T 43900 44800 5 10 1 1 0 0 1 +refdes=S* +} +C 44700 45000 1 270 0 switch-diag.sym +{ +T 45100 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 44700 44700 5 10 0 1 270 0 1 +clock=clk +T 45300 44800 5 10 1 1 0 0 1 +netname=S0 +} +C 46100 45000 1 270 0 switch-diag.sym +{ +T 46500 44900 5 10 0 0 270 0 1 +device=SWITCAP-switch +T 46100 44700 5 10 0 1 270 0 1 +clock=clk +T 46700 44800 5 10 1 1 0 0 1 +netname=S# +} +L 51200 48000 50000 48000 3 0 0 0 -1 -1 +L 50000 48000 50000 41600 3 0 0 0 -1 -1 +L 50000 41600 51200 41600 3 0 0 0 -1 -1 +L 49900 43100 50000 43000 3 0 0 0 -1 -1 +L 50000 43000 49900 42900 3 0 0 0 -1 -1 +T 50200 42200 9 10 1 0 0 0 25 +uP + + + +D0_out + + + + +D1_out + + + + + + +D3_in + + + +D4_in + + + +D5_in +N 43500 43700 50000 43700 4 +N 44900 43000 50000 43000 4 +N 46300 42300 50000 42300 4 +C 48600 44200 1 90 0 diode-1.sym +{ +T 48000 44600 5 10 0 0 90 0 1 +device=DIODE +} +C 49300 44200 1 90 0 diode-1.sym +{ +T 48700 44600 5 10 0 0 90 0 1 +device=DIODE +} +N 48400 45200 48400 45100 4 +N 49100 45100 49100 46200 4 +L 49900 43800 50000 43700 3 0 0 0 -1 -1 +L 50000 43700 49900 43600 3 0 0 0 -1 -1 +L 50100 45100 50000 45200 3 0 0 0 -1 -1 +L 50000 45200 50100 45300 3 0 0 0 -1 -1 +L 50100 46100 50000 46200 3 0 0 0 -1 -1 +L 50000 46200 50100 46300 3 0 0 0 -1 -1 +B 43100 43900 4400 4400 12 1 0 2 100 75 0 -1 -1 -1 -1 -1 +L 41800 43500 41800 42200 3 0 0 2 50 10 +C 48100 46900 1 0 0 ground.sym +L 49900 42400 50000 42300 3 0 0 0 -1 -1 +L 50000 42300 49900 42200 3 0 0 0 -1 -1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..6210c99 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Keypad Scanning + +The 3x4 and 4x4 matrix keyboards are commonly used for user input. Usually, +the row and column wires are connected to GPIO pins on a microcontroller. A +simple approach requires 7 wires for a 3x4 keypad. + +This article introduces a new technique wish reduces the number of GPIO pins +down to 6, 5 and even 4, using software scanning techniques and diodes. + +Even though this reduces GPIO pin requirements in a manner similar to +[charliplexing](https://en.wikipedia.org/wiki/Charlieplexing), this is a +*different* design. +