Building PS/2 to USB Adapter - Do I connect PS/2 cable shield to GND?

sofakng

19 Nov 2021, 22:40

I'm building a PS/2 to USB adapter ("Soares Converter"), but do I connect the PS/2 wire shielding to GND on the microcontroller? The PS/2 port/cable itself also has a separate ground pin.

User avatar
vvp

20 Nov 2021, 15:01

You must have it connected to signal ground at least on one side of the cable (typically this is on the PC side because PCs are made that way). If you do not do this then induced voltages on the shielding may transfer to signal wires irregularly due to cable imperfections or design (unequal capacitance between signal wires and cable shielding).

You may connect it to signal ground also on the device side. If the device has conductive case then often the cable shield is connected to case but often not to the signal ground on the device side. Otherwise it is often connected to the signal ground (near the connector) on the device side as well. The disadvantage of having it connected on more places is ground loops which may screw signals in the case of higher magnetic fields. The slight advantage is less noise on signals due to capacitance differences between different signal wires and shield in the device. This is not such a big deal since it is already connected on the PC side and most device side PCBs have proper ground plate.

If you cannot decide from the above what is better in your particular case then connect signal ground and shield on the device side near the connector. Assume signal ground and shield are already connected on the PC side.

sofakng

20 Nov 2021, 17:39

Thanks so much for the information.

In my situation I'm using a microcontroller (atmega32u4) in-between the device (keyboard) and host (computer).

The host is connected using USB so I'm not sure about grounding.
The device is an IBM Model M connected using a female PS/2 cable. The IBM Model M has a large metal plate inside that I believe has a grounding screw attached.

What would you recommend in this situation?

SK-8K

20 Nov 2021, 19:06

What I've found in my experiences with modifying keyboards is that the cable shield is almost always connected to the metal backplate/mounting plate rather than to the controller board. Likely to provide a safe path for any ESD discharge.

What I'd do is solder the shield cable directly to the USB port's shield. That way the shielding would continue uninterrupted along the USB cable as well. And connect the signal ground wire to the microcontroller ground.

User avatar
vvp

21 Nov 2021, 02:53

The USB shield and signal ground are already connected together in the PC. PC's are made that way and it is good :)

Connect USB shield with PS/2 shield at atmega32u4 location.
Connect USB signal ground with PS/2 signal ground at atmega32u4 location. It is likely already done through MCU PCB..
Do not explicitly connect shield with signal ground at agmega32u4 location. They may be already connected on the MCU PCB. Do not disconnect them if so.

Leave shield/signal grounds as they were in the keyboard (signal ground is likely not connected to shield in the keyboard itself).

Post Reply

Return to “Workshop”