I tried connecting a 2200uF capacitor 5V>GND, but this did not solve the problem.
I replicated the problem by plugging in a fridge, a microwave, and a water cooler into a power strip and then connecting the arduino usb to the other plug in the same outlet. When I flip the power strip on/off, the arduino eventually hangs and loses connection.
This is a really annoying problem. ![]()