sbolel:
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.
I think that is going a little far. You only need to simulate with the appliances that will be used there. (and the microwave does not use any energy when plugged in)
I put my cap across the power supply output, not the 5V. Energy stored in a capacitor varies quadratically with voltage. My circuit ran for three days and never reset. Even if it does, I turned on the WDT for two seconds as a redundant safety measure.