The TCXO arrived today. For those unfamiliar with the term, TCXO stands for Temperature Compensated Crystal Oscillator. Recall that the biggest factor in determining the stability of a crystal is the ambient temperature. To work around that, there are two ways you can go: you can either "steer" the crystal by altering the loading of it in response to temperature changes, or you can place the crystal in a temperature controlled environment (this is done with an OCXO - an Oven Controlled Crystal Oscillator. More on that later).
One issue that I was concerned about when I ordered the TCXO was that it was a 3.3 volt unit, and the ATMega328P I'm using to do the counting is running at 5 volts. Fortunately, I've had quite a bit of experience with reading 3.3 volt logic with 5 volt ATmel controllers without difficulty, and it turns out this was no exception. The ATMega in this case needs to be fused for an external oscillator, which is fed into the XTAL1 pin (one side benefit of this is that you get back PB7 as a digital I/O pin, though there's no need for it in this case). With the recommended loading capacitance on the output and the recommended power supply filtering, the circuit worked first time perfectly.
I loaded the GPS calibration sketch into the controller. This one is the same as the code for testing clock units, but it's set up to sample a 1 Hz signal for 10 seconds instead of a 16.384 kHz signal for 1 second. I've left it run for several hours now and with everything set up just using "dead bug" wiring on my breadboard, the oscillator has a base drift of 0.185 PPM - it's losing 37 cycles out of 200,000,000. An uncompensated crystal oscillator I had set up as a test was nearly an order of magnitude further off than that (and fluctuated rather wildly with temperature). I haven't varied the temperature a lot (though it is an unconditioned garage, and it was quite warm today), but for the range of temperatures that that garage is going to experience, the TCXO should stay (according to its datasheet) ±10 counts out of 200,000,000 - 50 parts per billion.
And given that I can repeat this test any time I wish, I believe I can say with a straight face that the $5 calibration service I perform as an option for the movements I sell on Tindie should be able to peg the initial drift of the crystal within 0.5 ppm (in actuality the granularity of the trimming is 0.1 ppm, and I am shooting for +/- 2 units) relative to GPS.
I have an OCXO on order. It will have a stability of 20 ppb instead of 50 ppb, so it's stability will be within ±4 counts out of 200,000,000.
However, both of them have an initial calibration of only +/- 1 ppm. Fortunately, all this means is that I can calibrate it against GPS to find its actual drift (for this TCXO, it's going to be 0.2 ppm) and then subtract that (because the oscillator is running slow) from the trim value for a particular clock.
They make voltage controlled TCXO and OCXOs. These allow you to trim the frequency to perform calibration against an external standard. I could use such a mechanism to "dial in" the oscillator so that its drift versus GPS is zero. The problem with that is that you need a very, very stable voltage reference. By comparison, just storing the observed drift value in EEPROM and compensating for it in software is a lot easier.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.