Some insights gained while working on my tonight:
* to get long battery life in a battery powered IOT-like application with an ESP8266, it is essential that the device can sleep efficiently
* the DS3231 is a nice 3.3V compatible real-time-clock chip but you cannot directly use its alarm output to trigger ESP8266 wakeup because it has alevel-like output. If you tie it directly to the ESP8266 reset pin, it will keep the ESP in reset, so the ESP is unable to clear the DS3231 alarm (a dead-lock / chicken-and-egg problem).
* however, if you put a 1 uF capacitor in series to the ESP reset input, the DS3231 low-level alarm output is converted into a low-going pulse, which asserts the ESP reset only momentarily. This is a bit like how the classic arduinos receive a short reset pulse when the DTR signal goes low.

This should allow arbitrary long sleep times, with wakeup exactly on the time programmed into the DS3231 RTC.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...