I have a design that has a +24VDC supply, a 7805 voltage regulator converting it to 5 volts and then a microcontroller and some peripherals behind the regulator.
The design and the 24V supply connector isn't meant for hot swapping, but users still do it. If the 24V connects before the ground, it seems that the 7805 acts pretty much as a short and everything behind it is at 24V (minus some voltage drop). When the ground connects a moment later, the microcontroller gives up the ghost, since all bypass capacitors have now 24V over them.
What could be done to fix this? Unfortunately the connector cannot be changed. I could change the regulator, but no datasheet mentions anything related to this. 7805 has a Darlington pair as an output transistor, would a MOSFET based regulator, such as LP2950 fix this? Another solution that came to my mind is using a 5.6V Zener between the 5V and the ground.
Here are the simplified schematics:
Simplified because there are a couple more ICs, but those are connected as the microcontroller, with a 100nF bypass capacitor. Those ICs typically die as well.
Microcontroller inputs have no external pull-down resistors to ground, but I2C and reset are pulled up to 5V.
Only connector on the board is the supply connector, so ground loops aren't possible.
I found this forum thread discussing about the same phenomenon, and to quote: "Just tested it. 12.00 in 11.52 out. --- So, I guess that loosing the ground will fry your circuit."