GPS PPS use as a time reference

Most GPS modules today have an output called PPS.  PPS stands for Pulse Per Second and is a digital output signal which changes value on the 1 sec. boundary for UTC (Universal Coordinated) time.  This signal can be used to reset internal counters in a DAQ system that count the number of clock ticks from the second boundary.  The signal polarity and length is usually programmable in the GPS.

A few notes on using this PPS signal:

  1. There are two measures of the signal: one is the signal accuracy and the other is its precision.  Accuracy is how close the signal edge is to the actual UTC boundary.  Some mfgrs. do not give you this value.  It can often be a few microseconds off from the actual UTC boundary.  The good news is that this offset error is usually fixed for a given firmware version/product.  The second measurement is the precision, which is how much the PPS signal edge changes from one second to the other.  This value can be from the 10s of nanoseconds to a few few microseconds.
  2. The PPS signal edge and rise time are very important if you are using it to reset a counter.  If the rise time is slow due to a large input capacitance, long signal length, etc. this will add an offset to the accuracy that will need to be calibrated out.  If the signal is noisy from long trace lengths, unshielded cables, or other noise sources, the reset circuit may see more than one edge or a variable delay on the offset time where the counter is reset.
  3. Many GPS have precision in the 10’s of nanoseconds.  The PPS can be used to calibrate crystal oscillators which have errors generally in the 20-100 ppm.  A 100 ns precision gives an error of about 1 PPB.   The biggest problem is the precision of the GPS can vary due to many factors which cannot be easily measured.  The error can change from one PPS to the next.  So a trick is to create either a median filter or moving average of several PPS counts to determine the actual count value.
  4. FPGA’s can very easily synchronize a clock count time to the PPS edge boundary and then measure the time of an event like a trigger.
  5. Microcontrollers can also use the PPS to sync. a counter to UTC second time, but are less flexible and generally less accurate in measuring event times, especially when interrupts are used instead of h/w timers.
  6. GPS systems need to be able to view the sky to work properly.  This can be a big problem if the system is indoors and shielded.  An antenna would have to be run to the outside.
  7. The GPS serial data can be used to set the system date and time.   The data come out of the GPS some time usually from 100-500 ms after the PPS edge.

The GPS PPS signal, when properly handled, can provide a very good time reference for DAQ systems.