One of the requirement of the ESPCLOCK project is to deal with persisting the clock time when the supply batteries run low, or when they are removed for battery change. For previous iterations of the project, a 0.47F supercap was attached to the ATtiny85 to keep it powered it long enough during a cut-off to write the clock time to flash memory.
For the ESP32, I found out it is impossible to power the main processor with the supercap, even if WiFi is not activated. It is just too power hungry! However, it is able to keep the ULP powered for 5 to 6 minutes. I found this out by getting the ULP to toggle an output pin and monitoring the output with a logic analyzer. The 0.47F supercap is placed across the 3.3V and GND pins. Power is supplied via the 5V pin. When the supply is pulled, the ULP continues to produce output for a further 5 to 6 minutes.
So the strategy I will adopt is this. The ULP will measure the supply voltage via a voltage divider.When the supply voltage drops below a certain threshold (eg. 4.2V for 4xAA), it will stop everything. The residual power in the batteries will keep the ULP and values stored in RTC slow memory running for a very long time, until the batteries are replaced.
Comments
Post a Comment