I am designing USB unplugging/plugging hardware and I wanted to know why USB plugs are designed such that the power leads make a connection before the data. Is it purely to ensure that data is not able to connect at the same time and/or before the power is connected?

Because I'm not actually physically unplugging the connector, is the pin offset connection delay purely because of mechanical issues, or is it ok if they connect at the same time because there are no mechanical interactions happening with my hardware (it's all done through ICs/FETs). My current version (without a delay) works, but I'm really wondering if it would be better (more in spec) were I to implement a delay when reconnecting power and data.

  • 1
    \$\begingroup\$ That design allows connection on run. \$\endgroup\$ – user263983 Mar 11 at 20:57
  • \$\begingroup\$ What is "connection on run"? \$\endgroup\$ – Mike Mar 11 at 21:07
  • 1
    \$\begingroup\$ Ground connection allows plug to be connected while powered. \$\endgroup\$ – StainlessSteelRat Mar 11 at 21:10

It's actually more extensive than that. The USB shield connection makes contact before any of the pins. After this the power pins connect, followed by the data pins.

The reason for this is that USB supports hot-plugging. This presents a number of issues to the electrical circuitry. The first is that there may be a large electrostatic potential on the device being connected and if this discharges, even through the power pins, it could damage both devices. This is why the shield connects first.

After this the power pins connect and this is done to ensure the device powers up first before voltage is presented at the data pins. Otherwise it is possible for current to leak back through the data pin input structure, which could damage the hardware and can cause unreliable startups.

If you are doing everything electrically then none of this is a problem and you should be fine to just connect everything at the same time.

  • \$\begingroup\$ So I never break the connector shield or the ground pin - the only connections I break are +5, d+, d-, and the differential pairs (USB3 connector) - from what you said it sounds like I'm good. \$\endgroup\$ – Mike Mar 11 at 21:22
  • 1
    \$\begingroup\$ +1 for this, if you connect any data pin before ground, and after power, it will mess you up good, and most likely break things in a way that is difficult to debug and will make you sad for weeks. It can cause partial failures of components that come back and go away. \$\endgroup\$ – BeB00 Mar 11 at 21:25
  • 1
    \$\begingroup\$ @Mike Unless you guarantee to connect the +5V line first, you can get a situation where there is a voltage on a data pin that is higher than the power supply voltage Vcc - as the power hasn't even been applied yet. That can damage some devices. \$\endgroup\$ – Simon B Mar 11 at 21:30
  • \$\begingroup\$ So I currently use a TI USB 3.0 + USB2.0 Differential Switch (HD3SS6126) for data connections - I could add an IC to delay the logic signal such that the data lines switch over some amount of time later. Right now they connect at the "same time" (I think the IC differential switch has something like a 70ps delay) \$\endgroup\$ – Mike Mar 11 at 21:56

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.