I designed a PCB with a microcontroller and a load that draws 3A on average with current spikes of up to 9A. The PCB is powered by a high-drain Li-Ion battery. I want to add a simple undervoltage protection feature to the firmware that cuts the load from the power supply when the battery voltage falls below a certain threshold. The microcontroller can measure battery voltage, but I'm unsure under which conditions to cut the load from the power supply. There are in principal two different approaches:
- cut the load from the power supply when the battery voltage falls below 2.7V (or another threshold), independent from how long the battery voltage stays below this value
- cut the load from the power supply when the battery voltage falls below 2.7V (or another threshold) for a certain time
I'm unsure which approach would be better. If the second approach would be better, what would be an appropriate time during which the battery voltage would need to stay below the threshold?