Thursday, July 2, 2015

Budget 10MHz Frequency References



Nearly every piece of modern electronics we use today has crystal frequency references inside. These crystals are used for generating clock signals, as frequency references for RF transceivers, and many other applications. But how accurate are these crystals? If you see a little crystal on a circuit board stamped "25MHz", how accurate is it? The answer is often surprising, and a little disconcerting.

The stability of crystal oscillators is a very interesting point of research and experimentation. Dave Jones over at the EEVBlog has an excellent video on crystal oscillator drift. It is especially important to be aware of these characteristics when you own lower-cost frequency counters and function generators. These devices often have simple crystals inside as "references", which may or may not have good initial frequency accuracy and long term drift. Often times it is useful, if not absolutely necessary, to have a frequency reference in your lab. A good, stable reference can help you to assess the accuracy and stability of those oscillators in your lab equipment.

There are many excellent options for personal lab frequency references. A GPSDO is pretty much the way to go these days, and they can be had on eBay for around $200 to $300 US. Keep the unit powered on all the time, have proper antenna placement, and it's all you should ever need. A surplus rubidium standard is another popular option, and they can be found for a little cheaper.

However, what should you do if your budget is in the tens of dollars instead of hundreds? Can you still pick up a reasonably good frequency standard? The answer is, mostly, yes.

Oven Controlled Crystal Oscillators (OCXOs) and Temperature Compensated Crystal Oscillators (TCXOs) are two possible options for the start of an inexpensive lab frequency reference. TCXOs are cheaper and consume less power, but don't have the same level of performance as OCXOs. However, if you are really pinching pennies, the price of the TCXO (as low as $1 if you shop around) is quite tempting. Let's collect some data on an OCXO and a TCXO, both purchased from eBay, and see how they do.

I used my Agilent 53131A and TimeLab to collect some data. My setup is described in more detail below. As a control sample, I collected 30 minutes of frequency data on the OCXO reference in my HP 5334B counter. It will be the blue plot in the graph shown below. It's been continuously on for over 6 months since I purchased it, so it's fairly stable.

I then set up to collect data on the eBay OCXO we will compare. It is a Raltron 10MHz unit powered from +12V. Claimed stability is 0.1 PPM, and it cost $26 plus shipping. The seller included excellent data on the control voltage versus frequency. I applied the recommended control voltage for best initial accuracy. I then let the unit warm up for 30 minutes before collecting my data. This seemed like a reasonable procedure that would mimic how a typical eBay purchaser would use the reference.

30 minutes of data was collected on the Raltron OCXO. Here's the graph:



We can see that the Raltron OCXO is still drifting significantly, even after a 30 minute warmup. The control voltage recommended by the seller is pretty good though. Even as is, this would make a good start to a lab frequency reference.

Next, let's collect data on the TCXO. It is a Raltron 20MHz unit powered from 5V. Claimed stability is 2.5PPM, and it cost about $1 shipped when purchased in bulk. I soldered it to a small breakout board I designed a while back for this package (shown above). I left the frequency trimmer alone to begin with. The only remaining issue was the 20MHz frequency. To eventually feed this into lab equipment as a reference, we need to divide it by two.

My initial plan for this was to use a schmitt buffer and then a D flip-flop to divide. That's a very common way to do it, and would produce good results. However, a user over at the EEVBlog forum posted a while back about some code they developed for AVRs to make a low cost reference. The AVR takes in the 20MHz signal and can divide it down to many different frequencies, including 10MHz. This seemed like a project someone might want to take on if they are looking for a budget reference, so I decided to use it for the test. I built their circuit using an ATMEGA328. I let the circuit and TCXO warm up for 30 minutes and then collected data. Here it is, compared against the Raltron OCXO data:


I could tell that the TCXO was still in a warmup cycle as this data was collected, despite the initial 30 minute warmup. I shouldn't have tried to skew the data in the TCXOs favor, but I figured I'd give it a fair shake. I let it warm up for 90 more minutes, and then collected another measurement:


That's a little better. The long warmup really helped the TCXO's performance. There's an initial frequency offset of about 1.6 PPM, but assuming we had access to a proper frequency standard, we could trim that out and be pretty much spot on. With periodic checkups against a standard, we could even tame the long term drift. The low cost reference described by the EEVBlog user linked above seems to work pretty well. I didn't test the other frequencies if can generate, but they are probably fine too.

Let's now put the above data in perspective. I did a final measurement on a plain old 25MHz crystal, driven by a 74LVC1GX04 crystal oscillator driver. I allowed it the same 30 minute warmup as the other devices. Here's the graph:


The eBay OCXO and TCXO look pretty good now, don't they? You can barely make out those traces after the scaling caused by the XO trace. A plain old crystal can have very poor stability and drift characteristics, especially when temperature changes a lot. Here the temperature was quite stable, and we still had drift.

Finally, here's the ADEV plot for all of this:



Can an inexpensive OCXO or TCXO from eBay be used as a budget frequency reference? Yes, but with some caveats. Whichever you buy, build it into a piece of equipment, instead of just leaving it as a bare component. Make sure temperature and supply voltage are as stable as possible to remove those as factors. At least once after you get the device, trim the initial frequency accuracy against a KNOWN reference. Hopefully you have access to one at work, school, or a club. Periodically correct long term drift if you are able. Be aware of your uncertainties. You are just fooling yourself if you try to calibrate a frequency reference using another reference of equal (or lesser!) accuracy.

Neither the TCXO nor a bare OCXO is even close to being in the same league as a GPSDO or atomic standard. You get what you pay for, especially when it comes to measurement standards. However, if you just need to check simple crystal oscillators in your lab for your hobby projects, a home-built TCXO- or OCXO-based frequency reference might get you by.

I hope this data was interesting and useful. Thanks for reading!

- Dan W.


**** Test setup details: Agilent 53131A counter with a locked Thunderbolt as the external reference. The counter was in frequency mode (instead of TI) to avoid the noise floor of the instrument and aliasing when measuring unstable signals. Please take the above ADEV plot as relative, not absolute. Room temperature 76 degrees F and stable throughout. All devices tested were warmed up for at least 30 minutes prior to collecting data.