Electronic – Should a mechanical power switch float or ground main power when the system is off

powerpower supplyswitches

Whenever I've put a mechanical switch on a design to allow a battery to be connected / disconnected, I've always just floated system power whenever the switch is open, like this:
Schematic with floated "off" state

However, a colleague asked during a design review whether it makes more sense to ground system power when the device is off:
Schematic with grounded "off" state

From a basic functionality perspective, I believe that either should work. However, I was curious if there is a particular reason to choose to float or ground the main supply in the "off" state?


Edit: Several (very helpful!) initial answers and comments discuss potential harms or considerations if we do choose to ground the input. Are there any extra risks or considerations for leaving the input floating (the first design)?

Best Answer

Shorting the input to ground can damage some regulators because the output capacitors and multifarious bypass capacitors which may be connected to the output discharge through the regulator. It's not necessarily easy to tell from the datasheet whether that is true. You could add a resistor between the switch and ground to reduce the chances of that happening.

Some regulators have a pull-down transistor on the output to quickly discharge the output capacitors so you can reset (say) a micro by quickly cycling the power. This particular one does not seem to. Discharging the input capacitor with a switch takes you part of the way there, but there is no guarantee the output capacitors will be discharged quickly (though they probably will).