While electronics is one of my two hobbies, even after your much appreciated explanations, I would be lying if I said I fully understand exactly what’s going on.
The power bricks you are using (to charge your macbook and to power your other equipment) input dangerous mains electricity and output safe, isolated low-voltage electricity. They are "safety devices" that are designed to
almost guarantee that you cannot be electrocuted by anything plugged into the low voltage side, like a laptop, or even if you put the output lead into your mouth like a small kid might.
The problem is that these power supplies are hyper-optimised for their goals of safety, radio compliance and low-cost. What if they gave you the sensation of being gently electrocuted, but don't
actually electrocute you? That's perfectly fine! That doesn't break any of their goals. And if it makes them cheaper and emit less radio interference then that's even better.
Seriously. That's the reason. That's the thinking behind it.
I'd prefer to also give you some more technical detail on what's going on. Have a look at this circuit diagram of a power supply similar to what you might find in your laptop charger:
(stolen from https://www.electrothinks.com/2021/02/12V-2a-switch-mode-power-supply-with-lp2704a.html ) On the bottom-left you can see the dangerous 240V mains coming in. On the right you can see the safe, isolated 12V coming out. I've highlighted the dangerous and safe halves of this circuit. Touch anything on the red side and you may get electrocuted, touch anything on the blue side and you'll be fine.
There are three key components that bridge the dangerous and safe sides. From top to bottom: a capacitor (C6), a transformer (T1) and an optocoupler (U1).
The transformer does a really good job at isolating the dangerous side from the safe side. It doesn't let electricity through directly, it smuggles the electricity through a magnetic field to get it from one side to another, and in a very controlled manner.
The optocoupler similarly does a really good job at isolating the dangerous side from the safe side. It doesn't let electricity through directly, it smuggles the electricity by converting some to light and using something similar to a solar panel on the other side to detect it.
The capacitor... it doesn't do so well. It straight up lets electricity from the dangerous side go to the safe side. It doesn't smuggle. It doesn't even launder. The only saving grace is that it only allows a
little bit across.
That's your tingle.
The evil class Y capacitor leaks a tiny bit of dangerous mains across to the safe side, into your laptop and then into you when you touch its case. It's enough to feel but not enough to harm you. (Technically it could harm you if you attach it to subdermal metal probes in your body, especially if they're close to your heart or in your brain. Please don't do that.)
The evil class Y capacitor reduces the (unwanted) radio emissions of the power supply without needing to kill anybody, so the designers consider it a win.
You can exorcise the evil in one of two ways:
(1) Remove the capacitor, or
(2) Attach the output GND to mains ground.
Removing the cap is difficult because the power supply is in a welded or glued plastic shell. You probably don't want to muck with dangerous power supplies if you don't have much experience. Not to mention that operating a source of radio interference in a hospital is ethically questionable.
Attaching the output GND to mains ground is a much easier solution. The key to understanding this is to imagine yourself as being at mains ground (close enough) and the two wires coming out of the power supply being at these voltages when compared to you:
+12V: 12VDC + 90VAC of mains tingle from the Y class capacitor
GND: 0VDC + 90VAC of mains tingle from the Y class capacitor
If you attach the power supply output GND to mains ground then you will suppress the tingle voltage:
+12V: 12VDC + 1VAC of mains
tingle from the Y class capacitor
GND: 0VDC + 1VAC of mains
tingle from the Y class capacitor
You can achieve this in many ways, including:
* Attaching a USB cable between your macbook and something with mains ground (the USB shield will connect the earths)
* Using a power supply with a three-prong plug (has mains ground) instead of a two-prong plug (ungrounded)
Does that make sense? The technical section might have gone a bit off the rails, please feel free to ask questions.