Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)
User avatar
By torntrousers
pieman wrote:
torntrousers wrote: I've tried that on several ESPs and they all seem to run a bit slow so it loses about 7 minutes per day, which probably wouldn't happen with an external RTC.

I was interested in your comments about ESP's losing 7 minutes per day. Maybe I am misinterpreting your term 'losing' as our tests with WeMos D1 Mini's suggest gaining 56 minutes per day. That is, with deep sleep set at 1 hour it wakes up in less than 58 minutes.

What i meant is that i have some ESPs where they publish a sensor reading once per day, so they deepSleep the rest of the time. The maximum deepSleep interval is 72 minutes so to do the once per day wake up it actually takes 24 deepSleep's of 60 minutes. But all the ESPs i've tried this 24 x 60 minute sleep with end up with a total sleep time of a bit less than 24 hours, so wake up and do the publish about 7 minutes early. (i guess thats actually running a bit fast not a bit slow isn't it)
User avatar
By mnaveed1
#76342 Hello,
I am working with AM2302 (humidity and temperature) sensor to record the readings and send data and go to deep sleep for 20 seconds using internal RTC of esp8266 thing dev board. But now for more accurate time keeping and extended time delay I want to use external RTC (DS321SN) to make my board go to deep sleep and wake up after specific length of time to send data. However, I am unable to write the code for it. Can anyone please provide me a code which I could use as a base to learn how to use external RTC together with ESP8266 thing dev ? Thank You!!
User avatar
By schufti
#76370 there is nothing special. you just connect the alarm output of the rtc with the rst of esp 8266.
after setting the wanted alarm time on the rtc you do a deepsleep(0); at the wanted time the rtc resets the esp and voila ... just watch out that alarm out of rtc fits the esp rst requirements (short low pulse).