Was fun.
Was fun.
Initially I was also going to use an external RTC but didn't want to have the additional circuitry to actually turn on and off the esp32 via the RTC's interrupt signal. Did you find that the internal RTC on the esp wasn't accurate enough?
It's more the power savings I was after :-) I wanted to put the esp32 into the deepest possible sleep state, which involves turning the RTC/RTC memory off entirely and is a pretty big drop. The external RTC I picked has a much lower current draw.
The esp's RTC is quite inaccurate, but certainly good enough to ballpark "morning update" and update system time to re-calibrate then.
I noted this in the "future work" section but I don't have a way to actually test or validate whether the various deep sleep levels are working. If I try to use the ammeter on a standard multimeter it can't cope with the changing ranges as the esp draws a bunch of power to boot and I think probably causes brownouts.
Do you have a current ranger / ucurrent gold type device?
- Put it in deep sleep
- On top of this, turn off the power domains for the RTC peripheral, RTC memory and the XTAL oscillator manually
- Use exlusively the ext1 external wakeup (ext0 requires the RTC peripherals to be powered on)
From my reading of the spec sheet, this is the best you can do on the chip.
Note that my choice of RTC also factors into the equation, the RV-3028-C7 has a significantly lower current draw than the common DS* RTC chips you see on maker-type boards.
And yeah, I bought a CurrentRanger :)
I'm very lazy about charging devices (I'm one of those people that keep their bicycle mechanical instead of going with the trend of electric shifters, because I absolutely don't want that hassle), so my goal was to maximize the number of months I wouldn't have to touch it.
Maybe I'll splurge for a CurrentRanger as well. I'm definitely on board with changing batteries as infrequently as possible.
I tend to go pretty obsessive with these release (e.g. https://github.com/eikehein/hyelicht), so it takes some time ...