On the other side, we had intern at our (very small) company and he used his own mac. One time he had to debug a mains-powered device. He decided that he will try connecting it to both mains AND programming dongle without separating transformer. He fried the dongle (it literally exploded, plastic lid banging on desk in sudddenly silent office is the most memorable thing), the company provided monitor and device, but somehow his private mac mini survived all this while being in the middle.
That sounds fishy, even if the debugged device directly interfaced mains, the Mac doesn't. And even if it did, how high would the probability be that both machines were on different circuits with phases so much out of sync that it would matter?
Unless I misunderstood your story
That device was a cheap wifi power plug, had cheap unisolated power supply, it was never intended to have user accessible electrical parts sticking out, so no need for isolation. In such cases device has common ground with ac voltage. I don't know all specifics, but NEVER connect any single terminal of 220V plug to your computer ground (usb ground in this case). When it's properly grounded, most devices will survive this. But somehow monitor connected to that mac didn't survive it. And several milliseconds of full 220V before circuit breaker reacted, made very thin traces in debugger pretty much vaporise and explode.
If i remember correctly, a lot of power supplies of cheap electronics have AC-coupled the low voltage side with the mains side. There's no physical wire, just a capacitor. You can often feel the AC when touching the 'safe' side of the adaptor.
Forget “cheap”. As far as I can tell, many modern ungrounded power supplies, including Apple’s, have enough A/C coupling from the line to the output that you can feel a bit of tingling when you touch a metallic object connected to the output.
How is this even allowed? My tv had it. My MacBooks since time memorial have it. They all feel “spicy”.
The Y capacitor is needed to allow the EMI to have a way to ground from the output rather than going out and getting radiated by the output lines.
I don’t believe for a second that this is actually necessary in a way results in that spicy feeling. I do believe that it’s far cheaper to use a Y capacitor than to come up with a better filter network that works well, though.
Common mode noise filtering is either going to be purely inductive or need a Y-cap. No other way around it.
One can build lots of things out of inductors and capacitors. I bet it’s possible and even fairly straightforward to built a little network to allow high frequencies to pass from output to the two line inputs with low impedance but that has extremely high impedance at 50 and 60 Hz (and maybe even at the first few harmonics). It would add components, cost and volume.
I bet this could be done at the output side, too. And a company like Apple that values the customer experience could try to build a filter on their laptop DC inputs to reduce touch currents experienced by the user when connected to a leaky power supply. Of course, the modern design where the charging port is part of a metallic case might make this rather challenging…
(Seriously, IMO all the recent MacBook Air case designs are obnoxious. They have the touch current issue and they’re nasty feeling and sharp-edged.)
The capacitor has to see the common mode voltage. Where do you put the other end?
Off the top of my head? Make a little gadget that’s an inductor and capacitor, in parallel, tuned to 60 Hz (i.e. a band-stop filter) and, in series with that, a Y capacitor. Wire up this gadget in place of the Y capacitor, so you end up with two of them (line to output negative and other line to output negative, perhaps). Or maybe you just have one, and you connect it between the normal pair of Y caps and the output. It will have very high impedance at 60Hz, enough impedance from DC to a few kHz to avoid conducting problematic amounts of current at DC or various harmonics, and low enough impedance at high frequencies to help with EMI. It might need a couple types of capacitor in parallel in the band-stop part to avoid having the high-frequency impedance of the presumably large-ish capacitor in parallel with the inductor being a problem, and it might be an interesting project to tune it well enough to really remove the annoying touch current, especially if you believe in 50Hz and 60Hz operation. Maybe a higher order design would work better, but the size would start to get silly.
My Fold 5 has that feeling along the hinge when charging too, no matter the charger I use. I guess it's considered safe, but it's weird.
Totally believable if the debugging device was doing something with a serial port. I once hacked something together to interface a PC serial port to a Raspberry Pi. The PC serial is real-ish RS-232, with negative voltages. The Pi side was just 0/3.3V positive. I had a nice 18-volt power brick laying around, and just split it's output down the middle--what was 0 volt ground was used as -9 volts, the middle voltage was now 0 volt ground, and the 18-v line was now +9 V.
At first everything seemed OK. but when I plugged a monitor into the PI I Was Made To Realize a) the nice 18-volt PS really was high quality, and although it was transformer-isolated its output ground was tied to the wall socket earth, b) monitors also tie HDMI cable ground to earth, and so c) my lash-up now had dueling grounds that were 9V apart.