BatteryUndervoltageProtect.ino
Sketch containing the code that runs on the Arduino Pro Mini in this build. This code sleeps 99% of the time, waking up about every 4 milliseconds to check the voltage on the battery. If the voltage is high enough, then the MCU toggles the pins connected to the charge pump to keep the MOSFET turned on. If the voltage is below the set threshold, then the MCU goes to sleep forever, the charge pump discharges after a second or two, and the MOSFET stops conducting. The Arduino will not turn on again until either the battery is replaced or the reset button is pushed.
ino -
1.99 kB -
04/21/2018 at 18:27
|
|
Download
|