audioconnectorFeaturedGroundHDMIHow ToNewspcbPCB Hacksusb

Where Do You Connect The Shield? [Hackaday]

View Article on Hackaday

When it comes to polarizing and confusing questions in electronics, wiring up shields is on the top-10 list when sorted by popularity. It’s a question most of us need to figure out at some point – when you place a USB socket symbol on your schematic, where do you wire up the SHIELD and MP pins?

Once you look it up, you will find Eevblog forum threads with dozens of conflicting replies, Stackexchange posts with seven different responses plus a few downvoted ones, none of them accepted, and if you try to consult the literature, the answer will invariably be “it depends”.

I’m not a connector-ground expert, I just do a fair bit of both reading and hacking. Still, I’ve been trying to figure out this debate, for a couple years now, re-reading the forum posts each time I started a new schematic with a yet-unfamiliar connector. Now, of course, coming to this question with my own bias, here’s a summary you can fall back on.

Consumer Ports

Putting HDMI on your board? First of all, good luck. Then, consider – do you have a reason to avoid connecting the shield? If not, certainly connect the shield to ground, use jumpers if that’s what makes you comfortable, though there’s a good argument that you should just connect directly, too. The reason is simple: a fair few HDMI cables omit GND pin connections, fully relying on the shield for return currents. When your HDMI connection misfires, you don’t want to be debugging your HDMI transmitter settings when the actual No Signal problem, as unintuitive as it sounds, will be simply your shield not being grounded – like BeagleBone and Odroid didn’t in the early days. By the way, is a DVI-D to HDMI adapter not working for you? Well, it might just be that it’s built in a cheap way and doesn’t connect the shields of the two sockets together – which is fixable.

Putting an Ethernet port on your board? This is the case where you should probably watch out, to make sure you understand what’s happening. Ethernet doesn’t use or need ground as such — it’s a galvanically isolated interface — but if you ground the shield and then use a shielded cable, your ground will go run along the shield. Do you need it? Likely not. Do you want it? I’d say it’s inconclusive. This only applies if your cable has a shield and metal-plated jacks that connect to it: while that’s not the norm, it’s the case for CAT6 and CAT7 cables, which are now pretty common because they’re pretty much required for 2.5 Gbps and above interfaces. Same goes for magjack shields, though watch out, they have a separate ground pin for the internal transformers and circuitry, you do need to wire that up, it won’t propagate any further than it might need to.

Every coaxial port that has a shield contact, but there’s only two contacts in total? This goes from RCA to BNC – the “shield” is actually often a ground pin, though not everyone might realize this. If it is used as a ground pin, passing the return current through, it has to stay grounded at both ends.

USB Ports

There are a fair few different USB port connectors and roles you could be putting on your board – here’s a quick answer for a somewhat common case. USB-A port that’s a host and therefore a power source? Connect the shield to ground. This is what you are universally expected to do, and something that indeed is done basically everywhere you look, bar devices that are being a bit bizarre.

What about a device port, like microUSB, or USB-B, or, hell, miniUSB? Well, the recommendation is leaving two footprints connected to the shield, so you can stuff them with 0-ohm resistors later, or put, say, a resistor-and-capacitor combo there if you’re having noise issues. Honestly, it is unlikely to hurt you if you ground it, doubly so if it’s a power only port – USB is a seriously sensitive interface when it comes to common mode shifts.

Using USB-C? Just wire the shield to ground. Do not pass go, do not collect 200, just wire it up to ground. Why? The specification requires you to, so that’s an easy call. It’s definitely true that, with dual-role ports being abundant, you can no longer really differentiate between host or device, so figuring out shield grounding based on already shaky roles would be a problem. By the way, this is a gift for all of us reverse-engineers out there – finally, a connector with a shield that is guaranteed to be ground-connected!

Not everyone realizes that the specification explicitly mandates it, and people still think separating shield from ground could be meaningful, including myself as recently as a few months ago. If anyone needs a pointer, tell them to check the USB-C cable and connector specification, revision 2.2. For sockets (receptacles), open page 44 and refer to the note 11, for plugs, open page 78 and refer to the note 6.

Other Concerns

There is some mechanical helpfulness to hard-wiring shield to ground, especially if you’re using copper fills without thermals. In my experience, it’s harder for connectors to break off when they have a plane of solid uninterrupted copper they adhere to! Now, thermals do help soldering a whole bunch, so I don’t want to be gung-ho about it, but if you’re dealing with a fully surface-mount connector that can get torn off, you might as well go thermal-less just this once. Worked for me on a larger-scale product of mine, to the point I completely stopped getting the problem where microUSB shield pads would get torn off the board. Of course, remember, microUSB with through-hole mounting pins is superiour mechanically – in case you do make the very situational decision to use microUSB.

The debate about grounding shields might never end, but if you want a summary, this is what I can say surefire, and I hope it helps. What’s your take?



Leave a Reply

Your email address will not be published. Required fields are marked *