[time-nuts] Yet another Arduino-based GPSDO

Jim Harman j99harman at gmail.com
Thu Apr 10 00:44:37 UTC 2014

My apologies if this posts twice. I sent a copy earlier today but I think
that was before I was subscribed to the list...

I have recently built a low cost Arduino-based GPSDO based on Lars
Walenius' design and thought I would share my experiences.

For the GPS I am using the Adafruit GPS Shield ($49.00) which is based on
the Globaltop 3339 chip. This does not have a "stationary" mode or sawtooth
compensation but it does have a 1 pps output with stability speced at 100
ns RMS. Typical performance seems a good deal better than this, using the
Adafruit external antenna. My antenna is outdoors on a windowsill, so it
sees about half the sky. Sawtooth is about 10 ns p-p. I was able to fit the
phase comparator onto the prototyping space of the GPS Shield card.

My oscillator is a surplus OCXO made by FOQ Piezo, which cost $25.00 on
eBay. Drift after several days of operation is about 6x10^-11 per day.

In place of Lars' PWM-based DAC I am using a 12 bit MCP4725, with an I2C
interface to the Arduino. This is available on a breakout board for $4.95
from Adafruit.

The oscillator, DAC, and HC393 divider are packaged separately from the GPS
and phase comparator, with a 6 inch jumper between them. One advantage of
this arrangement is that you can use the oscillator stand-alone. The DAC
has non-volatile memory which I load with the latest 3-hour average value,
so it will remember its calibration.

Observations based on about a week of testing:

-- Because the oscillator has only one ground pin, it is important to make
sure the VCO circuitry does share a current path with the oscillator, to
avoid frequency shifts when the oven current changes. .

-- With the oscillator and phase detector on separate cards, I got a lot of
ringing on the 1 and 5 MHZ clock lines. This added noise to the ADC
readings and may have also caused occasional spurious interrupts on the
Arduino. Adding 100 ohm resistors in series with these lines helped a lot.

-- the 1 usec integrator at the ADC input is very sensitive to temperature.
Just blowing on it causes a bump of about 75 ns, which recovers after about
about 30 sec. Covering the Arduino and GPS shield to protect it from air
currents improves the short-term stability considerably.

-- Lars' filter, though hard (for me) to understand, seems to work very
well. Dusting off my 1969 edition of Mesla and Schultz's "Linear Control
Systems", it appears to work like a system with lag-lead compensation. It
is very handy to have independent control of the time constant, the gain,
and the damping factor.

-- In place of the DIP switches Lars uses to set the operating mode and
time constant, I added simple commands from the PC keyboard to hold at a
specified DAC value or run with the loop closed. Still to do: restore the
ability to change the time constant on the fly.

-- I have been using an enhanced serial monitor for the Arduino, which is
very useful because it allows real-time performance monitoring and
plotting. It is described here
The monitor software is new and not generally released yet, but is
available on request by contacting its author via the Arduino forum. This
may be an answer to the issue Chris Albertson raised on how to test a GPSDO
without expensive gear. You can for example produce a histogram of the
5-minute average DAC output values using just a few lines of code. You can
also send messages to an "Alert" window, and plot the TIC and DAC values
over time with a scope-like display.

A screenshot that includes a hanging bridge is attached. Vertical range is
100 ADC counts (100 ns) and horizontal is 512 sec. The black trace is the
raw TIC data and the red trace is TIC_ValueFiltered, the output of the
low-pass filter. The blue trace is an offset version of the DAC output. The
filter time constant was set to 512 seconds. The bump at about 200 sec was
caused by a slight breeze blowing past the TIC. You can see the histogram
window in the background.

I will post schematics and my updates to Lars' code if there is interest.


--Jim Harman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Hanging bridge 2.png
Type: image/png
Size: 107475 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20140409/2d046894/attachment.png>

More information about the Time-nuts_lists.febo.com mailing list