USB Keyboard to PS2 serial converter

I have been struggling with tryingto connect a joystick to my Arduino using the USB shield then this thought came to me.

I recall a small adapter that used to be included with USB keyboards so that the USB keyboard could be plugged into a PS2 port on a desktop computer. When I Google USB to serial converters I find that most plug ionto a USB host port and then gives a RS-232 output. This is not what I want.

What would you call an adapter that converts a device, i.e. keyboard with a USB connector to rs232 that I can connect to the serial port on my Arduino thereby eliminating the issue of trying desperately to make my joystick interface.

With this adapter,I could easily parse the serial stream to get the joystick and button movements.

Will this work What do you call the adapter??

I would call it an antique! How old is a PS2 keyboard? Perhaps 20 years, perhaps more.

Paul

I don't think the adapter will work. It was designed so tha the keyboard could be used on an older computer rather than using the USB.

Actually, I have a number of keyboards and mice with the PS2 connector and computers to go with them.

barryjo:
I have been struggling with tryingto connect a joystick to my Arduino using the USB shield then this thought came to me.

I recall a small adapter that used to be included with USB keyboards so that the USB keyboard could be plugged into a PS2 port on a desktop computer. When I Google USB to serial converters I find that most plug ionto a USB host port and then gives a RS-232 output. This is not what I want.

What would you call an adapter that converts a device, i.e. keyboard with a USB connector to rs232 that I can connect to the serial port on my Arduino thereby eliminating the issue of trying desperately to make my joystick interface.

With this adapter,I could easily parse the serial stream to get the joystick and button movements.

Will this work What do you call the adapter??

There is no standard adapter that does that, nor any standard protocol for such an adapter to use - an adapter like that is called “A microcontroller with USB host capability programmed to do that”

RS232 has nothing to do with PS2. PS2 has a clock line and a data line (and I think it’s unidirectional) - RS232 has two lines (TX and RX), and instead of a clock line, it relies on both ends having accurate clocks to time bits with. The fact that they’re both called serial just means that one bit is transmitted at a time (as opposed to a parallel interface, where they might have 8 data wires plus clock (for example), sending a whole byte at a time.

Using Arduino as a USB host is a pain - I hardly ever see anyone talking happily about how they got a USB host shield and everything works great. You may be better off modifying the joystick, and getting rid of it’s USB interface and replacing that with an Arduino (a small one like nano or pro mini) that either does everything, or outputs easy-to-use serial datastream).

An alternative to the USB host shield but there is no guarantee it will work with your joystick. I do not think there is a universal device that will convert any HID device to PS2.

http://www.hobbytronics.co.uk/usb-host-joystick

Thanks gdsports, this looks interesting. I also agree with DrAzzy. I have tried many combinations of USB joysticks, mice, and keyboards with the examples that are supplied with the Arduino ESB library. MOst do not work at all. I have one keyboard that works. I find it interesting that the USB HID interface is supposed to be easy to work with. I have not found this to be the case. Give me a serial connection any day and I will be very happy. At least with a serial connection, RS232 type,you can easily receive and print what you are getting and go from there. Usint the USB libraries shnows absolutely nothing. I compile and all I see is the word "start". Now, isn't that really great.

I think I will buy or borrow one of the joysticks that the USB librry specifically addresses and see it it will work. I bet that it will not.