Aug 11, 2015

CWTD Episode #73

Frequency
... Accuracy & Stability in the Ham Shack

Checkout the Background Info, or go directly down to the CWTD VCXO Kit

Overview

This episode is all about "Frequency", a fundamental element of our lives as hams.  In our typical fashion, we are addressing the topic with techniques, devices and equipment to measure frequency with relatively good accuracy.  Being able to determine its stability.  Various time & frequency projects that are price-achievable and quite usable in the shack.  And "disciplining" approaches to improve performance (such as phase noise).  The nifty project this time is the "CWTD Voltage-Controlled Crystal Oscillator", or VCXO ... a module that will serve as the basis for ultimately producing our very own GPS-Disciplined Oscillator for super stability and accuracy! 

73, George N2APB and Joe N2CX

Listen to the Podcast  (Right-click and download to your computer for best listening results)

Text discussion during the show ...

<20:38:32> "Ken - VA3KMD": a pity the NorCal FCC-2 is no longer available

<20:45:14> "KD2E (Dave)": http://www.klockit.com/depts/AtomicClocks/dept-52.html

<20:46:59> "Ken - VA3KMD": I think CHU has the same stability and accuracy as WWV and has aa good signal on the east coast.

<20:47:33> "Pete WB2QLL": Klockit is local to me and they have an outlet store, and coupons and senior discounts are available.

<20:48:31> "Pete WB2QLL": I've bought the atomic clock movement and it works fb

<20:51:24> "George N2APB": Yup!  Ken, do you know of any "CHU" receiver modules, such as we see for WWV?  And are there atomic clocks that also decode AM-encoded (or phase encoded) time information?

<20:51:59> "KD2E (Dave)": I've gutted about 10 normal analog clocks, and retro-fitted with the WWVB (atomic) movement. Pick the face thickness, and length of hands, second hand wanted.....and "Presto-Chango"!!!!

<20:52:44> "Dave AA3UR": http://www.nist.gov/pml/div688/grp40/upload/NIST-Enhanced-WWVB-Broadcast-Format-2012-12-07-3.pdf

<20:56:19> "KA7OEI": CHU uses AFSK - see the Wikipedia page.

<20:57:23> "Dan - KB9JLO": What about the HP 10811-60111 OXCO?

<20:57:31> "KA7OEI": The 100 Hz IRIG code on WWVH is similar to WWVB - but the bits are in a different order.  The former is what the Heathkit clock used to use.

<20:58:48> "Joe N2CX": The HP unit is quite good as well if available.

<20:59:39> "Dan - KB9JLO": I've been keeping one to make a GPS-controlled_oscillator

<21:03:00> "KD2E (Dave)": Is the 60 cycles of line voltage accurate these days to use as counter check....or is the counter probably more accurate than the line?

<21:03:46> "Dan - KB9JLO": Remember that the 60 cycle time signal is often "varied" to control generation on the grid. Also loads on the grid affect frequency.

<21:03:50> "Larry - W2HHV": Video demo of procedure for adjusting a secondary frequency source against a primary frequency source: EEVblog #457 - Oscillator Calibration Follow up:  https://www.youtube.com/watch?v=2OHMNGi1RUY

<21:03:51> "Clint - KA7OEI": The line frequency is "unregulated" these days:  OK in the west, less good in the East and can be terrible in Texas.

<21:04:16> "Joe N2CX": 60 Hz power on average is stalbe but not nearly as good as a good xtal source.  Besides, it is only accurate "on average".

<21:05:00> "Dan - KB9JLO": It's not exactly unregulated Clint. The utility companies use it to 'adjust' the load on the grid and generation. I never realized what it was like till I spent some time in that industry...

<21:05:38> "Dan - KB9JLO": Back when NY went dark that one year (???) you should have seen the dip in frequency that caused.

<21:06:57> "Clint - KA7OEI": When I was in the industry WAPA (here in the west) held long-term pretty well.  A few years ago long-term stability was "relaxed" - whatever that is.  On the "Time Nuts" group a few years ago they talked about how line-referenced clocks on the Texas grid were >10 minutes off in a month:  Here in Utah I seem them move 10-20 seconds/month.

<21:09:17> "Joe N2CX": For time reference, 1 ppm equates to 2.59 seconds per month.

<21:14:09> "Clint - KA7OEI": Here is a "less stable" GPSDO:  http://www.jrmiller.demon.co.uk/projects/ministd/frqstd0.htm

<21:18:14> "Dan - KB9JLO": I've got the PCB & parts to do this one (someday) http://ve2zaz.net/GPS_Std/GPS_Std.htm

<21:20:05> "George N2APB": I've observed the time-nuts list discussing the HP OCXO mentioned here.  Very nice.  (Do you have one?)

<21:22:09> "Steve, N0XC": I have the HP oven unit inside the HP105B crystal standard, and it is very nice.

<21:23:12> "Pete WB2QLL": http://www.klockit.com/products/sku-batteryconverter.html



Measuring Frequency

History of Frequency Counting techniques ...


http://spectracom.com/Desktopmodules/Bring2Mind/DMX/Download.aspx?EntryId=446&PortalId=0

There are Two Fundamental Types of Frequency Counters  
         [Thanks to
Best-Controller-Projects.com for this great overview ...
http://www.best-microcontroller-projects.com/article-frequency-counter.html]

Did you know there are two types of frequency counter?  
The method you'll probably think of first is to count the input edges of the signal you want to measure and time a precise delay e.g. 1s then the frequency you measure will be in Hz.

There is another method called reciprocal counting where you count the edges of the internal clock instead (used in commercial counters). 

 

Normal direct frequency counting

The obvious method is to feed the measurement signal into a counter chip which is turned on for a set period e.g. 1 second.  
The counter value is actually the frequency measurement since: 
f = events/time = counter value/1 second = counter value in Hz.

The problem with this method is that the resolution of the counter is 1Hz and the number of digits displayed is dependent on the input frequency:
A 1Hz input  gives 1 digitA 100Hz input  gives 3 digits etc.
The resolution is in Hz (dependent on the gate time -which must be a multiple (or sub-multiple) of a second) - this is why the reciprocal counting method is better as it gives a resolution in terms of the master clock frequency inside the unit that is not dependent on gate time and the number of digits is also not dependent on the input frequency.

Reciprocal frequency counting

The second method is reciprocal counting where instead of counting the input signal you count periods of a master clock and instead of counting the input signal edges you let the input signal start and stop the counter.
For example the counter is started at the rising edge of the input signal and stopped at the next rising edge.  Now the counter reading is actually the period of the input signal in multiples of the master clock.
Its called reciprocal counting since you have to work out:  f= 1.0 / period
... to work out the frequency.

A simple reciprocal counting example.

Let's say your internal counter runs at 1 MHz and you have an input signal that has a frequency of 1345Hz.

The number of 1MHz periods in 1345Hz is:  Tsig/Tmeas = (1/1345)/(1/1e6) or 1e6/1345 = 743.49

We lose the decimal point to get: 743 counts of our 1MHz counter.

So in the microcontroller we have a value of 743 and to show the frequency on a display we need to calculate the following equation:

1/(743*(1.0/1e6)) = 1345.895 Hz

which can also be written as:  1e6/743 = 1345.895 Hz

... and the easiest way to do that is using a floating point library.

Note: Remember that floating point libraries are slow, slow, slow so consider using fixed point maths.

The reason for using reciprocal counting

Reciprocal counting is more difficult as you have to use floating point routines to work out the frequency but because the counter counts edges of a master clock the resolution is fixed in multiples of that master clock and not dependent on the input signal i.e. the frequency counter will show all digits regardless of the frequency of the input.
The resolution of the measurement is better since in a normal counter the count will be out by 1 Hz count whereas the reciprocal counter will be out by 1 master clock cycle.
Note: This does not mean that it is more accurate - accuracy depends on the clock stability of the unit.
Reciprocal counters are useful for period measurements and you will find for commercial counters that they usually have two inputs labeled A and B.  You can set up the frequency counter to just measure A frequency on A or on B but you can also do signal period measurements e.g. trigger on the rising edge of A to get the high period etc. 
In addition you can do measurements between different signals e.g. rising edge of A and only after that has triggered stop the count on the rising edge of B - that would be useful for measuring timing characteristics for a peripheral e.g. RAM access time.
- See more at: http://www.best-microcontroller-projects.com/article-frequency-counter.html#sthash.WltjBvH1.dpuf 

Frequency Counter Theory of Operation

Count number of cycles of input signal for prescribed time

          Resolution depends on input gate time ... 0.1  seconds for 10Hz, 1 second for 1 Hz, 10 seconds for 0.1 Hz

Accuracy depends on good time base

            Should be no worse than 10 times accuracy desired

Frequency "Attributes"

Stability

    - NPO caps, negative or positive temp coefficient
    - EMRFD Section 7-12 -  drift experiments with oscillator in a box with light bulb
    - Crystal Freq-Time Curves ... flat spot at room temp or higher, points of inflection where freq curve vs temp is flattest

Accuracy – how close to desired frequency (parts in 10E6, 10E7 or higher)

Precision – how many digits?

            Precision without accuracy is meaningless

Noise (Phase Noise)

 



Cool Projects ... Here are some very cool "frequency-related" projects that we've either built or studied before.

A)  Frequency Counters

1) Simple example homebrew project from ei9gq ...


http://homepage.eircom.net/~ei9gq/counter.html

This simple frequency counter project was in Homebrew, RadCom October 2006. The original design uses a gate time of one second which gives a count resolution of 1Hz. Maximum input frequency is about 50MHz. A VHF/UHF prescaler for this counter is described in Homebrew, RadCom February 2008. U2 is a PIC16F628 (PIC16F628-20 or PIC16F628A). The PIC crystal frequency is 10.240MHz. The firmware is easily modified so that a 10MHz crystal can be used instead. Homebrew for March 2008 shows how this counter can be used with a GPS or Loran controlled gate.

2) EBay freq counter ... http://www.ebay.com/itm/Blue-0-1-60MHz-20MHz-2-4GHz-RF-Signal-Frequency-Counter-Cymometer-Tester-/181806842808?

Has a temperature compensated timebase ... "TCVXO"
See this real nifty frequency counter in use with our CWTD "GPSDO" project lower on this page.
Here's the MANUAL, as constructed from information on the eBay page, and our own experimentation. 

3) HP-5328B Frequency Counter ... http://www.ebay.com/itm/HP-5328B-UNIVERSAL-COUNTER-100-MHz-Powers-On-/271749008844

Don't let this eBay price intimidate you.  N2APB got his for about $150 at a hamfest, and it works great!
The best parts about this "Universal Counter" is that it can ...
- Can measuring frequency down to .01 Hz, it can measure:
- Can measure time difference between two pulses
- Can be clocked from an external source (like a 10 MHz OCXO or Rubidium Standard ;-), and
- It has an HP-IB interface port on the back for automated measurement taking. 

This is a REAL DEAL in the realm of frequency measurement!


 

B)  WWVB Receivers

We've talked about WWVB in a previous episode "What Time Is It?", but here in this Frequency episode, the value and meaning of time (and frequency) synchronization with a known-good source like WWVB takes on whole new meaning.

1) PV Electronics "WWVB 60 kHz Time Receiver Module and Antenna"

Many in our homebrewing field had been lamenting the "unobtanium" nature of an older-yet-popular Digi-Key item (CMMR-6P-60), but we recently found another one over in the UK, from PV Electronics.  I have several of these on order right now!


        http://www.pvelectronics.co.uk/index.php?main_page=product_info&products_id=7 
 

 

2) N0BHQ "WWVB Receiver"


See full size schematic, description and PIC decoding software at ...http://www.ringolake.com/pic_proj/WWVB/WWVB_ISO.PDF

PCBs available from OSH Park ... https://oshpark.com/profiles/goboxgizmos/page/7

 

C)  Oven-Controlled Crystal Oscillators

1) Hans Summers Projects ... http://www.hanssummers.com/

This guy is amazing, and his web pages have tons of great projects with fantastic (low) prices.  Of particular interest to us here on this topic is his homebrew OCXO Design:


  http://www.hanssummers.com/ocxosynth.html

We will revisit this some more later on this page.

 

2) N2APB & N2CX "OCXO" Project ... an Ovenized Crystal Oscillator using a Trimble OCXO Module

"Trimble 34134-T" OCXO ... packaged neatly and perfect for the bench!

   

     
 Trimble 34134-T OCXO, ~$15 ... http://www.ebay.com/itm/Trimble-high-precision-Oscillator-OCXO-65256-10Mhz-sinewave-12V-/291534381377?hash=item43e0cda141

 

3) LPRO-101 Rubidium Standard 10 MHz Reference Oscillator

Getting this Rubidium Frequency Standard on eBay is a simple deal (and a GOOD one!) for about $175.

Having a frequency standard that can achieve such high accuracy, and is stable
 

            
N2APB packaging of the LPR-101                                                                     EFRATOM LPRO-101
http://www.ebay.com/itm/RUBIDIUM-SYMMETRICOM-EFRATOM-LPRO-101-10Mhz-Oscillator-24V-excellent-condition-/291353326436?pt=LH_DefaultDomain_0&hash=item43d602f364

 

Rubidium Frequency Standard "Primer" ... Our good CWTD listener Clint, KA7OEI, has an excellent primer on Rubidium Standards, and use of the Efratom LPRO-101 ... http://www.ka7oei.com/10meg_rubidium1.html

 



Measurement In Action]

1) Frequency Standard and Measurement Set-up ... at N2APB


             

2) Zero beat oscillator with WWV at 5 or 10 MHz

Tutorial #58 from Alan Wolke, W2AEW ...  How to zero-beat WWV to check or adjust a Frequency Counter's accuracy

            Good at best to 1 part in 10E7 depending on skill and propagation variation

 



Our CWTD Project this time ... a GPS-Disciplined Oscillator!


 
                                                                     (Click photo for bigger view)

YouTube video of VCXO Breadboard being tuned up ... Check out how our Breadboard of this circuit actually works ... https://youtu.be/oj1gDl0rhD8  
(Be sure to turn up your computer's audio volume for this one ... I had a FUBAR moment during video recording!  -- n2apb)

 

CWTD "GPS-DO" Project:

A GPS Clock, or GPS-Disciplined Oscillator (GPS-DO) is a combination of a GPS receiver and a high-quality, stable oscillator such as a quartz or rubidium oscillator whose output is controlled to agree with the signals broadcast by GPS and GNSS satellites. GPSDOs work well as a source of timing because the satellite signals must be accurate in order to provide positional accuracy for GPS in navigation. These signals are accurate to nanoseconds and provide a good reference for timing applications.

Over the course of this, and the following two episodes, we will be homebrewing our very own GPS-DO.  The three phases are ...

Phase 1:  VCXO ... A Voltage Controlled Crystal Oscillator ... Tonight's episode! (Aug 11)

Phase 2:  OCXO ... A temperature-controlled "oven" + a VCXO = an OCXO (Oven Controlled Crystal Oscillator) ... Episode airs on September 8.

Phase 3:  Disciplining ... Phase-Locking the OCXO to a stable and accurate frequency ... Concluding the series, this episode will air on October 12.

 

PHASE 1: VCXO

The "Crystalizer"... A Voltage Controlled Crystal Oscillator

Here is "phase 1" of our overall GPSDO project, the VCXO ...


                                                                        (Click image for larger view.)

Background

Some time ago, we developed a 10 MHz voltage controlled crystal oscillator, or VCXO, for use as a fun project at the immensely popular Atlanticon QRP Forums.  This VCXO is able to be put to use in many ways around the shack. For example, once calibrated, this VXO can serve as an accurate frequency standard for receiver alignment, or as a PLL standard, or even as an LO for a transmitter. 


Click to view/download the PDF version of the schematic and all kit information

 

How It Works

The CWTD “VCXO” produces approximately 1-2V p-p at RF Out when C3 is in the top position (C3a on the pcb). This signal is quite ragged but very suitable for driving a balanced mixer like an SA612 (e.g., in mixing applications). When C3 is placed at the  “C3b” position, a much more sinusoid-like100-200 mV p-p signal is delivered at RF Out, which is more suitable for use as a “standard” 10 MHz oscillator standard in the shack. 

Capacitors, crystals and semiconductors have temperature coefficients that represent how the component values change with changing temperature. When the component values change, the oscillator frequency changes. This drift is not good if you want a very stable and unchanging oscillator frequency. 

So the real fun challenge for the builder, and the excitement with our resurfacing this project here on CWTD, is to find ways to dynamically adjust, compensate or insulate the circuit against temperature changes. The Adjust signal on connector P1 pin 1 is delivered by a simple potentiometer that presents a nominal 3.4 volts to D1, which is a "voltage variable capacitor" commonly called a varicap diode.  But this only a static level and if the temperature changes, the pot setting would need to be changed to compensate for that change . One could instead dynamically adjust that control signal in accordance to the ambient temperature. Or perhaps use of NP0 “negative coefficient” capacitors in the circuit could compensate for drift .. which is what we've done now with the CWTD version of the circuit. But other techniques will come along in Phase 2 and Phase 3 for this project!

Construction Notes

Construction of the VCXO is straightforward – just use the schematic as a guide for placement of the components at the silkscreened locations on the board.

  • Resistors are mounted “on end” with the top lead bent over and going into the hole next to the bottom lead.  Be sure to use your ohmmeter to double check your guess at the color coding on these resistors.  You may be fooled with the 47-ohm and 12-ohm resistors! ;-)

  • Three NP0 ("NP Zero") capacitors are supplied in the "outer" kit bag.  NP0 caps have zero drift with temperature (or at least to +/- 30ppm/Deg-K ... which is pretty darn close to zero at the temperature ranges we'll be ultimately operating the oven (in Part 2).

  • A a 2.1mm coaxial power jack is also provided for convenience.  Just plug in your standard 12V power source on the bench to power the whole project.

  • Place R11, the 500-ohm, 10-turn trim pot into the used pins 3, 4 and 5, as shown in the top view photo.  Then add the wire jumpers to the bottom of the board as shown in the bottom view.  (Alternatively, you could mount the trimpot off-board, as we did in the Breadboard photo at the top here, but it's convenient to have it located firmly right there on the board.)  BTW, note how I placed the ground jumper, as a bare wire "outboard" of the board, able to serve as nice clipping point for attaching your scope and/or frequency probe!

  • NEW ... In order to have your VCXO ready to be combined with the Oven Control circuit board coming in the next episode, please mount the crystal about 1/4" off the bottom of the board, as shown in the photo below.  If you have already mounted the crystal on top, just unsolder the crystal and reattach it on the bottom. Don't worry, it's easy. Just gently pull one side and then the other while heating each pad. Then re-attach to the same pads on the bottom side. And if you don't have 1/4" of lead length, just solder some bare wire in the pcb holes and then attach the crystal to these.

  • What do you put at the L1 position on the VCXO pcb?  The answer isn't obvious!  We provide a 10 pF NP0 capacitor for use at the "L1" position on the board. This spot was originally intended to be for an inductor, which would tend to lower the operating frequency of the oscillator.  But as we built up many boards in the prototyping phase, it was found that the crystal was running a little "too low" for the adjustment range offered by the voltage variable cap (diode D1), so we shall instead use a capacitor to allow adjustment up to, and beyond the 10 MHz operating point.  But as Dave AD7JT points out, and nicely illustrates below, it's not quite as simple as that!

                             
    Figures above:  Finding the right capacitor value to place at the L1 position on the VCXO pcb to provide adjustability above/below the target 10,000,000 Hz point.
    Dave AD7JT writes: "I had to do some cut-and-try stuff to get the frequency range to include 10 MHz.  The initial frequency range with "L1" set to 10 pF didn't come within 2 KHz of 10 MHz.  Shorting L1 got it in range but just barely (took about 4V on the Adjust line).  I wanted 10 MHz to be at about 1.5 V or midway on the DAC output range for a dsPIC.  I finally settled on a value of 68pF for "L1".  The attached shows my readings for all the values I tried.  In all cases the frequency range was about 700 - 750 Hz (not enough to even see on a scope)." 

So just connect up the 8-12V power source (a 9V battery will work for a short while, with a current draw of about 130 mA), and you'll be off to the races!

And remember, you'll want to use a frequency counter to serve as your adjustment guide ... Tweak the trimpot to bring the VCXO operating frequency as close as possible to 10 MHz, just as I show in the YouTube video (link above.)

Oh, you don't have a frequency counter?!!  Well, get one of those nifty 8-digit, blue-LED counters shown above (and on our Breadboard) on order from ...  http://www.ebay.com/itm/Blue-0-1-60MHz-20MHz-2-4GHz-RF-Signal-Frequency-Counter-Cymometer-Tester-/181806842808?     You just can't beat this $12 wonder (+about $2 shipping from China!!)

  
Click either photo for a bigger view.

What's Next?

In September's episode of CWTD, phase 2 of our GPSDO project is called "OCXO" ... for Oven-Controlled Crystal Oscillator.  We will discuss and demonstrate the building of a temperature-controlled “oven” ... a temperature-controlled “oven” , which is a thermally-insulated enclosure (maybe an Altoids tin?!) for the VCXO board, and some control loop electronics (maybe using Hans Summer's "OCXO" technique?).

Then in October's episode, we wrap things up with phase 3 of our project by taking an inexpensive GPS unit (like a NEO-7M off the Internet?) and using it's 1 pulse per second (1pps) signal coming down off the satellites to "discipline" our OCXO to make it extremely stable.  When all done, we'll have a homebrew solution for a stable and accurate 10 MHz signal for use in the shack ... for use as a measurement standard, driving a clock to extreme accuracy, or for feeding into our rigs to keep them dead-on frequncy for digital mode operation (WSPR and JT65A).

 

Interested in Building the CWTD VCXO?

CWTD VCXO Kit ... is SOLD OUT.     But you still can build one!  The components are readily available and the circuit is simple.  You can build it up on a "solderless breadboard": one of those white plugboards with all the holes, like the small one that holds the Control Voltage trimpot pictured in the photo and video above.

 

References

1)  John Miles, KE5FX site ... <www.ke5fx.com> ... A great assemblage of links having to do with high precision, accuracy and stability techniques can be found on the. You can literally spend days reading up on techniques, software, measurement results and the history of timing and frequency control here. Just plan on spending an afternoon to browse it.

2) “Resources for Precision Timing, Stability, and Noise Analysis” ... <http://www.ke5fx.com/stability.htm> ... If you want in-depth knowledge this is THE place to go. Plus, you can download plenty of extremely valuable application notes and technical papers for future reference. 

3) Great References from the site of KA7OEI ... http://www.ka7oei.com/10meg_rubidium1.html

  • The KO4BB Wiki - This site as a lot of information on various Rubidium references and "precision timing" equipment, among many other things!

  • Rejuvenating Rubidium Lamps - The rubidium lamp in these devices has only a finite lifetime, but this page explains how you may be able to get more life out of it if it quits working!  Note that this page doesn't address the LPRO-101 specifically, but the same general technique may be applicable.

  • The "Time Nuts" Mailing list and archive - Covering all sorts of nerdy topics related to frequency and time measurement, the archives of this list contain a wealth of information about this and other frequency references.  While anyone may peruse the archives, you must join the list in order to participate.

  • Performance of Low-Cost Rubidium Standards by John Ackerman, N8UR - This article compares a number of low-cost (e.g. surplus) rubidium units to determine best short and long-term stability.  The winner?  The Efratom LPRO-101!

  • Stability and Noise Performance of Various Rubidium Standards by John Miles, KE5FX - Another excellent article comparing the important parameters of various Rubidium devices available on the surplus market.  From this page you can readily see why the LPRO-101 works "barefoot" as a microwave reference and an FE-5680 does not!

 

 

  •