Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCF8523 Load Capacitor Selection #266

Open
gsauthof opened this issue Sep 19, 2022 · 0 comments
Open

PCF8523 Load Capacitor Selection #266

gsauthof opened this issue Sep 19, 2022 · 0 comments

Comments

@gsauthof
Copy link

gsauthof commented Sep 19, 2022

The PCF8523 RTC integrates the load capacitor (C_L), but not the 2**15 Hz oscillator itself.

According to the PCF8523 datasheet one can chose between to internal capacitors (cf. the first control register): C_L=7 pF and C_L=12.5 pF

Looking at the Adafruit PCF8523 RTC PCB schematics I don't see any C_L value specified on Q1.

Looking at the Adafruit rtclib code I don't see the capacitor bit (in register control 1) being set anywhere. Thus, the default value of 7 pF is used.

Thus, I was inclined to believe that Adafruit's PCF8523 RTC PCB indeed uses an C_L=7pF oscillator.


However, I calibrated an Adafruit PCF8523 RTC (STEMMA QT version, under the default C_L setting) and I measured an offset of 186 ppm.

This seems to be excessive, since almost all oscillators on common distributors (such as digikey/mouser) have a frequency stability of +- 100 ppm or less specified. And the cheapest ones even have a specification of +- 25 or 50 ppm.

Common aging specifications are +- 3 ppm per year.

Since such oscillators run faster if you use a C_L lower than the specified value I developed the suspicion that the Adafruit PCF8523 RTC PCB really uses an 32.768 kHz part with C_L=12.5 pF.

Case in point: oscillators with C_L > 7 pF also seem to be more common and easier available through distributors.
NXP agrees:

As previously pointed out crystals used for RTCs come in three versions, optimized for
three standard values for C L with 12.5 pF the most common. Generally, an RTC using a
12.5 pF crystal has a timekeeping current of about 1.6x more than an RTC using a 7 pF
crystal. [..] An oscillator using a 12.5 pF crystal will be more stable and less susceptible to noise and
parasitic capacitances. [..] Besides technical considerations there are also procurement issues. Crystals designed for a 12.5 pF load capacitance are readily available through many distributors.

I thus repeated the calibration with a C_L=12.5 pF selection (i.e. 7th Control 1 register bit set to one).
And as expected, the calibration offset is much lower: just 8 ppm


Could you clarify what kind of oscillator the Adafruit PCF8523 PCB actually uses?

If it indeed uses a C_L=12.5 pF one it would make sense to adjust the initialization code in rtclib, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant