ESP32 DCF77 Transmitter - Time Drifting - Page 1
Forum section: electronics / general

author: Miti
author_rank: Super Contributor
timestamp: January 06, 2023, 01:40:10 am
content: 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

author: bidrohini
author_rank: Regular Contributor
timestamp: January 06, 2023, 01:19:12 pm
content: You can check this regarding the ESP32 time drift issues:https://esp32.com/viewtopic.php?t=4941

author: Miti
author_rank: Super Contributor
timestamp: January 07, 2023, 02:39:55 pm
content: Quote from: bidrohini on January 06, 2023, 01:19:12 pmYes, I read that, thanks. I don't think it applies to me.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 07, 2023, 08:38:02 pm
content: Speaking of DCF77, I designed a clock with a DCF77 receiver years ago and it used to work absolutely fine.But for about a few months now, it doesn't receive any usable DCF77 signal - much too noisy at almost any hour now. Same area.Has anyone else noticed something similar?

author: wek
author_rank: Frequent Contributor
timestamp: January 07, 2023, 09:54:03 pm
content: > But for about a few months now, it doesn't receive any usable DCF77 signal - much too noisy at almost any hour now. Same area.My place is around 650km from Frankfurt. A commercial clock which used to lock in reliably during any night, this year twice it displayed wrong hours correct minutes.My parents live some 200km further away in a relatively undeveloped area, and my mum told me that this year it took a week for the DCF clock to adjust to winter time.The switching revolution, yay!JW

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 07, 2023, 09:55:31 pm
content: Quote from: wek on January 07, 2023, 09:54:03 pmAny idea what's the cause? A change in the transmission power of the DCF77 signal, or just the EM noise that has grown exponentially everywhere?

author: Miti
author_rank: Super Contributor
timestamp: January 07, 2023, 11:43:25 pm
content: Quote from: SiliconWizard on January 07, 2023, 09:55:31 pmTry now. I turned off my basement transmitter.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 07, 2023, 11:50:51 pm
content: Quote from: Miti on January 07, 2023, 11:43:25 pmLol. The fun part is that my clock actually just synced to DCF77. It hadn't in weeks.

author: Miti
author_rank: Super Contributor
timestamp: January 08, 2023, 12:02:20 am
content: Quote from: SiliconWizard on January 07, 2023, 11:50:51 pm

author: jav
author_rank: Contributor
timestamp: January 08, 2023, 12:53:13 pm
content: Quote from: wek on January 07, 2023, 09:54:03 pmI'm 1400 km away from Frankfurt, and I need a clear night and an outside view for the clocks to sync.I ended up building a transmitter out of a Raspberry Pi, so they're always in sync, and I can even include full local weather forecast in the signal. NTP syncs perfectly, and as the transmitter is using DMA, CPU load is negligible.

author: PinheadBE
author_rank: Regular Contributor
timestamp: January 10, 2023, 11:26:34 am
content: For several months now, I also have a commercial clock never getting synchronized again.I checked the presence of a typical DCF77 signal on the input pin of the µC, and it seems to be present.Weird.....

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 10, 2023, 06:52:48 pm
content: Quote from: PinheadBE on January 10, 2023, 11:26:34 amIt's not that weird. DCF77 is very easily perturbed by noise.And since transmission is very slow (1 bit per second) and a full frame spans over 60 s, the probability of getting a correct frame if your conditions are not ideal is pretty low.Bad decoders will give you an erroneous time/date. Good ones will just not sync.Many of us seem to have noticed a relatively recent degradation though, and as I haven't heard of any change for the transmitter, it's most likely due to an increase of environmental EMI.To pinpoint exactly the source(s) of this EMI, you'd need to investigate with proper equipment. But nobody seems to care.

author: 0xFFF0
author_rank: Regular Contributor
timestamp: April 04, 2023, 07:48:58 pm
content: you can check the status here:https://dcf77logs.de/live

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 04, 2023, 07:54:54 pm
content: I can confirm DCF77 reception has become absolutely atrocious especially in urban areas.In my case it is currently absolutely unusable (can take several weeks to be able to sync just once), while it was still fine a couple years ago, same area (would sync at least once a day or more).I know it has nothing to do with the emitter itself. Probably local interference that has gotten out of control.