2
\$\begingroup\$

I designed a PCB with an STM32 and a micro USB connector. I put a NUF2042XV6T1G between the connector and the STM32 to protect the data lines. The USB shield is connected to system ground via a 120R@100MHz ferrite bead.

The board has a power prioritization scheme going on, so it can be either bus powered, powered via a power supply or from a battery. I tested the prioritization circuit extensively, and the priorities and the make-before-break behaviour work just fine.

However, I noticed that when the board ground is referenced to mains earth via the power supply, the STM sometimes resets when I plug in the micro USB cable. At first I thought that the make-before-break doesn't work reliably, but that is not the case. Then I noticed that it is enough to touch the micro USB plug's shield to the receptacle's shield to crash the CPU. So I had a look at what's going on on the USB shield when not connected to my board:

Scope shot: Chinese power supply

Above is the shield voltage (referenced to mains earth) when the USB cable is plugged into a cheap chinese USB power supply (no mains earth connection).

Scope shot: Apple Power supply

Above is the shield voltage (referenced to mains earth) when the USB cable is plugged into a genuine Apple USB power supply (no mains earth connection either). Not as bad as the chinese one, but I'm still shocked (fortunately only figuratively. I don't notice anything when touching the shield with my finger).

I noticed that the CPU does not reset if I touch the USB plug's and receptacle's shield with my finger before connecting the metal parts when plugging in

So the question here is: How should I connect the receptacle's ground to the circuit ground to avoid this issue and stay clear of EMI issues? A high resistance (1M or so) instead of the ferrite bead? Both in series? Both in parallel (makes no sense to me)? Capacitively couple them?

\$\endgroup\$
  • \$\begingroup\$ The USB shield and USB ground are most likely connected together at the USB charger. There is no absolutely correct way of doing it, but in general it is not suggested that the USB shield and USB ground have a DC path at the device side, only capacitor betwee them to provide AC path. Sometimes you see 1 Mohm though. But if the STM resets when connecting chassis, can you test if it resets also when connecting the USB otherwise, destroy a USB cable to disconnect the foil or modify your device to disconnect the ferrite. Can you post the schematics of STM32 device for analysis? \$\endgroup\$ – Justme Jun 7 at 16:09
  • \$\begingroup\$ Or this one, electronics.stackexchange.com/q/389972/117785 \$\endgroup\$ – Ale..chenski Jun 8 at 0:00
  • \$\begingroup\$ And this question discusses the leakage issues with "isolated" AC-DC power adapters and explains your waveforms. \$\endgroup\$ – Ale..chenski Jun 8 at 0:03
0
\$\begingroup\$

So the question here is: How should I connect the receptacle's ground to the circuit ground to avoid this issue and stay clear of EMI issues?

A good reason that I can think of why a USB shield is not galvanically connected to ground is because a USB port can be expected to survive EN 61000-4-5 indirect lightning surges and, when testing is applied, the shield is connected to the surge generator via a 2 ohm resistor. So, if the surge level to pass is 2 kV, the peak current that can flow through a grounded shield is about 2,000 amps.

What I have seen something like this: -

enter image description here

And the capacitor is usually rated around 1 kV. On Ethernet cables it's more common to see a 2.2 nF or 1 nF capacitor rated at 1 kV or more.

| improve this answer | |
\$\endgroup\$

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