Close

More accuracy, and measuring it

A project log for GPS+Atomic clock build

Building a GPS-disciplined clock using Rubidium oscillator with DS3231 backup using PPS signals from all sources

paul-leskinenPaul Leskinen 09/02/2015 at 04:140 Comments

I've decided that it's not terribly useful to have an atomic clock but not really know how accurate it is. And since it can take a year or so for the Rubidium oscillator to be off by a millisecond (and much longer for a visible error), I need to take precision down to the microsecond. This requires modifying the time library (again) and measuring how far off the internal time is from the GPS pulse when the GPS is taken "offline." Also, the GPS and Rubidium pulse interrupts need to use micros() instead of millis() to "stamp" when they fire. I mean really, 1/1000th of a second is an eternity.

Most of these code changes are already in place, but I'm now having issues when the micros() function wraps after 4.2 billion microseconds elapses (every 71 minutes). Should not be too difficult to track down and fix, but debugging is trickier when you have to wait over an hour to see if you've fixed it!

Anyway, I should be able to see errors in the microseconds accumulating after a day or two, depending on how consistent the measurement is. More to come...

Discussions