any USB keyboard and mouse to PS/2 adapter? - Page 1
Forum section: electronics / general

author: 0db
author_rank: Frequent Contributor
timestamp: June 23, 2020, 01:04:07 pm
content: I wonder if there is any opensource project around to interface a usb keyboard and mouse to a ps/2 computer.

author: bingo600
author_rank: Super Contributor
timestamp: June 23, 2020, 06:33:50 pm
content: Not opensourcehttps://www.ebay.com/itm/2x-USB-PS-2-PS2-Male-to-USB-A-Female-Converter-Adaptor-For-MOUSE-KEYBOARD-EU/163166618504But at that price i'd just buy them

author: 0db
author_rank: Frequent Contributor
timestamp: June 23, 2020, 08:22:59 pm
content: It's a passive adapter without any MPU inside, and it only works if your keyboard already talks PS/2.It simply switch the keyboard into PS/2 mode. But things go more complex when you want to adapt a common keyboard or mouse that are USB-only.

author: Gyro
author_rank: Super Contributor
timestamp: June 23, 2020, 09:17:49 pm
content: Quote from: bingo600 on June 23, 2020, 06:33:50 pmI think those are just passive adapters for older keyboards and mice that had dual USB / PS2 functionality. I'm not sure if that still applies to current ones.It looks as if there was a relatively recent Silicon Chip article on a USB KeyboardORMouse to serial adapter but It doesn't look as if it's actually PS2 format...http://www.siliconchip.com.au/Issue/2019/February/USB+Mouse+and+Keyboard+Interface+for+Micros?res=nonflashThe downloadable code is only in Hex too.Edit: The consensus on Amazon seems to be 'it depends'...https://www.amazon.com/StarTech-com-Replacement-USB-Keyboard-Adapter/dp/B000A0K2JO/?th=1

author: fordem
author_rank: Regular Contributor
timestamp: June 26, 2020, 02:03:41 am
content: Let me start by confirming, do you have an older computer that takes a PS/2 keyboard & mouse, but has no USB port, that you need to use - or - do you have an older PS/2 keyboard & mouse that you want to use with a newer computer that doesn't have PS/2 ports?USB ports have been around for over a decade now, and any system without a single USB port is probably near useless at this point, but if that is the situation, PS/2 keyboards & mice can be found used on ebay. If it's a PS/2 system with at least one USB port, you can hang a USB hub off that port and plug a USB keyboard & mouse in, pretty much every OS released in the last decade will recognize them.If what you have is an older PS/2 keyboard & mouse, or maybe an older KVM switch, inexpensive adapters to connect those to a USB port are available.

author: 0db
author_rank: Frequent Contributor
timestamp: June 27, 2020, 10:47:30 am
content: The computer only has PS/2 ports, it's a vintage machine and can't have any USB port.But I need to use a USB keyboard and mouse. And I am willing to develop the adapter myself.

author: ebastler
author_rank: Super Contributor
timestamp: June 27, 2020, 01:04:03 pm
content: Quote from: 0db on June 27, 2020, 10:47:30 amI am only aware of adapters for the opposite scenario (vintage PS/2 mouse/keyboard to modern USB computer), as also shown in the post above. Why don't you simply use a "proper" vintage keyboard and mouse with your vintage computer?

author: Nusa
author_rank: Super Contributor
timestamp: June 27, 2020, 02:05:39 pm
content: Vintage is one solution. But there are still plenty of new keyboards that come with PS/2 adapters/functionality and should work.As for mice, I just looked on Amazon and new PS/2-only mice are still available, quite cheap. No adapter needed.A little harder to fine, but I also found new PS/2-only keyboards as well. No adapter needed.So either they're still supporting consumable peripherals for old hardware, or there's enough old stock PS/2 stuff still out there.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: June 27, 2020, 05:51:35 pm
content: Quote from: 0db on June 27, 2020, 10:47:30 amSome Arduino boards can act as a USB host, such as theDueor SAMD based ones like theZero. For a compact design, I'd consider something like theSparkFun SAMD21 Mini Breakoutor theAdafruit Feather M0 Basic ProtoThere are libraries available to interface to a USB keyboard and mouse, and emulate a PS/2 keyboard and mouse. Use them with some translation code to do what you want.https://github.com/arduino/ArduinoCore-samd/tree/master/libraries/USBHosthttps://playground.arduino.cc/ComponentLib/Ps2mouse/

author: 0db
author_rank: Frequent Contributor
timestamp: June 27, 2020, 06:24:07 pm
content: Quote from: MLXXXp on June 27, 2020, 05:51:35 pmNice idea!

author: fordem
author_rank: Regular Contributor
timestamp: July 02, 2020, 12:49:46 am
content: Quote from: 0db on June 27, 2020, 10:47:30 amHow old is this computer and what expansion bus does it use? USB expansion cards are available & dirt cheap and I'd be quite surprised if you couldn't find a usable PS/2 keyboard & mouse on ebay

author: Nusa
author_rank: Super Contributor
timestamp: July 02, 2020, 02:39:44 am
content: One can still get a native PS/2 keyboard and mouse brand new.https://www.amazon.com/Logitech-Deluxe-Desktop-Keyboard-Mouse/dp/B00354TYM8He seems more interested in the project rather than finding the simple and cheap solution that works. Which is fine, although saying that would have made this thread easier.

author: e_60
author_rank: Contributor
timestamp: July 15, 2020, 04:56:41 am
content: I had a similar requirement recently. I have an old PC with only ps2 keyboard/mouse and I wanted to use a USB Keyboard/Mouse, so I purchased one of these:https://www.tripplite.com/ps-2-to-usb-converter~0DT60002It is an absolutely overkill it cost me $120 but I wanted to see it in action, when I have time I would like to investigate making my own in a more compact form factor on a "dongle" format to plug into the proprietary ps2 port on my laptop.as other have mentioned, a more cost effective solution is to buy a ps2 keyboard, or one that supports it through the passive adapter.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 23, 2021, 12:58:44 pm
content: (Necro warning)By coincidence, I came across this:https://github.com/10110111/usb2ps2convand also this thread. So perhaps there are additional options available.Tim

author: PKTKS
author_rank: Super Contributor
timestamp: November 23, 2021, 01:06:05 pm
content: Quote from: T3sl4co1l on November 23, 2021, 12:58:44 pmNice alternative...I have a pile of very good "old" stuff which is being "obsoleted" by this USB fever...ALAS.. has seen that a simple USB VID ID register is costing about U$10.000I miss plain RS232.. much cheaper and easier... although bulkyPaul

author: cfbsoftware
author_rank: Regular Contributor
timestamp: November 23, 2021, 10:55:14 pm
content: Some of Digilent's Artix 7 FPGA boards (e.g. the Basys 3) connect a PIC24FJ128 to a USB socket to implement a standard PS/2 interface for communication with a mouse or keyboard. I have found this works better with USB mice and keyboards than any other solution (standalone adapters etc.) that I have tried. The hardware and PS/2 related-details are described in detail in the USB HID Host section of the Basys 3 documentation:https://digilent.com/reference/programmable-logic/basys-3/reference-manual?redirect=1Unfortunately this is only a partial solution for my application (Project Oberon) because a) I need two PS/2 interfaces and b) I have not been able to locate the source code used to program the PIC. I'd be VERY interested if it, or an equivalent, was found so I could use the same technique with other FPGA boards.

author: cfbsoftware
author_rank: Regular Contributor
timestamp: November 23, 2021, 11:19:45 pm
content: Quote from: Nusa on July 02, 2020, 02:39:44 amHave a closer look: "Currently unavailable. We don't know when or if this item will be back in stock."I tracked it down to NewEgg but it also listed out of stock there as well. The additional information (Date First Available: May 05, 2004) leads me to believe these are obsolete listings.https://www.newegg.com/logitech-deluxe-desktop-bundle-967290-1403-ps-2-wired/p/N82E16823126144For my uses, a three-button mouse (e.g. the Logitech M-S35) is preferable to a scroll-wheel mouse. Fortunately you can often get good used ones on eBay at a reasonable price e.g.https://www.ebay.com.au/itm/194526758817

author: ebastler
author_rank: Super Contributor
timestamp: November 24, 2021, 06:57:57 am
content: Cherry still makes keyboards with a "Combo" interface, i.e. a USB jack which supports translation to PS/2 via a passive plug adapter. (Which comes with the keyboard.) Here are a few, from full size to compact:https://www.cherry.de/PDF/EN_G80-3000.pdfhttps://www.cherry.de/PDF/EN_G80-1800.pdfhttps://www.cherry.de/PDF/EN_Compact-Keyboard_G84-4100.pdfThese are current products, in stock at Amazon and elsewhere. Note that not all Cherry keyboards support the PS/2 adapter; e.g. the RGB-illuminated versions and the MX series seem to be USB only.

author: MarkF
author_rank: Super Contributor
timestamp: November 24, 2021, 08:01:33 am
content: Scrap the whole PS/2 idea and get a USB card to use your USB keyboard and mouse directly.Plus room for other devices. Lots to choose from. Just Google them.You do not need to use the old PS/2 ports for keyboard and mouse.Here's anexample from Amazon:Also:StarTech.com PCI to USB 2.0 Controller Adapter Card

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 24, 2021, 12:58:47 pm
content: Easier said than done when the machine doesn't have PCI(e), for example.Or even when it does, the OS doesn't support it (e.g. Win95).Why not update? Or upgrade? Some industries prohibit that (let alone if a viable upgrade path is even known for the given hardware, software and application involved), and with good reason!Tim

author: mariush
author_rank: Super Contributor
timestamp: November 24, 2021, 01:29:27 pm
content: The simple solution would be to buy a PS/2 keyboard, and a PS/2 mouse.They still make them.You can also buy new old stock of some keyboards that are ps/2 ... seehttps://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313&_nkw=new+old+stock+ps%2F2+keyboard&_sacat=0

author: simba15
author_rank: Regular Contributor
timestamp: January 20, 2022, 03:26:44 pm
content: So recently I found the need for this USB device to PS2/AT adapter.Most of my Keyboards are USB and none of them seemed to be PS2 compatible ( with an adapter)If could be really handy to have a USB device to PS2 output adapter.usb2ps2conv seems like a good project, Has any one made one?I have a STM32 Nucleo-64 board that i could try but im not sure if Nucleo boards are compatible?Thanks.

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 04, 2022, 02:08:36 pm
content: Would these 2 adapters work?https://www.startech.com/en-us/cables/gc46fmkeyhttps://www.startech.com/en-us/cables/gc46fm

author: ebastler
author_rank: Super Contributor
timestamp: February 04, 2022, 11:01:43 pm
content: No, both are passive converters, as stated in the product descriptions. They will only work with keyboards or mice which are already equipped with a combined USB/PS2 interface.

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 04, 2022, 11:34:25 pm
content: So the OP has special keyboard and mouse that he must use? I use those adapters with almost any USB keyboard or mouse I got and they work.

author: ebastler
author_rank: Super Contributor
timestamp: February 05, 2022, 07:18:28 am
content: Most older USB keyboards, and some current models, can „speak” PS/2. The majority of current keyboards cannot.

author: BeBuLamar
author_rank: Super Contributor
timestamp: February 05, 2022, 08:31:07 pm
content: Thanks! I still use IBM model M keyboards. In fact I tend to toss the keyboard that came with new computer.

author: TechTaco
author_rank: Newbie
timestamp: April 29, 2022, 01:30:49 am
content: As noted above with the Ardiuno, just to throw this out there, if you wanted to get even more compact a single PIC32 MX series chip could probably do this. It has USB support and the PS/2 keyboard protocol is quite basic which it can also do. The mouse protocol I'm not as familiar with.The PIC32MX230F256B-50I/SP (~$5) DIP package for easy breadboarding, supports USB "On The Go" which allows a USB keyboard and mouse to be plugged in to the chip, as it acts as a host.Chapter 12 of "Programming 32-bit Microcontrollers in C: Exploring the PIC32" by Lucio Di Jasio describes step-by-step how the PS/2 keyboard protocol works in depth and programming for it on the PIC32.