Go Down

Topic: PS/2 keyboard (Read 3 times) previous topic - next topic

James C4S

I striped the wire, and used the wikipedia article
Since you cut the connector anyway, have you verified with your meter's continuity tester to verify the pinout / colors?  I wouldn't rely on the wikipedia article.

And nothing shows up in the Serial Monitor.
Nothing?  Not even the "Keyboard Test" message you have in your setup()?  You might add a serial.println() after the if "(keyboard.available())."  Then you'll at least know your if-else-cases are being checked.

According to my volt meter, the 5V is being delivered, but te CLK and DATA are dead.
Keep in mind that CLK and DATA are both open-collector outputs from the keyboard.  So without a pull-up resistor, you probably won't see them change.  (From what I can tell, the libraries enable the internal pull-ups, so you don't need to worry about this.)

Start by verifying you have the pin-out of your connector correct.  Like I said, don't rely on the Wikipedia's color code for the wires.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


Sep 19, 2010, 10:31 pm Last Edit: Sep 19, 2010, 10:31 pm by Osgeld Reason: 1
heh last ps/2 keyboard I tore apart the wire colors were random AND the silkscreen was wrong

wire colors are a horrid way of figuring out connections anyway, they mean nothing and no one has ever stuck to whatever people seem to think they should be


Question 1: I stripped the main, thick, black, cable ( that comes out of the keyboard itself), to find five more inside. 4 were colored (as I have mentioned), one was uninsulated. Wikipedia claimed that red was Vs, yellow was GND, green was clk, white was data. There was no mention of the uninsulated one. I tested these wires, using wikipedia's chart for reference. None seemed to be working.
2. Before I stripped the main cable, I plugged it in to a computer, and it worked. Then I stripped it.
3. I didn't confirm, I only reference the chart on wikipedia's PS/2 connector article (which I have posted the link somewhere)
4. At the beginning of the program, the Arduino outputs "Keyboard Test" to the Serial monitor. This came up, just nothing else did.

Just a side note....
The PS/2 plug has 6 pins--- but only 5 wires. The four I have told you are pins 1, 3, 4, 6, but no one seems to know what pins 2 and 6 do. So since I have 5 wires, one of them could be the wire for pin 2 or 6.
I don't know.

The problem can't be software-- this library has worked for others. So it must be hardware/wiring.

Also-- the problem is not only trying to get the data to the arduino-- it seems as though the keyboard isn't getting power. The caps, num, and scroll lock lights won't light up when pressed as they did when plugged into a computer.


I looked at the plug, and I tried the following connections:
Yellow is CLK
Green is DATA
Red and White are power
I'm not sure what the uninsulated is, nothing happened when I connected it to ground or 5Vs.


How do you suggest I figure out the wires?

Go Up