PS/2 keyboard

Sorry about that. I did install PS/2 Keyboard from the playground, and then installed PS2 ext. Before all this, I had PS/2 mouse Arduino Playground - Ps2mouse
but that didn't work. I know it says mouse, but it was supposed to work for keyboards, too, as the devices work on the same protocol.

Well, I jus tested it, and with the multimeter positive pole on the red wire, all three other wires return 5Vs.... so your right. Wikipedia could have been wrong.
I have a red, white, green, and yellow wire, plus an outside mesh thing which returns nothing. What would you suggest?

I striped the wire, and used the wikipedia article
PS/2 port - Wikipedia

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.

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?

Well, I jus tested it, and with the multimeter positive pole on the red wire, all three other wires return 5Vs.... so your right. Wikipedia could have been wrong.
I have a red, white, green, and yellow wire, plus an outside mesh thing which returns nothing. What would you suggest?

Are you sure you looked at the right pinout, the plug pinout rather than the mirrored socket pinout.

When you connect 5V and Gnd you should get the LEDs on the keyboard flash. This normally occurs and is a nice way to know that they are the right way round.

Mowcius

I no linger have the plug head (alas...). I have 5 cords
Red
White
Uninsulated (Protective GND...?)
Green
Yellow

Common sense says that the red and white should be power.. but those don't work. I don't want to randomly try every combination for fear of shorting out my arduino, so has anyone ever tried this project, know how to find the cords, and/or now what colors it should be? ( I have an old Dell keyboard, if that helps)

P.S. I'm sorry if I'm not being clear/helpful/whatever-- I'm only trying.

common since goes out the window when your making 10,000 keyboards an hour for a nickel each in china

colors mean nothing until you document them yourself, you should be able to open the keyboard and figure out which one is ground (cause it will be the common connection tween everything) , after that your just going to have to poke around until you find power, easy take 5 volts 3 wires until the keyboard lights blink on and off like they do when turning on your computer

after that its a 50/50 shot which one is clock and data

If you are lucky, there will be names on the PC board that identify where the wires connect.

and as I already mentioned I have had 1 that they couldnt even bother to get the silkscreen right, so its a gamble

The pinout at the connector is standardized; the meat of what people are telling you to look at the cut-off end of the cable that has the connector, and figure out which color goes to which pin. THAT will tell you which color is which, regardless of whether the cable is "standard colored" or not. If it wasn't right at the pins, it wouldn't have worked on a PC either.

If you carefully take apart the keyboard so that you can see the circuit board inside, it is usually pretty easy to tell which pins are +5/GND. There will usually be a nice polarized cap connected between the PCB traces for GND and +5. Here's a picture of a keyboard's PCB (this happens to be a USB keyboard, but a PS/2 will look very similar.) The black tubular bit in the middle is the cap I'm talking about...

So I opened it up, and once the black wire goes inside the keyboard, it spread into the four colored fire. These are soldered onto the circuit board, next to letters
White : V (olts)
Yellow : D (ata)
Green : C (LK)
Red: G (round)

I haven't tried it yet, but I hope it works. I'll get back to you all on that.

White : V (olts)
Yellow : D (ata)
Green : C (LK)
Red: G (round)

Sounds about right :slight_smile:

If it doesn't work then it might have been that all the wrong wire combos messed it up but normally they're pretty good at protecting themselves :stuck_out_tongue:

IMHO, Wikipedia should remove that table

Isn't wikipedia edited by members?

In that case, why don't you remove it? ;D

westfw, that thing in your pic looks interesting, what is it?

Wikipedia is edited by a consensus of members who agree on the content and changes.
People who go in willy-nilly making changes are not considered team players.

Righty ho.

Mowcius

I just tried the new wiring config-- same as before. Nothing. Must be something inside the keyboard, then. Oh Well.

westfw, that thing in your pic looks interesting, what is it?

It's a foot switch (I'm not sure where that come from) connected to the guts of a USB keyboard, wired so that one foot pedal will generate "page up" and the other will generate "page down." It is supposed to be destined to become part of a music system so that a guitarist can advance pages of lyrics/chords on a laptop as she sings/plays, rather than having to deal with the current 50+ pounds of paper...