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!?)

  • \$\begingroup\$ Would that become a problem if I connect a powered USB-hub instead of a keyboard? \$\endgroup\$
    – Johannes
    Jul 7 '17 at 17:12

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

  • \$\begingroup\$ +1 I would add that the shield, when properly de-coupled from the signal ground, substantially reduces EMI coming from the noisy ground inside connected devices, or when the differential data signals are slightly imbalanced, due to slight cable/trace length mismatch, or driver mismatch. Which happens. \$\endgroup\$ Jul 8 '17 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.