Weird USB oscilloscope ground issue? - Page 1
Forum section: electronics / repair

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 17, 2024, 10:54:06 pm
content: Today I ran into an odd problem when adjusting two old scopes. The tools I am using are a B&K 3026 signal generator and a picoscope 2204A for sanity checking the B&K. The problem is that when I connect the pico to the generator the trace is offset by about 240mv, regardless of if the generator is on or not, it only has to be plugged in. I put an ammeter between the grounds of the pico and the generator and get nearly 180mA of current flow. I can also get this current flow between the pico and a different grounded object, like a grounded power supply case.So from what I can tell, there is a potential difference of 240mV between the GND (i.e. the black wires of the PSU) of my PC, and earth (the pin on the outlet). I need some help figuring out why this would happen. The power supply is fairly new, but I have been using the picoscope for years on this PC. Is this a failure of the PC or is it user error?

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 17, 2024, 11:46:14 pm
content: 180mA sounds an awful lot !Is that AC or DC or a mix of ?The Pico actually works (powers on) when it isn't connected to a DUT's ground ? (Thinking USB cable ground could be cut then it powers itself finding a ground path on the DUT.)If this isn't the case I'd get really worried, start checking power outlet ground continuity and being weary of the various protagonist's power supplies safety (Y capacitors).

author: coromonadalix
author_rank: Super Contributor
timestamp: June 18, 2024, 12:00:47 am
content: can you plug the pico on a lappy battery powered ? if this offset / current dissapearthe generator could be at problem, something in the ac section, ac filter hoping its not those who get defectivesor phases problems between your main computer and the generator ?

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 18, 2024, 12:59:32 am
content: Quote from: shakalnokturn on June 17, 2024, 11:46:14 pmIt is purely DC as far as I can tell, at least the 240mV I measured is. The pico seems to work perfectly fine, always has.Quote from: coromonadalix on June 18, 2024, 12:00:47 amI don't believe the signal generator is the problem. I can get current to flow between the shield of the usb cable and a grounded surface, regardless of how the scope or the generator is hooked up. I did not test with a laptop, but I would assume that the issue would go away. I will test with a laptop tomorrow just so that I can finish what I was doing before I noticed this problem.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 19, 2024, 02:02:47 am
content: I tested with a laptop on battery, not issues at all. There is definitely a problem with my PC, power supply or otherwise. The power supply is a Corsair RM850e that I bought back in march, not super high end but not bottom of the barrel either.

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 19, 2024, 08:53:34 am
content: Quote from: Alex_Baker on June 18, 2024, 12:59:32 amAll grounds being common, even with a good USB cable, it makes sense that the supply current to the Pico should divide out through the various ground paths offered. (The infamous ground loops that all audio designers must avoid.)You can confirm this by using a beefier USB cable or doubling the ground link between PC and Pico, in both cases the Pico probe ground to DUT current (and thus offset voltage) should decrease.Haven't looked around but guess this is a common known problem.The solution would be an USB isolator unless you can get away with not tying the probe ground clip to the DUT.

author: 2N3055
author_rank: Super Contributor
timestamp: June 19, 2024, 09:38:08 am
content: This is not ground loop question. Something is wrong.240mV voltage drop with 180mA current suggest 1.3 Ω resistance.With everything else disconnected, just PICO into PC with USB cable, measure voltage between Pico side USB ground and PC ground, on the cable ends. You should not have more than 20-30mV.With everything disconnected measure voltages between PC and siggen ground.Measure around..

author: wraper
author_rank: Unknown
timestamp: June 19, 2024, 09:51:22 am
content: Quote from: Alex_Baker on June 19, 2024, 02:02:47 amNot necessarily based on that alone as you're simply make that side float so no current can possibly flow regardless of the reason. There are two things I can think about. Either current flows from laptop PSU from some reason, you can check that by measuring current between PSU GND and mains earth. Or there is an issue with USB GND connection between the laptop and the oscilloscope, so current from VBUS flows through the earth of other device as low resistance path and back to earthed laptop PSU GND through the mains wiring. I suggest measuring if there is a voltage drop between Oscilloscope probe GND clip and laptop GND, you can probe another laptop USB connector shell for that.

author: m k
author_rank: Super Contributor
timestamp: June 19, 2024, 12:11:36 pm
content: Quote from: Alex_Baker on June 17, 2024, 10:54:06 pmDisconnect everything but keep cords connected to machines.Short earth pins of cords.Can you find a steady resistance when fiddling with variations?

author: Jeroen3
author_rank: Super Contributor
timestamp: June 19, 2024, 12:27:20 pm
content: Quote from: Alex_Baker on June 18, 2024, 12:59:32 amI hope not! That would be very bad.Can you also measure this current on the USB cable (clamp entire cable) when you touch the USB Chassis to a BNC of the signal generator?If yes, that means you have a DC ground fault. Then be very cautions, your GFCI will not operate anymore.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 19, 2024, 03:19:45 pm
content: I put a hvac style current clamp meter around the usb cable, nothing. I live in the US where GFCIs are not standard equipment, only bathrooms and outdoor outlets have them.Does this mean that my PC's power supply is at fault? I have several other ATX PSUs sitting around and they all measure a couple of ohms between black and earth, I did the same test on my PC with it turned off and got 2 ish ohms. So it seems that whatever bonds black to earth is ok.

author: wraper
author_rank: Unknown
timestamp: June 19, 2024, 03:21:44 pm
content: Quote from: Alex_Baker on June 19, 2024, 03:19:45 pmMost of the clamp meters only measure AC current.QuoteNo. As I said measure voltage between oscilloscope and computer GND. Also if PSU has GND and earth shorted, it cannot be at fault.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 19, 2024, 03:40:49 pm
content: Quote from: wraper on June 19, 2024, 03:21:44 pmThis was in response to Jeroen3Quote from: wraper on June 19, 2024, 03:21:44 pmI missed your earlier response, I apologize. This issue only occurs with my PC tower, not the laptop. I measured 19mV between scope ground and the shield on another usb port on the front of the computer, the scope is on a very long cable. I measured 100mV between earth and scope ground today, which is interestingly not as bad as yesterday.This ground "leakage" problem has nothing to do with the scope, I can replicate this stray current flow from any GND point on the computer, not just the scope.

author: wraper
author_rank: Unknown
timestamp: June 19, 2024, 04:12:14 pm
content: I have another thought. Plug everything in the same mains extension cord and see what happens. It could be something funny is going on with mains earth wiring and you connect devices in question into different "earths".

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 19, 2024, 05:11:46 pm
content: Quote from: 2N3055 on June 19, 2024, 09:38:08 amI don't often disagree with you but here I'll have to, not on the fact that the resistance is rounded down from 4/3There is a ground loop sketch it out, you'll see... Probe ground, USB ground and PC ground are all common now if you connect the probe ground to another length of wire leading to the PC's PSU inlet ground connection you create a loop which is also an additional return path for the supply current to the Picoscope. This alternate return path runs through the Pico's frontend ground tracks and probe ground wire which also have resistance (say approx. 1.3) so measuring anything is offset by the voltage drop across the probe's ground wire.Edit: OTOH you weren't saying there wasn't a ground loop, rather it wasn't the problem. It still looks the most plausible problem to me considering it's DC.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 19, 2024, 05:27:10 pm
content: Quote from: shakalnokturn on June 19, 2024, 05:11:46 pmWhat puzzles me is that I have never ran into this problem before. I have used the pico dozens of times over the last several years and never noticed any funny business before.So If I do create a ground loop when connecting the pico to an earthed BNC, is that normal? if so how do I avoid it in the future?

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 19, 2024, 10:37:57 pm
content: Creating a ground loop in this situation is normal and unavoidable without additional hardware, why it should only show effects now is another problem...The most obvious to me would be higher resistance in the conductors or connections somewhere between probe ground clip and PC PSU. (Probe, BNC connector, Pico PCB, Pico USB connector, USB cable,PC USB connector, optional USB to mainboard connector, mainboard to PSU connector...)Try hooking everything up so it shows the offset then wriggle things around to see effects on offset.Out of curiosity with Pico connected to unplugged PC what resistance measurement do you get between probe ground clip and PC's PSU earth terminal?I'd look for a high speed USB data isolator and a (ungrounded) linear regulated power supply for the Pico. Still I'd first try to understand why this issue is showing now if it hadn't previously...

author: 2N3055
author_rank: Super Contributor
timestamp: June 20, 2024, 06:23:13 am
content: Quote from: shakalnokturn on June 19, 2024, 05:11:46 pmMy English. Sorry.There is a wire loop. Always is when you measure with any scope.Problem is that voltage is DC and is huge. That is what I meant.Ground loop is not source of the problem, it is what allows us to measure that something is injecting current to ground. And it should not. And even if it does, impedance of grounding should be lower.10-30mV is normal.250mv means something is wrong.All the stuff on your desk should be connected to same grounding point.Connected with short cables, there should be order of magnitude less potential difference in what essentially aspires to be equipotential net.Something is not right with grounding and/or power distribution wiring.In addition to DC current being injected into ground from somewhere. Also not right.

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 20, 2024, 12:16:53 pm
content: Quote from: 2N3055 on June 20, 2024, 06:23:13 amYes that is another possibility of course DC current in a shared ground wire could give similar symptoms and be potential safety hazard if ground continuity is lost at any time.Once power mains (line) power distribution ground conductors have been confirmed to have sufficiently low resistance (which is one of the requirements for a safe power distribution) a couple of quick measurements should be able to reveal if cause is DC current flowing in the ground conductor.The easiest to me still seems to be a comparative test:Take a random remote ground point that shows DC voltage / current WRT to Picoscope probe ground as per OP's issue, take the same random point and repeat measurements WRT to PC's casing.If the same voltages / currents exist in both cases 2N3055 and wraper's explanation fits here, if not mine applies.It looks like I missed this along the way:Quote from: Alex_Baker on June 19, 2024, 03:40:49 pmSo I could be wrong about the origins of the problem in the end.... Then OP should get very worried about the leakage source.

author: m k
author_rank: Super Contributor
timestamp: June 20, 2024, 12:26:59 pm
content: Quote from: Alex_Baker on June 19, 2024, 03:40:49 pmWhen measuring those resistances, did you include the power cord?Move the tower to the bathroom.Disconnecting mass storage will speed things up.What say your GFCI?If nothing check earth connection.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 22, 2024, 08:42:59 pm
content: I did a bit more testing but came up inconclusive.The resistance between GND and earth seems fine, a couple of ohms on my crappy meter that reads 1 ohm with the probes shorted. Something odd that I noticed with an analog ammeter is that the needle will drift cyclically up and down a few milliamps. As a point of comparison I checked three other ATX PSUs, all from different decades and none showed current from GND to earth. I did the same test to the one in my PC with everything disconnected and got no stray current, so this phenomenon only occurs with the whole system hooked up.Another more concerning and puzzling thing that I found is that with the ammeter attached to GND in the PC, and earth, the needle jumps around in tune with a new squealing sound that the PSU is making. I don't know when this noise started, but I only noticed it when I went snooping around my computer. Remind me to never buy a corsair power supply again, because every one I have owned, new or otherwise, has squealed like a stuck pig.

author: magic
author_rank: Super Contributor
timestamp: June 22, 2024, 09:15:29 pm
content: As much as it sucks, this is absolutely normal and not a sign of any mains wiring issue.Your ATX PSU is internally grounded to mains protective earth and there is no current flowing through this connection until you connect your USB gadget. The gadget is grounded to the motherboard, which is grounded to the PSU through a bunch of black cables, as you know. Those cables carry many amperes of current, hence motherboard ground is some millivolts above true earth and its exact potential jumps around in sync with varying power consumption of the CPU. If you ground your USB gadget elsewhere, you provide a new path for the motherboard ground current to return to the PSU (through the USB cable and mains protective earth), so part of it diverts there.About the only solution is to reduce resistance between the PSU and the motherboard, and particularly between the earth connection inside the PSU and the USB port ground pin.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 22, 2024, 10:04:45 pm
content: Quote from: magic on June 22, 2024, 09:15:29 pmThis makes sense, thanks!I am still wondering how I have never noticed this before when using my scope, perhaps I had something hooked up weirdly that one time. It sounds like the proper way to avoid this issue is a USB isolator and external power supply(or some devices have built in isolated DC-DC).

author: magic
author_rank: Super Contributor
timestamp: June 23, 2024, 06:33:09 am
content: Yes, USB isolation will do it. A dedicated low power SBC for running the scope also should.I don't know if USB has enough common mode noise immunity for this to work, but one could also try to star-ground the USB port in the PC. Say, buy one of those rear brackets with USB ports connected to pin headers on the motherboard, cut the GND cable and connect it to a free Molex plug going straight to the PSU.I discovered this issue long ago with audio equipment, because analog outputs have the same offset and CPU noise problem. It is a widely known problem, although few people appear to know the reason.

author: wraper
author_rank: Unknown
timestamp: June 23, 2024, 08:25:35 am
content: Quote from: magic on June 22, 2024, 09:15:29 pmTo the level of what he'd seen it's not normal.

author: m k
author_rank: Super Contributor
timestamp: June 23, 2024, 09:59:54 am
content: Different grounds can have different levels on purpose.180mA can be an overcurrent protected short.

author: magic
author_rank: Super Contributor
timestamp: June 23, 2024, 10:02:16 am
content: Quote from: wraper on June 23, 2024, 08:25:35 amFair enough, I measured my own computers and found only up to 10mV between USB port grounds and PSU chassis under full load, so 250mV may be a little excessive. I also have a few mV difference between the chassis and earth on a nearby mains socket, indicating that I already have ground loops sending DC through mains earth, maybe through the monitor.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 26, 2024, 03:49:02 pm
content: I have tested earth paths around my workbench, which is where I am using the scope. I have not tested the earth path of the actual outlets in the wall since that would need me to turn the power off, but other than that I have not found any problems.Correct me if I am wrong, but I don't think this stray current issue actually poses any risk to me or my electronics, so I don't think it is worth chasing any more. If I had to guess, a mixture of long usb cables and a sub-optimal set of power strips feeding my PC and workbench make this seem much worse than it normally would be.

author: wraper
author_rank: Unknown
timestamp: June 26, 2024, 04:01:13 pm
content: Quote from: Alex_Baker on June 26, 2024, 03:49:02 pmYou don't need to shut down the power to check the earth connection. Yes it poses safety risk as some devices my be working without proper protective earth connection.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 26, 2024, 04:06:00 pm
content: Quote from: wraper on June 26, 2024, 04:01:13 pmI have tested all the earthed devices in this room, I cant find anything wrong with any of them.

author: wraper
author_rank: Unknown
timestamp: June 26, 2024, 04:18:29 pm
content: Quote from: Alex_Baker on June 26, 2024, 04:06:00 pmSo what? Device can be 100% fine but dangerous at the same if there is an issue with mains wiring.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 26, 2024, 04:25:21 pm
content: How about this, I know that there exists and earth connection between my workbench and my PC, which are on different wall outlets. I know one exists because I can create a current loop by connecting my scope ground to earth at my workbench, which must mean that current is flowing back to the PC through the outlet earth wiring. I don't exactly know the condition of the earth path, but it cant have too high a resistance or 100mV would not result in much current flow.

author: m k
author_rank: Super Contributor
timestamp: June 26, 2024, 06:35:43 pm
content: Famous last words.Here all deadly electric accidents have had two faults.You seem to have one already.

author: magic
author_rank: Super Contributor
timestamp: June 26, 2024, 11:05:14 pm
content: If there is abnormally high voltage between different "grounds" in the PC then the problem is likely in the PC.If in doubt, disconnect everything from it and measure if the motherboard to case offset is still there. Theoretically, there is possibility that something else is broken and sends tons of DC through a ground loop passing through its PC connection cable, the PC and mains earth, but IMO the PC is the chief suspect.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 27, 2024, 03:24:26 am
content: Quote from: m k on June 26, 2024, 06:35:43 pmI get the message, thanksQuote from: magic on June 26, 2024, 11:05:14 pmI could not find anything that was more than 6mV.

author: m k
author_rank: Super Contributor
timestamp: June 27, 2024, 10:06:02 am
content: With earthed extension cord you can check what nearest GFCI has to say.Insulated area doesn't need protective earth, assume that it is not there.When connecting devices to earthed socket assume that metal parts are live.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 27, 2024, 02:39:36 pm
content: I plugged the power strip under my desk into a bathroom outlet, which does not have a GFCI itself but is connected to one elsewhere. I then repeated my earth-to-earth and earth-to-pc GND current tests from the outlet under my workbench, and I could never get the GFCI to trip. I got about 4mA going from PC earth to workbench earth, and 10ma going from PC GND to workbench earth.

author: magic
author_rank: Super Contributor
timestamp: June 27, 2024, 04:42:46 pm
content: I thought typical GFCI trip on AC not DC?And they trip on mismatch between phase and neutral, not on protective earth current.

author: m k
author_rank: Super Contributor
timestamp: June 27, 2024, 05:18:29 pm
content: Quote from: Alex_Baker on June 27, 2024, 02:39:36 pmThat is good.Now you(and me) can be much more certain that no hazardous situation is present.You can also assume that original ground current is between secondaries and possible leak is less than dangerous.Comparing this latest situation and earlier connections you should be able to narrow the problem down, at least some.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 27, 2024, 10:05:42 pm
content: Quote from: magic on June 27, 2024, 04:42:46 pmThat is what I was wondering, this house was built in 1990, so not sure what type of GFCI is installed.

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 27, 2024, 10:11:53 pm
content: If neither the PC's case-PSU- ground continuity is suspect, it isn't the PC's PSU leaking massively and it isn't a DC voltage drop linked to the Picoscope power (as I understand that has been ruled-0ut ?).Could it be a power device, likely inverter-based (solar power, aircon...) sharing the same line but further down that's getting away with putting a fair deal of DC leakage current through the PE wire on that line due to lack of (adequate) GFCI?I'm not familiar with the American NEC, here in France the MCB's allow up to 500mA of ground fault before tripping.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 28, 2024, 12:07:10 am
content: Quote from: shakalnokturn on June 27, 2024, 10:11:53 pmI will try to follow up on this at some point, I want to try and unplugging things in the vicinity until it isonlythe pc plugged in, perhaps in that entire circuit. There are no large power devices around me, only lots of little ones.

author: m k
author_rank: Super Contributor
timestamp: June 29, 2024, 09:50:39 am
content: You can also measure PE resistances.Bathroom and workbench PE sockets are pretty close, desk socket seems to be something else.Use the extension cord to bring wall sockets side by side.Probe tip can have better connection than its side.You may get lower shorted resistance by measuring few millis of conducting material.If probe is too short you must tilt it to get a PE connection.Then the connection can be less than optimal and if it is missing completely you may need to go back to previous situation to get a confirmation.Keep also in mind that wall socket can be less than optimal, connection can be loose or broken.So uncertain connection is not necessary your meter.In case of uncertainty I would be "watta..." and open the socket.Don't do that if you are not sure.

author: Alex_Baker
author_rank: Frequent Contributor
timestamp: June 30, 2024, 12:25:13 am
content: Quote from: m k on June 29, 2024, 09:50:39 amThe only problem with this is that there are small voltages between earth sockets, which makes it impossible for my multimeter to do a resistance reading. I know there shouldn't be voltages on the PE wire, but nonetheless there is.

author: m k
author_rank: Super Contributor
timestamp: June 30, 2024, 03:35:45 pm
content: What is small?Digital multimeter can create AC volts from thin air.You can demonstrate that by moving hanging probes apart.For checks you can also use line voltages.But then you must be sure that your meter and leads are correctly protected.If PE is connected one side measures a line voltage contra it.I guess you can quite easily lose near 5% of line voltage for bad connections.If that stray voltage is real you can also use it and create a distance map.If there is a DC component you can also create a direction map.But don't take that result granted, situation can change depending how surrounding machines are on and off.It's also time consuming since you must move extension cord around and trust that its contact is equal enough.One overall downside with wall sockets is that some are extremely difficult to reach.And that doesn't even include exclusive ones, like fridge and washer.