Synchronize multiple DS3231 at once

dizcza
Posts: 56
Joined: Tue Sep 07, 2021 6:59 pm

Synchronize multiple DS3231 at once

Postby dizcza » Mon Jan 24, 2022 8:19 am

I have three DS3231 and I want to synchronize them all to have their clocks aligned with 100 us precision (deviation at the sync time point). Let's extend the solution for an arbitrary number N of RTC clocks. The real time they will be showing doesn't really matter as long as all of them are synced.
How to achieve this? Thanks.
The use-case is the following. I have three ESP32 and three DS3231 - one RTC per board. I can wire RTCs at home as I'd like to and then go take measurements with three clocks aligned for an hour.

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

Re: Synchronize multiple DS3231 at once

Postby liebman » Mon Jan 24, 2022 3:08 pm

I have a ESP32+GPS+DS3231 (it's an NTP server) https://github.com/liebman/esp32-gps-ntp that maintains time typically within +/- 10us of GPS. This tunes the AGEOFFSET register in the DS3231 to speedup/slowdown the RTC. Also has a high level interrupt handler in assembly that detects the time delta between the GPS second mark and the RTC second mark. Maybe this can help or provide ideas.
-- Chris

dizcza
Posts: 56
Joined: Tue Sep 07, 2021 6:59 pm

Re: Synchronize multiple DS3231 at once

Postby dizcza » Mon Jan 24, 2022 3:18 pm

liebman wrote:
Mon Jan 24, 2022 3:08 pm
I have a ESP32+GPS+DS3231 (it's an NTP server) https://github.com/liebman/esp32-gps-ntp that maintains time typically within +/- 10us of GPS. This tunes the AGEOFFSET register in the DS3231 to speedup/slowdown the RTC. Also has a high level interrupt handler in assembly that detects the time delta between the GPS second mark and the RTC second mark. Maybe this can help or provide ideas.
-- Chris
Thanks, I didn't know that DS3231+GPS offers such a high time precision of 10 us. I'll look into it.

Who is online

Users browsing this forum: No registered users and 125 guests