[time-nuts] Using GPS 1PPS for accurate period measurement

Hal Murray hmurray at megapathdsl.net
Fri Dec 2 12:59:38 EST 2011

> The need for this is that the RTC chip for a product has the engaging
> property of shifting it's frequency by several ppm after being soldered to
> the board, and I need to characterise this to get accurate timing for the
> product. 

Are you sure you have the exact same setup?

Have you tried soldering by hand rather than running the whole chip through 
the oven?

I've been playing with one of the Dallas DS32KHZ parts.  I'm guessing you are 
using the RTC version.  I'm running it at 3.3V because I didn't have a 3.0 V 
regulator handy.  It's running about 2 PPM high which matches the spec on the 
power supply sensitivity.

Another possibility is that I didn't ground the NC pins.  (I didn't notice 
that in the data sheet until I read it again looking for crap like that.)

> I want to measure the accuracy of a 1Hz signal from a real time clock (RTC)
> chip with an integrated TXCO allegedly good for +/- 2ppm accuracy. My
> employer is too tight to buy a good frequency counter, but I do have a GPS
> module outputting 1PPS. If I use a little micro running at 16MHz from a
> jellybean crystal to measure the period of the 1PPS signal from the GPS
> concurrently with measuring the period of my test signal, will I be able to
> get accuracy of sub ppm? My resolution for a single period is 62.5 ppb, but
> this is a lot different to accuracy. I could easily count multiple periods,
> as I do not need fast results. My thought is that the 16MHz will have jitter
> and a pronounced drift, but that as the measurements of my reference and
> signal are done nearly concurrently, the errors will be very small.

I agree with others that if your time is worth anything, this is a fine 
excuse to get a counter.

Another possibility is a scope.  Do you have a digital scope that can delay 
out to 1 second?

I remember years ago, when I got my first GPS receiver triggering our fancy 
lab scope on the PPS signal and dialing out to look at the next one.  The 
scope was off by by something like 7 PPM.

Anyway, I'm pretty sure you can do something like you describe.

You might try a pair of tvb's picPETs.
They expect 10 MHz rather than 16.

If you like programming micros, you can obviously do something similar.  If 
your favorite chip has 2 counter/timer modules with the right options you can 
probably do both in one chip.

If I was doing something like this, I'd collect 100 seconds of data and then 
graph it and use the mark-one eyeball as a filter.  If I didn't like the 
results, I'd write a script to average over 10 and 100 seconds and graph that.

Things to consider:

How good is your GPS antenna?  Does it fade out occasionally?  If so, you 
have to record the GPS status too.

How stable is the temperature in your lab?  The ballpark for low cost 
crystals/oscillators is 1 PPM/C.

These are my opinions, not necessarily my employer's.  I hate spam.

More information about the time-nuts mailing list