I'm designing a battery-operated device driven by an S2 mini board, which is based on an ESP32-S2 microcontroller. In order to save battery the board wakes up every 15 mn, does its thing, and then goes into deep sleep for another 15 mn. I'd like to implement some sort of low-voltage shut-down system to avoid over-draining the batteries.
I can do something like that in software, using the board's ADC to read battery levels, but some small current will continue flowing due to the resistors used to read the battery level, along with the LDO regulator's quiescent current (I'm using a HT733).
Is there a way to block all current out of the batterr once its voltage is below a certain threshold? Could I do something like this with a well-chosen p MOSFET? Or am I just better off with the software option?