Picked up a couple of keypads on the cheap (really cheap, which is why i bought them without having a reason to) They are the small type, used in security code pads etc... Keys like this Code: 1 2 3 4 5 6 7 8 9 * 0 # Got them home, had a close investigation, they only have 7 connectors on the bottom... strange... 12 keys but only 7 connectors. Which got me thinking, maybe it interfaces with serial or something? If so then this is goig to be harder to tinker with than i thought Any ideas, i can post pics if you'd like... dragon2309
That crossed my mind as well, its definitely a possibility. The onyl serial/code/model number/ID on the board is "AP-207WP-MM" I've searched for countless hours and countl find anything worth writing about... The closest was this PDF - http://www.megatonecorp.com/product_doc/pdf/keypad-web-kpd-207WP.pdf although its got 207WP in it, there are subtle differences to the one i have and the ones in those pictures. That and the fact taht PDF is utterly useless with reaards to connectivity.
Sounds like a matrix setup. one for each row and one for each column. 3 columns and 4 rows. that's 7 connectors
12 keys and 7 wires... most likely its has 3 common columns and 4 common rows. Find a micro-controller and use that to scan the keypad. Though I have seen somewhere (forget where) something that hooks directly to the keypad and outputs DTMF, thats not really helpful unless your making a phone.
Ok, i'm sort of getting this matrix idea thing... so these 7 connectors at the bottom, say the first three, do they correspond with columns 1, 2 and 3 and the next 4 connectors correspond with the rows 1, 2, 3 ans 4? So say i pressed button 8, it would close the circuit around pins 2 and 6?? yes? If so that makes perfect logical sense, but it still is quite confusing... how would i interface with this. I'll give you a little hint, i aim to have it as part of a multi-lock on a case to power it up, theres two key switches, and i want this keypad to act as the 3rd lock... easily done, just put all three switches in series on the PWR_ON connector on the mobo, but still, i need to get my head around this keypad first cheers, dragon2309
okay, after metering every possible combination and pressing every single button over 7,000,000 times, i've come up with this, but ill be screwed if i can make sense of it :|
i cracked it... kinda... lol Code: 5 1 3 2 7 6 4 1 x x 2 x x 3 x x 4 x x 5 x x 6 x x 7 x x 8 x x 9 x x * x x 0 x x # x x edit: if you just comment a chart like this in your code, then it should be relatively easy to see how each one is done, even in the future.
thats helpful in the fact that it sort of dispalys it in a nice fashion, but it still doesnt make any sense, it only looks like it does because you mixed up the pin numbers along the top... my question is why the hell would they make a board layout like that, it makes no sense
lol, no clue. thats why i said i "kinda" cracked the code. oh well, at least you know how it works and it will only take up 7 pins on a PIC. any clues as to what your going to use it for yet?
He he, thanks for setting it out for me btw, appreciate it. First thing, is that i've never used a PIC or programmed anything more than simple arrays in C#... and that was over 2 years ago... I do PHP if thats any help... lmao and yeh, in a couple posts back i mentioned it... quote..:
after a quick google this turned up: http://www.rentron.com/serkey16.htm if not that helpful, it might be able to explain how it works
OMG Come on people, I figured this out for myself aged 12. Code: OOOOOOO ||||||+-2nd row |||||+--3rd row ||||+---3rd col |||+----4th row ||+-----1st col |+------1st row +-------2nd col To read with a PIC: make col1 high, other cols low, then test each of the rows, if row1 is high, that means "1" is being pressed, if row2 is high, "4" is being pressed, if row3 is high, "9" is pressed etc. Then make col2 high and the rest low, and repeat for 2,5,8,0 then finally make col3 high and the rest low, and read in the rows for 3,6,9,#.
Well duh, we all know that already, i was pointing out that it didnt really make logical sense, surely for the easiest use it would be pins 1-7 with column 1, 2, 3 and then row 1, 2, 3, 4 along the 7 pins, in that order... But, yeh, as pointed out by someone else, it was most probably to route the traces easier. Which makes sense i suppose. I'm currently looking into PIC programmers, they are quite expensive (cheapest i can find is £20 and that doesnt really look very good). And im only using it for one thing ever, seems expensive. I dont suppose there is any service or person on here that programs chips and sends them out for a fee or anything? Also, say myself or someone else does end up programming a PIC, how would it actually interface with the keypad, im pretty sure these are simple questions and are making me look like a dick, but i have no idea about PIC's, sorry I could go the other non technical way, rig up some sort of latching switches (or possibly relays) only on a set of 4 terminals etc... then it would only complete the circuit if the right keys were pressed.... Sort of crap though, cos a user could just press every switch, lol... But for the purposes of external viewing and photos/videos it would work fine, its just not functional, lol dragon
basically, you would just hook those 7 lines into 7 IO lines on the PIC. when a button is pressed, two of those IO lines will go HIGH, so then you find which 2 went HIGH, then use a lookup table to find which key was pressed. heres a little example i found real quick, even has some assembly code for the PIC. http://www.winpicprog.co.uk/pic_tutorial9.htm edit: or, even better, here is an encoder that takes the keypad and transforms it into binary numbers that can be transfered to the PIC either in 4 parallel lines or one serial line. it also has an output for a beeper noise thing. pretty cool... http://www.elabinc.com/ede1144.pdf oh, btw, its for a 4x4, but you have a 3x4... there is probably one out there for a 3x4 button matrix.