I made a DCF77 transmitter using this ESP32 board:
https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinoutsThe Arduino sketch is here:
https://github.com/SensorsIot/DCF77-Transmitter-for-ESP32/tree/master/DFC77_ESP32First, I thought everything is well but being in the development phase, I kept resetting the ESP32 board. Once I left it running a longer time, I saw that the time on the clock was drifting. Even though it was apparently getting the time from the NTP every hour, the time wasn't correct but adding almost a minute every hour.
If I pressed the reset button, the time would be correct again.
I read somewhere that ESP32 has an internal RTC which drifts badly while in deep sleep, so I tried light sleep with no success.
I gave up looking for a SW solution and I decided to do a hardware reset every time it wakes up by connection a digital output to the reset input of the board.
That solved the time accuracy issue but then I found that the go to sleep time drifts now. It is set to wake up at about ten to the hour and go to sleep at the top of the hour. It wakes up always on time but going to slip is delayed more and more.. It is almost like it has two independent RTCs, one that gets the time from the NTP server and is used to wake up and send the DCF77 signal and another one that is set only once at power up and drifts a lot when the device is in sleep and is used to go to sleep.
Do you gurus have an explanation for this behavior?
Cheers,
Miti