Author Topic: On device's side, should I connect USB cable shielding to the black wire?  (Read 2226 times)

Dave and 8 Guests are viewing this topic.

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22047
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
no. if you have at some moment a bad power supply on pc/laptop side and the target is not floating, you're gonna burn the laptop. i changed southbridge on some laptops with this type of connection.

I had that happen once!  It's entirely plausible what happened is, the power supply delivered a sudden short circuit (causing transient reversal at the motherboard), or with frayed ground and a ground loop, exposed to double nominal input voltage, in any case damaging the power distribution, and cascade failure ensues.  In my case, it wasn't the SB but the PCIe expander chip (3.3V supply!) that got nuked.  At this point, whatever gets damaged is pretty random I'd say.  In my case, the computer was completely isolated, no outside connections besides the supply.  Whether grounding might exacerbate a failure mode like this, or not, I think it's plausible that it doesn't matter, but it depends on the particular design of the system.

The exact problem I had, was the power supply output cable (the usual triax double-braid power cable) was frayed inside the PSU box, momentarily shorting out and sparking.  It seems the motherboard didn't appreciate this too much.  I resected the cable, strain-relieved it better (read: taped some extra loop length onto the outside :) ), replaced the motherboard, and that laptop is... still working today, actually.

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: 22047
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Even your concrete example may have hidden details which may lead to different results and as you said you're understand it and ready for surprises despite the fact that you had good experience with it.

But was that what was asked about?

Take the first question:

Quote
1. What is the ground wire referenced to / paired with?

Do you need reference to the full schematics, mechanical diagrams, and EMC plots, of some system, to judge the construction of a cable within that system, then?

It seems pretty answerable to me; but I guess there are mysteries that even lone cables contain.  I bow to your wisdom, sir :)

...As long as we're here, then, does anyone else want to play?


2a. Is USB fully differential? If it depends, then also, when?

USB is not fully differential (at least USB1 and USB2). Data is sent differential, but it has some weird things (I think they are called "T-states") that are used to signal special conditions on the USB bus. In this regard it somewhat resembles the start and stop conditions on an I2C bus.

For the rest, I have always been confused of how to handle GND versus shield in cables.

Dingdingding!  USB is not a differential standard.  While I don't know what the actual input structures look like (probably with good reason (that's IP)), it's plausible that they're just a pair of normal-mode CMOS input pins (for HID/low/full speed modes) or the low-threshold equivalent (high speed).  It's also plausible that they use a differential receiver (perhaps the same one in all cases, i.e. ~mV precision and high speed capable), but also have normal or common mode receiver(s) to detect the special symbol.

The exact term I believe is SE0, both lines low.  The inverse is not used, and J / K denote the differential +/-1 (-/+?) states, I think it was.

A key insight: because of this, it is impossible to do more than a token amount of CM filtering on USBD_P/M; more than that, and you spoil the fidelity of the SE0 symbol, and line drops ensue.  You (almost?) never see CMCs on Full Speed lines, and only a tiny amount on High Speed lines (usually ~100Ω at 100MHz -- nothing more than a ferrite bead).

Since Full Speed (and below) has the inputs open-circuit in receive mode, there's no impedance to filter against, anyway, just the tiny receiver input capacitance; and if you add your own onboard capacitance, you can only do it by loading each line to GND, reducing DM bandwidth as well (though not as quickly; Full Speed can tolerate some 10s of pF, perhaps at expense to maximum line length).  But filtering below 30MHz or so disturbs or removes the SE0, and even then, the ISI is big, likely leading to line errors and dropped packets or links.

Remaining questions:

1. What is the ground wire referenced to / paired with?
(A: usually VCC; most USB cables I've taken apart, are double twisted pair, with foil on the data pair.)
2a. Is USB fully differential? If it depends, then also, when?
2a(i). If so/when, what is USB's common-mode range? How does it compare with commercial immunity levels?
2b. Is the power fully differential? (An odd way to put it, but more to the point: would there ever be a situation where we would worry about common-mode currents on the power pair? When, generally, are we ever concerned about that on a power line?)
(A: you've already implied that GND could be used as a signal reference, so the answer is no!)
3. If the answer to at least one of (2) is no, what solution would you suggest for it? (implied: a solid shield most likely, but on what justification; what possible alternatives?)

Concrete example: https://www.eevblog.com/forum/beginners/on-devices-side-should-i-connect-usb-cable-shielding-to-the-black-wire/msg5510779/#msg5510779
Diagram: https://www.eevblog.com/forum/beginners/on-devices-side-should-i-connect-usb-cable-shielding-to-the-black-wire/?action=dlattach;attach=2232685;image
Challenge: what is the EMC situation for the USB cable, under variation of how we connect the shield, or connector in general, within the EUT?

Tim
« Last Edit: May 22, 2024, 12:27:15 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3624
  • Country: ua
But was that what was asked about?

Take the first question:

Quote
1. What is the ground wire referenced to / paired with?

I understand your point and agree that USB cable is not simple differential pair in the shield. Yes, it seems like unbalanced line and the situation is going to be more complex, because there are a lot of different USB cables from different manufacturers, cheap and expensive, shielded, double shielded and not shielded at all.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22047
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
But was that what was asked about?

Take the first question:

Quote
1. What is the ground wire referenced to / paired with?

I understand your point and agree that USB cable is not simple differential pair in the shield. Yes, it seems like unbalanced line and the situation is going to be more complex, because there are a lot of different USB cables from different manufacturers, cheap and expensive, shielded, double shielded and not shielded at all.

I could go on to describe (or provide crude drawings for) ... USB cable construction (well heck, let's just put that in real quick anyway: say it's outer braid 90% coverage, power pair twisted, foil over data pair twisted; braid serves as drain wire for foil)
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2267
  • Country: fi
Shield?

Code: [Select]

    chassis                  chassis
 ---------------          ---------------
 |  ---------  |  signal  |  ---------  |
 |  |  GND  |    -_--_---    |  GND  |  |
 |  ---------  |          |  ---------  |
 ---------------          ---------------
  |                          |
  |neutral                   |neutral
  |                          |
  |        *********************
*********** earth

Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 880
  • Country: fr
no. if you have at some moment a bad power supply on pc/laptop side and the target is not floating, you're gonna burn the laptop. i changed southbridge on some laptops with this type of connection.
Make it make sense. Shield making connection between the grounds first/disconnecting the last is exactly what will protect internal pins if there is potential difference between the grounds of the devices.
you let floating one device, it's already there. lot of laptops are not earthed or you may have a bad earth connection, if laptop's psu is erratic you may got some>60V potential escaping that laptop (voltmeter will measure this clearly between USB +5V laptop rail and the target device earth connection, ie some arduino board or whatever). the differential disjunctor may respond, but in the meantime the damage on the laptop's usb port is done. those type of connections fry the laptop's usb port, i had multiple cases when i worked in this bussiness. i'm pretty sure it wasn't superior forces doing that (the client usually said "when i connected the usb port it died").
in a perfect world, connecting the devices like this will be the rule. i had also in another company people connecting NVR HDMI port with the NVR in standby and the monitor also, and my boss changed the fried NVRs (HDMI dead). The same potential difference is causing the same issue, you can check for hikvision/dahua hdmi fried ports on forums, it's not my day-dream.
for me, if possible, try to leave one device floating (connect V+ and V- rails only) and hope the other's device earth is ok.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17366
  • Country: lv
no. if you have at some moment a bad power supply on pc/laptop side and the target is not floating, you're gonna burn the laptop. i changed southbridge on some laptops with this type of connection.
Make it make sense. Shield making connection between the grounds first/disconnecting the last is exactly what will protect internal pins if there is potential difference between the grounds of the devices.
you let floating one device, it's already there. lot of laptops are not earthed or you may have a bad earth connection, if laptop's psu is erratic you may got some>60V potential escaping that laptop (voltmeter will measure this clearly between USB +5V laptop rail and the target device earth connection, ie some arduino board or whatever). the differential disjunctor may respond, but in the meantime the damage on the laptop's usb port is done. those type of connections fry the laptop's usb port, i had multiple cases when i worked in this bussiness. i'm pretty sure it wasn't superior forces doing that (the client usually said "when i connected the usb port it died").
in a perfect world, connecting the devices like this will be the rule. i had also in another company people connecting NVR HDMI port with the NVR in standby and the monitor also, and my boss changed the fried NVRs (HDMI dead). The same potential difference is causing the same issue, you can check for hikvision/dahua hdmi fried ports on forums, it's not my day-dream.
for me, if possible, try to leave one device floating (connect V+ and V- rails only) and hope the other's device earth is ok.
Shield is connected to GND at USB host and USB is not an isolated interface regardless if there is a shield or not. How disconnecting the shield at USB device is supposed to improve situation as there is GND wire anyway? Not to say increasing ground connection resistance only increases chances of killing something as current will flow through the other wires instead. Not to say shield makes connection first when inserting the plug, and then GND wire and VUSB simultaneously, with disconnecting the shield there is a high chance 5VUSB will make connection slightly earlier and take all the current instead of GND where current in any direction generally is harmless.
« Last Edit: May 27, 2024, 06:12:41 pm by wraper »
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3586
  • Country: nl
Concerning ground loops in general (audio).

I once had a 10m audio cable from my computer corner (in an earthed socket) to my stereo set (in another wall socket, probably another phase (3-phase system here in the Netherlands, even in residential appartment buildings). Every now and then I had to unplug and re-plug the (RCA) audio connectors. During plugging I regularly saw (dim) sparks between the central pin of the RCA (Supposed to be Audio!) to the metal enclosure of my stereo set. And that was a stereo set for which I even paid decent money second hand. And though both my stereo set and my PC survived this several times I was not happy with it.

My solution was to buy an extra extension cord, and power all the stereo equipment from the same power outlet as my PC. Later I switched to digital audio which uses transformers on both sides of the cables, very much like Ethernet.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17366
  • Country: lv
Concerning ground loops in general (audio).

I once had a 10m audio cable from my computer corner (in an earthed socket) to my stereo set (in another wall socket, probably another phase (3-phase system here in the Netherlands, even in residential appartment buildings). Every now and then I had to unplug and re-plug the (RCA) audio connectors. During plugging I regularly saw (dim) sparks between the central pin of the RCA (Supposed to be Audio!) to the metal enclosure of my stereo set. And that was a stereo set for which I even paid decent money second hand. And though both my stereo set and my PC survived this several times I was not happy with it.

My solution was to buy an extra extension cord, and power all the stereo equipment from the same power outlet as my PC. Later I switched to digital audio which uses transformers on both sides of the cables, very much like Ethernet.
It was either a non solution at all or did not fix the root cause of the problem. And it rather indicates a lack of a ground loop. If it was sparking, it means either your audio system was double insulated (for which plugging everything into the same extension cord will do nothing) or you had Earth connection missing in the mains socket.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12068
  • Country: ch
Huh? Sparking proves one thing: that the two grounds are not at the same potential, and that they aren’t galvanically isolated.

If one device were floating (what you might be referring to with double-insulated in this context, since mains-referenced audio equipment went the way of the dodo ages ago) then it wouldn’t spark.

If ground were missing, it would be floating and thus also wouldn’t spark because there’s no complete circuit.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17366
  • Country: lv
If one device were floating (what you might be referring to with double-insulated in this context, since mains-referenced audio equipment went the way of the dodo ages ago) then it wouldn’t spark.
It would spark because of Y capacitors. It wouldn't spark only if it was some very old system without those.
 
The following users thanked this post: tooki

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3624
  • Country: ua
Huh? Sparking proves one thing: that the two grounds are not at the same potential, and that they aren’t galvanically isolated.

It happens when some device has no ground pin on mains socket, its ground is floating and has about 100V AC potential due to mains voltage divider which happens on the mains filter capacitors.

So when you connect such floating ground to another device which ground is connected to GND pin on the mains socket, there is voltage and some parasitic current. According to standard it should be limited, but still enough to damage some sensitive electronics. And this is why sparks appears...

Later I switched to digital audio which uses transformers on both sides of the cables, very much like Ethernet.

Cheap Chinese ethernet adapters don't have transformer, they have soldering pads on PCB to solder transformer, but usually it is missing and a couple of capacitors are soldered instead of transformer :)

Here is example:
« Last Edit: Yesterday at 10:08:51 pm by radiolistener »
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6510
  • Country: ro
Sometimes the magnetics are in the same metallic enclosure with the RJ45 connector.  The PCB design might be made to accommodate both variants, either with magnetics in the connector or separated.

Shield of the USB cable (and for other differential cables, in general) has to go to the metallic enclosure, not to the GND, and even if the CH340 doesn't have any enclosure, the PC has, so do not tie the USB shield to the black GND wire.
« Last Edit: Yesterday at 10:15:47 pm by RoGeorge »
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3624
  • Country: ua
Sometimes the magnetics are in the same metallic enclosure with the RJ45 connector.  The PCB design might be made to accommodate both variants, either with magnetics in the connector or separated.

Yes, but this one looks too small to have transformers inside and if it has transfromers inside, then it should use jumpers, not capacitors, isn't it?
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12068
  • Country: ch
Sometimes the magnetics are in the same metallic enclosure with the RJ45 connector.  The PCB design might be made to accommodate both variants, either with magnetics in the connector or separated.

Yes, but this one looks too small to have transformers inside
No, the transformers are absolutely tiny, so jacks with magnetics can be practically as small as jacks without them!
« Last Edit: Today at 02:12:08 am by tooki »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12068
  • Country: ch
If one device were floating (what you might be referring to with double-insulated in this context, since mains-referenced audio equipment went the way of the dodo ages ago) then it wouldn’t spark.
It would spark because of Y capacitors. It wouldn't spark only if it was some very old system without those.
And

It happens when some device has no ground pin on mains socket, its ground is floating and has about 100V AC potential due to mains voltage divider which happens on the mains filter capacitors.

So when you connect such floating ground to another device which ground is connected to GND pin on the mains socket, there is voltage and some parasitic current. According to standard it should be limited, but still enough to damage some sensitive electronics. And this is why sparks appears...


 :palm: at myself, because I absolutely know this, and just didn’t think of it at the time. D’oh!!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22047
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Huh? Sparking proves one thing: that the two grounds are not at the same potential

Correct,

Quote
and that they aren’t galvanically isolated.

incorrect.

Keep in mind that galvanic isolation only requires some maximum earth leakage current (AC or DC).  It doesn't say anything about voltage (well, it probably does, but how exactly and where, I don't know offhand), at least unless it were like some kV, but that would also be an ESD or comfort issue anyway.

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf