When I was struggling with the correct capacitative loading for the latest design, I iterated through 4 different crystals at DigiKey before settling on the one from Citizen Finedevice that's specified.
First, a little background on how you properly use crystals. I'm sure there are more details that a real perfectionist could delve into, but I'm just going to touch on enough high points to arrive at the correct design.
I came at this being used to the DS1307 RTC chip. It's datasheet says that it's oscillator is designed with the proper loading built-in for a 12.5 pF 32.768 kHz crystal. So for that chip, all you do is hook the crystal straight up (with short leads and a keep-out zone around the crystal, its traces and pins, and so on). When I came to design the Crazy Clock, I looked at this application note. In particular, it showed pictures of bare crystals being attached directly to the leads of microcontrollers for testing. No loading caps. That was how I arrived at the erroneous design that runs ~115 ppm fast.
In actual fact, the ATTiny datasheet says that the low frequency crystal oscillator provides 18 pF on one pin and 8 pF on the other. The actual loading capacitance presented to a crystal is the product of the sums of the capacitance on each pin divided by the sum of the capacitance on each pin. (18+8)/(18*8) is around 5.5. Well under half the capacitance required.
Crystals exhibit an inverse logarithmic relation between their frequency and loading capacitance. The logarithmic asymptote is chosen by the manufacturer to be well below the target frequency so that the correct loading lines it right up to the target. Doing this allows the "flatter" portion of the curve to be near the calibration point, making the crystal less sensitive to the accuracy of the loading. Of course, "less" and "zero" aren't the same thing, and even NP0 caps are still +/- 5% generally.
So back to the sampling of crystals. Adding 12 pF loading caps to each lead of the crystal lands us, in theory on 12 pF. The traces on the board are quite short, but will still contribute some loading. In principle, that should bring us up to at least 12.5 pF. The weird part? Three out of four of the crystals I sampled still ran slightly fast. The last crystal? It ran *way* fast. For that last crystal, I tried using 15 pF caps instead. Using 15 pF results in a loading capacitance of 13.5 pF or so. The result? It was spot on.
And so, the mystery is complete. The Citizen Finedevice crystal I'm using in all of the prototypes with 15 pF loading caps results in units that calibrate almost perfectly - well inside of 10 ppm for the most part.
Even if my calibration methodology is wrong, that still doesn't account for the observed differences among all of the manufacturers. According to what I have observed, for Citizen Finedevice, 13.5 is the new 12.5.
I wrote them and asked. Their reply was indicative of an impenetrable language barrier. I gave up on trying to chase it down. All I know is that the combination I've picked appears to be what works the best.
We'll see when the manufactured samples arrive tomorrow.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.