AN2971
Application note
Using the typical temperature characteristics of 32 KHz crystal
to compensate the M41T83 and the M41T93 serial real-time clocks
Introduction
Typical real-time clocks employ 32 KHz tuning fork crystals. While being well suited to the
low-power needs of battery-backed applications, they can drift significantly over the
industrial temperature range –40 to +85°C. At the extreme temperatures, drifts are
somewhere between –108 and –177 parts per million (ppm), a loss of about 5 to 8 minutes
per month. Full temperature compensation is possible, but costly. However, a simplified
technique can be employed which can greatly improve the drift, and hence improve the
timekeeping accuracy of the RTC without adding significant cost.
Knowing the general shape of the tuning fork crystal's temperature curve, such a
compensation scheme is possible in applications where a temperature sensor is in use.
As shown in
Figure 1
below, in the shaded portion nearer the bottom, the accuracy of the
32 KHz crystal falls off appreciably as the temperature approaches the limits of operation.
The pink line in the middle of that region is considered the typical behavior. If the oscillator
is adjusted for the expected or typical curve, the accuracy approaches the shaded region
depicted at the top of the figure, to something nearer the range ±25 ppm, about 1 minute per
month, a much more tolerable range of accuracy. Essentially, this technique takes the
bottom shaded region and straightens it out along the temperature axis.
In many applications that level of accuracy is all that is required. This document describes
how to implement such a compensation scheme.
Figure 1.
32 KHz crystal drift versus temperature
30
20
10
0
-10 -50 -40 -30 -20 -10
-20
-30
-40
-50
-60
-70
-80
-90
-100
-110
-120
-130
-140
-150
-160
-170
-180
0
10
20
30
40 50
60
70
80 90 100
PPM
Uncompensated
range of drift versus
temperature
MAX
TYP
MIN
post-max
post-min
TEMP (°C)
AM03096v1
July 2009
Doc ID 15627 Rev 1
1/12
www.st.com
Additional considerations
AN2971
1
Additional considerations
The turnover point is the temperature at which the crystal is at its highest frequency. This is
the maximum or highest point on the temperature parabola and is referred to as T
0
. In
Figure 1,
it was assumed the turnover point was 25°C. It will in fact range between 20 and
30°C for most 32 KHz crystals.
Figure 2.
Typical temperature curves for three different turnover points after
calibration to 0 ppm at 25°C
Three turnover points (k=0.036, typical)
5
T
0
(°C)
30
25
20
0
0
10
20
30
40
50
-5
-10
PPM
-15
-20
-25
-30
-35
TEMP (°C)
AM04628v1
During factory calibration of the M41T83 and M41T93, the oscillator frequency is adjusted
until the device is very close to 0 PPM at 25°C. This has the effect of moving the
temperature curve up and down.
If the turnover point is at 20°C, after factory calibration, the device will be at 0 PPM at 25°C,
but will run at its fastest at 20°C. This is depicted by the orange curve.
Similarly, if the turnover point is at 30°C, after factory calibration, the device will be at 0 PPM
at 25°C, but will run at its fastest at 30°C. This is depicted by the blue curve.
Thus, the temperature turnover point moves up and down with calibration, but remains at the
same temperature.
2/12
Doc ID 15627 Rev 1
AN2971
Additional considerations
When the minimum and maximum values are included for all three turnover points, the
curves of
Figure 3
are derived. The pink region is the same as before in
Figure 1
and
represents the minimum and maximum cases for a turnover of 25°C. The pink brackets on
either side of
Figure 3
help make this clear.
Figure 3.
Range of drift for three turnover points
40
TEMP (°C)
-50 -40 -30 -20 -10
-10
0
10 20 30 40 50 60 70 80 90 100
T
0
/k
20/0.030
20/0.036
20/0.042
25/0.030
25/0.036
25/0.042
30/0.030
30/0.036
PPM
-60
30/0.042
T
0
=30°C
-110
T
0
=20°C
T
0
=25°C
T
0
=25°C
-160
T
0
=20°C
T
0
=30°C
-210
AM04629v1
The blue shaded region covers the minimum and maximum cases for a turnover of 30°C,
and the orange shaded region covers the minimum and maximum cases for a turnover of
20°C. The entire range of drift is indicated by the dashed black lines, and is the sum of the
three cases.
Doc ID 15627 Rev 1
3/12
Additional considerations
AN2971
For the purposes of this application note, the net result of considering the turnover point is
an increase in the amount of uncertainty in the drift at the temperature extremes. With this
added, the straightened uncertainty region shown at the top of
Figure 1
becomes that of
Figure 4
below.
Figure 4.
Range of drift after compensation
-50 -40 -30 -20 -10
40
30
20
DRIFT (PPM)
10
0
-10
-20
-30
-40
-50
-60
AM04630v1
0 10 20 30 40 50 60 70 80 90 100
TEMP (°C)
T
0
=
25°C
T
0
=20
to 30°C
In
Figure 4,
the black dashed lines show the entire range of the drift after compensation. As
before, in
Figure 1,
the gray region represents the parabolas after they have been
straightened along the temperature axis.
After compensation, the drift should be no worse than ±20 ppm in the range –10 to +50°C,
and typically less than ±10 ppm in that range as shown by the gray dashed lines for
T
0
= 25°C
Crystal equation
The drift of a tuning fork crystal is described by the equation below.
Δ
f
= −
k
⋅
(
T
−
T
0
)
2
f
0
Here, the drift is expressed as a fraction of the nominal frequency, f
0
. The factory calibration
adjusts for the deviation of f
0
from 32768 Hz. T
0
is the turnover point, and T is the
temperature, in Celsius. k is a constant in the range 0.030 to 0.042, with a typical value of
0.036. When plotted, the equation gives the curves shown in
Figure 1
through
4.
The typical
case in
Figure 1
is for k = 0.036. The other values of k give the minimum and maximum
(dashed line) curves.
4/12
Doc ID 15627 Rev 1
AN2971
Application theory
2
Application theory
As shown in
Figure 5,
the typical temperature characteristics of the 32 KHz crystal are
described by a parabola. Away from the center point, at temperatures above and below
25°C, the crystal tends to run at lower frequencies. A table can be derived from the curve
from which the user can look up the approximate drift (in parts per million or PPM) of the
clock for a given temperature. Thus, if the application can measure the temperature, it can
predict the drift of the real-time clock and compensate accordingly by adjusting the RTC's
calibration circuit.
The M41T83 and M41T93 employ analog calibration circuits which adjust the frequency of
the oscillator by adding or removing capacitance. The non-linear relationship between the
load capacitance and frequency is depicted in the curve of
Figure 7.
Note that, since the curve is non-linear, the incremental change in PPM of the oscillator
varies with the position on the curve. That is, a small change in capacitance does not have
the same effect on PPM at one point on the curve as at another. Therefore, in order to
determine how much incremental capacitance to add or remove to achieve a desired PPM
shift, the user must first determine where on the curve the device is operating.
In the cases of the M41T83 and M41T93, in the embedded crystal package, a factory-
calibration value is programmed into a permanent (one-time programmable) register which
can be read by the application. This provides the starting point for the calibration procedure.
It indicates where on the curve the device is operating at room temperature.
In summary,
Figure 5
(tabularized in
Figure 6)
tells the user the necessary PPM of
calibration required for a given temperature. In turn,
Figure 7
and
Figure 8
allow the user to
determine the load capacitance setting necessary to achieve the desired PPM shift.
Doc ID 15627 Rev 1
5/12