Author Topic: USB Shield Ground Connection  (Read 92870 times)

0 Members and 4 Guests are viewing this topic.

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: USB Shield Ground Connection
« Reply #25 on: September 24, 2018, 07:00:49 am »
Always ground shield directly to circuit ground plane.  Anyone who says otherwise simply isn't smart.  Yes.. you will find appnotes suggesting otherwise.  They aren't smart. ;)

Didn't read the whole thread into details, but I absolutely second this.
I've seen too many non-working / damaged USB setups, and in each and every case the root cause/problem was the non boldly-to-GND-connected shield of the USB connector.
Putting any kind of impedance in series with the USB shield leads to elevated levels of common mode noise / disturbances on the data pair. The USB transceivers aren't made to cope with significant common mode and get easily disturbed and destroyed by voltage differences between the ground potentials of the USB host and the USB device. Bonding the USB cable shield to GND on both ends is the best (only) way to deal with that.
If you want (need) to reduce common mode currents along the USB cable, either your cable is too long, or put some turns of the whole cable through an appropriate ferrite core.
Safety devices hinder evolution
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15441
  • Country: fr
Re: USB Shield Ground Connection
« Reply #26 on: September 24, 2018, 05:40:35 pm »
Always ground shield directly to circuit ground plane.  Anyone who says otherwise simply isn't smart.  Yes.. you will find appnotes suggesting otherwise.  They aren't smart. ;)

I'll have to second that. I'm not a big fan of any kind of "split" ground design (unless of course they are isolated from one another). Doesn't make any sense.

Yes, you will find that in some specific cases, an USB shield connected to ground through a resistor/capacitor or not connected at all will give you "better" (better usually meaning a system that doesn't reset or hardlocks) behavior in case of ESD for instance (this kind of shielding trick is often used to pass ESD testing). That usually means you have problems elsewhere to fix.

 

Offline bloguetronica

  • Frequent Contributor
  • **
  • !
  • Posts: 354
  • Country: pt
Re: USB Shield Ground Connection
« Reply #27 on: September 24, 2018, 11:58:33 pm »
Hi,

The cable shield should be grounded (i.e. directly connected to ground) on the host side, as per the USB specifications. On the device side, it should not be connected to GND, except via a 1M \$\Omega\$ resistor with a 100nF capacitor in parallel. Other values are acceptable. There is a large leeway on the values you can choose.

Who says otherwise is wrong. The ground and shield, despite being at the same potential, serve different purposes. The ground wiring is used for power and signal return. The shield is for shielding. If you tie shielding to ground at both ends of the cable, you will defeat the shielding purpose and external noise will couple to ground.

Kind regards, Samuel Lourenço
 

Offline jolshefsky

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
    • Jason DoesItAll
Re: USB Shield Ground Connection
« Reply #28 on: September 25, 2018, 12:22:53 am »
The cable shield should be grounded (i.e. directly connected to ground) on the host side, as per the USB specifications. On the device side, it should not be connected to GND, except via a 1M \$\Omega\$ resistor with a 100nF capacitor in parallel. Other values are acceptable. There is a large leeway on the values you can choose.

Who says otherwise is wrong. The ground and shield, despite being at the same potential, serve different purposes. The ground wiring is used for power and signal return. The shield is for shielding. If you tie shielding to ground at both ends of the cable, you will defeat the shielding purpose and external noise will couple to ground.

I'll just assume this is what the USB spec says and leave it at that. But I want to second the "different purposes" comment. I have long been under the impression that in circuits where there is a ground line separate from a shield (e.g. not coaxial cable shield) that the shielding should be tied to ground only at one end so that it (1) functions as a shield, and (2) to avoid ground loop problems where two parallel but separate wires are carrying the "same" current.

I don't really understand how it's advantageous to have the 1MΩ || 100nF capacitor at the other end (but I'll trust whoever the EE was that convinced a committee that it was a good idea). I can see it as a "backup" coupling, or to dissipate frequencies high enough to wiggle through the shield, but I'm way out of my depth here to do anything but wildly speculate.
May your deeds return to you tenfold.
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 10847
  • Country: us
  • $
Re: USB Shield Ground Connection
« Reply #29 on: September 25, 2018, 12:50:26 am »
what ground loop? the one between a faraday cage shield and a ground wire? how is it coupling?

leaving the shield floating, not connected to the slave (host my ass what is this freaking species, alien?) then geometrically its still connected to the circuit seperated by the inductance of the ground wire, thats like making it a  stub resonator or something

so if you disconnect the shield on something with connected grounds you get an isolation of like 1uH/meter of cable or something.

why is USB different then a twinaxial?
« Last Edit: September 25, 2018, 01:06:59 am by coppercone2 »
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: USB Shield Ground Connection
« Reply #30 on: September 25, 2018, 05:24:05 am »
Hi,

The cable shield should be grounded (i.e. directly connected to ground) on the host side, as per the USB specifications. On the device side, it should not be connected to GND, except via a 1M \$\Omega\$ resistor with a 100nF capacitor in parallel. Other values are acceptable. There is a large leeway on the values you can choose.

Who says otherwise is wrong. The ground and shield, despite being at the same potential, serve different purposes. The ground wiring is used for power and signal return. The shield is for shielding. If you tie shielding to ground at both ends of the cable, you will defeat the shielding purpose and external noise will couple to ground.


So the spec isn't smart. Quite common. Why would one expect from people expertising in digital transmission and bloated software protocols beeing smart in EMC? Most probably this part of the spec was created in a rather (EMC wise) clean environment - and yes it works, so the spec will be. And then there are many monkeys that just implement it that way because every monkey has done so before and no monkey knows why and why they are beating any new monkey that does it differently.



And I have to admit: The spec way works - with devices like mice and keyboards, these often have no shield at all.
« Last Edit: September 25, 2018, 05:30:50 am by capt bullshot »
Safety devices hinder evolution
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: USB Shield Ground Connection
« Reply #31 on: September 25, 2018, 09:26:47 am »
Where in the spec?

I only see this,

usb_20.pdf
Quote
6.8 USB Grounding
The shield must be terminated to the connector plug for completed assemblies. The shield and chassis are
bonded together. The user selected grounding scheme for USB devices, and cables must be consistent with
accepted industry practices and regulatory agency standards for safety and EMI/ESD/RFI.

Which defaults to what the experts in this thread have been saying, nothing else. :)

FYI, the only possible situation you would EVER lift the shield, is if the shield first connects to a solid metal enclosure, and if the interior is not quite at the same potential because of other considerations that are better solved this way (i.e., by floating the USB by less than a volt).  Example, a high current power supply that has some unavoidable ground side voltage drop, and therefore internal connections must float slightly otherwise they could draw huge ground-loop currents.

If you need to float more than a volt (even a volt is pushing it to begin with), simply isolate the USB channel, using a digital isolator device.  ADI makes all-in-one chips for this, or you can pair a USB-UART interface with a conventional isolator for a somewhat simpler (probably about same cost) solution.  With the isolated circuitry floating, the shield can be tied directly to it without problems, maximizing signal quality.

Tim
« Last Edit: September 25, 2018, 09:31:50 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline bloguetronica

  • Frequent Contributor
  • **
  • !
  • Posts: 354
  • Country: pt
Re: USB Shield Ground Connection
« Reply #32 on: September 28, 2018, 03:21:23 pm »
The cable shield should be grounded (i.e. directly connected to ground) on the host side, as per the USB specifications. On the device side, it should not be connected to GND, except via a 1M \$\Omega\$ resistor with a 100nF capacitor in parallel. Other values are acceptable. There is a large leeway on the values you can choose.

Who says otherwise is wrong. The ground and shield, despite being at the same potential, serve different purposes. The ground wiring is used for power and signal return. The shield is for shielding. If you tie shielding to ground at both ends of the cable, you will defeat the shielding purpose and external noise will couple to ground.

I'll just assume this is what the USB spec says and leave it at that. But I want to second the "different purposes" comment. I have long been under the impression that in circuits where there is a ground line separate from a shield (e.g. not coaxial cable shield) that the shielding should be tied to ground only at one end so that it (1) functions as a shield, and (2) to avoid ground loop problems where two parallel but separate wires are carrying the "same" current.

I don't really understand how it's advantageous to have the 1MΩ || 100nF capacitor at the other end (but I'll trust whoever the EE was that convinced a committee that it was a good idea). I can see it as a "backup" coupling, or to dissipate frequencies high enough to wiggle through the shield, but I'm way out of my depth here to do anything but wildly speculate.
The capacitor only couples AC and the resistor is just a weak tying. This actually prevents ground loops while shorting tiny currents caused by RF noise. Your view is correct. The 1MΩ || 100nF is what I normally use and see in other projects. The values don't have to be that and there is a lot of leeway. As long as it dissipates currents going to the chassis (because the shield is tied there), it is fine.

P. S.: Normally, these currents are due to capacitive coupling in the switched mode power supply, and have to be dissipated throughout the whose system (peripheral devices connected to the USB account for that too).

Hi,

The cable shield should be grounded (i.e. directly connected to ground) on the host side, as per the USB specifications. On the device side, it should not be connected to GND, except via a 1M \$\Omega\$ resistor with a 100nF capacitor in parallel. Other values are acceptable. There is a large leeway on the values you can choose.

Who says otherwise is wrong. The ground and shield, despite being at the same potential, serve different purposes. The ground wiring is used for power and signal return. The shield is for shielding. If you tie shielding to ground at both ends of the cable, you will defeat the shielding purpose and external noise will couple to ground.


So the spec isn't smart. Quite common. Why would one expect from people expertising in digital transmission and bloated software protocols beeing smart in EMC? Most probably this part of the spec was created in a rather (EMC wise) clean environment - and yes it works, so the spec will be. And then there are many monkeys that just implement it that way because every monkey has done so before and no monkey knows why and why they are beating any new monkey that does it differently.



And I have to admit: The spec way works - with devices like mice and keyboards, these often have no shield at all.
Short answer: no. The shield tying to ground on the host side has a logical explanation, and I presented it. This is not just some cargo cult. But fell free to have your opinion on this matter. I take it as it is: just an opinion.

Where in the spec?

I only see this,

usb_20.pdf
Quote
6.8 USB Grounding
The shield must be terminated to the connector plug for completed assemblies. The shield and chassis are
bonded together. The user selected grounding scheme for USB devices, and cables must be consistent with
accepted industry practices and regulatory agency standards for safety and EMI/ESD/RFI.

Which defaults to what the experts in this thread have been saying, nothing else. :)

FYI, the only possible situation you would EVER lift the shield, is if the shield first connects to a solid metal enclosure, and if the interior is not quite at the same potential because of other considerations that are better solved this way (i.e., by floating the USB by less than a volt).  Example, a high current power supply that has some unavoidable ground side voltage drop, and therefore internal connections must float slightly otherwise they could draw huge ground-loop currents.

If you need to float more than a volt (even a volt is pushing it to begin with), simply isolate the USB channel, using a digital isolator device.  ADI makes all-in-one chips for this, or you can pair a USB-UART interface with a conventional isolator for a somewhat simpler (probably about same cost) solution.  With the isolated circuitry floating, the shield can be tied directly to it without problems, maximizing signal quality.

Tim
That is correct. Although, due to capacitive coupling in the switched-mode PSUs that computers normally use, that difference can go as high as 10's of volts AC, if unchecked (i. e., ground not tied to the chassis, at all).

Kind regards, Samuel Lourenço
« Last Edit: September 28, 2018, 03:26:32 pm by bloguetronica »
 

Offline prasimix

  • Supporter
  • ****
  • Posts: 2037
  • Country: hr
    • EEZ
Re: USB Shield Ground Connection
« Reply #33 on: September 28, 2018, 04:02:00 pm »
This old thread resurrect recently and I'd like to rephrase my question about possible issue with USB isolator that is mentioned in another thread (post #1061) and USB isolator as possible solution is also mentioned in this thread (post #31):
Does wrongly wired shield and gnd could be a possible cause of USB isolator failure that is wired as in schematic presented here (IC17)?. It seems that my wiring of shield and gnd is almost correct (I've used a ferrite bead as some monkeys suggested somewhere else :)).

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: USB Shield Ground Connection
« Reply #34 on: September 28, 2018, 05:13:58 pm »
Rules I try to live by when bringing cables into an enclosure:

Cable screens go directly to the enclosure, if at all possible making 360 degree contact (This is especially true for balanced audio, but also RF and most digital control lines).

The internal reference plane (PCB or whatever) connects to the enclosure and thus to the cable  screen, but there is NO common impedance (Do not connect the screen to the internal plane then to the chassis!), this keeps the currents flowing between the various IO cable screens from contaminating your reference plane.

If the signals properties allow it, some lowpass filtering (also returned directly to the enclosure) right at the IO connector is a good thing, but to be effective it really needs an impedance to work against, a few tens of ohms in a small package followed by a 100pF to chassis is MUCH more effective then just the 100pF to chassis), be careful not to upset the line balance here, caps tend to poor tolerance and a T network arrangement with the common cap a decade or so smaller then the one to each signal leg can help a lot when the best you can do is 1 (or 5) percent parts.

Once you get onto the edge of the PCB do some more filtering and whatever is appropriate for ESD measures, it is helpful to bring everything in along one edge of the board if you can as this minimises loop areas.

If you are doing single ended small signal stuff, well, sucks to be you, budget for another few rounds of prototyping! Single ended analogue rates well up the "Doctor, it hurts when I do this..." scale.

Nothing particularly specific to USB, but there is IMHO nothing particularly specific to USB apart from the fact it is not properly balanced and was designed with scant attention to making it easy to filter.

Regards, Dan.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: USB Shield Ground Connection
« Reply #35 on: September 28, 2018, 08:35:50 pm »
Short answer: no. The shield tying to ground on the host side has a logical explanation, and I presented it. This is not just some cargo cult. But fell free to have your opinion on this matter. I take it as it is: just an opinion.

Not having the shield tied to ground on the far side, injects exactly the common mode voltage into the signal lines.

With the bypass cap, that voltage is shunted at AC, but through the impedance of that lone capacitor, which is considerable in the frequency range where ESD and EFT live (10-300MHz).

Consider we have the ESL of the cap, in series with a, say, 2kV 5ns EFT pulse, and we need to attenuate that pulse to below 2V to avoid disturbing the signal.  (The hazard is this: rapid-fire pulses from EFT will disrupt a USB connection, requiring a driver-level reset.)  That's an attenuation ratio of over 1000 (60dB), and assuming the cable's impedance (with respect to free space) is about 150 ohms, that means an impedance under 0.15 ohms.  That's less than 2.4nH at 10MHz, and an impossibly low 80pH at 300MHz.

In short, a single capacitor cannot do an adequate job here!

This is why I at least recommend four caps spaced around the connector shell.  It's still not good enough (maybe ~0.5nH total?), it just has a better chance of working.

Note that ferrite beads on the cable, do very little against EFT, because of two reasons:
1. The pulse is so tall, it saturates the ferrite, only taking a little off the top.
2. To have any benefit, the required series impedance is very large (kohms), which requires many turns on a huge ferrite, or dozens of beads stacked on the cable.
(This is not theoretical: I have done the experiments and measured the waveforms.  No, I don't happen to have hard copies available for release..)

Direct shielding is the only good method to deal with it.


Quote
That is correct. Although, due to capacitive coupling in the switched-mode PSUs that computers normally use, that difference can go as high as 10's of volts AC, if unchecked (i. e., ground not tied to the chassis, at all).

10s of volts AC, in a grounded circuit??  I don't know what part of my message you were replying to.

FYI, metal-enclosure appliances are internally grounded as well, where possible.  For example, computer PSU outputs are grounded to their chassis.  The motherboard isn't usually grounded to its mounting screws, but its connectors (and expansion cards) are.

Audio equipment often isn't, to avoid ground loop, but not completely so.  A typical solution is a bleeder resistor or TVS, to shunt fault currents to ground, while allowing some compliance with input ground loop voltages.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: USB Shield Ground Connection
« Reply #36 on: September 28, 2018, 08:43:04 pm »
Nothing particularly specific to USB, but there is IMHO nothing particularly specific to USB apart from the fact it is not properly balanced and was designed with scant attention to making it easy to filter.

This exactly -- USB was made for one environment and one environment only: point-to-point connection within a fully shielded signal path.  Any interruption in that shield, introduces exactly the voltage drop across the interruption, into the signals.

USB's common mode range is only a volt or two, so you don't have much to work with.  It's not like RS-485 where the receivers can tolerate +/-15V of noise!

The J/K symbols are unsymmetrical, so common mode filtering cannot be employed, at least at any useful cutoff frequency.

The receiver isn't terminated, either -- it has a high impedance -- and because it is a duplex system, you can't rely on one end or the other being a known transmitter (as you can with RS-422).  So even just adding a small CMC (small so it doesn't affect the J/K symbols) has almost no effect, it's working against pin capacitance only.  There's very little impedance to filter against.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline chris_leyson

  • Super Contributor
  • ***
  • Posts: 1549
  • Country: wales
Re: USB Shield Ground Connection
« Reply #37 on: September 28, 2018, 11:19:30 pm »
Quote
Always ground shield directly to circuit ground plane.  Anyone who says otherwise simply isn't smart.  Yes.. you will find appnotes suggesting otherwise.  They aren't smart. Not having the shield tied to ground on the far side, injects exactly the common mode voltage into the signal lines.

Thanks Tim, I couldn't have said it better. At the receive end you have a differential receiver with limited common mode range and any common mode interference can "block" the receiver or inject unwanted signal edges. The screen on the USB cable is part of the "point to point" signal chain and you have to "ground" it at both ends otherwise the shield acts as an extra signal line which becomes a source of common mode interference.

If you've got ground loop problems with USB or any other interface you don't break the cable screens because that will srew up your signal integrity, use an isolator to break up common mode paths.

 

Offline bloguetronica

  • Frequent Contributor
  • **
  • !
  • Posts: 354
  • Country: pt
Re: USB Shield Ground Connection
« Reply #38 on: September 29, 2018, 12:25:54 pm »
Short answer: no. The shield tying to ground on the host side has a logical explanation, and I presented it. This is not just some cargo cult. But fell free to have your opinion on this matter. I take it as it is: just an opinion.

Not having the shield tied to ground on the far side, injects exactly the common mode voltage into the signal lines.

With the bypass cap, that voltage is shunted at AC, but through the impedance of that lone capacitor, which is considerable in the frequency range where ESD and EFT live (10-300MHz).
...
That's why a capacitor and a resistor in parallel are used to tie the shield to ground on the "far" (device) side. As I previously mentioned.

...
Quote
That is correct. Although, due to capacitive coupling in the switched-mode PSUs that computers normally use, that difference can go as high as 10's of volts AC, if unchecked (i. e., ground not tied to the chassis, at all).

10s of volts AC, in a grounded circuit??  I don't know what part of my message you were replying to.

FYI, metal-enclosure appliances are internally grounded as well, where possible.  For example, computer PSU outputs are grounded to their chassis.  The motherboard isn't usually grounded to its mounting screws, but its connectors (and expansion cards) are.

Audio equipment often isn't, to avoid ground loop, but not completely so.  A typical solution is a bleeder resistor or TVS, to shunt fault currents to ground, while allowing some compliance with input ground loop voltages.

Tim
First, emphasis on my words "unchecked (i. e., ground not tied to the chassis, at all)". That means if the circuit is not grounded.

I was just mentioning the reason why the ground should be tied to the chassis in the first place (in several points of the system, BTW). The ground of switched-mode PSUs often show some residual line voltage due to capacitive coupling in the switching transformer, if left floating (a simple concept that my stupid, psychopatic, and very incompetent ex-manager couldn't grasp, because the coupling in a transformer is mainly inductive, as we all know).

Imagine that the primary and the secondary of the transformer are plates isolated from one another. You have a capacitor. Now one on the sides of the primary is referenced to mains, and other might or might not be referenced to ground. The parasitic capacitor between the primary and the secondary will conduct a residual current from the primary to the secondary. If the secondary is not earthed, well, you can see what happens.

P.S.: People don't read the posts all the way in this forum. Misunderstandings are frequent. Just an aside.

Kind regards, Samuel Lourenço
« Last Edit: September 29, 2018, 12:39:48 pm by bloguetronica »
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 10847
  • Country: us
  • $
Re: USB Shield Ground Connection
« Reply #39 on: October 01, 2018, 07:48:37 am »
a resistor is not going to work to short out some kind of inductance present in capacitor leads. How will a resistor short out shit at 300MHz?? and the transformer parasitic C should provide common mode connection. how does the return current flow ? 

but if your transformer parasitics are destroying your isolation then you need to consider using a different transformer because the thing is built wrong, especially if you are going to think about floating shields because of their possible action as a return. you need to get a transformer that has less energy density/physical space. otherwise you get a bootleg lemon. That's like a super model that ends up purging and smoking meth to fit into a bikini its gonna end up weak and frail. You want your shield to protect from transients and all that shit, If your making compromises because of the transformer you got the wrong transformer.

say you treat the windings as parallel plates, you need a return current path.

i wanna know why analog devices did this shit in the ADALMPLUTOSDR though. There is like a 5k between USB shield and PCB GROUND. Pisses me off honestly. I might remove it. '

I thought it was some kind of hack to allow them to sell a severely fucked up PCB but the more I think about it the more I think someone just applied some rule of thumb bullshit between the grounds for no good reason.
« Last Edit: October 01, 2018, 08:10:36 am by coppercone2 »
 

Offline bloguetronica

  • Frequent Contributor
  • **
  • !
  • Posts: 354
  • Country: pt
Re: USB Shield Ground Connection
« Reply #40 on: October 01, 2018, 09:42:18 am »
Hi coppercone2,

This is an inherent characteristic of switched-mode power supplies. The high switching frequency only aggravates the problem, no matter how good the isolation is. Therefore, your secondary circuit will always need to be referenced to chassis/earth. There is nothing wrong with the transformers inside these.

But suppose that we wanted to solve the problem by rebuilding the transformer. Well, you could increase the primary to secondary isolation thickness. That would, in effect, decrease the parasitic capacitance. However, that would cause the efficiency of the transformer to decrease.

Anyway, Analog Devices did it correctly, IMHO. As long you don't have noise injecting to the USB lines, you are OK.

Kind regards, Samuel Lourenço
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 10847
  • Country: us
  • $
Re: USB Shield Ground Connection
« Reply #41 on: October 01, 2018, 09:51:16 am »
look at the tear down video of that differential oscilloscope on the forum, they made a special transformer to eliminate this problem, rather then trying to assault shielding etc

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf