for my project I need "precise" timing so I started to play with crystals. I have GPS module and consider the 1PPS signal as a "gold standard". Problem is I can catch the signal only outside. So I checked the DS3231 board 32kHz output and confirmed it has <3ppm deviation from the 1PPS with minimal jitter and I am using this as precise time for testing other sources.
I have 20 watch crystals from eBay and a few PCF8563 RTC chips. On solderless breadboard I connected the watch crystal to the RTC chip and measured its 32kHz output - it was a lot faster, about 200ppm compared with DS3231. But compared to other crystals in the batch they have the same "offset". Now I see two possible explanations:
- The crystals are poorly cut and are off
- My "layout" is poor and parasitic capacitance of the breadboard pulls the crystal off
What do you think about it?
Probably a combination of both.
Instead of using el-cheapo crystals from eBay, why not buy one of known specification from a decent vendor and see what results you get.
What is the application that needs "precise" timing.
Have you considered that temperature will also cause frequency drift?
On solderless breadboard I connected the watch crystal to the RTC chip and measured its 32kHz output - it was a lot faster, about 200ppm compared with DS3231.
Did you add some load capacitance. Without that the frequency will be too high.
Different 32kHz crystals might need different load capacitance.
You could manually trim the frequency to 0ppm with a trim cap (~30pf).
Or do it the old way, with a 'gimmick capacitor'.
Watch crystals from eBay are probably rejects that failed to make the 100ppm bin!! If you want accurate get a good TCXO oscillator, not a random cheap crystal.
In fact this is more XY problem. I was reading about crystals and I know "a lot" but not the "important".
I know crystal needs load capacitance which is very tiny in general. If you have a datasheet of the crystal the manufacturer states capacitance the crystal needs and it is usually around 10-20 pf. But the IC driving the crystal has already some capacitance. Also traces on PCB has some capacitance. Solderless breadboard even more. You should know this capacitance to select proper load caps - but you can hardly measure it because the probe will have some capacitance too. So in reality for fixed layout you try it, measure real frequency and add capacitors to pull it to the desired one. Is it true?
But there come the ppm rating. Let say I get a 20ppm crystal from a reliable manufacturer. What this number means? I thik it is defined "with rated load capacitance frequency of the crystal will be 20ppm from rated over the whole temperature rage". Is it correct? But since I don't know what load capacitance on the crystal really is (I added some capacitance I hoped it is close) I will likely not get into the 20ppm range, right? But unless the load capacitance is extremly off I will still get good frequency stability - 20ppm from the new pulled frequency?
So far I ever used crystals of various speeds without any load capacitors - just internal capacitance of the chip and parasitic capacitance of breadboard. The crystal ever started ad was running close to the rated frequency - both watch crystal and 20MHz crystal (for ATMega). Since "everyone" uses load crystals I think there is a catch here. Is it only wrong frequency? Risk the crystal won't start properly? Or increased current consumption?
Watch crystals from eBay are probably rejects that failed to make the 100ppm bin!!
What can I expect from such crystal? At nominal load and room temperature more than 100ppm from nominal frequency (I measured 200ppm) but it holds this "wrong frequency" as precisly as a good crystal holds the right 32.768 frequency? It can be easily compensated in SW. Or does it mean the crystal also drifts so much with age/temp etc?
I wouldn't trust an eBay purchase to conform to published data. If you you want accurate don't buy crystals without a load capacitance rating in the first place - better still a TCXO performs much much better than a bare crystal and you don't have to worry about capacitance, its all done for you. Modern SMT TCXOs are surprizingly cheap for 1ppm performance...
for my project I need "precise" timing so I started to play with crystals. I have GPS module and consider the 1PPS signal as a "gold standard".
32KHz crystal will be +- 20ppm even if you get a really good one, I'd guess any old xtal from eBay could be +- 100ppm easily.
Standard oscillator modules for 32kHz are around 25ppm.
A TCXO will do better, this one: DS32KHZS#T&R claims 7.5ppm.
For better precision, you really need a higher frequency module
Look at the datasheets for the various crystals.
Btw. be careful with a standard GPS 1PPS output 'gold standard', it's long term accuracy is extremely good, but short-term pulse-to-pulse can vary quite a bit as it switches satellites and it's estimation of position changes.
Also depends on what you call 'precise'...
I did a project recently to generate 10MHz reference signal from a 20MHz VC-TCXO, trimmed by an ATSAML21's ADC's and a GPS module. Managed better than 0.001ppm (using ASVTX-09-20.000MHZ-T )
I don't need so much precision. In fact a few hundreds ppm is OK (like 1s in one hour). But 200ppm on workbench + different temperature + different voltage may cause problems. Currently I want to use it for synchronizing frequency hops of nRF RX and TX. While the link is established both sides may compare time and compensate for frequency drift. I think I will be fine. But I expected (much) better results and I want to understand what and why I am doing. So I asked a lot of questions that haunt me in my previous post.