geekhack

geekhack Projects => Making Stuff Together! => Topic started by: JunkFace on Tue, 12 May 2015, 14:52:28

Title: USB to PS2 Adapter?
Post by: JunkFace on Tue, 12 May 2015, 14:52:28
Hey I have a KVM at work that I would like to plug either my HHKB or a Filco Minila into.  The only problem is the KVM is PS2 and my keyboards are USB.  I'd like to always be able to type on my main PC and also control other machines I'm working on with the Filco.  It would be ideal to use a couple of 60% boards so I don't have to move the big, clunky, horrible, rubber dome HP monstrosity that is PS2.  I brought in a model M but that thing is even bigger and desk space is a real constraint.

Anyway I'm having some trouble finding out how to do this online.   There are some converters around (in the UK for 50 pounds) but I have a teensie laying around not being used so I'd rather just do it myself.

I see tons of PS2 to USB teensie projects but haven't found a USB to PS2.

Does anyone know if this is possible?

If you could point me in the right direction that would be great.  There are converters out there so it must be possible.  Can anyone help out?
Title: Re: USB to PS2 Adapter?
Post by: JunkFace on Wed, 13 May 2015, 08:25:30
Anyone know if this can be done?
Title: Re: USB to PS2 Adapter?
Post by: azhdar on Wed, 13 May 2015, 08:33:35
(http://www.telecommander.com/pics/links/cables/usbto1ps2adapter/ADA-USB-PS2-unit.jpg)

why don't you use this things. I remember getting one with my QFR.
Title: Re: USB to PS2 Adapter?
Post by: JunkFace on Wed, 13 May 2015, 10:21:42
Show Image
(http://www.telecommander.com/pics/links/cables/usbto1ps2adapter/ADA-USB-PS2-unit.jpg)


why don't you use this things. I remember getting one with my QFR.

I've tried using these and they don't seem to work.
Title: Re: USB to PS2 Adapter?
Post by: wlhlm on Wed, 13 May 2015, 10:25:56
Show Image
(http://www.telecommander.com/pics/links/cables/usbto1ps2adapter/ADA-USB-PS2-unit.jpg)


why don't you use this things. I remember getting one with my QFR.

I've tried using these and they don't seem to work.
They are passive and require support from the keyboard itself.

http://deskthority.net/wiki/Adapter
Title: Re: USB to PS2 Adapter?
Post by: JunkFace on Wed, 13 May 2015, 10:32:04
Show Image
(http://www.telecommander.com/pics/links/cables/usbto1ps2adapter/ADA-USB-PS2-unit.jpg)


why don't you use this things. I remember getting one with my QFR.

I've tried using these and they don't seem to work.

They are passive and require support from the keyboard itself.

http://deskthority.net/wiki/Adapter

Is there a way to get around this then?  I'd think there would be some way to configure a teensie to allow this.  Somehow....
Title: Re: USB to PS2 Adapter?
Post by: user 18 on Wed, 13 May 2015, 10:53:21
Active adaptors do exist, but they tend to be expensive, and would be notably more complex to make work. I'm not sure off the top of my head exactly what would need to be done, but it's a lot more complex than the passive version.

If you have the space, it's probably much easier to get a QFR or similar and use its passive PS/2 adaptor than to try and hack an adaptor together. Likely, you would need to use a microcontroller to emulate a USB host device, translate the incoming signals into proper PS/2 interrupts, and send those interrupts via a PS/2 keyboard interface -- none of which is native behaviour for a teensy. This isn't my area of expertise by a long shot, so it's possible I'm off, but it's definitely not as easy as going in the other direction.

Using a TKL board like a QFR gives you significant space savings over a Model M. You could also check and see if any iteration of the Poker has PS/2 capability, although I don't believe it does.
Title: Re: USB to PS2 Adapter?
Post by: Hzza on Wed, 13 May 2015, 10:56:14
You could also check and see if any iteration of the Poker has PS/2 capability, although I don't believe it does.

The original PokerX is native PS2 IIRC; I recall hasu saying he kept one around to test his firmware.

Not sure of any of the other variants are though.
Title: Re: USB to PS2 Adapter?
Post by: hasu on Wed, 13 May 2015, 20:36:11
On USB side you can use Circuit@Home USB Host Shield and its library to host USB keyboard.
https://github.com/felis/USB_Host_Shield_2.0

And as for PS/2 you will be able to find and reuse codes from PS2AVR.
https://github.com/showjean/ps2avrU

Just buy Arduino Leonardo and HostShield to start developping!
Title: Re: USB to PS2 Adapter?
Post by: ricercar on Wed, 13 May 2015, 22:01:30
nevermind.
Title: Re: USB to PS2 Adapter?
Post by: VoteForDavid on Wed, 13 May 2015, 22:02:55
Going the other way, this is a non-issue.  There is no need to DIY anything, its $5 on ebay.  These things get pitched out all the time, your IT department may even have one laying around they'll donate to the cause. If the little plastic adapter like shown above doesn't work then you want the kind with two PS/2 ends and a blob in the middle with the "active" converter chip.  When PS/2 was what everybody had, the newfangled USB keyboards were often able to be used with a passive converter like azhdar showed.  Since "nobody" uses PS/2 and it's a bit of a constraint anyway, the newer USB boards won't play nice with PS/2 anymore.

Going from a USB keyboard to a PS/2 KVM is proving shockingly hard to find cheap.  Here's an example of the expensive variety
http://www.overstock.com/Electronics/Minicom-by-Tripp-Lite-PS-2-to-USB-Converter/6697341/product.html?cid=143974&track=CSEShopping&utm_source=ecn&utm_medium=cse&utm_campaign=ecn&srccode=cii_13736960&cpncode=41-47176680-2

This bothers me.  I looked.  I read discussions on other forums.  If your keyboard was not MADE to work with a passive PS/2 adaptor, it may never do. Apparently going TO PS/2 is a hassle, and usually people aren't as picky as GH members about using a decent keyboard ;)

Oooooh yes!  A question: JunkFace, are you restarting the KVM when you plug in your keyboard?  It may work with the simple passive converter, but PS/2 is not hot-pluggable and your stuff might need to re-initialize with a keyboard plugged in, to recognize it.