These notes summarize and expand the setup description in my article, " A GPS-Based Frequency Standard," QST July 1998 p. 37.
First, some corrections to the QST schematic:
1) The QST draftsman got R5 and R6 reversed in Fig. 3 of the article. R5 should be the resistor that has one end grounded. The text and Fig. 1 are OK. However, they are also reversed on the first production run of the A&A PCB stencil. This has been corrected in recent production.
2) Ra and Rb were drawn in a confusing manner on the schematic; they are not the values of the coarse and fine adjustment pots. Ra is the resistance from the TOP of the coarse tuning pot to the wiper arm. Rb is the resistance from the wiper to the R5,R6 junction (so it includes the bottom part of the coarse pot and the fine pot). The values of Ra and Rb are measured after you get the coarse and fine pots set so that the VCXO is approximately on frequency. Don't be too concerned about getting the Ra, Rb values exactly right, since they are usually only a smallish correction in the calculation of R6. If R5 is about 300 ohms then R6 usually works out to be in the range 500 to 3000 ohms for most VCXOs I've seen. To limit the current output required from the DAC the total resistance (R5+R6) should be kept above about 1000 ohms.
Basically R5 and R6 form a voltage divider to reduce the DAC output to match the particular VCXO you're using. That would be the end of the story, except that the 2 pots also provide another bit of attenuation that has to be included when you ask how much does EFC input change when the DAC output changes by a given amount. That's the origin of the equation in footnote 8. This equation was written all on a single line and this has caused some confusion because of the multiple parentheses required. An example may make the calculation clearer. Suppose the parameter S is measured to be 1.5e-7, then S/7.5e-9 = 20. Also, suppose Ra = 5K and Rb = 15K, then Ra/(Ra+Rb) = 5K/20K = 0.25. Multiplying these two terms together gives 20 x 0.25 = 5, and subtracting 1 gives 4. Suppose R5 = 300 ohms, then R6 should be 4 x 300 = 1200 ohms.
A point that has mystified some readers is the connection that comes out of the top of the VCXO and connects to the top end of the coarse pot. This is a highly regulated supply voltage, typically around 8 volts, that many VCXOs provide to power the EFC network. If your VCXO doesn't provide this output voltage you can devise one for yourself using a resistor and a (temperature stable) Zener diode connected to the VCXO voltage supply. Choose a Zener that is several volts above the EFC voltage you need.
3) Another drafting error on Fig. 3: U1 pin 10 (not pin 1) is grounded. The PCB distributed by A&A Eng'g is OK, so it's not a big deal unless you make your own board.
The first thing you will probably want to do after you have built the controller board is find the EFC pot settings that will put your VCXO close to its proper frequency (10 MHz, 5 MHz, 1 MHz, etc.). "Close" probably means better than 1 part in 1e8, which may be better than you can do by zero-beating to WWV.
A "setup" mode, as described in the article, was programmed into the controller to try to solve this problem for people that don't have an accurate reference available. Setup mode works fine, but it may take a while to get the correct frequency because the LED display only updates twice a minute. (this situation was improved in software vsn 1.33 by adding a once-per-second phase difference output - see below)
A faster method, if you have a scope with bright trace, is to look at U3 pin 15. You will see a once-per-second pulse whose width is the gps-VCXO phase difference (use a sweep speed of 1 microsec/cm or faster; the pulse will be dim because of the low rep rate). If the width of this pulse gets progressively narrower your VCXO freq. is too high, conversely if it lengthens as you watch it, you're too low in freq. Adjust your EFC pots until the width is fairly constant. As you watch the pulse, it will eventually "foldover" from very short to about 2 microsec long (or v.v.). You need to adjust the freq. so these foldovers occur several minutes or more apart, which puts your freq. within 1 part in 1.0e8 of the correct value. You can now measure, or estimate, values for Ra and Rb (see above).
You will also need to estimate the sensitivity parameter "S." A method for doing this is described in footnote 8, but an example might make the description a bit clearer. Suppose you have the scope set at 1 microsecond/cm. If it takes 100 sec for the VCXO waveform to move 1 cm (1 microsec), then the drift rate is 1.0e-8. (i.e. 1.0e-6 sec, 1 microsec, divided by 100 sec) . The sensitivity S is how much the drift rate changes (i.e., the relative frequency change) when you change the EFC voltage by 1 volt.
With values for Ra, Rb, and S, choose a value for R5 (say 500 ohms), and compute R6 as described above, and install these two resistors. The controller should quickly lock the VCXO to GPS with S2 open and S1, S3 closed (N=2). Don't forget to set S4 according to the polarity of your EFC voltage, and close S5 to allow the controller to change the DAC (see footnote 11). If the DAC voltage doesn't settle down to a fairly constant value after a few minutes it is probably because the switches are set backwards (believe me, I do it all the time). A little label next to the DIP switch pack helps.
You can experiment with higher switch settings (N=3,4,5,6,7) to get progressively longer time constants. However, the performance of the controller even at N=2 or N=3 is very good, all the more so now that SA has been discontinued. The elimination of SA has reduced the jitter (from an Oncore receiver) by about a factor of 4 (equal to two N units). The longer TCs suppress GPS jitter more completely, but they are also slower to recover from any frequency jumps that your VCXO might have. Getting the very best setting for your particular VCXO will require monitoring and graphing the ASCII output from the controller. It's interesting, but it's not essential. The ASCII output values will make more sense if you recall that the controller tries to keep the gps-VCXO phase difference at or near a setpoint of 800 (versions of the software below 1.29 used a setpoint of 1024).
The "heart beat" LED which indicates that the 1 pps is being received from the GPS receiver and that the PIC CPU is running has a 2-second period, i.e., it is on for one second, then off for one second.
The hi/low LEDs show high/low frequency, as described in the article, ONLY in the N=0 mode. At N=1 and above, the hi LED indicates that the phase is far from the set point, suggesting that the phase lock is questionable. The lo LED shows when the "deglitcher" algorithm (see footnote 10 in the article) is operating to delete a spurious phase reading. The deglitcher only checks for spurious data at the longer filter time constants (N = 4,5,6,7).
To avoid a switching transient the time constant setting (N value) should be changed gradually as described in the article. In practice this means that the N value should be increased (or decreased) only one step at a time. Also, it is necessary to wait at least 30 seconds between changes, since the controller only reads the switches at the 30-second update intervals. If this procedure is followed the controller will notice that the N value has been changed and will correctly scale the IIR filter parameters to match the new setting, but, as mentioned above, it can only change one step (up or down) during any 30-second interval.
Parts Procurement Problems/Solutions
1) Take care about which 4046 chips you use for U1 and U3. The Phillips 74HCT4046 chips (formerly sold by Radio Shack) are fine. So are CD74HC4046 chips made by Harris or T.I. Do not use chips made by Fairchild and do not use CD4046 chips; both have a different design and will not work in this circuit. Thanks to Pavel Kovensky (Prague, Czech Republic) for noticing the design difference of the Fairchild chips.
2) Burr-Brown officially discontinued the PCM-61P DAC as of 2/1/00. However, I have been able to obtain a supply and I can continue to make them (or the AD1861N) available to people who are building the controller. The Analog Devices AD1861N is a direct substitute for the PCM-61P, however this chip may be hard to find in small quantities. Eventually I may have to modify the PIC software, probably using the 20-bit DAC PCM-1702P. This will require an op amp since the '1702 has only a current output. The present A&A PCB has plenty of space to mount a small op amp "dead-bug" style, and A&A has indicated they will modify the PCB when necessary to accommodate the extra parts. In the meantime I hope the supply of PCM-61Ps will last awhile since the present circuit works very well.
3) Digi-Key no longer stocks some parts specified in the article. However, parts available from Mouser Electronics (www.mouser.com, 800-346-6873) can be directly substituted. U2 (74HCT4520): use 74HC4520, Mouser part number 511-M74HC4520; U5, U6 (74HCT166): use 74HC166, Mouser part number 511-M74HC166; U7 (ECS300S-24): use DCO-2400, Mouser part number 520-DCO2400 (U7 is back in stock at D-K under XC313-ND, ECS-240-3-C3X1A). I have verified that these substitutions operate properly (11/99).
4) DigiKey no longer has the Jewel +/-200 mv DPM mentioned in the parts list. This is no great loss since it was expensive. However, a meter of some sort on the DAC output is very handy for monitoring. To adapt the 200 mv scale to 3 volts I made a divider network out of two resistors and soldered it to the terminals on the back to the DPM. Make sure you get a DPM that can have its supply voltage ground connected to the input ground. I would suggest getting a +/-2 volt or a +/-200 mv unit and making a resistor divider so it reads full scale (1.999) when it has 3 volts applied. It won't read in "volts" exactly, but that doesn't make much difference. If you need "volts" multiply the reading by 3/2. I haven't tried it myself, but Jeremy Nichols (email@example.com) has suggested that the Radio Shack 277-303 DPM ($18) would make a good substitute for the Jewel unit. It's normally a special-order item which can be shipped directly to your home. More recently, Don Shelley, KD7BU, reports that Circuit Specialists in Scottsdale, Az. carries the model PM-129B for $11.49 and which is 3-1/2 digit LED type DPM that has a common ground capability. They are on the web as www.web-tronics.com.
Starting with version 1.33 the PIC software provides a convenient method for adjusting the VCXO close to frequency. The gps-VCXO phase difference is now read by the PIC each second and is used to generate an analog voltage at PIC pin 2 (P4 #6 on the A&A PCB). A meter connected to this pin will indicate the phase difference each second and is a more convenient setup method than using the scope, as suggested above, especially if you are located on a mountain top. The voltage will vary from 0 to about 2 volts in proportion on the phase difference and will be about 1 volt if the phase is near the controller's setpoint. Because the voltage is generated by a variable duty-cycle square wave (PWM) an analog voltmeter should be used to measure it; a digital meter may not average the pulses correctly, (Thanks to Bob Larkin, W7PUA, for this concept and some PWM software to implement it)
The ASCII printing format was also changed in version 1.33 to save space on a display terminal and make spreadsheet entry of the data more convenient. The three values printed at each 30-second update are now all on a single line separated by spaces with the CR-LF only after the 3rd value. Gary Sanders has kindly updated his useful PC program "gpslog" so that both old and new formats are parsed correctly.
The heartbeat LED should turn on and off at 1 second intervals. If it does, the 1 pps pulse is coming in from the GPS receiver and the controller CPU is running. If not, check that a 1 sec gps logic signal is present at U8 pin 21, and that the 6 MHz clock is present at U8 pin 9. It is also possible, although unlikely, that the CPU has gotten hung up. Remove the positive supply voltage for a few moments to reset it.
The VCXO should be producing clean TTL pulses at U2 pin 1, and you should see these progressively divided by factors of 2 at pins 3,4,5,6. The selected output (probably pin 6) should appear at U3 pin 3 - don't forget to wire a jumper (on P3 of the A&A board) to select an output.
With the DIP switches set to N=0 (setup mode), the DAC output voltage should be very close to zero (maybe it will be 10 or 20 mv; this voltage could be set exactly to zero with a trimmer, but for our purposes it doesn't make any difference so I didn't waste money on the trimmer). With a DIP setting of N=1 or higher, the DAC voltage (U9 pin 12) should change every 30 seconds as the controller steers the VCXO.
A scope or a logic probe is handy for tracing signals around the board. If nothing seems to work, check solder connections and the supply voltages. Of course, the usual antistatic precautions should be taken in handling ICs.
A mysterious problem. The symptom. In one case the controller was unable to phase lock a 10 MHz VCXO even though casual inspection indicated that all the components were functioning properly. The phase counter readings sat consistently around 1200, and nothing the controller did to bring the phase to the setpoint at 800 seemed to have any effect. The cause. The problem was traced to a small spurious coupling between U3-3 and U1-14 due to the trace layout of the A&A PCB. The problem can occur if the VCXO input signal at U1-14 is very small due to excessive attenuation by the R1, R2 network. The VCXO signal becomes contaminated with a divided-down version of itself. A small fraction of the VCXO pulses then fail to trigger the 4046 and the phase counter produces random readings with an average value of about 1200. The missing pulses are not evident to the casual observer. The solution. Avoid a marginal signal level at U1-14. A convenient fix is to add a 10 or 15 pf capacitor across R2 (the resistor from the VCXO input to C1). This has the dual benefit of raising the VCXO signal level (especially for higher frequency VCXOs) and lowering the impedance at U1-14 so the spurious signal is reduced. A test. If your controller works you don't have this problem. However if you're curious, try observing the signal at the 4046 output (U1-2), while triggering your scope on the U3-3 signal. Set the sweep speed so that a few dozen pulses are visible and look for any gaps or marginal pulses. Or, forget the test, just install the capacitor. A special thank you to Jim Bittle for his insight and patience as we worked together to understand this problem.
1) Ben Bibb, NO5K (firstname.lastname@example.org) has compared his GPS- disciplined VCXO to Loran-C using an Austron 2150A Loran receiver. In his first measurement the VCXO - Loran phase difference was within 30 nsec of its initial value after 14 hours. I have seen similar performance over a period of several days using an Austron 2100. The observed phase drifts of 100 nsec or so are consistent with the drift of the Loran-C master stations as reported by USNO (see http://tycho.usno.navy.mil/loran.html). The drift of the GPS oscillators is reported by USNO to be about 100 times less. The conclusion is that your VCXO, with its homemade GPS-controller, is perhaps 100 times more accurate than any Loran-C based frequency standard.
2) Synergy Systems has a special price for readers of the QST article (ask for Art). The Motorola UT+ GPS receiver board (good for timing applications) is about $140 less 10% with backup battery and $130 less 10% without the battery. Synergy also has a web site with information on the Motorola GPS receivers. Synergy's phone number is (858) 566-0666 and web address is www.synergy-gps.com. You will need some method of communicating with the UT+ to initialize it, setup "position-hold" mode, and so forth. The UT+ speaks Motorola binary protocol, which an ordinary PC terminal program can't handle. One solution is to use Rick Hambly's excellent TAC32 software to communicate with the UT+. It's available at http://www.cnssys.com/tac32. If anyone is aware of other convenient solutions, please let me know. Note also the comment below about using a spare section of the MAX233 chip for level conversion between the UT+ and a PC. Information on making electrical connections to the UT+ is contained in the Q&A file on this web page. It can also be deduced by looking at the assembly manual for the TAPR TAC-2 and/or the DGPS Reference Station PCB, which can be downloaded from the TAPR site (www.tapr.org).
3) The A&A printed circuit board is sized so it can slide into the channels of an Elma type-33 case, which is the case shown on the first page of the article. There is enough room inside to house the Motorola Oncore GPS board also. As a bonus, you can power the Oncore from the regulated +5 v on the controller board and use a spare section of the MAX233 chip to convert the inverted TTL Oncore serial port signals to/from real RS-232 levels. There are terminals at the edge of the A&A PCB to make these connections. This provides essentially the same functionality you get with the TAC board available from TAPR (and you'll have enough money left over to buy the expensive Elma case!)
4) PIC programming is described in a recent book "Programming and Customizing the PIC Microcontroller," Myke Predko, McGraw-Hill, 2nd ed., 2000. Of course, the Microchip PIC16C73X Data Sheet (actually a 300 page booklet) is invaluable. It's available from DigiKey or your Microchip rep. Another useful book is, "Design with PIC Microcontrollers " John B Peatman, Prentice Hall 1997. It has a more academic flavor than the Predko book and a good description of PIC internal architecture
5) Bob Larkin (email@example.com) writes: " I connected an ICL7662 voltage inverter between the plus input and the -input to drive the -5 regulator. This requires the IC plus only one 10uF cap and allows everything to be powered from the single +7.5 to +15 Volt input. You might point out to the folks that there are two 47uF caps on the board for the regulator inputs that are not on the schematic. These also make the 7662 installation easy. I dead-bugged the 7662 in an open spot next to the regulators." He also reports " It does not work to power the UT+ from the 5 Volt reg on the controller board unless the input to the board is around 7.5 Volts. The LM2940T-5 overheats with 260 mA and 13.6 Volt input. I have opted for a separate heat sinked reg for the UT+."
6) John Eliss (firstname.lastname@example.org) has made a single-sided PCB layout of the controller that can be built using an iron-on process and requires only 5 jumpers. He is happy to share his layout with those who are interested in making their own PCB. (Note added 6/2001: the above email address is no longer valid and unfortunately I have neither a valid address or a copy of the layout).
7) For VCXOs with a frequency at 10 MHz or above it may be desirable to increase the division ratio to 32. Division by 16 is the maximum that can be obtained with the 4520 4-bit counter U2a. A second 4520 can be connected "piggyback" fashion on top of U2 to achieve higher division ratios. The power and grounds for the upper 4520 (U) are obtained by soldering the appropriate pins to the lower 4520 (L) (pins 2,7,8 and 16). Clip the unneeded pins and use wire jumpers to make the signal connections: U1 to L6, U9 and 10 to L8. For division by 32 take the output from U3 and connect it to the header (P3) pin that feeds U3 pin 3. This sounds more complicated than it is, and it leaves the PCB undisturbed so it is easy to return to the original configuration by plugging a normal 4520.
8) I have received numerous requests for reprints of the QST article from folks that do not have access to QST. To satisfy this need I have put an Acrobat PDF-format file of the article on my webpage at http://members.xoom.com/GPSprojects/
My web site at www.rt66.com/~shera describes the GPS controller project and has some recent results. I plan to use it to collect and publicize the results, tips, questions, problems, etc. that builders of the controller may have. If you want to be added to a list of e-mail addresses that will be notified when something interesting is added to the web site, send me e-mail (email@example.com).