I've managed to render 3 different Arduino boards inoperable over the past few days and I'm trying to isolate where I'm going wrong. My current suspicion is that the grounds in my home are incorrectly wired and when I connect my Arduino's ground up to that third wall prong (via whatever device, see next), it's toast.
The recurring scenario is:
- Connect Arduino via USB to laptop. It's a Mac laptop with a 2-prong connector, i.e. no mains ground connection.
- Load a trivial program into the board. Works like a charm.
- Program loads a number of times without problems, make some tweaks, all is well so far.
- During my fiddling I also have a battery powered multimeter, and an oscilloscope (this one: https://www.amazon.com/Hantek-DSO5102P-Digital-Storage-Oscilloscope/dp/B01EJLZYN8), which I'm using to verify things are as I think they are. I'm pretty sure this scope, like most, has the ground clip connected to mains ground.
- All of a sudden, I go to try loading the next iteration of my program, and it doesn't load. Error says it cannot find the USB port. (Arduino is SAMD21G powered, with USB connected directly to the MCU.)
- That board never works again ever. Pull another board fresh out of the box and it works fine.
I have verified that:
- It is not a problem with the USB port. As above, another board works correctly using the same port.
- I'm pretty sure I didn't make a silly mistake like plugging 5v or more into something expecting 3.3v, at least not three times in a row.
As above, I think the common denominator is the ground connection from the oscilloscope. (It's hard to pinpoint exactly because each time I was doing a lot of poking around and there's no smoke or even change in LEDs, etc., the board seems to continue executing code correctly - the only time I find out that it went bad is the next time I try to load code onto it and it doesn't work.)
I then remembered that a house inspection done earlier on this home revealed this:
(This is physically located on the other side of the property but it's the same overall electrical system.)
Okay, so with all that, my question is: Is it possible that this (or some other) incorrect wiring situation could result in the use of my (mains-grounded) oscilloscope causing permanent damage to these Arduino boards?
This is probably a silly question for someone with a lot of electrical experience and education, but with what I know so far, I haven't been able to wrap my wits around what the effect of connecting neutral and ground together on a sub-panel would be in this situation.
UPDATE: I did some other measurements:
- First, I measured bench power set to the 4.5v knob shows 5v on the oscilloscope. Then, removing the ground and measuring + on the 4.5v bench terminal vs disconnected/mains ground:
That's pretty clearly following the regular main power of the building. Not sure why it's 94v, but otherwise it looks very much like wall power to me.
- Scope's ground clip connected to mains (scope coax shield) and probe connected to USB shield of laptop with laptop plugged in:
- Same thing with laptop unplugged (battery power only):
So... maybe the problem is me connecting/disconnecting the scope's ground to/from the USB shield (Arduino's ground) while everything is connected and running - creating a momentary ~100v difference and causing damage? Which would lead me to believe that if I need to use the scope, then I should first connect the scope ground to the USB shield's ground before doing anything else(?)