Killertechno
Posts: 192
Joined: Wed Jan 02, 2013 8:28 am

[RTC] DS3231 clock calibration (doubts and trouble)

Fri Aug 17, 2018 3:39 pm

Hi to all, I need to sync external hardware for acquire data @500 SPS, so to keep time updated I used DS3231 on my Pi.
First of all, I compared DS3231 square wave to PPS output of GPS receiver (Ublox Neo-M8T).
I've seen there is a drift between DS3231 output and PPS signal, so taking a look I discovered DS3231 clock tolerance is about 1,5ppm (at room temperature).
On the web I can find DS3231 board with embedded eeprom, so I supposed to check clock drift at different temperatures, store values on eeprom, and change ageing register upon temperature to keep DS3231 internal clock as precise as I can.
Is this a good idea or is there some kind of Debian process to keep already updated DS3231 clock drift?

I discovered every about 10 minutes, DS3231 registers are updated, such if

Code: Select all

hwclock -w 
would be executed.
Any ideas about who is updating RTC?
Thanks.

wh7qq
Posts: 1366
Joined: Thu Oct 09, 2014 2:50 am

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Sun Aug 19, 2018 1:18 am

The ds3231 keeps time with a temp controlled crystal oscillator whereas the GPS signal is tied to an atomic clock. Which do you think is more accurate and precise? There are all sorts of internal delays and variable propagation delays for both systems so to expect perfect synchrony between the two is fatuous. The "drift" you are seeing may or may not be real but choose one or the other and sync everything else to it and you should be ok with the external devices unless they have independent time bases.

Killertechno
Posts: 192
Joined: Wed Jan 02, 2013 8:28 am

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Sun Aug 19, 2018 12:27 pm

Which do you think is more accurate and precise?
You don't need to do this question.

How could you say "may not be real "?
Comparison among different GPS receivers (not taking care of cable length) I see PPS edge offset difference is whithin 10us, no drift.

Paul Hutch
Posts: 437
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Mon Aug 20, 2018 3:05 pm

There appear to be more counterfeit, decades old stock, and recycled DS3231's on the market now than new units. The chip alone sells for $4.00US in 1000 piece quantities so if a complete PCB, chip, capacitor, and resistors module sells for less than $10 in single piece quantities I'd be suspicious that it will not actually meet the full set of specifications like a brand new chip will.

Killertechno
Posts: 192
Joined: Wed Jan 02, 2013 8:28 am

Re: [RTC] DS3231 clock calibration (doubts and trouble)

Mon Aug 20, 2018 8:12 pm

Paul Hutch wrote: I'd be suspicious that it will not actually meet the full set of specifications like a brand new chip will.
It meets. 1 ppm is within specifications, but regardless temperature.
I just suggested to trim DS3231 depending temperature to increase accuracy.

Return to “Advanced users”