Go Down

Topic: problems combining millis() and GPS timekeeping (Read 4562 times) previous topic - next topic

pito

#15
Jan 30, 2013, 11:18 pm Last Edit: Jan 30, 2013, 11:35 pm by pito Reason: 1
The 1sec pulse from a GPS module is not exactly 1sec. It has a jitter (~few milliseconds) thus the short time precision is poor. Only when averaged over a longer time period (~hours) it follows the "GPS" precision, however. Normally, you do not want to use 1sec pulses from a GPS module for a measurement. It is used for disciplining of a quality crystal oscillator (ie 5-10MHz) instead. Google "crystal oscillator disciplining"..
http://en.wikipedia.org/wiki/GPS_disciplined_oscillator

Jack Christensen

#16
Jan 31, 2013, 01:26 am Last Edit: Jan 31, 2013, 01:28 am by Jack Christensen Reason: 1

The 1sec pulse from a GPS module is not exactly 1sec. It has a jitter (~few milliseconds) thus the short time precision is poor. Only when averaged over a longer time period (~hours) it follows the "GPS" precision, however. Normally, you do not want to use 1sec pulses from a GPS module for a measurement. It is used for disciplining of a quality crystal oscillator (ie 5-10MHz) instead. Google "crystal oscillator disciplining"..
http://en.wikipedia.org/wiki/GPS_disciplined_oscillator


I wondered about short term jitter and yes I am aware of disciplined oscillators. Yet, using this technique, I have measured several µCs with crystals for their system clock, and having one of the timers set to create a 1MHz output, I can watch the readings for minutes at a time and I usually don't see more than a single digit bobble. A few milliseconds jitter would cause variations of thousands of Hertz. Perhaps this particular GPS receiver uses a disciplined oscillator for its 1 PPS output. Don't remember but I'll double check the datasheet.

Here is some typical output, I was fairly amazed. Just the first minute's worth in the quote but the attached file has ten minutes or so. I've checked this particular unit several times over as many days, and the frequency is always the same, so I'm not seeing any longer-term variation either.

Code: [Select]
GPS Frequency Counter
2: 1,000,003 Hz
4: 1,000,003 Hz
6: 1,000,004 Hz
8: 1,000,003 Hz
10: 1,000,003 Hz
12: 1,000,003 Hz
14: 1,000,004 Hz
16: 1,000,002 Hz
18: 1,000,003 Hz
20: 1,000,003 Hz
22: 1,000,003 Hz
24: 1,000,003 Hz
26: 1,000,003 Hz
28: 1,000,003 Hz
30: 1,000,003 Hz
32: 1,000,000 Hz
34: 1,000,003 Hz
36: 1,000,003 Hz
38: 1,000,003 Hz
40: 1,000,003 Hz
42: 1,000,003 Hz
44: 1,000,003 Hz
46: 1,000,003 Hz
48: 1,000,003 Hz
50: 1,000,003 Hz
52: 1,000,003 Hz
54: 1,000,003 Hz
56: 1,000,003 Hz
58: 1,000,003 Hz
60: 1,000,003 Hz
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

michinyon

Which GPS are you using to get 40 samples per second ?

Jack Christensen


Which GPS are you using to get 40 samples per second ?


I read that he was logging data 40/sec, not that the GPS was providing updates at that rate.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up