Arduino and PS2 Keyboard with Limited Keys

Hi there.

I know there is lots of stuff around on it on the internet. We can connect PS2 Connector to Arduino and using PS2 Library Arduino and PS2 Keyboard can work but thats not what i want.

Here is what i want to do

I got a JUNK keyboard from somewhere today, now i wanna tear that Keyboard down and i want only 4 to 5 of its keys and i want that whenever i press those keys i get the input using Arduino Connected to my PC using Serial on my Computer. I know how to communicate with Arduino using Serial port, so that part is not a problem. I somehow want to get the input from those Keys to Arduino but i dont know how to do that.

Any help in this regard will be greatly appreciated. Any link to some tutorial will do too.

So you're gonna make your own 1x4 or 1x5 or 2x3 keypad? Wire them up as described in this thread and replace the IR transmit code with your println code to the PC

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283692181

If it's a keyboard that is less than say 8 - 10 years old it is almost certainly of the membrane switch type. Taking them apart and using only some of the keys is very very difficult one of the reasons being that thee is nothing to solder wires to.

If it's an old keyboard with "Cherry type" real switches, the kind that has a large stroke, and a loud click (they were so much better that the cheap crap you get now :slight_smile: ), you could just hook up each switch to an Arduino digital pin like any other switch.

Taking them apart and using only some of the keys is very very difficult one of the reasons being that thee is nothing to solder wires to.

Taking them apart and using the controller board to generate just a few keys worth of data, using "other" switches for the actual contacts, is pretty trivial. Here's a keyboard controller that is connected to a dual-footswitch that generates "forward arrow" and "backward arrow" keystrokes. No arduino required, even. Works with keyboards of any technology (PS2, USB, ADB...) since the interface to the computer remains the same...

So you're gonna make your own 1x4 or 1x5 or 2x3 keypad?

Thats Exactly what i am trying to do.

If it's a keyboard that is less than say 8 - 10 years old it is almost certainly of the membrane switch type. Taking them apart and using only some of the keys is very very difficult one of the reasons being that thee is nothing to solder wires to.

I teared up the Keyboard and here is its internal
http://img214.imageshack.us/img214/1/img0048mb.jpg
I think its not possible to solder it as you said, so i gave up the idea of making a keyboard of mine out of it.

You can get little keypads like this as surplus, or new other places, for not much money, then wire them up using the keypad library

As Westfw posted. If you ditch the actual buttons on the keyboard and use the little PCB that does the keyboard matrix decoding you can easily figure out which points on the PCB to connect to simulate a keypress.

You can get little keypads like this as surplus, or new other places, for not much money, then wire them up using the keypad library

Non-Illuminated Pushbutton Switches - Surplus Sales of Nebraska

Yes i think this will be the last resort if i cant use my existing Keyboard. As i am still learning Electronics so i want to tear up my possessions and learn.

As Westfw posted. If you ditch the actual buttons on the keyboard and use the little PCB that does the keyboard matrix decoding you can easily figure out which points on the PCB to connect to simulate a keypress.

Yes you are right, there is a Keyboard Controller inside my Keyboard but dont know how to use that, i ll Google for it but if you have some nice tutorials on how to use Keyboard controllers with Arduino, do post.

If you imagine thr keyboard as a matrix of X rows and Y columns.

When a key is pressed all it is doing is shorting one row to one column.

So on the little circuit board there is a long row of contact points connected to all the flimsy membrane plastic stuff inside the keyboard.

All you have to figure out is whih of the contact points is a row and which is a column.

They are usualy organized so all the row contact points are next to each other and all the column pints are next to each other, but not allways.

If you look at all the litle tracks on the membrane plastic stuff you should be able to trace them back to the circuit board and figure out which two circuit point on the board any given button connects when pressed.

You can then soldere an ordinary switch to those 2 points and presto
your new switch will do exactly the same as pressing the original keyboard switch.

It's a little tedious to do all the tracing but you could also just hook the keyboard up to a PC and try to connect random pairs of contact points on the circuit board until you find some that give you the characters you want in your "mini keypad"