Electronic – Low voltage shutdown with regulator using microcontroller

voltage-regulator

I'm using a lithium polymer battery with an LDO regulator. I want the regulator to shut down when the battery voltage gets too low. I'd prefer to monitor the battery voltage using a microcontroller that's already in my circuit rather than adding a separate voltage supervisor or comparator to control the regulator's Enable pin.

The problem is that the microcontroller is powered by the regulator's output VDD, so before the regulator is enabled, the microcontroller is off and its GPIO pin can't control the Enable pin. The battery's on/off switch is an SPDT switch and not momentary. Is there a solution to this that would "cost less" than adding a voltage supervisor/comparator to control the regulator's enable pin? And not adding a momentary switch? I know this won't work:

enter image description here

Best Answer

A supervisory/comparator or circuit is required if you want to do LDO enable control. One other option are LDO's with undervoltage lockouts which essentially have a comparator built in. Like the one in this question.

LDO with low-voltage cutoff?

Your right, you can't use a microcontroler to do undervoltage control, because it needs voltage to run. You need an external circuit. Another option is to use a pmosfet to do the control, which doesn't require a comparator.