Did I resolve my ground loop? - Page 1
Forum section: electronics / beginners

author: 0xcart
author_rank: Contributor
timestamp: April 26, 2020, 07:49:03 pm
content: I was about to connect my USB Segger J-Link JTAG debugger and my USB Logic Analyzer to my target device, and recalled this video which I recently watched: "How NOT To Blow Up Your Oscilloscope!"Attached is an image with two illustrations (PowerPoint for the win).Figure 1shows my "before" andFigure 2shows my "after". The "after" includes this J-Link JTAG Isolator (https://www.segger.com/products/debug-probes/j-link/accessories/isolators/j-link-jtag-isolator/) from Segger which apparently does just what it says, providing electrical isolation.Does the inclusion of this device from Segger resolve my ground loop?

author: tyguy2
author_rank: Unknown
timestamp: April 26, 2020, 07:58:43 pm
content: Can't tell for sure, but it looks like the ground from your logic analyzer is still grounding your target device to your computer

author: 0xcart
author_rank: Contributor
timestamp: April 26, 2020, 08:10:30 pm
content: Correct. Do I need to isolate that as well? Or is it okay for my target device to have "one" path to ground through my computer? Watching the above video I linked to, I assumed it was okay. The oscilloscope in the video is grounded.

author: RoGeorge
author_rank: Super Contributor
timestamp: April 26, 2020, 08:27:50 pm
content: Quote from: 0xcart on April 26, 2020, 07:49:03 pmNo, the JTAG isolator doesn't make any sense, you still have the ground between the PC and the target device connected through the logic analyzer, as the drawing shows.My guess is you misunderstood the problem. In the first place, chances are there is no ground problem for your setup. It all depends of what your target device is, and where from/how each device is powered.If you already used the PC, the logic analyzer and the target device together, without isolation, then there should be no problem to connect the JTAG too.

author: 0xcart
author_rank: Contributor
timestamp: April 26, 2020, 08:40:45 pm
content: The following is from the user manual of my logic analyzer:"The user should be cautious of this when the logic analyzer is used in the presence of a ground loop. Specifically, this means that the logic analyzer is not the only ground path between your Device Under Test (DUT) and the host PC. Ground loops by themselves are not necessarily bad, but requires extra caution from the user.Common Ways a Ground Loop Can Exist:• Other USB devices (such as programmers) are connected to the DUT, or the DUT itself is plugged into the USB port on your computer.In addition to the logic analyzer's ground connection, the DUT's ground is also connected to the PC's ground through another USB port."The emphasis (bold) on that last sentence is mine. This is what made me question my original setup. The DUT (what I am calling target) would be connected to my PC through two USB paths (LA and J-Link). By using the isolator from Segger, it would only be one path.

author: DannyTheGhost
author_rank: Contributor
timestamp: April 26, 2020, 09:21:36 pm
content: Ground loop problem occurs when two or more different current paths meet on shared conductor. For example, audio equipment - here if your power amplifier current loop flows through conductor and causes voltage drop on it, which makes it 'visible' by other signal sources that uses the same conductor. This causes crosstalk between these two sources, like audible 'hums' from speakers.The video you watched shows about another problem - connecting two 'negative' terminals of oscilloscope to different points on your DUT with different potentials means shorting them together, potentially blowing your oscilloscope and/or DUT.Regarding ground loops - if your digital stuff uses small current to operate, have high thresholds (for example, 5V or 3.3V logic) - you should not worry about it. Mainly, only very sensitive analog/digital signals are main victims by ground loops.Regarding isolation - if you have worries about your PC safety - isolate EVERYTHING when you want to connect DUT in question.P.S. I hope my badish English is understandable enough

author: RoGeorge
author_rank: Super Contributor
timestamp: April 26, 2020, 09:29:31 pm
content: There is nothing wrong in having two ground wires between the PC and the DUT, one wire through the LA and another wire through the JTAG. That is why the manual of the JTAG also says "Ground loops by themselves are not necessarily bad, but requires extra caution from the user."The problems can come from the Y capacitors of switching power supplies. The loop that can damage things is usually closed through the grounding pins of the power outlet (mains voltage), not between the USB ports (of course assuming GND from all USB ports connect to the same GND of the DUT).Those potentially dangerous loops were not even drawn in the Power Point diagram, that makes me assume the question came from a misunderstanding.If the JTAG can be safely connected to the USB, and the LA to the USB (simultaneously), then there is no danger to connect both the LA and the JTAG to the DUT, as long as the GND from the LA, the GND from the JTAG and the GND from the DUT (all three) are all connected together.Now, if the DUT is some sort of weird device that has a dangerous GND potential relative to ground, or the DUT has no galvanic isolation relative to mains (either by design or by a defective Y capacitor in the power supply) than that is another story, and should be looked very carefully. But, if you were to be in this last situation, then by connecting the LA, the PC and the DUT together (without JTAG) you would have probably broke the LA by now, which you didn't, so I assumed the DUT is no weird device.Ideally, the DUT should be kept floating, so there will be no possible ground loops through DUT.So far, it looks like a JTAG isolator will be useless, because there is no problem there, but if you want to go into details, you need to look how is each device powered. From the USB, or from their own power source (mains), from a floating source (battery)? What is the DUT, and how it is powered?

author: 0xcart
author_rank: Contributor
timestamp: April 26, 2020, 09:31:56 pm
content: Thank you to everyone. I appreciate your responses.

author: 0xcart
author_rank: Contributor
timestamp: April 27, 2020, 03:51:04 am
content: I updated the image to include additional details:The device under test is an ARM M4F based MCUThe MCU is powered by a R&S HMP2020 power supply (which has galvanically isolated, floating outputs)The image uses bright yellow dotted lines to signify isolationI guess I still don't fully appreciate whyFigure 1doesn't have a ground loop. One of the examples in Dave's video shows an Arduino connected via USB (thus connected to Earth through the host PC), an Oscilloscope (also connected to Earth) hooked up, and shows the resulting shenanigans. InFigure 1of my image, the MCU is connected to Earth via both the Segger J-Link device and the Saleae LA. Yes, they're both connected to the same host PC, but both USB ports are connected to Earth. It seems like the potential is there to repeat Dave's shenanigans if I were to "accidentally" touch the wrong pin, etc.Figure 2seems to correct the problem by eliminating the second path to Earth and thus the "loop". The Segger J-Link Isolator completely separates the path.Again, I appreciate the feedback/advice.

author: Ian.M
author_rank: Super Contributor
timestamp: April 27, 2020, 06:15:11 am
content: If the two ground paths are strictly in parallel and their loop area is minimal you are very unlikely to have any problems. Where you can run into trouble is if the target has a split ground plane and JTAG ground and Logic Analyser ground are different nodes, or if you are running the JTAG host software on a different PC to the logic analyser software, on different wall outlets (and you don't have a ground bonding strap between the two PC chassis), or if any other test equipment introduces a ground with excessive loop area, or if you are operating in a high EMI environment (e.g. near heavy electrical plant). It helps to run all test equipment that may introduce a ground from a single power strip so the loop doesn't include the wiring runs back to your building's breaker panel. Also to minimise loop area (and thus EMI pickup by induction), loosely twist together (approx 1 turn per foot) leads carrying a ground coming from the same source for as much of their length as is reasonably practical.For those too busy to re-watch all of EEVblog #279, 'DaveCAD' explanation of scope + DUT grounding via USB starts at 15:11, and hands-on investigation with an Arduino starts at 16:50

author: 0xcart
author_rank: Contributor
timestamp: May 06, 2020, 04:20:04 am
content: Thanks Ian.M. Your explanation of parallelism (and minimal loop area) was key. Plus further analysis and testing. Plugging either the LA or debugger into a different computer which itself is plugged into the wall across the room for example demonstrates the problem. Which is as you describe. Thank you for your thorough explanation.

author: dietert1
author_rank: Super Contributor
timestamp: May 06, 2020, 07:04:12 am
content: When using a scope i developed the habit to take a first measurement without connecting probe ground to anything on the DUT. If one starts in a large scale like 100 V/unit and then goes down, one can check where the DUT Gnd is and what kind of noise it exhibits. You have to keep in mind that the DUT PE connection may be much stronger than the probe Gnd connection. So common mode noise will be in the measurement even after connecting probe Gnd.Regards, Dieter