Electrical – USB OTG Cable Shielding

shieldingusbusb-otg

I just soldered a USB OTG cable to connect a keyboard (regular USB-A) to a Raspberry Pi Zero (micro-USB).

How to wire the VCC, GND, D- and D+ pins was obvious and the cable works. However both connectors have a pin that is connected to the connectors metal enclosure. The cable I used has a wire mesh for shielding.

How am I supposed to connect the shielding:

  1. Both connectors metal enclosure to the wire mesh
  2. Only one connectors metal enclosure to the wire mesh (which one?)
  3. Connect shielding to ground?

This question has been asked before: Understand the shielding of a USB device
But it was not answered, aso I am not sure if the fact that this is an OTG cable makes a difference (I guess in case 2. I would have to connect the mesh to the micro-USB that connects to the raspberry, not the keyboard!?)

Best Answer

Both shields should be tied to the connector shield. USB ground should not connect to the shield at the cable connection. (although they could be tied on the PCB)

Shields shunt noisy current away from the grounding signal, if the cable shield was broken, a noisy current would choose ground as its prefered pathway where it could cause interference in the data lines by coupling into the data lines via mutual inductance. (wires running along side each other form a mutual inductor where magnetic fields can couple from one to the other wire).

The cable shield will also shield the internal conductors from stray electric fields and RFI.

How am I supposed to connect the shielding:

This way: Both connectors metal enclosure to the wire mesh