Author Topic: USB to PS/2 converter - CH559 based  (Read 4852 times)

0 Members and 1 Guest are viewing this topic.

Offline rasteriTopic starter

  • Contributor
  • Posts: 17
  • Country: gb
USB to PS/2 converter - CH559 based
« on: September 05, 2022, 06:09:30 pm »
I've been working on a USB-to-PS/2 converter, so you can connect modern USB input devices to your old PCs.

It's based on the WCH CH559 MCU which is a great little part for this purpose, as it has two USB host ports.

It supports USB keyboards, mice, and game controllers. So you can plug in a joypad and it'll emulate keyboard presses, handy for games.

Source code and PCB/enclosure designs are here - https://github.com/rasteri/HIDman
« Last Edit: September 05, 2022, 07:48:49 pm by rasteri »
 
The following users thanked this post: Mechatrommer, oPossum, edavid, tooki, Gyro, nockieboy, Nominal Animal, RichardM, serisman

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6268
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #1 on: September 05, 2022, 06:36:47 pm »
Great! They can be bought for less than US$ 5.- anywhere.
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 459
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #2 on: September 05, 2022, 07:06:41 pm »
I'd like the other way round to use modern mice and keyboards with older test equipment. This seems to be non existent...
 

Online wraper

  • Supporter
  • ****
  • Posts: 17675
  • Country: lv
Re: USB to PS/2 converter - CH559 based
« Reply #3 on: September 05, 2022, 07:27:48 pm »
I'd like the other way round to use modern mice and keyboards with older test equipment. This seems to be non existent...
It's exactly that, two USB hosts for modern peripherals and two PS/2 outputs.
 
The following users thanked this post: dl6lr

Online wraper

  • Supporter
  • ****
  • Posts: 17675
  • Country: lv
Re: USB to PS/2 converter - CH559 based
« Reply #4 on: September 05, 2022, 07:28:40 pm »
Great! They can be bought for less than US$ 5.- anywhere.
You wish. What is sold are just two connectors with wires in between. Works only with keyboards and mice which already support both USB and PS/2 but only have USB connector.
« Last Edit: September 05, 2022, 07:31:09 pm by wraper »
 
The following users thanked this post: tooki

Offline rasteriTopic starter

  • Contributor
  • Posts: 17
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #5 on: September 05, 2022, 08:04:15 pm »
Works only with keyboards and mice which already support both USB and PS/2 but only have USB connector.

Yeah while the first generation of USB keyboards/mice supported PS/2, they're getting increasingly rare.

With this you can even use one of those little wireless keyboard/mouse combined dongles
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7988
  • Country: nl
  • Current job: ATEX product design
Re: USB to PS/2 converter - CH559 based
« Reply #6 on: September 05, 2022, 08:11:01 pm »
Interesting project, but ..
Where do you get PS2 to PS2 cables?
 

Offline rasteriTopic starter

  • Contributor
  • Posts: 17
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #7 on: September 05, 2022, 09:26:56 pm »
Interesting project, but ..
Where do you get PS2 to PS2 cables?

Anywhere really - I got mine from eBay. They were once quite commonly used with KVM switches.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #8 on: September 05, 2022, 10:12:34 pm »
Source code and PCB/enclosure designs are here - https://github.com/rasteri/HIDman

hi, great project! It can save x11 terminals (PS/2 only)!
can you include KiCad files?

I'd like to buy a CH559 evaluation board and load your firmware on it, and then use your KiCad project to design a thinner adapter.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline rasteriTopic starter

  • Contributor
  • Posts: 17
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #9 on: September 06, 2022, 12:02:15 am »
can you include KiCad files?

Kicad files are in the hardware folder.
 
The following users thanked this post: DiTBho

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12795
  • Country: ch
Re: USB to PS/2 converter - CH559 based
« Reply #10 on: September 06, 2022, 05:59:52 am »
Great! They can be bought for less than US$ 5.- anywhere.
The $5 ones are passive adapters, as already explained. Active adapters to convert PS/2 peripherals to USB exist as well, but they’re in the $15-30 range. (Though I assume they can be had on aliexpress for pennies.)

This is the opposite: converting USB peripherals to PS/2 for use on old systems.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #11 on: September 06, 2022, 09:37:29 am »
                               _____________________________________________________
                              | ___________________________________________________ |
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||            ____________                           ||
                              ||           |x___________|                          ||
                              ||           |            |                          ||
                              ||           | hAllo      |                          ||
                              ||           |            |                          ||
                              ||           |____________|                          ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||                                                   ||
                              ||___________________________________________________||
                              |_____________________________________________________|
                                     _________________________________________
                                    |                          tektronix      |
.___________________                |                                         | 
|                   |               |                                         |
|                   |==== PS/2 ==== |    xterm 400S                  (*)      |
|                   |==== PS/2 ==== |                                         |
|___________________|               |_________________________________________|
          \
           \_________USB_______________________________________________________
                                    /                                         /
                                   /usb                                      /
                   _______________/____________________                     /
                  /___________________________HHKB JP__\                   /usb
                 /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/                __/___
                /____/_/_/_/_/_/_/_/_/_/_/_/_/_/_/___/_/               /     /
               /___/__/__/__/____//___/__/_/_/___/__/__/              /_____/
                                                                     /_/_/_/
                                                                    touch pad




Yeah, *this* is the evil plan, buahahahahahaah
(bad laugh, like Doctor Evil in Austin Power
or something)
(


  ;D )
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 459
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #12 on: September 06, 2022, 09:57:01 am »
I'd like the other way round to use modern mice and keyboards with older test equipment. This seems to be non existent...
It's exactly that, two USB hosts for modern peripherals and two PS/2 outputs.

Ah, I see. So the PS/2 has to be connected with two 1:1 cable with Mini-DIN at both ends. That wasn't clear to me from your first post (and I didn't viewed the Github yet).
Great job then!
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 459
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #13 on: September 06, 2022, 10:00:16 am »
                              ||           | hAllo      |                          ||

  ;D )

From your setup the shift key seems to be somewhat malfunctioning  :-DD
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #14 on: September 06, 2022, 01:58:01 pm »
                              ||           | hAllo      |                          ||

  ;D )

From your setup the shift key seems to be somewhat malfunctioning  :-DD

 ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7158
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #15 on: September 08, 2022, 11:42:13 am »
The $5 ones are passive adapters, as already explained. Active adapters to convert PS/2 peripherals to USB exist as well, but they’re in the $15-30 range. (Though I assume they can be had on aliexpress for pennies.)

This is the opposite: converting USB peripherals to PS/2 for use on old systems.

These are commercially available as well, but quite uncommon. Apparently people are more likely to preserve and use old keyboards than old computers? They also cost well above $5; Google finds this one in the > $30 price range:
 

https://www.ihse.com/products/usb-ps2-converter/
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12795
  • Country: ch
Re: USB to PS/2 converter - CH559 based
« Reply #16 on: September 08, 2022, 05:38:30 pm »
These are commercially available as well, but quite uncommon. Apparently people are more likely to preserve and use old keyboards than old computers?
Well, there really were some awesome keyboards in the past (but mostly before the PS/2 era), but I think a lot of the USB adapters get used for things other than ordinary keyboards. Think (really) expensive ergonomic keyboards, but also things like bar code scanners, "keyboard wedge" card readers, etc.
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 459
  • Country: de
Re: USB to PS/2 converter - CH559 based
« Reply #17 on: September 19, 2022, 04:05:16 pm »
It's based on the WCH CH559 MCU which is a great little part for this purpose, as it has two USB host ports.

It supports USB keyboards, mice, and game controllers. So you can plug in a joypad and it'll emulate keyboard presses, handy for games.

Questions:

1. Is there a fixed assignment of keyb and mouse? How is this handled as PS/2 uses different pins/signals for keyb vs. mouse.
2. What about wireless desktops where one USB receiver handles both HID?
3. Did you source your chips from LCSC?
 

Offline rasteriTopic starter

  • Contributor
  • Posts: 17
  • Country: gb
Re: USB to PS/2 converter - CH559 based
« Reply #18 on: September 25, 2022, 05:53:38 pm »
Apologies for my delay in replying.

1. Is there a fixed assignment of keyb and mouse? How is this handled as PS/2 uses different pins/signals for keyb vs. mouse.

Current firmware is fixed, but all data pins of the PS/2 connectors are wired up so it will be flexible. In fact I plan to allow combined Keyboard/Mouse output from one port for dual-use PS/2 inputs (like on some laptops)


Quote
2. What about wireless desktops where one USB receiver handles both HID?

They work great, I recommend their use :)


Quote
3. Did you source your chips from LCSC?

I've bought them in various places (ebay, aliexpress). Never come across a broken one.
 

Offline serisman

  • Regular Contributor
  • *
  • Posts: 100
  • Country: us
Re: USB to PS/2 converter - CH559 based
« Reply #19 on: December 16, 2022, 10:49:24 pm »
Source code and PCB/enclosure designs are here - https://github.com/rasteri/HIDman
I'd like to ... design a thinner adapter.

In case you're still interested, I designed a thinner adapter for this...

https://github.com/serisman/HIDman-mini
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8420
Re: USB to PS/2 converter - CH559 based
« Reply #20 on: December 17, 2022, 10:00:48 am »
I wonder how long it'll be until this product also shows up on Aliexpress... the active adapters that let you use PS/2 keyboard + mouse as a USB one are already <$5.
 
The following users thanked this post: grantb5

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12795
  • Country: ch
Re: USB to PS/2 converter - CH559 based
« Reply #21 on: December 17, 2022, 12:54:08 pm »
I wonder how long it'll be until this product also shows up on Aliexpress... the active adapters that let you use PS/2 keyboard + mouse as a USB one are already <$5.
The market for those is likely larger than the market for this.
 

Offline mikeisfly

  • Newbie
  • Posts: 1
  • Country: us
Re: USB to PS/2 converter - CH559 based
« Reply #22 on: September 01, 2024, 03:36:01 pm »
Can I buy one of these from you? If not I'm not sure how I can buy the components to build this for myself. I would love a guide for a complete noob who has a soldering iron but doesn't want to buy a 3D printer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf