[SOLVED] Trying to wire * and # keys to have the same function on the access keypad

dc2000

Distinguished
Jan 22, 2012
68
0
18,640
We have an access control keypad at the storage site that looks like this. It's an old DigiGate/PTI keypad:

XHdd58j.jpg



It works by letting people enter their code (as digits) followed by an asterisk (*). Unfortunately though, some keypads also do the same but require a pound (#) at the end, which makes it very confusing for customers.

So I was thinking to wire those two keys together, * and #, so that they had the same function.

I opened it up and saw that there's this 10-pin connector that goes to the keyboard (unplugged on this pic):

DhWf7c9.jpg



So two questions:

1. What would be the interface that they are using the transmit keystrokes?

and

2. Is it possible to use something like a Pi board, or similar, to do what I want here?
 
Solution
To add to what Alabalcho wrote. Here is a possible way you would decode this board in Pi-land.

First you have to see what lines do what. This will take a while. Measure the resistance for each pin combination. This will be 55 measurements. Put black lead on pin 1, then measure the resistance between it each of the other nine pins, 2-10. Then move the black pin to 2 and measure 3-10. then 3 and 4 -10 You'll end up with a matrix
1234567890
1 xxxxxxxxx
2 xxxxxxxx
3 xxxxxxx
4 xxxxxx
5 xxxxx
6 xxxx
7 xxx
8 xx
9 x

Now press and hold the 0 key and repeat the above. And repeat that for the other keys. 660 measurements! If you see a pattern you should be able to cut down on the measurements...
Most of these keboards are "matrix", meaning you have not 12 individual wires (one per button), but four "horizontal" wires intersected with three "vertical", so each button connects one "horizontal" to one "vertical" wire.

All this info - it won't be that easy, and there is no "universal" solution.
 

OldSurferDude

Reputable
May 18, 2019
171
31
4,640
To add to what Alabalcho wrote. Here is a possible way you would decode this board in Pi-land.

First you have to see what lines do what. This will take a while. Measure the resistance for each pin combination. This will be 55 measurements. Put black lead on pin 1, then measure the resistance between it each of the other nine pins, 2-10. Then move the black pin to 2 and measure 3-10. then 3 and 4 -10 You'll end up with a matrix
1234567890
1 xxxxxxxxx
2 xxxxxxxx
3 xxxxxxx
4 xxxxxx
5 xxxxx
6 xxxx
7 xxx
8 xx
9 x

Now press and hold the 0 key and repeat the above. And repeat that for the other keys. 660 measurements! If you see a pattern you should be able to cut down on the measurements.

You should see a pattern and should be able to note, for example, that 1,2 & 3 buttons a change with (let's say) pin 5. Like wise, the 6 pin is the same for 4, 5 & 6 buttons, etc. This is your matrix.

Let's say pin 5 is for row 1; pin 6, for row 2; pin 7 for row 3; and pin 8 for row 4. Pin 2 is for column 1, pin 3 for column 2, and pin 4 for column 3.

On your Pi, make three I/O outputs and four I/O inputs and connect these to pins 2 through 4 and 5 through 8, respectively.

Your software is like this,
Hard code which button matches which connection [button[3,4] = {1,2,3, 4,5,6, 7,8,9, *,0,#}
Make all outputs low.
Repeat for each output: [for i=1 to 3]
set output i high
--Repeat for each input: [for j= 5 to 8]
---- if input j == 1 then break out of for loops

If i == 4 then no button pressed
else button pressed is button[i-3,j-4]

This does not cover two buttons pressed at the same time, which would also appear if the pad has shorted out or opened.

Also, there is a myriad of other ways to implement a keypads, this is just one.

Have fun with it.
 
Solution

TRENDING THREADS