6

I have an SBC with a USB host port, but it is exposed as male header pins rather than a female USB port.

I have soldered female headers to a USB cable and have a working but intermittant connection, I think because the shield was left floating and the cable is somewhat long (7 ft). The connection seems to stabilize when I short the shield to a ground pin on the SBC.

Does it matter if the shield gets shorted to ground on the host side versus the device side? I'm pretty sure you're not supposed to do it on both, but I don't know if it practically matters which side.

ocrdu
  • 9,195
  • 22
  • 32
  • 42
davegravy
  • 359
  • 2
  • 9
  • 1
    The shield must be grounded at both ends, as close as possible to circuit ground, while surrounding the wires. The reason is explained within this answer, https://electronics.stackexchange.com/questions/648991/usb-2-0-hs-common-mode-chokes-on-dp-dm/649065#649065 – Tim Williams Apr 06 '23 at 22:47
  • @TimWilliams Where to connect the shield is never that easy. On many situations the shield must not be connected to ground on both ends, as it depends on the situation you are in. – Justme Apr 07 '23 at 04:34
  • @Justme Could you provide some examples where this is the case? I have never seen a system where ground and shield are not within millivolts or tied directly. – Tim Williams Apr 07 '23 at 05:41
  • @TimWilliams Most often a good system never has return currents in the shield. Connecting the shield to ground on both ends and having a ground wire will result in currents in the shield and is already a ground loop. Just google USB appnotes how to connect the shield for example. But USB is a difficult case as e.g. a mobile phone can be both a host and a device so the best practice will be case specific. For other buses, they simply define that shield must be connected on one end only. For example most RS-485 based industrial buses. – Justme Apr 07 '23 at 06:19
  • @Justme Which return currents, specifically? (signal? power?) And by "good system" you mean USB specifically, or more general? USB signals themselves are common ground; there is absolutely no avoiding a ground loop, short of isolating one or both sides entirely; the question is GND wire, or shield. I've never seen a USB transceiver that claimed wider than 0...VCC common mode range (unlike RS-485 for example, which is made to operate over a wider range). Would you like to move this to a chat? – Tim Williams Apr 07 '23 at 06:40
  • @TimWilliams Shield must not have DC currents; for that there is the common ground wire, for return currents and for common ground reference between devices. I never claimed anything else what you talk about wider common mode range. I simply wanted to point out that blindly saying that USB must always have cable shield connected to ground at both ends is incorrect. The ground return wire obviously needs to be connected between devices. And really, the discussion when to connect shield to ground or how to connect it even indirectly would be endless as it is case specific. – Justme Apr 07 '23 at 06:56
  • Should coax just never be used, then? It's impossible as far as I can tell to use it for DC-coupled signals without also passing DC current through the shield. – Tim Williams Apr 07 '23 at 07:09
  • @TimWilliams Coax is a completely different situation and unrelated to shielding USB and other shielded differential pairs, and it may be even more complex subject where to bolt a coax connector ground to handle return currents, which are mostly high frequency anyway if coax needs to be used. – Justme Apr 07 '23 at 07:23

2 Answers2

9

How to connect cable shields

a.k.a: A short summary of Henry Ott's approach in Electromagnetic Compatibility Engineering (2009).

Foreword

Does it matter if the shield gets shorted to ground on the host side versus the device side? I'm pretty sure you're not supposed to do it on both, but I don't know if it practically matters which side.

This is a dangerous question to ask. On one hand, EMI/EMC textbooks suggest that connecting the shields to chassis at both ends is always the best option from the perspective of RF shielding... On the other hand, for low-frequency applications, the conflicting requirement of avoiding ground loops mandates that the shield should only be connected at one side.

In my original answer, I believed I already carefully navigated around the nuisances of the pros and cons of connecting the shield at one side, or at both sides. Unfortunately, I completely ignored the problem of another related question: the connection between the shields and the circuit grounds. My failure to take that into account caused a lengthy 3-way debate with over 20 exchanged comments.

This new answer has been fully rewritten, and would hopefully address the deficiencies in my original answer. This answer is meant to be a faithful summary of the apporach advocated by Henry Ott in the textbook Electromagnetic Compatibility Engineering (2009), and would serve as a general reference on shield connection to all future questions.

Nearly every single claim in each every paragraph is backed up with quotations from Ott (2009), and please notice me immediately if I made any misrepresentation of Ott. However, disagreements exist even among experts. If you disagree with Ott, debating with me would be unproductive.

Overview

The connection of the shield is subjected to multiple and often contradictory requirements: (1) effective RF shielding, (2) avoiding ground loops that cause low-frequency noise and hum, (3) ESD immunity, (4) radiation due to common-mode current flowing across the shield or chassis.

Shield-to-Chassis Termination

The first problem is whether the shield should be terminated to the chassis, at which location, and whether one-side or two-side termination should be used.

RF Shielding

For high-speed digital and RF systems, including most USB devices, RF shielding (Requirement 1) is usually the most important factor. [1] In this case, the shield of a cable should be seen as an extension of the metal enclosure of the equipment [2] - if a cable is used to connect two devices, this situation is equivalent to a single device inside a shared outer chassis. This necessarily mandates the termination of shield and chassis at both sides. [1][2][3]

Two enclosures connected with a shielded cable in an attempt to turn the two into one continuous enclosure.

Thus, a shield should satisfy the following requirements:

  • Terminate the shield at chassis on both ends, never the circuit ground. [1] The shield-to-chassis connection should be the preferred path of the RF noise current.

  • Make complete 360-degree contact with the chassis. [3]

  • Connect other non-shield conductors (such as power, signal, power ground, signal ground) to the circuit, as usual.

Ground Loop

Connecting the shield at both ends create a ground loop, a small difference of ground potential causes a noise current to flow from one end to another. For high-speed RF and digital systems, this is usually considered to be an acceptable cost - functional RF shielding is much more important than a few millivolts of negligible noise, which is below the logic threshold or can be filtered out. [1]

Unfortunately, for low-frequency or analog systems, the low-level noise can cause serious interference. The classic problem is the 50/60 Hz mains hum in audio. [4] Analog data acquisition systems may experience similar problems.

Coincidentally, this problem also occurs at a much greater scale in industrial installations across buildings where a significant difference of "Earth" potential between locations exist.

Thus, the shield is often connected at one end, and disconnected at the other side. [4] This sacrifices effective RF shielding, reducing the Faraday cage that is capable of blocking high-frequency radiation to a simple electrostatic screen, only capable of blocking low-frequency electric fields, like mains hum.

Terminating the shield to the chassis, instead of the circuit ground, somewhat mitigates but does not solve the problem of the lack of RF shielding. [5]

Best of both worlds?

If terminating the shield at both sides is required for high-frequency shielding, while terminating the shield at one side is required for low-frequency analog systems to avoid mains hum. What is the solution for mixed-signal systems? Is there a compromise between Requirement 1 and Requirement 2?

Three options exist:

  1. Use a shielded twisted pair. Twisted pair, even unshielded, provides inherent suppression of electromagnetic interference, especially when combined with differential signaling. This way, the necessity of an RF shield is reduced. Thus, the shield for the twisted pair can be dedicated for low-frequency shielding only, and still providing acceptable EMI/EMC performance. [4] Nevertheless, when there's a chance to connect the shield at both sides properly, RF suppression would be even higher.

This possibly explains the reason that disconnecting the USB shield at one side is not a deal-breaker, despite that it's not elegant in theory.

  1. Use a large number of SMD capacitors to connect the chassis and shield. This way, the shield is disconnected at DC and low frequencies, but it's reconnected at RF. However, to be effective at RF, the parasitic inductance of the capacitors must be as low as possible. [7] Thus, it needs to be considered on a case-by-case basis, and it's a non-standard solution.

  2. Use a triaxial cable with two layers of shields, one is connected at one end for low-frequency shielding, another is connected at both ends for RF shielding. This requires the use of awkward and non-standard cables and is unpopular today. [8]

Chassis-to-Circuit Ground Connection

The next problem is whether the chassis should be connected to the circuit ground (usually the ground plane of a circuit board), and if so, at which location. Because the shield is already connected to the chassis, the problem of whether the shield should be connected to the circuit ground is also implied here.

Connection vs Termination

Didn't I just write that "terminate the shield at chassis on both ends, never the circuit ground"? Why am I now discussing the connection from shield to the circuit ground?

There's a difference between termination and connection. Any electrical path would be a connection, but termination emphasizes the first location a contact is made. A shield should first and foremost be connected to the chassis via a solid, low-impedance, 360-degree bond to the chassis. This is the preferred path of current flow in the shield.

But an eventual electrical connection between shield and circuit ground (as a result of bonding the circuit ground to the chassis) is still permitted. For example, a coaxial connector should ideally be screwed onto the chassis directly, before the same "shield/ground" and center conductor wires reach the circuit board.

ESD Immunity

Theoretically, an RF shield works by itself and does not need an electrical connection to anything else. From the perspective of RF interference only, the shield can be left floating. However, bonding circuit ground and chassis is often desirable due to other practical problems, mainly ESD.

Imagine a circuit board fully enclosed by a Faraday cage. When the cage is zapped by ESD, although the absolute potential of the circuit relative to the Earth ground increases, the relative potentials remain the same, and the circuit board is perfectly protected. Unfortunately, real circuit boards have external cables attached, and one of the cable may attach the circuit ground to an external ground, possibly an Earth ground.

After the metal enclosure is zapped by ESD, the circuit ground potential is held by the cable, enabling a secondary ESD strike may develop from the chassis to the circuit ground, finally leaving the system via an attached cable. It may crash the system in this process.

Bonding the chassis and circuit ground with a solid connection is often used as the solution of this problem to satisfy Requirement 4.

Location of Bonding

The location where the bonding is made requires attention.

Due to the flow of current, there exists a voltage gradient across the circuit ground plane of the circuit board. If the ground plane is bonded to the chassis at the right side of the board, while the cable enters at the left side of the circuit board, this potential difference would cause a common-mode noise current to flow, degrading the EMI/EMC performance of the system. [9]

To mitigate this problem, Ott recommends creating a separate area on the circuit board, dedicated to I/O connectors. At this I/O area, a solid connection is made between the chassis and the circuit ground, simultaneously, the cable shield is terminated to the chassis at the same location. [10] By connecting the shield, chassis, and circuit ground at nearly the same location, a voltage gradient is largely avoided.

This area of the PCB also uses its own ground plane, largely but not fully isolated from the main circuit ground plane. Only a small bridge is used to connect both planes, allowing high-frequency signals to flow on top of the bridge without crossing a slot in the plane, while providing a degree of isolation between the circuit ground of chassis gruond.

This is an attempt to solve the problem of making a shield-to-chassis connection to be the preferred path of the RF noise current. In an old-school design the connectors are screwed onto the chassis, so a shield-to-chassis connection is almost always the prefered path for noise current. But in modern designs, connectors are mounted onto the circuit board, not the chassis. Thus, avoiding injecting noise from the shield to the circuit ground becomes a problem. The isolated I/O ground plane is the author's best attempt to solve this problem.

Also, note that other connections between the chassis and the circuit boards are permitted. But they cannot replace the connections at the I/O area of the PCB, which is of crucial importance.

In my observation, the design of desktop computer motherboards largely reflects the principles behind this method. the motherboards come with a separate I/O cover. When the board is installed, the I/O cover is pushed forcefully onto the chassis.

Perfect Shield Connection

To summarize, if you're connecting two high-speed digital devices together (with no analog or mixed-signal circuit, and both with metal chassis), according to Ott, theoretically, the purest way to do that would be:

  1. Mount the connector onto the chassis, creating a solid shield-to-chassis termination.

    Ideally, the connector should be mounted directly onto the chassis first. For many coaxial and circular connectors, they can be screwed onto the chassis directly.

    If the connectors are mounted onto the circuit board, use metal I/O cover, EMI gaskets, grounding fingers, or other means to create a solid connection between the metal shell of the connector and the chassis.

    If the above is not possible, the I/O ground plane to chassis connection serves as the final fallback. At the very least, multiple metal screw standoff is used.

  2. Create a seperate I/O area and I/O ground plane on the circuit board, allowing the chassis-to-circuit ground connection to be made with minimum common-mode current flow.

    The I/O area of the PCB also uses its own ground plane, largely but not fully isolated from the main circuit ground plane. Most copper between the two regions are removed, only a small bridge is used to connect both planes, allowing high-frequency signals to flow on top of the bridge without crossing a slot in the plane, while providing a degree of isolation between the circuit ground of chassis ground.

  3. Connect other non-shield conductors (such as power, signal, power ground, signal ground) to the circuit, as wires or traces.

This complete my summary of Henry Ott's Electromagnetic Compatibility Engineering, the following sections are my own opinions.

Practical Issues

In the context of USB, there are many practical issues that force designers to devitate from the ideal solution. My observation is that, they include:

  1. It's difficult to terminate shield to chassis correctly. Sometimes designers simply have no control over the I/O area. Furthermore, USB connectors are tiny, especially the new Type C connectors, using gaskets or ground fingers is likely not practical. The Ott's I/O-area solution is also a mitigation more than a solution.

  2. For the ideal method to work, both sides of the shield must be designed correctly, with the correct bonding of circuit ground, chassis, and shield. If one side is not correctly designed, sometimes beyond our control, a common-mode noise current flows and creates increased interference, as previously described.

  3. The use of analog and mixed-signal circuits in USB device, such as audio or data acquisition, may rule out connecting the shield at both sides as an option, compromising RF shielding. Thanksfully, due to the use of shielded twisted pair in USB, even with a compromised shield, the EMI/EMC performance may still be acceptable, it depends. Galvanic isolation may be an alternative solution.

  4. Many devices have no metal enclosure at all, invalidating the entire method.

No Metal Enclosure

The worst-case (yet common) scenario is when there's no metal enclosure.

In this case, it's impossible to divert the noise current on the shield away from the circuit board. If a connection is still made from the shield to the circuit ground, noise is injected directly into the circuit board's ground plane. Combined with some mixed-signal or analog circuits on the board that are vulnerable to ground loop, the situation becomes a total mess.

As a result, people invented various workarounds to overcome this problem, they include:

  1. Disconnecting the shield entirely.

    Idea: Stop noise current from the shield from entering circuit ground. Flawed.

  2. Use RC circuits to connect the shield to the circuit ground.

    Idea: Create a high-pass filter to stop low-frequency noise current, such as mains hum, from flowing on the shield or entering the circuit ground. Flawed.

  3. Use ferrite beads to connect the shield to the circuit ground.

    Idea: Create a low-pass filter to stop high-frequency noise current, such as EMI, from entering the circuit ground. Flawed.

  4. Connect shield directly to the circuit ground.

    Idea: Maintain shield and circuit ground at the same potential. Flawed. It violate all of Ott's rules. But better than you think, and is a suitable compromise for many applications.

Unfortunately, these methods may work in some particular situations, but each has its flaws.

The source of my claim was Tim Williams, one participant of the previous debate in the comment section, he was already known to me as a prolific poster on the EEVblog forum, and I remember seeing his extensive writing on the subject of the USB shield connection.

The most important flaw is that if the shield and circuit ground are isolated from each other via capacitors or ferrite, during a ESD strike, a large potential difference is created between the shield and circuit ground, enabling a ESD strike across them, and causing the device to fail ESD compliance tests. In Williams' anecdotal observations, floating shield, RC and ferrite bead solutions performs poorly under ESD strikes, and is a common cause of failure of ESD compliance tests. After bonding the shield directly onto the circuit ground, these devices would pass ESD tests immediately. Whenever the topic of splitting USB shield and circuit ground is brought up, he would always say, "don't do it, it simply cannot pass ESD tests."

Another flaw mentioned by Williams, if I remember correctly, was the issue of common-mode radiation when the cable shield and power/signal ground is not at the same potential. The potential difference across the two conductors create a noise current flow throughout the entire cable's length, creating common-mode radiation. On the other hand, making a solid connection between the shield and the circuit ground suppresses this potential difference, reduce radiation (of course, this is not the only possible failure mode, and I can imagine that there are other situations that it may create the opposite situation).

Another flaw is that isolating the shield from the circuit ground is in a violation of the USB standard. The USB Type-C specification includes a blanket prohibition against these practices (On the other hand, the USB Type-C specification also includes extensive description on bonding the shield and the chassis, thus, I imagine that the technical committee behind USB follows a method similar to the one proposed by Henry Ott).

  1. The receptacle shell shall be connected to the PCB ground plane.

As a result, for a pure digital USB device, without analog or mixed-signal circuits, without a metal chassis, connecting the shield directly to the circuit ground, while violating all of the rules, in actually a suitable compromise for many applications with justification. And indeed, many USB dongles are designed like that. When you don't have a choice, a straight connection may be the only compromise here.

If one decides to use RC and ferrites solutions, solving the ESD problem is left as an exercise for the reader.

Thus, USB shield connection appears to be a rather "polarized" problem: if you're doing it wrong, you'd better to do it wrong all the way. If you're doing it right, you'd better to do it right all the way. It's difficult to take the middle ground.

On Holy Wars and a Plea for Peace

I have a personal explanation of why EMI/EMC problems trends to generate flame wars - the gap between idealized best practices and actual systems. The problem of all "ideal" approaches is that, they must be followed precisely and exactly, and all the necessary preconditions must also be satisfied for their assumptions to be valid. Any deviation would change their applicability and result.

Using another problem in PCB design as an example: In PCB design, there's a rough consensus that, if the PCB is already partitioned into digital and analog sections, the return current in each section is mostly contained in their own area. Thus, unless very high isolation is required, splitting the analog and digital ground planes is often counterproductive. Hence, people start to describe it as an anti-pattern and is something to be avoided - it's better to avoid the gaps in the ground plane to reduce EMI, and "don't split planes" becomes a slogan. But if a circuit board is not following the assumption behind this methodology to begin with (not having partitioned sections), splitting the ground plane may actually improve performance - an apparent contradiction. Soon, another fraction of designers would soon to start attacking the supposedly "the best practices."

But it's not the theory that is in fault, it's just that it has to be followed systematically.

I believe this scenario is extremely common in the field of EMI/EMC. Since every system has quirks and limitations, it creates a lot of contradictory observations. Thus, it generates never-ending debates and controversies.

References

[1] Page 91.

At frequencies above about 100 kHz, or where cable length exceeds one twentieth of a wavelength, it becomes necessary to ground the shield at both ends. This is true for either multiconductor or coaxial cables. [...] It is therefore common practice at high frequency, and with digital circuits, to ground the cable shield at both ends. Any small noise voltage caused by a difference in ground potential that may couple into the circuit (primarily at power line frequencies and its harmonics) will not affect digital circuits and can usually be filtered out of rf circuits, because of the large frequency difference.

[2] Page 90.

If you think of a cable shield as being an extension of the enclosure’s shield, then it becomes clear that the shield should be terminated to the enclosure not to the circuit ground.

[3] Page 555

Think of a cable shield as an extension of the shielded enclosure. Therefore, how effective the shield is has a lot to do with how well the cable shield is terminated to the enclosure. Use a 360-degree termination to the enclosure, not to circuit ground.

[4] Page 88

The main reason to shield cables at low frequency is to protect them against electric field coupling primarily from 50/60-Hz power conductors. As was discussed in Section 2.5.2, a shield provides no magnetic field protection at low frequency. This points out the advantage of using shielded twisted pair cables at low frequency: The shield protects against the electric field coupling and the twisted pair protects against the magnetic field coupling. Many low-frequency circuits contain high-impedance devices that are susceptible to electric field coupling, hence, the importance of low-frequency cable shielding.

At low frequency, shields on multiconductor cables where the shield is not the signal return conductor are often grounded at only one end. If the shield is grounded at more than one end, then noise current may flow in the shield because of a difference in ground potential at the two ends of the cable. This potential difference, and therefore the shield current, is usually the result of 50/60-Hz currents in the ground. In the case of a coaxial cable, the shield current will produce a noise voltage whose magnitude is equal to the shield current times the shield resistance, as was shown in Eq. 2-33. In the case of a shielded twisted pair, the shield current may inductively couple unequal voltages into the twisted pair signal conductors and be a source of noise (see Section 4.1 on balancing

[5] Page 89.

Grounding the cable shield at only one end to eliminate power line frequency noise coupling, however, allows the cable to act as a high-frequency antenna and be vulnerable to rf pickup. AM and FM radio transmitters can induce high-frequency rf currents into the cable shield. If the cable shield is connected to the circuit ground, then these rf currents will enter the equipment and may cause interference. Therefore, the proper way to terminate the cable shield is to the equipment’s shielded enclosure, not to the circuit ground. This connection should have the lowest impedance possible, and the connection should be made to the outside of the shielded enclosure.

[6] Page 78.

A shielded twisted pair has characteristics similar to a triaxial cable and is not as expensive or awkward. The signal current flows in the two inner conductors, and any induced noise current flows in the shield. Common- impedance coupling is therefore eliminated. In addition, any shield current present is equally coupled (ideally), by mutual inductance, to both inner conductors and the two equal noise voltages cancel. An unshielded twisted pair, unless its terminations are balanced (see Section 4.1), provides very little protection against capacitive (electric field) pickup, but it is very good for protection against magnetic field pickup. The effectiveness of twisting increases as the number of twists per unit length increases. When terminating a twisted pair, the more the two wires are separated, the less the noise suppression. Therefore, when terminating a twisted pair, shielded or unshielded, do not untwist the conductors any more than necessary to make the termination.

Twisted pair cables, even when unshielded, are very effective in reducing magnetic field coupling. Only two conditions are necessary for this to be true. [...]

[7] Page 92.

At low frequency, a single-point ground exists because the impedance of the capacitor is large. However, at high frequency, the capacitor becomes a low impedance, which converts the circuit to one that is grounded at both ends. The actual implementation of an effective hybrid cable shield ground may, however, be difficult, because any inductance in series with the capacitor will decrease its effectiveness. Ideally, the capacitor should be built into the connector.

[8] Page 93

2.15.2.4 Double Shielded Cable Grounding. Two reasons to use a double- shielded cable are as follows: One is to increase the high-frequency shielding effectiveness; the other is when you have both high-frequency and low- frequency signals in the same cable. In the first case, the two shields can be in contact with each other; in the second case, the two shields must be isolated from each other (often referred to as a triaxial cable). Having two shields that are isolated from each other allows the designer the option of terminating the two shields differently. The outer shield can be terminated at both ends to provide effective high-frequency as well as magnetic field shielding. The outer shield is often also used to prevent radiation from the cable, which results from high-frequency common-mode currents on the cable. The inner shield can then be terminated at only one end, thus avoiding the ground-loop coupling that would occur if grounded at both ends.

[9] Page 131

Chassis ground is any conductor that is connected to the equipment’s metal enclosure. Chassis ground and signal ground are usually connected together at one or more points. The key to minimizing noise and interference is to determine where and how to connect the signal ground to the chassis. Proper circuit grounding will reduce the radiated emissions from the product as well as increase the product’s immunity to external electromagnetic fields. Consider the case of a PCB, with an input/output (I/O) cable, mounted inside a metallic enclosure as shown in Fig. 3-24. Because the circuit ground carries current and has a finite impedance, there will be a voltage drop VG across it. This voltage will drive a common-mode current out on the cable, and will cause the cable to radiate. If the circuit ground is connected to the chassis at the end of the PCB opposite the cable, then the full voltage VG will drive the current onto the cable. If, however, the circuit ground is connected to the enclosure at the I/O connector, the voltage driving common-mode current out onto the cable will ideally be zero. The full ground voltage will now appear at the end of the PCB without the cable connection. It is, therefore, important to establish a low-impedance connection between the chassis and the circuit ground in the I/O area of the board.

Another way to visualize this example is to assume that the ground voltage produces a common-mode noise current that flows toward the I/O connector. At the connector, there will be a current division between the cable and the PCB ground-to-chassis connection. The lower the value of the board ground to chassis impedance, the smaller the common-mode current on the cable will be. The key to the effectiveness of this approach is achieving a low impedance (at the frequencies of interest) in the PCB-to-chassis connection. This method is often easier said than done, especially when the frequencies involved can be in the range of hundreds of megahertz or more. At high frequency, this implies low inductance and usually requires multiple connections.

Establishing a low-impedance connection between the circuit ground and the chassis in the I/O area is also advantageous with respect to radio frequency (rf) immunity. Any high-frequency noise currents induced into the cable will be conducted to the enclosure, instead of flowing through the PCB ground.

[10] Page 625

A major source of radiation from electronic products is due to common-mode currents on the external cables. From an antenna theory perspective, a cable can be considered as a monopole antenna, with the enclosure being the associated reference plane. The voltage driving the antenna is the common-mode voltage between the cable and the chassis. The reference for the cable radiation is therefore the chassis and not some external ground such as the earth.

Because the potential difference between the cable and chassis should be minimized, the connection between the PCB ground and the chassis becomes important. The internal circuit ground should be connected to the chassis at a point as close to the location that the cables terminate on the PCB as possible. This is necessary to minimize the voltage difference between the two. This connection must be a low-impedance connection at radio frequencies. Any impedance between the circuit ground and the chassis will produce a voltage drop, and will excite the cables with a common-mode voltage, which causes them to radiate.

[11] Page 554

比尔盖子
  • 6,750
  • 2
  • 27
  • 58
  • 1
    Excellent descriptions and diagram. I wish I could upvote a second time! – Tim Williams Apr 07 '23 at 12:34
  • Good write-up. But I don't really understand one thing: In a situation where one device lacks a dedicated chassis, you say that leaving that end of the shield open prevents a ground loop. IMO, this is not true. As long as there is any path for 50 Hz current that includes the signal wires, you will have a "ground loop". I see no situation, where leaving one end of the shield open, prevents this loop. – tobalt Apr 07 '23 at 16:26
  • 1
    @tobalt You're right. The existing description does not apply to a device without a dedicated chassis. (2) no chassis, and (3) ground loop are meant to be separate conditions, (3) is not a result of (2). I've renumbered "(2)" to "(4)" to avoid this confusion. – 比尔盖子 Apr 07 '23 at 16:53
  • That image applies to USB poorly. For example, you may have a device with plastic case or metal case. And with USB, you have ground wire for power and data. In the picture, there is only a signal wire and shield, the return path for signal is via long route through PCB, along chassis and shield. Which is not suitable to high speed digital signals at all. – Justme Apr 07 '23 at 17:10
  • @Justme This image is a schematic representation of the outer shield's connection only. The center conductor represents any other non-shield conductors, including power, power grounds, signal, and signal grounds. In other words, they're connected to their destination at the circuit board as usual, possibly even circuit ground or the ground plane - It would be clearer if the diagram shows multiple wires, unfortunately it was not my image. - but fundamentally I don't see anything incorrect. – 比尔盖子 Apr 07 '23 at 17:23
  • @Justme Of course, practically speaking, for USB, you usually don't have the chance of making a shield-to-chassis connection first before making the second signal ground connection, since most connectors cannot be mounted onto the chassis. But this problem has already been covered by the first point of my listed "non-idealities". – 比尔盖子 Apr 07 '23 at 17:26
  • @比尔盖子 That picture is from ESD section to use shield to extend the enclosure. You need to look at other pictures that actually relates to grounding the shield at both ends or not. 2-28, 2-46, . Even a quote from book, "the shield should be terminated to the enclosure, not signal ground". For low frequencies that is. And hybrid solutions are required for USB, as it has high speed data and and lower frequency power usage in the same cable. So sure, USB cable shield might be best to connect to device metal case, but it may not be wise to connect USB ground wire to shield at the device - depends. – Justme Apr 07 '23 at 17:57
  • @Justme The image from the ESD protection chapter just happens to give a clear visual representation, but exactly the same principle for RF shielding, "use shield to extend the enclosure", is also described by the author in the RF shielding chapters. Page 90, "If you think of a cable shield as being an extension of the enclosure’s shield, then it becomes clear that the shield should be terminated to the enclosure not to the circuit ground." The same is also repeated in Page 510, Page 511, Page 578, and Page 770. – 比尔盖子 Apr 07 '23 at 18:02
  • So basically, you are agreeing, if I say that USB cable shield foil must not be connected to USB cable black ground wire, at both ends of the cable? – Justme Apr 07 '23 at 18:04
  • @Justme I'm saying that in the ideal case (not considering mixed-signal or plastic enclosure), the USB cable shield foil should be connected to the chassis at both sides, and the USB cable signal return should be connected to the circuit board at both sides. However, due to the bounding between the circuit board's ground plane, preferable at the I/O area of the board, the shield foil and the circuit board will still be connected, but the noise current prefers the shield-to-chassis connection. This is described in page 625, and also as Figure 16.2. – 比尔盖子 Apr 07 '23 at 18:24
  • @Justme Furthermore, Page 486 and Figure 12-15 further describes the technique of using a separate I/O ground plane (somewhat but not fully separated from the main ground plane) and bounding the chassis and circuit ground at this location to further making shield-to-circuit ground a less preferred path. – 比尔盖子 Apr 07 '23 at 18:26
  • @Justme Also, speaking of isolating the shield, I already devoted three paragraphs on various techniques, including using many capacitors, using RC networks, using ferrite beads, or using triaxial cables (not relevant for USB). Two of them are also described by Ott as well. But I warned that all of these are relatively uncommon, implying that they should be used carefully on a case-by-case basis (largely due to Tim Williams's personal observation that RC and ferries cause many ESD test failures, and that a direct bound gives the best result). But I did mention them as potential approaches. – 比尔盖子 Apr 07 '23 at 18:36
  • @Justme Correct, cable shield connects to metallic enclosure; which in turn is connected to PCB GND, and thus signal GND. It doesn't matter where; this might occur through mounting screws, or directly at the connector. Occasionally it might even occur through several boards and connectors, e.g. a PC's ground reference is in the PSU. The case for plastic enclosure, where the PCB is the enclosure for EMI purposes (shielding), simply ties shield and GND wire to GND plane at the connector; this is applicable to probably >90% of peripherals? – Tim Williams Apr 08 '23 at 00:09
  • Note that all of this discussion hasn't even mentioned the particulars of USB; it hasn't mattered if it's single-ended or differential, one wire or many. Opening shield is more tolerable in certain differential cases, but USB is most certainly not: the J and K symbols drive the common mode of both lines together. The common mode impedance therefore MUST be respected, and that can only be achieved through (AC) grounding the shield to the driver. The GND wire has its own normal and CM impedances to shield, which will not respect this requirement. – Tim Williams Apr 08 '23 at 00:12
  • @TimWilliams But that is my point, nobody forces you to connect PCB signal/power ground to metallic chassis through mounting holes. The PCB digital ground can be left disconnected from chassis. Why do you think it is alwas so and why would you even do it? It may be better for EMI/EMC to use capacitors or RC network to tie digital ground to chassis ground. Most device data sheets, app notes, and EMI/EMC measurements suggest this instead of bolting the shield and digital ground directly together like you say. – Justme Apr 08 '23 at 07:01
  • 1
    @Justme "Most device data sheets, app notes suggest this" For EMI/EMC advise, I consider them untrustworthy, many are just repeating questionable rules of thumb. Just a few examples, many suggest the use of 0.1 uF and 1 uF capacitors per pin - without any consideration resonance or target impedance (FPGAs are exceptions). Many suggest the use of a split analog-digital ground plane - perhaps reasonable when the board contains only a single converter or if high isolation is required, but otherwise it's usually an EMC anti-pattern to be avoided due to return current discontinuity. – 比尔盖子 Apr 08 '23 at 07:24
  • @Justme EMI/EMC measurements suggest this Now, this is a much more trustworthy source. I totally believe that in many cases, bolting the shield and digital ground directly together would cause worse EMI/EMC performance. This problem is also addressed by Ott's book. Ott states the location of the bolting can be critical. If they're joined incorrectly, for example at the far-end of the I/O entry location, the common-mode current may flow across a longer path and creates EMI/EMC problems. However, if done properly and they're joined at the I/O panel, performance should be satisfactory. – 比尔盖子 Apr 08 '23 at 07:29
  • @Justme Right now I'm writing a new answer that hopefully will address all the questions that have been discussed here. – 比尔盖子 Apr 08 '23 at 08:16
  • @Justme Why do PCs tie it? Well, we might not have an answer to this as that probably got set in stone eons ago (i.e. ask an original IBM PC designer; everyone thereafter had no choice but to repeat it), but for my interests in doing so would depend upon controlling EMI inside the enclosure (e.g. solid grounds to return CM currents on ribbon cables etc.; a ferrite bead should likely be used on said cable to reduce the current), and making fusing effective in case of internal faults (e.g. a daughterboard shorts to chassis, blowing its backplane fuse, all is good). – Tim Williams Apr 08 '23 at 08:34
  • In the EMI case, of course that can (and often does!) use an R+C or such between signal and chassis grounds. Any given board doesn't need to be DC chassis grounded, but such a connection must exist somewhere for this protection method to work. – Tim Williams Apr 08 '23 at 08:37
  • @TimWilliams I don't get if you are joking or not, but IBM PC was released 14 years before design of USB started. Anyway, given the simple scope of the question, answering how the shield should be connected on the SBC host is enough, and let the USB devices do what they see is best - even much of this answer is beyond the scope and irrelevant to the question asked. – Justme Apr 08 '23 at 09:18
  • 1
    @Justme I don't see any joke here. He was asking the question, "if bonding the chassis and circuit ground at DC is not required, and alternative RC connections are possible, then why are nearly all modern desktop PCs designed this way?" (and as a side-effect, also connecting USB shield and circuit ground at the host side?). Naturally, it was because the original IBM PC did it that way, and everyone else just copied it from generations to generations. And why did the IBM PC do that? It's lost in time and we can only speculate. – 比尔盖子 Apr 08 '23 at 09:45
  • @比尔盖子 "IBM PC" did not have USB because USB was designed 14 years later. So an "IBM PC" could not connect USB shield anywhere. The "IBM PC" has nothing to do with USB. – Justme Apr 08 '23 at 10:51
  • 1
    @Justme The logic of what I said is: (1) IBM PC introduced the practice of bonding the motherboard circuit ground and chassis, as a DC short, (2) this practice was copied by all manufacturers throughout history, (3) USB was introduced, (4) Like other shielded ports, USB shield is bonded to the chassis (5) Naturally, USB shield is now automatically connected to the motherboard ground, not as an explicit design, but as a natural result of the fact that the motherboard circuit ground and chassis are already bonded, a decision made by the IBM PC. [lightly edited: RM] – 比尔盖子 Apr 08 '23 at 11:25
  • 2
    ADVICE IN GENERAL: The system has noticed the very long comment section and is suggesting moving it to chat. It's useful. I ignored the suggestion. BUT please ensure comments are useful, minimal and of a clarifying nature where possible. As ever, answer related information should go into the answer to esure it is easily accessible to others and not lost if the comments get removed. || I lightly edited a comment - nothing rude or impolite was said BUT long experience shows that it's easy to cause offence in to and fro discussion. PLEASE ensure all comments are not able to be taken wrongly. – Russell McMahon Apr 08 '23 at 12:29
  • @Justme The answer has been completely rewritten, this hopefully would address all of the previous questions mentioned in the debate. The citations should've been more details but it's already over the maximum character limit. In the next update I plan to move citations to a separate answer. – 比尔盖子 Apr 09 '23 at 08:14
  • @TimWilliams The answer has been completely rewritten, this hopefully would address all of the previous questions mentioned in the debate. The citations should've been more details but it's already over the maximum character limit. In the next update I plan to move citations to a separate answer. – 比尔盖子 Apr 09 '23 at 08:14
  • Amazing. I need to re-read a few times (I'm inexperienced) but this seems comprehensive. In my specific case neither host nor device has a metal enclosure and I have no idea what the device side has internally. Sounds like I am in "No Metal Enclosure" option #4 territory. – davegravy Apr 09 '23 at 13:29
3

For your case, do what USB hosts like PCs do - connect shield to ground at host, and let the USB devices do what they do.

If you look at a standard PC as an example, the connector on PC motherboard or front panel will have the connector metal shell connected to chassis ground, and on the USB cable the connector metal shell connects to the cable shield.

The USB cable itself has the shield connected to metal shells of the USB connectors. Therefore it is up to the USB devices to define how they connect to the cable shield, if at all.

Many USB devices do not connect ground directly to shield due to electromagnetic emissions and signal integrity issues. Some might use a capacitor or ferrite bead to connect to the shield, or it may be directly connected or left disconnected - it depends on many things such as what device it is, does it have a separate mains supply or not, or does it have external connections to other equipment or not. So the best way to connect the shield depends what device are you making - a mouse, a printer, or an Ethernet dongle

But on a simple case of just being a simple USB host, they typically connect the connector metal case, i.e. the cable shield, directly to USB host ground.

So in this case, you should connect the USB cable shield to SBC ground directly.

Justme
  • 147,557
  • 4
  • 113
  • 291
  • Note that an unconnected shield might as well not be there, i.e. exterior (common mode, usually from outside noise sources e.g. radio, ESD) currents are permitted to flow directly into the wires within, as if they were unshielded twisted pair. (A small advantage does remain over true UTP, which isn't important here.) The wires within a USB cable are not tightly coupled to each other (i.e., not nearly as well coupled as the wires to the shield), so these exterior currents sum with signal currents, reducing receiver CM range and introducing EFT and ESD currents to them. – Tim Williams Apr 07 '23 at 08:05
  • Whereas if the shield is grounded at both ends -- at the very least at AC, with multiple bypass caps in parallel spread around the connector -- these currents are directed safely into the circuit ground plane where they do not disturb signal quality. Thus is is always better to ground the shield. Whether the shield carries DC currents isn't important to signal quality, but direct grounding it is the easiest way to ensure AC grounding. – Tim Williams Apr 07 '23 at 08:06
  • @TimWilliams Why do most USB application notes say connecting shield directly to ground is a bad thing then? If you connect shield and ground wire directly to USB device ground plane, any noise on ground plane will couple to shield and it radiates like an antenna. That's why the "blanket statement" is that shield must not be connected at both ends, unless there is a good reason to do so. And that's why there is both a ground wire, and just a shield. – Justme Apr 07 '23 at 08:23
  • Application notes are at best a mediocre reference; I have seen more than my fair share of factually inaccurate ones. They are best used as a starting point, as one begins to develop more complete knowledge of the system in question. If one lacks that information, it's a relatively safe "default" position to take, but you will rarely if ever find complete truths in them. Case in point, they rarely if ever give references to support their claims; I suspect most obtain the "don't ground shield" point from the USB standard itself, which simply leaves it open to the engineer. – Tim Williams Apr 07 '23 at 08:54
  • The specific cases where USB would be used without a grounded (to circuit) shield, is when it's grounded to a metallic enclosure (usually with spring contacts), as in a desktop PC for example. In that case, the CM voltage between case and circuit GND is small (even 100s mV would probably suggest something's going horribly wrong?), and AC voltages within the enclosure should be modest as well (under a volt?). This is well within USB's CM range, and ESD is handled by the chassis, so it works. When the PCB is the chassis, they must be grounded one in the same. – Tim Williams Apr 07 '23 at 08:56
  • @TimWilliams I never said it is simple, I just said connecting the shield always from both ends to ground is usually not correct and not done. And PC is a poor example, as it is a host and it would anyway connect USB shield and USB ground together right on the motherboard. It is the USB device side that should then be very careful how it needs to connect to the shield, depending on many factors, but blindly connecting USB shield and USB ground together on the USB device side is usually not best way to connect them. – Justme Apr 07 '23 at 09:08
  • Why would it be different for host and client? The system is linear and reciprocal. – Tim Williams Apr 07 '23 at 09:09
  • The shield being at (DC) ground potential doesnt imply they shall be shorted right at the connector. In fact, they serve entirely different RF purposes, so they should be RF decoupled at the connector...The shield should be RF bonded to the chassis and Ground should connect to circuit ground. Yes, there may be cases where chassis doesn't exist or is the circuit ground, but these cases aren't general. Therefore +1. The PC example is a good case in point @TimWilliams – tobalt Apr 07 '23 at 09:10
  • Still what I wrote above doesn't preclude a shield connection on both ends. Clients (devices) can and should connect it to their chassis if available. Or leave it open, or terminate it. That depends. @Justme – tobalt Apr 07 '23 at 09:12
  • Indeed as @tobalt indicates, note I haven't insisted upon DC grounding here, and in fact what I mean is at least AC grounding, since signal quality is the material issue; but I haven't been shown a concrete example where they cannot be tied at DC, so I see no reason to insist others should do otherwise. – Tim Williams Apr 07 '23 at 09:14
  • 2
    @TimWilliams I think to have a fruitful discussion on where/how to connect USB shields, one must use clear language. Be explicit if you talk about DC/RF connection and ideally not use the rubber word "ground" If you open a chat somehow, I'd be interested to participate. I think this issue also deserves a comprehensive EE.SE wiki question. – tobalt Apr 07 '23 at 09:20