[ntp:questions] setting the time using gps-time and pps without ntpd?

Nicola Berndt nb at komeda-berlin.de
Thu Apr 24 14:28:17 UTC 2008


Unruh schrieb:
> nb at komeda-berlin.de (Nicola Berndt) writes:
> 
>> Hello,
> 
>> recently I tried building a microsecond precision timeserver using a 
>> gps-device with pps signal.
> 
>> The gps-data is transmitted via usb, the pps signal via the rs232 
>> carrier detect line.
> 
>> I tried several drivers and they all worked, but I had to figure that 
>> obviously my mainboard (via epia en12000EG) has terrible jitter. - unusable!
> 
> Are you sure that it is not the reading of the time that is the problem.
> What gps do you use? Are you sure it really has and is using PPS?
> And what do you call "terrible"
> 

I use a Conrad USB-Receiver that contains a U-Blox board. I took the 
PPS-Signal from the according pins inside the device myself and tested, 
if it sends a pulse every second and it does. So that looks ok to me.

"Terrible" I call that I can watch the jitter with ntpq -p jump from -50 
to 50. I assume those are microseconds, so +/-50 ms makes 1/10 seconds. 
I can set any clock that precise using my bare hands ;)

The next problem I actually stumbled across is the long time ntpd needs 
to settle. The system I inted to build has to be ready right after the 
start, because the pc lies in a shelf, off, and is switched on right 
when needed. There is no way to let it run, since it is battery-driven.
> 
> 
>> To solve the problem I think about simply setting the time every n 
>> seconds according to the collected gps time and the pps-signal. My 
>> system will run off for far less than a microsecond in an interval of 
>> let's say, 20 seconds or so. Like this I would implement a constantly 
>> jumping time, but the amount of jumps would be extremely small.
> 
> Just use ntp to discipline your clock. No need to try to bacly reinvent
> something.

Oh, I happily would, I just didn't get it to work and gave up at some 
point (after days..)

best regards,
../nico



More information about the questions mailing list