Okay, so here's the deal. I am doing this project, Arduino Playground - PS2Keyboard
and i have all of the materials. I tried soldering on some wires to the connector but i miserably failed. So now i am asking for your help. Can i cut off the connector to get to the wires?
of course, just make sure to cut a little farther from the connector so you can see which color wire goes to which pin on the connector.
okay, Thanks because it would have been a huge problem if i couldnot..
If i cut the orange connector off. What color wires will i see and what do those color wires go to.
If i cut the orange connector off. What color wires will i see and what do those color wires go to.
Unfortunately the standards are on the outside of the connector, not the inside. You'll have to use a meter to check continuity and figure out the pinout of that cable.
-j
If i get a ps/2 to usb connector and attach the usb connector to arduino, Is that the same thing? I know the usb has +, - and two other wires. The ps/2 also had +, - and two other wires. Are these the same thing. Will the usb work with the ps/2 library.
Do you mean just plug it into the arduino USB port?
If so, then NO. The arduino USB port works as a virtual serial port only. (PS search arduino.cc and the forums for heaps more on this, this question has been asked many many times before). This means the arduino can ONLY act as a serial port, it cannot act as a mass storage device, keyboard, mouse, etc.
Some keyboards have a USB->PS/2 adapter, which is designed to be used if your (older) computer doesn't have ps/2 ports. Although there is no "smarts" in the adapter, it only changes the connector type, it doesn't mean ps/2 and usb protocols are interchangeable.
In these keyboards, the "smarts" are within the keyboard itself. The keyboard can detect whether it is plugged into a USB port or a ps/2 port, and talk to the computer in the correct way.
If I were you I would find a keyboard with a ps/2 plug on the end so that you know it is speaking the ps/2 protocol, and go from there.
Now just to be difficult and throw something else into the mix, some (much cleverer than me) users have got basic USB HID interfacing working. This is the way that USB keyboards talk to your PC. It involves a fair bit of both hardware and software hacking. Search the forums for more info...
I'd take the suggestion about a USB-PS/2 adapter another way. It is a good source of a PS/2 socket that doesn't involve disassembling a motherboard. You could disassemble the adapter just to get the socket, or cut the end off a USB extender cable and use the wires to go to the pins on the Arduino.
I agree, the USB connector on the Arduino could NOT be used without looking into the USB-HID information mentioned above.
the USB connector on the Arduino could NOT be used without looking into the USB-HID information
It cannot be used period - it is hard wired directly to an FTDI rs232-USB adapter IC.
-j
This is all getting a bit rambling and confusing, so I'm gonna add some rambling of my own.
First, the playground article you reference is to allow a PS/2 keyboard to connect to an Arduino. It does not allow the Arduino to emulate a PS/2 keyboard.
In order to duplicate the playground article, you need to either a) get a PS/2 socket (a PCB mount socket, maybe scrounged off an old motherboard, or an inline socket, maybe chopped of the end of a keyboard extension cable), or b) chop the PS/2 connector off the end of the PS/2 keyboard in question and hard wire it directly to the Arduino.
You cannot use a USB to PS/2 adapter (that allows one to use a PS/2 keyboard on a USB-only computer) except to maybe destroy it to obtain a PS/2 socket for this project.
You cannot use a USB-PS/2 adapter that comes with some mice (allowing said mouse to plug in to a PS/2 port) because the gender is wrong. Such a device is useless for pretty much anything other than what it is designed for (although you could get a USB-A female connector or a PS/2 male connector out of it if you're careful).
You cannot use the Arduino's USB connector to emulate a USB keyboard, or any other USB device. IT is hard wired to the FTDU USB/RS232 chip.
Technically you can use some software and an external USB connector to use the Arduino to emulate a USB HID device; I think this has been done, but it's non-trivial and appears to have nothing to do with what you ask.
-j