RTC time drift calculation ???

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
I have 32.768KHz internal RTC in STM32L.
Now I have choosen crystal +/-20PPM.
How to calculate time drift of RTC ???

Thanks !!!
 

MrChips

Joined Oct 2, 2009
30,618
We can examine this in different ways.

How many minutes are there in one year?

1 year = 365 x 24 x 60 = 525,600 minutes
Hence there are about 1 million minutes in 2 years.
If your clock was stable to 1 ppm, it might drift 1 minute in 2 years.
If your clock was off by 20 ppm, the error would be 20 minutes after 2 years.

Here is another view.
How many seconds in 12 days?
12 days = 12 x 24 x 60 x 60 = 1,036,800 seconds
Hence we can do the same analysis.
1 ppm = 1 second error in 12 days.
20 ppm = 20 second error in 12 days.

And another view.
There are 60 x 60 x 14 = 50,400 seconds in 14 hours.
An oscillator with 20 ppm error would have a 1-second error in 14 hours.

However, ±20 ppm does not tell the whole story.
You need to know about the temperature dependency of the crystal oscillator.

You also need to put a trimmer capacitor in your crystal oscillator circuit. Even though the crystal may have a ±20 ppm specification, the purpose of the trimmer capacitor is to reduce the absolute error to less than 1 ppm.

At 1ppm absolute error, an RTC might have an error of 1 minute in 2 years which is beyond most everyday time-keeping expectations.
 

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
We can examine this in different ways.

How many minutes are there in one year?

1 year = 365 x 24 x 60 = 525,600 minutes
Hence there are about 1 million minutes in 2 years.
If your clock was stable to 1 ppm, it might drift 1 minute in 2 years.
If your clock was off by 20 ppm, the error would be 20 minutes after 2 years.

Here is another view.
How many seconds in 12 days?
12 days = 12 x 24 x 60 x 60 = 1,036,800 seconds
Hence we can do the same analysis.
1 ppm = 1 second error in 12 days.
20 ppm = 20 second error in 12 days.

And another view.
There are 60 x 60 x 14 = 50,400 seconds in 14 hours.
An oscillator with 20 ppm error would have a 1-second error in 14 hours.

However, ±20 ppm does not tell the whole story.
You need to know about the temperature dependency of the crystal oscillator.

You also need to put a trimmer capacitor in your crystal oscillator circuit. Even though the crystal may have a ±20 ppm specification, the purpose of the trimmer capacitor is to reduce the absolute error to less than 1 ppm.

At 1ppm absolute error, an RTC might have an error of 1 minute in 2 years which is beyond most everyday time-keeping expectations.

Thank you so much !!!!
MrChips.
Wonderfull explanation !!!

Yes , Time drift varry as Temp rise above and below of 25degC !!!
 
Top