Constantin
Well-known member
[BANG BANG BANG!]
There's those pesky uC companies beating on the door… again!
Finally got around to characterizing the RTC crystal approach with a CFS206, as promised. I used a GPS receiver to time the MCU crystal and the RTC crystal and a HTU21 temperature / humidity sensor to determine the PPM error vs. temperature. 50-odd measurements later, a least squares calculation distills the data points into a equation for a parabola that has a high degree of correlation.
Not that this approach is for everyone -
a) the MCU has to be on all the time (the TXO RTC can do this automagically)
b) temperature-based refreshes of the variables in question may interfere with other tasks.
c) having a accurate on-board temperature sensor is likely a requirement. The HTU21 is great - and I needed it anyway for humidity measurements.
d) You have to run the rig through a calibration routine with a GPS receiver. Takes time but factors can be stored once in EEPROM and forgotten. Accounts for all deltas…
So, plenty of reasons to stick to a TXO RTC, but I had fun showing that this approach can also work for my application. Despite all this, I may still make room on a daughter-board for your TXO RTC to give my colleagues the opportunity to eschew the need for GPS calibration.
The resolution for the above data is not the greatest because I was running the Teensy on a 5 second update loop per MCU / RTC cycle, so the PPMs measured increment in 0.2PPMs. But generally within 0.5PPM despite changing temperatures and likely could be better if the time constant were longer.
There's those pesky uC companies beating on the door… again!
Finally got around to characterizing the RTC crystal approach with a CFS206, as promised. I used a GPS receiver to time the MCU crystal and the RTC crystal and a HTU21 temperature / humidity sensor to determine the PPM error vs. temperature. 50-odd measurements later, a least squares calculation distills the data points into a equation for a parabola that has a high degree of correlation.
Not that this approach is for everyone -
a) the MCU has to be on all the time (the TXO RTC can do this automagically)
b) temperature-based refreshes of the variables in question may interfere with other tasks.
c) having a accurate on-board temperature sensor is likely a requirement. The HTU21 is great - and I needed it anyway for humidity measurements.
d) You have to run the rig through a calibration routine with a GPS receiver. Takes time but factors can be stored once in EEPROM and forgotten. Accounts for all deltas…
So, plenty of reasons to stick to a TXO RTC, but I had fun showing that this approach can also work for my application. Despite all this, I may still make room on a daughter-board for your TXO RTC to give my colleagues the opportunity to eschew the need for GPS calibration.
Code:
Welcome. Prepare to wait 0 seconds for CIC register to run out.
Now waiting for PPS signal acquisition.
Done.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.77PPM @ 22.83*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.77PPM @ 22.81*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.76PPM @ 22.75*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.75PPM @ 22.68*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.76PPM @ 22.70*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.75PPM @ 22.62*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.73PPM @ 22.43*C.
Actual MCU-RTC PPM delta: 6.80PPM, Predicted delta: 6.70PPM @ 22.21*C.
Actual MCU-RTC PPM delta: 6.40PPM, Predicted delta: 6.65PPM @ 21.87*C.
Actual MCU-RTC PPM delta: 6.40PPM, Predicted delta: 6.55PPM @ 21.24*C.
Actual MCU-RTC PPM delta: 6.60PPM, Predicted delta: 6.45PPM @ 20.77*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 6.37PPM @ 20.41*C.
Actual MCU-RTC PPM delta: 6.40PPM, Predicted delta: 6.29PPM @ 20.10*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 6.20PPM @ 19.79*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 6.13PPM @ 19.52*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 6.04PPM @ 19.25*C.
Actual MCU-RTC PPM delta: 6.40PPM, Predicted delta: 5.96PPM @ 18.99*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 5.88PPM @ 18.75*C.
Actual MCU-RTC PPM delta: 6.20PPM, Predicted delta: 5.79PPM @ 18.49*C.
Actual MCU-RTC PPM delta: 6.00PPM, Predicted delta: 5.70PPM @ 18.27*C.
Actual MCU-RTC PPM delta: 5.80PPM, Predicted delta: 5.61PPM @ 18.03*C.
Actual MCU-RTC PPM delta: 5.80PPM, Predicted delta: 5.52PPM @ 17.81*C.
Actual MCU-RTC PPM delta: 5.60PPM, Predicted delta: 5.43PPM @ 17.59*C.
Actual MCU-RTC PPM delta: 5.60PPM, Predicted delta: 5.34PPM @ 17.38*C.
Actual MCU-RTC PPM delta: 5.60PPM, Predicted delta: 5.25PPM @ 17.17*C.
Actual MCU-RTC PPM delta: 5.40PPM, Predicted delta: 5.16PPM @ 16.96*C.
Actual MCU-RTC PPM delta: 5.20PPM, Predicted delta: 5.06PPM @ 16.75*C.
Actual MCU-RTC PPM delta: 5.60PPM, Predicted delta: 4.96PPM @ 16.54*C.
Actual MCU-RTC PPM delta: 5.00PPM, Predicted delta: 4.86PPM @ 16.35*C.
Actual MCU-RTC PPM delta: 5.00PPM, Predicted delta: 4.77PPM @ 16.15*C.
Actual MCU-RTC PPM delta: 5.00PPM, Predicted delta: 4.66PPM @ 15.95*C.
Actual MCU-RTC PPM delta: 5.00PPM, Predicted delta: 4.56PPM @ 15.76*C.
Actual MCU-RTC PPM delta: 4.80PPM, Predicted delta: 4.46PPM @ 15.56*C.
Actual MCU-RTC PPM delta: 4.80PPM, Predicted delta: 4.36PPM @ 15.38*C.
Actual MCU-RTC PPM delta: 4.40PPM, Predicted delta: 4.25PPM @ 15.18*C.
Actual MCU-RTC PPM delta: 4.60PPM, Predicted delta: 4.14PPM @ 15.01*C.
Actual MCU-RTC PPM delta: 4.40PPM, Predicted delta: 4.04PPM @ 14.82*C.
Actual MCU-RTC PPM delta: 4.20PPM, Predicted delta: 3.93PPM @ 14.64*C.
Actual MCU-RTC PPM delta: 4.20PPM, Predicted delta: 3.81PPM @ 14.45*C.
Actual MCU-RTC PPM delta: 4.20PPM, Predicted delta: 3.70PPM @ 14.27*C.
Actual MCU-RTC PPM delta: 3.80PPM, Predicted delta: 3.59PPM @ 14.10*C.
Actual MCU-RTC PPM delta: 3.80PPM, Predicted delta: 3.48PPM @ 13.93*C.
Actual MCU-RTC PPM delta: 3.80PPM, Predicted delta: 3.37PPM @ 13.75*C.
Actual MCU-RTC PPM delta: 3.60PPM, Predicted delta: 3.26PPM @ 13.58*C.
Actual MCU-RTC PPM delta: 3.60PPM, Predicted delta: 3.15PPM @ 13.43*C.
Actual MCU-RTC PPM delta: 3.60PPM, Predicted delta: 3.04PPM @ 13.26*C.
Actual MCU-RTC PPM delta: 3.60PPM, Predicted delta: 2.92PPM @ 13.09*C.
Actual MCU-RTC PPM delta: 3.40PPM, Predicted delta: 2.82PPM @ 12.94*C.
Actual MCU-RTC PPM delta: 3.20PPM, Predicted delta: 2.70PPM @ 12.79*C.
Actual MCU-RTC PPM delta: 3.20PPM, Predicted delta: 2.59PPM @ 12.63*C.
Actual MCU-RTC PPM delta: 3.00PPM, Predicted delta: 2.49PPM @ 12.49*C.
Actual MCU-RTC PPM delta: 2.80PPM, Predicted delta: 2.38PPM @ 12.34*C.
Actual MCU-RTC PPM delta: 2.80PPM, Predicted delta: 2.28PPM @ 12.21*C.
Actual MCU-RTC PPM delta: 2.00PPM, Predicted delta: 2.12PPM @ 12.00*C.
Actual MCU-RTC PPM delta: 2.40PPM, Predicted delta: 1.97PPM @ 11.81*C.
Actual MCU-RTC PPM delta: 2.60PPM, Predicted delta: 2.05PPM @ 11.91*C.
The resolution for the above data is not the greatest because I was running the Teensy on a 5 second update loop per MCU / RTC cycle, so the PPMs measured increment in 0.2PPMs. But generally within 0.5PPM despite changing temperatures and likely could be better if the time constant were longer.
Last edited: