Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: interfacing a 4*4 keypad matrix  (Read 1150 times)

0 Members and 1 Guest are viewing this topic.

smommer

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:August 19, 2004, 12:20:10 pm
  • I'm a llama!
interfacing a 4*4 keypad matrix
« on: August 18, 2004, 02:17:53 am »
Does anyone have any ideas how i could wire up a 4*4 keypad matrix to my PC? the IPAC is designed for ground-referenced switches so im a bit lost.

if anyone could point me in the right direction i would be eternally grateful

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:interfacing a 4*4 keypad matrix
« Reply #1 on: August 18, 2004, 07:34:02 am »
Does anyone have any ideas how i could wire up a 4*4 keypad matrix to my PC? the IPAC is designed for ground-referenced switches so im a bit lost.

if anyone could point me in the right direction i would be eternally grateful
I doubt you want to do this - You are talking about a keyboard hack using a num-pad, correct.

See my keyboard hack page at http://www.mameworld.net/emuadvice/keyhack2.html

I know on a standard keyboard this would be a bad idea, due to blocking prevention in the firmware.  I don't know if that applies to this or not.

Here are the considerations.

Worst case, this will use a 4x4 matrix of connectors.  By mapping opposite joystick directions to allow blocking, this could work for a single joystick and 2 buttons, with 10 additional inputs for start, coin, etc.

Best case, this will use an 8x2 matrix, and you will be able to use 2 joysticks and 2 buttons each, or 1 joystick and 6 buttons for gaming controls.

It's also possible that if the keypad does not use blocking in the firmware, you would have ghosting problems, but you could overcome this with diodes to have all 16 inputs useable.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

smommer

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:August 19, 2004, 12:20:10 pm
  • I'm a llama!
Re:interfacing a 4*4 keypad matrix
« Reply #2 on: August 19, 2004, 12:49:30 pm »
im not sure whether it would be classed as a keyboard hack or not,

http://www.brendancassidy.com/padntab1.JPG
http://www.brendancassidy.com/padntab2.JPG
http://www.brendancassidy.com/padntab3.JPG

the thing im making is for some research im doing (i am a PhD student) into how cash machines (ATMs) can be better designed for disabled people.

I have wired the fruit machine looking buttons straight to an IPAC no problem, but wiring the keypad you see in the images is not possible on an IPAC. Andy pointed this out to me when i mailed him, i heard he is great at helping out his customers with queries, he is.

I have my 8 wires as seen in http://www.brendancassidy.com/padntab2.JPG which represents the 4 rows and 4 columns seen here http://www.brendancassidy.com/wiring.jpg but i dont know where to begin interfacing this to my PC, as with the IPAC interfaced switches i would like the keypad buttons to emulate keyboard button presses.

I know this isnt completely arcade control based but this community is the only community i know who may know where to go on this, im lost.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:interfacing a 4*4 keypad matrix
« Reply #3 on: August 19, 2004, 01:22:53 pm »
im not sure whether it would be classed as a keyboard hack or not,

http://www.brendancassidy.com/padntab1.JPG
http://www.brendancassidy.com/padntab2.JPG
http://www.brendancassidy.com/padntab3.JPG

the thing im making is for some research im doing (i am a PhD student) into how cash machines (ATMs) can be better designed for disabled people.

I have wired the fruit machine looking buttons straight to an IPAC no problem, but wiring the keypad you see in the images is not possible on an IPAC. Andy pointed this out to me when i mailed him, i heard he is great at helping out his customers with queries, he is.

I have my 8 wires as seen in http://www.brendancassidy.com/padntab2.JPG which represents the 4 rows and 4 columns seen here http://www.brendancassidy.com/wiring.jpg but i dont know where to begin interfacing this to my PC, as with the IPAC interfaced switches i would like the keypad buttons to emulate keyboard button presses.

I know this isnt completely arcade control based but this community is the only community i know who may know where to go on this, im lost.
Okay, I misread what you were initially trying to do - and the details will be difficult to explain.

If you wire the panel up like your wiring example shows and then have a microprocessor scan the inputs, you will get a "ghost" fourth keypress when two keys on the same row and two keys on the same column (electrically) are pressed at the same time.  See the Dave Dribin page I link to on my hacks page.

This is a big concern for arcade games, but if you will never have buttons pressed simultaneously, it won't matter so disregard my previous post.

If I read correctly, you want to send the button presses to the computer when a button is pressed on the numpad in the pictures.

You have four options that I can see to do this, in what I would consider easiest to most complex -

1)  They sell keypad devices on E-bay for about $10 - basically they look like the right side of a keyboard, with just the numpad see http://www.buy.com/retail/product.asp?sku=10341609&SearchEngine=PriceWatch&SearchTerm=10341609&Type=PE&Category=Comp&dcaid=1688  You could either mount one of these and change the button labels, or dismantle one of these and solder the buttons from your keypad to the inputs it uses.
2)  You can gut your panel, solder a single wire to one side of each switch and connect to the I-PAC GND terminal.  Solder 16 individual wires to the other side of each switch and connect to the individual I-PAC terminals (1sw1, 1sw2).  I'm not sure how well the numpad would re-install and work after you soldered it, though (depends on the internal construction.)  This is your cheapest and simplest solution.  I can give you more details if you don't understand, but I wil need pics of the internals of the keypad.  Also, there are more than eight wires coming out the back of that Storm brand panel, so it might not be wired the way you think, but you won't know until you disassemble it.
3)  You could basically do the same thing interfacing to a keyboard hack, but the I-PAC is easier to interface to.
4)  You could interface to a serial or parallel port and use software to read the button presses, but I am not familiar enough with this to explain it, and I don't think it will do exactly what you want.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Bgnome

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 466
  • Last login:January 10, 2005, 04:05:16 pm
  • Who's da gnome?
Re:interfacing a 4*4 keypad matrix
« Reply #4 on: August 19, 2004, 05:14:06 pm »
is the board powered or is just a matrix of switches?  if it is powered, you may be able to wire it to the ipac using transistors and 8 inputs and having the computer just figure out what button was pressed in the matrix.  this would be similar to tiger-heli's method of combining 2 inputs using the "AND" term in mame..