Moorepage
Projects, info & thoughts from Dick's lab |
Most recent update 9-6-2008 GPS-Disciplined Master Oscillator, Version 1:Dick's build of Brooks Shera's D-PLL Controller Parts gathered in September, 2003 Construction begun mid-August, 2004 When I came across Brooks Shera's web site about his GPS-controlled oscillator, I was really impressed. I have an HP 5345A computing counter/timer and it needed calibration, but I didn't want to pay for a Rubidium standard or pay to have someone else calibrate it. I decided to build the project and wrote this note to help others across the bumps I hit. Parts and pieces Fortunately, I already had a lot of the parts I needed to duplicate Brooks' project, and his complete list of resources made the rest relatively easy. Unfortunately, I didn't have a precision GPS receiver -- only a couple of consumer products from Garmin and Rayming that had no precision timing 1 pps output. Fortunately, Synergy Systems had a really good deal on used Motorola Oncore VP units as well as a nice inexpensive Hawk active antenna, so for substantially less than $100.00, I was OK in that department. (Jan. '07 update -- Synergy no longer seems to offer any Oncore boards, but many GPS boards will work if they output the 1 pps timing signal. Synergy now offers the iLotus M12M -- look under Products>GPS>Timing boards/modules). I bought the McKinney support board for the Motorola Oncore GPS receiver thru TAPR also linked on Brooks' site. They now show the kit of board and parts to be discontinued. This board is not needed but does make connections somewhat simpler because it provides a regulated supply for the Oncore and antenna, an RS-232 UART, and a buffered output for the 1 pps signal. The board's functions can easily be duplicated on perf board. I verified that everything on the GPS side was working. Since my HP 5345A can average counts for up to 1000 seconds, I used the 1 pps signal from the Oncore GPS to tweak it to about 3 parts in 10 E-10. Really took a lot of patience, especially because, unlike the HP 5328, the 5345 has no fine frequency trim, only the trimmer in the oscillator module that has to be moved in beentsy amounts, then you wait -- and wait. I still can't understand that engineering decision by HP, especially given the 11-digit resolution of the 5345. The result was certainly good enough for my overall purposes, but I really couldn't be sure about random variations in either the counter or the GPS signal -- the almost 17 minutes of averaging maybe wasn't enough and I really wanted to try the GPS-disciplined oscillator out anyway. I bought the controller board from A&A Engineering (also linked from Brooks' site) and ordered the chips I didn't have on hand; I found a real nice, very inexpensive toroid power transformer from All Electronics (the link is to their home page -- they always have a lot of interesting stuff) and then set the project aside for nearly a year. When I got back around to it, I had forgotten many of the details and so I re-read everything by Brooks, as well as the articles by Jimmy Oldaker and James Miller also linked on Brooks' site. I found it all very helpful but, of course, questions remained, especially about programming the PIC processor, which I had no experience with at all. More on this later. Instrument Case I had three old Fluke 893A analog differential voltmeters that I bought as a lot on eBay for $30.00. Out of three, I was able to make one good one to give to a friend, and get one complete case, which I decided to use for this project. The case had ample room for everything, which is good, because I like to "space-wire" stuff, and later you always want to add something. I gutted the case of all Fluke parts and made an overlay for the front panel from spray-can painted .063 aluminum sheet. Hand lettering with a black Sanford Sharpie fine-point pen is fast and easy and doesn't look bad -- well, not too -- bad. Master oscillator sans tilt/bail handle Rear panel OCXO One of the most important parts I also already had -- an HP 10544 10MHz OC/VCXO oscillator module, as well as the support board for it out of an HP 5328A/H99 counter that I had picked up years ago for parts. The 5328 oscillator support board made some things simpler, for me anyway: 1) It has a buffer amp for the 10MHz output, and the 5328 had a matching cable and BNC bulkhead connector for it. 2) It has a 74LS90 divider that provides a 1MHz output to drive both a front panel BNC jack and the controller board's U1 chip, which then allows U2a, set to divide by 4, to ouput a 250kHz signal for phase comparison to the 1 pps signal from the GPS receiver. 3) It has a highly regulated +13V supply for the oscillator's electronic frequency control (EFC) and oven control circuitry, a regulated +5V supply for the buffer and divider, and easy mounting of the oscillator module. 4) It has a 10k, 10-turn pot for fine control of the oscillator EFC, which makes connecting to the Shera controller board's DAC output simple. I could have soldered the connections directly to the support board's card-edge connector pads, but I removed the mating connector from the 5328's motherboard and made my connections to that. The support board's EFC circuit has a 17.8k resistor from the +13V supply to the top of the 10k "fine" pot. All I had to do was cut the trace that connected the bottom end of the pot to ground on the board, and solder a wire to the bottom end of the pot for connection to a second, 500 Ohm "finer" pot, wired in rheostat connection, which in turn connects to the DAC output. I set the finer rheostat to midrange for initial adjustments. I verified the sensitivity of the 10544 oscillator to EFC voltage changes, and it was almost exactly 1 E-8 Hz/Volt, which is the HP spec. Initially, I got everything hooked up and adjusted the oscillator's 10k fine pot for midrange, which I assumed the HP engineers would have designed for. This yielded an EFC voltage of around +2.4. Then I measured the RA and RB resistances, so that I could calculate the values for R5 & R6 on the controller board. By the way, this 10544 runs at about 50 degrees C inside a small styrofoam box I made to cover it. Seems kinda hot, but it works. Calculating R5 & R6: The equation for R6 in Brooks' article in QST Magazine is this: R6 = R5 [ ( RA / ( RA+RB ) x ( S / 7.5E-9 ) ) -1 ] However, Brooks' verbal example in his addendum of June 11, 2001, seems to me to indicate that the equation should be re-written to include a second parenthesis in front of the first RA term: R6 = R5 [ ( ( RA / ( RA+RB ) ) x ( S / 7.5E-9 ) ) - 1 ] It's straightforward -- one term is the voltage divider ratio of RA and RB as seen by the DAC output, and one term is the ratio of the oscillator's EFC sensitivity to Brooks' value for the controller's optimal loop sensitivity. Multiplied together, these terms let you calculate how much more voltage divider action is needed for the DAC output. My problem was that given the components already on the oscillator support board, I didn't need any more division, and in fact needed less. The thing is, the ratio of RA & RB is important to the overall result when the sensitivity term (S / 7.5E-9) is small. In my case the sensitivity term is 1E-8/7.5E-9 = 1.333. Since my 10544 oscillator module was old and well aged, I assumed that its aging curve was pretty flat. I decided to calculate backwards. I assumed a nominal DAC output of zero volts -- midrange in its output swing of +/- 3V (this assumes a very small need by the oscillator for a steady monotonic compensation -- perhaps an unwise assumption), and then calculated a ratio for RA and RB that would result in a value of zero for everything inside the brackets of the equation, which means a value of 0 for R6. With the part values on my support board, I only needed to adjust the 10k pot so that the upper arm had a value of approximately 3500 Ohms, then adjust the oscillator frequency to 10.0000000MHz by means of the trimmer in its top. This requires a nominal DAC output within a few millivolts of zero, which is what you get if you close the controller's filter switches 1, 2, & 3 to put the controller in set-up mode. I gave the DAC output a load of 1.18k to ground, using a resistor that was laying on the bench just when I needed it, and connected the output to the 500 Ohm "finer" adjust rheostat. So, no R6 in my unit, just a jumper. The combination of fine tweaking the oscillator and a final tweak of the "finer" rheostat makes setting the frequency within a usable control range simple without upsetting the RA and RB values. I believe the initial tuning procedure Brooks gives in his article will yield a good result but I didn't try it. Interior view -- note the "finer" 500 ohm pot stuck into the foam case covering the OCXO
Power supply
The power supply is dead simple, since the subsystems all have their own on-board regulation. The toroid transformer I used has two secondaries of 15VAC and 8VAC. I put the secondaries in series for 23VAC, with a tap at 8VAC. I grounded one end of the combination, and used half-wave rectifiers -- negative at the 8V tap and positive at the 23V end. I used fairly large capacitors as input filters, giving outputs of about +30VDC and -12VDC under load, with moderate ripple. An LM317T series regulator, mounted to the case's rear panel for heat-sinking, takes the nominal +30V output down to +20V, which feeds the oscillator and its support board, plus the GPS subsystem (which has its own +5V regulation), and the controller board's and divider board's +5V regulators. The -12V output feeds the controller board's -5V regulator. Since the controller's +5V 7805 regulator has a 20V input, I took it off of the controller board and heatsunk it to the chassis near the edge of the board, just to be sure that nothing gets too warm except the oven in the oscillator. Programming the PIC controller(s) I'm a Mac user, so the idea of dealing with DOS and doing command-line stuff makes me nervous -- I haven't used a command line for anything in about 20 years. I browsed for Mac solutions for programming a PIC and really didn't get anything I thought I could use. I'm not a novice computer user, but a lot of the tools I found are definitely meant for serious coders and/or for much older operating systems, with a sprinkling of Unix and other stuff thrown in. I do have a PC laptop that runs WinXP and only has USB ports for serial data. I thought I'd have to use a USB-to-serial adapter in order to program a PIC chip. Would it work? After Googling around a lot, I found a slick, inexpensive PIC programming board from Carl's Electronics that has both serial and USB interfaces and that supports many PIC chips. I got the assembled version with the ZIF socket. A software package for the programmer that runs under Windoze is downloadable thru a link on Carl's site, and there also is a link to a site for drivers for the FTDI USB/RS-232 interface chip (I discovered later that WinXP has a driver for the FTDI chip built-in -- no driver needed). It was confusing to try and figure out which driver to download from FTDI, so I just went with the first choice and that seemed to be right. Despite disclaimers on Carl's site and in the docs that the programmer is not "plug-n-play," my laptop chugged away for a minute or so after I connected the USB cable to the programmer and then announced that my new hardware was ready to use. The programming software recognized both Brooks' hex code file and the PIC chip immediately -- sure felt like plug-n-play to me. I got a couple of PIC 16C73B-20 chips from Mouser (Microchip is retiring the "A" version), and found that the USB programmer board and Brooks' code worked flawlessly. Initial performance The unit ran for several days on a filter setting of 4, which I believe, based on info on James Miller's site, averages for 1.67 hours. The mean phase error runs about 6.2nS at this setting, compared to around 35-120nS for the raw data from the GPS receiver as reported by the SynTac software from Synergy Systems. When the DAC's output went to a low of about -1V, I readjusted the trimmer in the oscillator module to bring the DAC output up to around +0.6V. I'll let it slowly drift back to -1V before repeating the exercise; I hope it takes a while. 12/20/04 Raw 1pps signal from satellite, with 5345's internal osc. Note overflow asterisk & m Hz indicators. (~ 999.9999994 mHz) As a secondary, "tautological" re-assurance test, and after setting the filter switches from 4 to 5 (3.33 hours of averaging), I connected the 10MHz output to the Ext. Osc. input jack on my HP 5345A, in order to phase-lock the 5345's time base to the GPS-disciplined 10MHz master signal. Then I connected the GPS receiver's raw 1 pps output to the 5345's channel A input, with 1000 Sec averaging for maximum resolution. I had an errand to do and left. When I came back 5 hours later, the 5345's overflow indicator was lit and the display was eleven zeros!!! Honestly, I wasn't sure the counter was working, so I went to a 10S gate and ten seconds later, the display was 1.00000000 Hz. 12/20/04 Raw 1pps from satellite, with 5345's osc. phase-locked to GPS-controlled master osc., N=4. (1.00000000000 Hz) A few details The McKinney support board for the GPS receiver has provisions for a low-Z output for the 1 pps signal and an LED driver, using a 7404 hex inverter. I take those outputs to the front panel to a BNC jack and an LED. The 1 pps green LED gives a quick verification that the GPS system is running (but not necessarily whether it's receiving a satellite signal -- the Motorola Oncore processor supplies a 1 pps output without a satellite signal so as to bridge any reception gaps. This is user controllable either thru the SynTac sw or the WinOncore12 sw available free from Synergy's site). I also have a green LED indicator for the +20V supply that verifies power-on and proper main regulator operation. I use the three LED outputs on the controller board too. The green "heartbeat" LED shows CPU operation (I found this important -- one older PIC chip died on me and I knew there was a problem when the heartbeat LED stopped but the 1 pps LED was still blinking). The red HI and LO LEDs flag any problems with phase lock as described in Brooks' article. Serial data out I may yet put a USB bridge in this unit, but for now, I read the serial data outputs from the GPS and from the controller using a Belkin serial-to-USB adapter connected to the PC laptop. The SynTac software from Synergy Systems works very well indeed under WinXP, at least once you get the connection sequence figured out, which is to connect everything and then reboot -- XP doesn't seem to like the serial-USB connection very well and shows its displeasure by making the cursor jump all over the screen while not responding to control inputs. As a plus, the SynTac SW also reads the NEMA outputs from my two consumer-grade GPS units. I use WinXP's built-in HyperTerminal to read-in the ASCII data from the controller, then save the data to the folder where I have everything related to this project. I tried Gary Sanders' QuickBasic file converter program GPSLOG3 (again, linked by Brooks) but I can't get it to read either the ASCII data files from HyperTerminal or his own Testfile. However, following Gary's notes, it's relatively easy to import the data into Excel and to tell Excel to do the computations that Gary's converter program does, and then plot the data. Frequency divider subsystem -- 10MHz input, 100kHz thru 1000 seconds output Brooks' site has a link to PIC assembler code written by Tom Van Baak for a PIC 16C84-20 that takes a 10MHz input and produces nine outputs from 100kHz to 1000sec in nine decade steps. Asking around on the web, I found I could substitue a 16F84A flash chip. I had a nine-position switch left over from the Fluke meter, so I built a little board to mount the PIC, a 74HCU04 hex inverter, and a 7805 regulator, and mounted it on the back of the switch. A buffered 10MHz output from the oscillator support board drives the PIC's clock input, and the nine outputs feed the switch. The return from the switch wiper feeds one gate of the 74HCU04, whose output feeds the other five gates in parallel. Their outputs each drive a series 47 Ohm resistor whose outboard ends are connected together to provide a low-Z output to the front-panel BNC jack. Being a PIC novice, I didn't know about setting the "fuses" when programming a PIC chip, and at first the breadboarded divider circuit wouldn't work correctly. Tom Van Baak graciously answered a couple of emails, and mentioned the fuses. After setting the oscillator fuse to high speed (HS) and disabling the watchdog timer (WDT), the circuit worked flawlessly. The 100kHz signal is asymmetrical by design, but the others are perfect square waves. It is stunning to an old geek to see these low frequency outputs have essentially the same precision and stability as the 10MHz master oscillator. Frequency muliplier subsystem -- 10MHz input, 100MHz output I wanted to multiply the 10MHz master signal to 100MHz to make calibrating some counters quicker (it's no help for computing counters like my 5345, though -- their display resolution is independent of frequency and only depends on the time base setting). It seemed I needed a PLL multiplier. After Googling around forever, I found Integrated Circuit Systems. (now merged with IDT -- once on the site, search for ICS501 or ICS501A). They make PLL-based clock multipliers. I was able to get two ICS501 chips (SOIC, which is the downward size limit for me on soldering -- forget TSSOP) and mounted them on an SOIC-to-DIP adapter board from Saelig Co. /Omega Engineering (the DIP16). These chips offer a variety of multiplier settings, so I configured one as a 2X multiplier and one as a 5X, in series. These are single-chip configurations needing no external components for the PLL filter. I mounted the assembly to the back of the 100MHz output BNC jack, and used a 7805 on-board for power regulation. The multiplier's output into 50 Ohms (through a recommended series 33 Ohm resistor between the IC output pin and the BNC center conductor) has 1 nsec rise and fall times, which means the output is actually more-or-less square. The output has the same resolution as the input, with a bit more jitter, which is no problem for my purposes. ICS also makes the 501A, which is the 501 with different multiplier settings, including a 10X setting which makes for a one-chip solution for this application. I had already built the two-chip board when a 501A sample arrived, so that change lies in the future. Satellite signals Since DoD has turned off Selective Availability, the controller doesn't seem to need much in the way of filtering to maintain a very accurate output from the oscillator. I've discovered that a filter setting of 2 or 3 seems perfectly adequate for most purposes. I'm now at 4 but am wondering if I'll go beyond that. The overall performance stability means that I won't move the filter switches to the front panel as I thought I might need to do. Last thoughts (for a while) This is without doubt the most satisfying electronic project I've ever built, and I'm just extremely grateful to Brooks Shera for making it possible to have a piece of equipment with accuracy like this sitting on my bench. My thanks also to everyone else who found Brooks' design interesting and desirable, and contributed to it. October 5, '04 Update I discovered that the 1MHz signal to the controller chip U1 (74HCU4046) needed to be terminated at the controller board input. I was getting a multitude of phase unlock indications, but the satellite signals were fine. Looking at the signals with a relatively high-speed 'scope (Tek 7904 w/ 7A26 vertical plug-in), I discovered that the 1MHz signal into the controller was pretty nasty looking. 100 Ohms turned out to be about right, both for when the front panel jack is in use, driving a cable terminated with 50 Ohms, and also for when the jack is open. Adding the resistor eliminated the funny stuff. I also wasn't happy with the 10MHz output signal waveforms from the oscillator support board. Those outputs originally came from a 74LS158 quad two-input selector (an inverting version of the common 74LS157). I replaced that chip with a 74ACT14 hex schmitt-trigger, which involved the somewhat tedious construction of a small board to hold the new 14-pin chip and make connections to the original 16-pin chip's holes. Part of the tedium came because this whole section of the support board's circuitry lies under the oscillator module, making testing more difficult (an extender board would really help here). A few of the holes lined up perfectly, a few needed to jump a pin hole or two. After this, the loading on the 10MHz output of the oscillator module needed to be increased to get decent waveform symmetry -- adding a 5.6k resistor in parallel with the original 10k pull-up resistor from the 5V supply did the trick. The 10MHz outputs are now much squarer and rise and fall faster, too. I kept the original emitter follower buffer for the front panel output. It's been a bit over a month, and the DAC output is almost -1V again... After re-trimming, the DAC output is about +0.8V. December 20, '04 The DAC output is now hovering around -0.35V, so it looks like the 10544 oscillator's delta-f aging drift is pretty low -- in 2-1/2 months, about 0.9 E-8, or 0.35 E-8/month, or roughly 1 E-10/day. March 11, '06 The unit has been running continuously, undisturbed since the last check. The DAC output is approximately -1.11V. After about 13 months since the last check, the total 10544 oscillator drift is 7.6 E-9, yielding a drift rate of about 2.9 E-10/month or roughly 9.7 E-12/day. Clearly this old oscillator likes not being disturbed by temperature shifts from opening the case or from turning the power off. Given the awesome stability, I hesitate to tweak the oscillator frequency to put the DAC output back to somewhere near zero. Maybe next year...... December 20, '06 Continuous operation goes on, but the DAC output is now about -2.5V, down from -0.35V, for a total two-year drift of 3mV/day, indicating an oscillator drift of 3 E-11/day. I tweaked the oscillator frequency adjust to bring the DAC output up to around +0.6V. Next tweak may not be needed for another two years or more. A couple of brief power outages in our area recently seem to have accelerated the drift a bit. I'm not sure why. August 5, '08 I have found a new system designed by Bertrand Zauhar that uses a digital frequency-locked-loop that I'm going to try out in this box. If it works out, I'll create a new page here on the site. September 6, '08 Bertrand Zauhar's D-FLL (digital frequency-locked-loop) works very well and my conversion is complete. See GPS Oscillator, Version 2 here on my site. |
|