Email or username:

Password:

Forgot your password?
Tube❄️Time

question: you have a USB connector on your project. how do you connect the shield? justify your answer, reply to the thread. (click this thread for the poll)

USB connector with a shield ground pin and a signal ground pin. there is a component connecting them together and it has question marks all around it
71 comments
Tube❄️Time

how do you connect the USB connector shield ground to the board's digital ground? justify your answer.

John Carlsen 🇺🇸🇳🇱🇪🇺

@tubetime

Inductive ferrite bead to limit conduction of higher frequencies and keep them off the shield

Nick 🦇🕸️🖤🖖

@tubetime through the skin of the device user. So, I guess that would be a very low value capacitor with extremely high ESR?

Joel Michael

@tubetime capacitor (and high-value resistor in parallel) for ESD protection: the shield is a touch-point and is susceptible to contact ESD strikes. Ref: Microchip AN2587 at ww1.microchip.com/downloads/ae

Peter Bindels

@tubetime I'd say through a resistor, something like a 10k resistor. Not sure why you'd add a capacitor; I'd guess the shield itself has enough parasitic capacitance to hold an ESD spike. And I don't understand analog electronics enough to know about the inductor, but I can see a case for it.

Did once encounter a USB plug converter that just didn't connect GND, so the only GND we got was through shield ground...

cliffordheath

@tubetime always nail it down. The device isn't expected to have any other earth, and shield isolation isn't needed for signal integrity

root42

@tubetime I have no idea about this, as I am a software person, but find this topic extremely interesting. I hope this will be resolved!

Doomstrike

@tubetime Device side float, host side connect straight to GND. You have a ground loop otherwise. The shield is just to keep stuff off the cable.
And now I'm filled with doubt 🥺

A. Fleury-Gobert

@tubetime
so, as it's a game of taking the best case...
Let's say the USB cable used is shielded
AND
It's connected to one of these badass gaming rig, metallic case, multicolored leds... and the USB A plug shield touches the rig case
AND
the electrical installation is top specs, with a nice crossed earth pin that actually delivers some juicy 110V or 220V

Do I want to inject 220V 50Hz in my project board? and reinject it in my badass gaming rig?

@tubetime
so, as it's a game of taking the best case...
Let's say the USB cable used is shielded
AND
It's connected to one of these badass gaming rig, metallic case, multicolored leds... and the USB A plug shield touches the rig case
AND
the electrical installation is top specs, with a nice crossed earth pin that actually delivers some juicy 110V or 220V

Cegorach

@tubetime directly - ground's gotta be grounded!

(well, unless you don't have a truly grounded wire - like plastic encoated device with only two-poled power supply)

gnarf

@tubetime It depends on the overall requirements of the board. Questions I might pose are:
- Is the device sensitive to noise?
- Is it likely to radiate EMI?
- What enclosure is used? Is it metal? Is it continuous or are there holes?
- What other connectors exist?
- Is the USB port power-only? Is it data only? Can the device be supplied from multiple sources?

You always need to take the entire picture into account, there is no flat out right or wrong.

@tubetime It depends on the overall requirements of the board. Questions I might pose are:
- Is the device sensitive to noise?
- Is it likely to radiate EMI?
- What enclosure is used? Is it metal? Is it continuous or are there holes?
- What other connectors exist?
- Is the USB port power-only? Is it data only? Can the device be supplied from multiple sources?

doragasu

@tubetime I think there are two possible answers: directly and capacitor. Directly might be preferred for most applications, but it creates a ground loop that might be problematic in some applications. If that is the case, a capacitor might help. I usually put a 0603 footprint to assemble a 0 ohm resistor, that can be replaced by a capacitor if needed.

ErwinHoogzaad

@tubetime direct connection. I used to use a 1nF // 1Mohm connection, but changed to direct after reading an application note or blog. Can’t remember where I read it.

Michael Ossmann

@tubetime If it is a Type-C connector, connect shield directly to GND because the spec says to. If it is a host, connect shield directly to GND because the spec says to. If it is neither, you have options, but lately I prefer direct connection because it is simple, easier to pass ESD testing, and has become the norm since Type-C.

Xeno the CaveSpider 🕷

@tubetime I voted capacitor but in reality it is a parallel RC combination with 1 MΩ

edit: Justify it… I'm not 100% shure but I think the reason was grounding the device's case this way enough against static electricity but not providing a real DC-path to prevent ground-loops (host grounds the shield directly, device never).

src: some friend at C3PB explained this as the ultimate solution to me

Tube❄️Time

so the correct answer is that *it depends on your system grounding strategy* but the most-often-correct answer is to tie them directly together. particularly if you're a hobbyist type, just tie them together and don't worry about it. but if that's not enough for you, continue reading...

Tube❄️Time

your system grounding strategy may involve various frequencies of interest, and what you do depends a lot on that!

Tube❄️Time

for example, if you're worried primarily about low frequency interference, you can disconnect the shield ground and get nearly 20dB reduction of noise at 50KHz.

pg 72, 73 of Electromagnetic Compatibility Engineering
Tube❄️Time

however, higher frequencies will see your puny disconnected shield and (due to parasitic capacitance) jump right across anyway!

Tube❄️Time

you'll get this same effect when you connect a capacitor between the shield ground and the board ground. you're now just *choosing* where that RF current will go.

Tube❄️Time

having an RF current flowing isn't necessarily bad. because of the skin effect, this noise current flows on the outside of the braided shield in the cable while your common mode signal current flows on the inside of the braided shield, and they don't interact (at high frequencies)

Tube❄️Time

but if you really don't want those RF currents (perhaps your cable just happens to be the right length to form a monopole antenna to radiate interference) you can add a ferrite bead around the cable. this causes common mode currents to see a higher impedance at high frequencies, and this reduces the current.

Tube❄️Time

in my experience with complex interconnected systems, this can turn into a game of whack-a-mole as the RF return current will find a path back (oh yes it will!) using a different route--and it may be a less desirable one!

Tube❄️Time replied to Tube❄️Time

what about the thing with the shield ground tied with an inductor in series? this is part of a *system* of multiple units connected together, and it's called a hybrid ground.

Tube❄️Time replied to Tube❄️Time

with a capacitor in series for each device, your grounding system allows RF return currents to take the shortest path but forces lower frequency currents to go through some other path, presumably a single point ground (audio folks like this!)

Tube❄️Time replied to Tube❄️Time

the inductor approach is less common because RF currents like to couple through parasitic capacitances (as we discussed before), so it's tough to control, but this method gives you a multipoint ground at low frequencies and a single point ground at high frequencies.

Tube❄️Time replied to Tube❄️Time

say we've connected the shield to our board ground. we can still improve on this!

page 486 of the book sets up a nice concept relevant to our problem at hand. create a "clean" I/O ground area on the PCB that acts like an extension of the chassis. put your EMI filter parts here. the idea is to direct any EMI on the signals ➡️ to the shield ground return.

Tube❄️Time replied to Tube❄️Time

incidentally this approach does another good thing -- putting all the connectors on one side of the board. we're trying to build a circuit that plugs into a USB jack, not a dipole antenna!

Tube❄️Time replied to Tube❄️Time

here's a fantastic real-world example of this design technique. here's a Macintosh 512K motherboard. with a bright light behind it, you can see the divide between the "clean" IO ground and the "dirty" logic ground.

(they did break the rule slightly with the keyboard connector on the front, but they've also extended the cut in the ground plane along the right edge of the board.)

Tube❄️Time replied to Tube❄️Time

naturally the topic gets even more complex when you add in ESD protection.

some folks mentioned adding a "bleeder" resistor in parallel with the coupling capacitor. i'm leery of adding series impedance to limit the current, typically you want that ESD out of there without giving it opportunities to current share with sensitive signal returns. also it turns out that many resistors can get destroyed by an ESD pulse, so there's another good reason to avoid this approach.

Tube❄️Time replied to Tube❄️Time

you might be OK if you add a shield ground ring around the board, near any gaps in your enclosure, so that ESD strikes will hit that rather than your main board ground. you should also protect any buttons or switches. for example, some tact switches come with a shield ground ring that goes to a 5th pin, which should be tied to your shield ground.

Tube❄️Time replied to Tube❄️Time

earlier i said that the tl;dr for hobbyists is to just tie the shield to your board ground. for professionals who aren't experts in EMI but work for big companies who have EMI folks on staff, you might just want to add a generic "series component" between the two grounds and populate it with a 0 ohm jumper. the EMI people (during precompliance testing) may need to play around with that connection, and this makes it easy.

A. Fleury-Gobert replied to Tube❄️Time

@tubetime
just add 2 traces for a 0 ohm. it's so easy to need an RC or an RL instead of a simple capacitor or inductance.

Natasha Nox 🇺🇦🇵🇸 replied to Tube❄️Time

@tubetime Ooooh, that's what these lines on PCBs are for. Makes sense.

Marcus Müller replied to Tube❄️Time

@tubetime I honestly think this is ill-advised, because it makes the very signal lines whose signal we did this whole connection for cross reference levels and hence become noisy at the receiver. That's not really an option for single- ended signals, and the differential ones you would encounter today would be very unhappy about the break in impedance and the complete loss of current return path (much more energy in the E-field between diff traces and their joint adjacent ground plane than …

Tube❄️Time replied to Marcus

@funkylab yeah the book advises building a ground "bridge" directly underneath high speed traces that cross over. they have high frequency return currents that take the path of least inductance (directly underneath) and if you have a ground cut underneath then the loop area increases, and you start radiating...

MarkAtMicrochip replied to Tube❄️Time

@tubetime @funkylab I think you’re right. Just remember that “low frequency” that does cross the ground plane better have very slow rise/fall times. I could not find the >1GHz EMI that was radiating from my board. Long story short, it was a 32kHz oscillator with a 800fs rise/fall time. In the oscillator manufacturers defense, the datasheet only had a maximum rise time spec. But who would have thought the edges would be that sharp!

Tube❄️Time replied to MarkAtMicrochip

@MarkAtMicrochip @funkylab you can sorta cheat a bit with high slew rate signals if they have a very long period and if you quasipeak during the EMI scan, but yeah usually high slew rate signals are a problem.

doragasu replied to Tube❄️Time

@tubetime Signals crossing a split plane in that example are firing all kind of alarms in my brain. Even if the signal is low freq, rise/fall times in todays electronics can cause EMI problems.

Matt Gray

@tubetime ohhhhhhh thanks for explaining the ferrite thing. Last time I looked it up (decades ago) I didn’t get it.

Tube❄️Time replied to Matt

@mattgrayyes yep it is a single-turn inductor.

Profoundly Nerdy

@tubetime Does it ever make sense to add a ferrite bead to 50 ohm coax?

For context: I'm a ham.

Tube❄️Time replied to Profoundly

@profoundlynerdy sure, if you're having trouble with common mode noise currents going between equipment. i've had to do it before. it's tough to do it right because usually the RF noise finds another path.

Joel Michael

@tubetime EMI this is only half of the story - the other half is ESD protection

Derek Robson

@tubetime I would connect it directly to GND, because I don’t know any better.

Datenegassie

@tubetime Just to be safe, I wire it directly to ground AND to 5V.

Nadia 🏳‍⚧

@tubetime Tap it to a touch sensor and get a button for free!

eater

@tubetime 2 crocodile clamps and a buckler

Mans R

@tubetime Capacitor and resistor in parallel because that's what some datasheet recommended.

Christian Berger DECT 2763

@tubetime 1Meg||some capacitor. Do not directly connect it to ground as some USB devices use the shield as a separate conductor for low speed signals.

truh

@tubetime through a small lightbulb do I know if I did something very wrong.

John Carlsen 🇺🇸🇳🇱🇪🇺

@tubetime

Here's an example of something that is *almost* right:

acmesystems.it/www/pcb_usb/USB

The problem is with the choice of putting a capacitor at location C106.

Having a capacitor there is great for AC coupling and DC blocking, which are both exactly the opposite of what we want in binding chassis ground to the digital supply return path.

For many reasons (including to pass regulatory EMI/EMC testing), we want conductivity that is high at low frequencies and to tapers off as frequencies increase. A ferrite bead is the best choice I've found for such a spot.

@tubetime

Here's an example of something that is *almost* right:

acmesystems.it/www/pcb_usb/USB

The problem is with the choice of putting a capacitor at location C106.

Having a capacitor there is great for AC coupling and DC blocking, which are both exactly the opposite of what we want in binding chassis ground to the digital supply return path.

tnt

@tubetime A 1M resistor in parallel with a 100n capacitor.

I want to avoid any large DC current, but I don't want it to build a charge either hence the 1M resistor. I also want any noise to be shunted to gnd hence the 100n cap (and the value is because I almost certainly have 100n caps already in BOM).

tnt

@tubetime 1M is what's in ESD wristwrap, so seemed appropriate to just avoid charge buildup.

100n ... honestly just because I have those on most boards anyway. And 30kohm at 50 Hz seemed good enough to avoid hums.

I'm pretty sure I copied that kind of topology from some example somewhere but it's been so long I couldn't give a source.

miek

@tubetime Ah, the illusion of choice! When experimenting for EMC testing recently (and then reading the spec more carefully), I found that on any recent (type-C) design that decision is already made for you. GND and shield are connected within the cable plug:

Tube❄️Time

@miek yes that's right, they often (but not always) do this.

Álvaro Prieto

@tubetime @miek yeah, I found that out when making my USB cable tester :/

Darrell Harmon

@tubetime Directly to the ground plane. I've never failed EMC/ESD with that.

Inductor is the worst option, I've fixed a few EMC fails where folks did that. Essentially an HF open. I want to keep the signals going through the cable in the cable which requires an HF short. Open makes an antenna driven my any common mode current in the other wires.

Capacitor or cap || resistor has a use in breaking low frequency ground loops, keeping extraneous DC currents out of the braid. Not relevant for USB.

Cutie-PHY

@tubetime All the EMC people I talked to said directly to GND. And it's now even mentioned in the USB-C spec.

And @jacqueline passed EMC with it so another great data point.

Go Up