ps/2 keyboard wires

I recently took apart an old keyboard to reveal the microchip inside. Now that board has 5 pins that connect via a cable to the computer. Now those five wires, which two are pos. and ground., can i connect those extra 3 to arduino and use the ps/2 library so i can print the keyboards info to the computer..... Thanks!

Hi,
Yes, you can do that, pretty much.

First, of those 5 wires, two are probably ground (one for the ground wire and one for the cable shielding) and one is +5v. The other two are data and clock. You can indeed use the PS2 library to hook the keyboard up to an arduino. I've done it myself.

However, what you get from the keyboard is not letters. You get scan codes which tell what keys have been pressed and released. It takes a fair amount of programming to interpret the scan codes. So having a full keyboard for arduino might be a little ambitious, but it's certainly possible to do lots of (more limited) things with the keyboard.

Have fun,

yes, I see (left to right)brown, yellow, red, gray, black. Im guessing that the red is positive(no doubt), black negative, Grays is the second gnd you mentioned and i do not know what is brown or yellow.

"Im guessing that the red is positive(no doubt), black negative, Grays is the second gnd you mentioned and i do not know what is brown or yellow. "

In this business it's best to never guess or assume wiring connections, too much chance of letting magic smoke out.

A quick google search using "PS/2 keyboard pinout" brought this nice hit:

One could have easily, and mistakenly, assumed the pin order would have been in a more logically sequenced order, so it's always best to try and find a drawing/picture if possible.

And going by individual wire colors is probably a mistake as that does not appear to be a standard and each manufacture is likely to use different colors.

If you have already removed the original cable from the keyboard you should retrive it and use a ohm meter to draw out the wire colors that correspond to the connector pin numbers, and then you will know for sure how to hook up to your Arduino board.

Good luck
Lefty

Any luck getting it to work?