[ntp:questions] Standalone PPS
Hello I would like to get some points of view before starting to write some code. I am trying run an electronic board I designed. A super stable OXCO generates pulse per second. I don't have any absolute reference time. The pulse has a constant but unpredictable phase due to the state of the electronics a power up. My goal is to keep a set of machine with a relative time between each other of 1mS and an absolute time of 1 second. I have a way to set the system clock at start up (before ntp) I can not use the driver 22 alone as I don't have an absolute reference. If I use both the drivers 22 and 1 the phase of the PPS make this channel rejected. I plan to write a driver that is a merge between 1 and 22, let's call it sapps. * Sapps_start sapps_time sapps_poll are copied from the driver 22 (if they are really needed) * sapps_init fetches the current_time, fetches the assert in /sys/class/pps/assert, keeps the digits after the decimal point, substracts them from the current time and set it as the reference Regards Patrick PS Also people who would like to design simplified electronics for radio control can be interested by this. As an example, the DFC77 is a data encoded by pulses per second of 100 or 200 mS (with a drop at the second 59) ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
On 10/06/2013 15:34, patrick200075...@gmail.com wrote: Hello I would like to get some points of view before starting to write some code. I am trying run an electronic board I designed. A super stable OXCO generates pulse per second. I don't have any absolute reference time. The pulse has a constant but unpredictable phase due to the state of the electronics a power up. My goal is to keep a set of machine with a relative time between each other of 1mS and an absolute time of 1 second. I have a way to set the system clock at start up (before ntp) I can not use the driver 22 alone as I don't have an absolute reference. If I use both the drivers 22 and 1 the phase of the PPS make this channel rejected. I plan to write a driver that is a merge between 1 and 22, let's call it sapps. * Sapps_start sapps_time sapps_poll are copied from the driver 22 (if they are really needed) * sapps_init fetches the current_time, fetches the assert in /sys/class/pps/assert, keeps the digits after the decimal point, substracts them from the current time and set it as the reference Regards Patrick PS Also people who would like to design simplified electronics for radio control can be interested by this. As an example, the DFC77 is a data encoded by pulses per second of 100 or 200 mS (with a drop at the second 59) For a stand-alone set of PCs, take a look at "orphan mode" NTP. I don't know whether you can combine this with sending a common PPS signal to all the PCs, though. You may be able to get 1 ms just with NTP alone, though, if the loading is light and you use a short local polling interval. There may be an additional difficulty with Windows PCs in that PPS works by having the NMEA driver timestamp the first received packet of serial data with the time of the PPS transition on the DCD line, so if there is no serial data the PPS may not be registered. Again I am not sufficiently expert to give a definitive answer on that - just a warning. As you mention a UNIX-like file name this may not be a problem for you, but someone else has mentioned a similar issue to me just recently and may be reading this group. -- Cheers, David Web: http://www.satsignal.eu ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
On 2013-06-10, David Taylor wrote: > On 10/06/2013 15:34, patrick200075...@gmail.com wrote: >> Hello >> >> I would like to get some points of view before starting to write some code. >> >> I am trying run an electronic board I designed. >> >> A super stable OXCO generates pulse per second. >> >> I don't have any absolute reference time. The pulse has a constant but >> unpredictable phase due to the state of the electronics a power up. >> >> My goal is to keep a set of machine with a relative time between each other >> of 1mS and an absolute time of 1 second. I have a way to set the system >> clock at start up (before ntp) >> >> I can not use the driver 22 alone as I don't have an absolute reference. If >> I use both the drivers 22 and 1 the phase of the PPS make this channel >> rejected. >> >> I plan to write a driver that is a merge between 1 and 22, let's call it >> sapps. >> * Sapps_start sapps_time sapps_poll are copied from the driver 22 (if they >> are really needed) >> * sapps_init fetches the current_time, fetches the assert in >> /sys/class/pps/assert, keeps the digits after the decimal point, >> substracts them from the current time and set it as the reference >> >> Regards >> >> Patrick >> >> PS Also people who would like to design simplified electronics for radio >> control can be interested by this. As an example, the DFC77 is a data >> encoded by pulses per second of 100 or 200 mS (with a drop at the second 59) > > For a stand-alone set of PCs, take a look at "orphan mode" NTP. I don't > know whether you can combine this with sending a common PPS signal to > all the PCs, though. You may be able to get 1 ms just with NTP alone, > though, if the loading is light and you use a short local polling interval. > > There may be an additional difficulty with Windows PCs in that PPS works > by having the NMEA driver timestamp the first received packet of serial > data with the time of the PPS transition on the DCD line, so if there is > no serial data the PPS may not be registered. Again I am not > sufficiently expert to give a definitive answer on that - just a > warning. As you mention a UNIX-like file name this may not be a problem > for you, but someone else has mentioned a similar issue to me just > recently and may be reading this group. IF you disable interrupt coalescing it should be easy to get 10micro (not milli) second on the machines (assuming they are Linux machines. Windows may be a whole other thing.) See www.theory.physics.ubc.ca/scatter/rt.html ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
wrote in message news:aed3fdb6-3f27-4361-81e4-18b7b1833...@googlegroups.com... [...] > I am trying run an electronic board I designed. > > A super stable OXCO generates pulse per second. > > I don't have any absolute reference time. The pulse has a constant > but unpredictable phase due to the state of the electronics a power up. This can be specified as a parameter to a freerunning PPS source. Time1 or time2, perhaps; it has been discussed here years ago and memory is suitably fuzzy for my age. Combine it with one of the more conventional sources (the pool comes to mind) over some time to find out the phase error. How stable is 'super'? Groetjes, Maarten Wiltink ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
Hi The super stable means easily 1ppm which means about one second every 16 days. Get a look to www.matel-fordahl.fr or www.kvg-gmbh.de . However my PCB can be implemented with classics DIL14 pins 1 7 8 14 footprints for people who has very bad computer clock or simply wants to put the clock outside the hot computer box or even outside the hot computer room. My goal is to keep internal machines on time to each other more than to keep an absolute clock. The internal ntp is enough for that as networks are 100M or 1 giga. The PPS is used only to MY stratum 0 (my PCB has 2 outputs as the max232 has 2 but I am using only one for the ntpd). The orphan mode is never used as long as a source is available. The 127.127.1.0 IS always available, it is this one that I need to get rid after the initialization. The problem is here: I need the local for initialization. But the local later on makes a conflict because it is a bad source. The time1 and time2 would have been the solution to adjust the phase on startup but I don't want to do that on each power up. I can do that if I would be able to use back quotes to call a script. Cheers ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
patrick200075...@gmail.com wrote: Hi The super stable means easily 1ppm which means about one second every 16 days. Get a look to www.matel-fordahl.fr or www.kvg-gmbh.de . However my PCB can be implemented with classics DIL14 pins 1 7 8 14 footprints for people who has very bad computer clock or simply wants to put the clock outside the hot computer box or even outside the hot computer room. What you really need is to interface your board with an external PPS source, i.e. a cheap (SURE/GARMIN) gps so that you can steer that internal osc to lock onto the absolute time signal. This will give you the best of both worlds: Both accurate and stable! Terje My goal is to keep internal machines on time to each other more than to keep an absolute clock. The internal ntp is enough for that as networks are 100M or 1 giga. The PPS is used only to MY stratum 0 (my PCB has 2 outputs as the max232 has 2 but I am using only one for the ntpd). The orphan mode is never used as long as a source is available. The 127.127..1.0 IS always available, it is this one that I need to get rid after the initialization. The problem is here: I need the local for initialization. But the local later on makes a conflict because it is a bad source. The time1 and time2 would have been the solution to adjust the phase on startup but I don't want to do that on each power up. I can do that if I would be able to use back quotes to call a script. Cheers -- - "almost all programming can be viewed as an exercise in caching" ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
On 2013-06-13, patrick200075...@gmail.com wrote: > Hi > > The super stable means easily 1ppm which means about one second every 16 > days. Get a look to www.matel-fordahl.fr or www.kvg-gmbh.de . However my PCB > can be implemented with classics DIL14 pins 1 7 8 14 footprints for people > who has very bad computer clock or simply wants to put the clock outside the > hot computer box or even outside the hot computer room. 1PPM is not what I would call super stable. That is 1 usec per second. > > My goal is to keep internal machines on time to each other more than to keep > an absolute clock. The internal ntp is enough for that as networks are 100M > or 1 giga. The PPS is used only to MY stratum 0 (my PCB has 2 outputs as the > max232 has 2 but I am using only one for the ntpd). > > The orphan mode is never used as long as a source is available. The > 127.127.1.0 IS always available, it is this one that I need to get rid after > the initialization. You should NEVER use the local clock. > > The problem is here: I need the local for initialization. But the local later > on makes a conflict because it is a bad source. Why do you need the local for initialization? > > The time1 and time2 would have been the solution to adjust the phase on > startup but I don't want to do that on each power up. I can do that if I > would be able to use back quotes to call a script. > > Cheers ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
patrick200075...@gmail.com wrote: Hi The super stable means easily 1ppm which means about one second every 16 days. Get a look to www.matel-fordahl.fr or www.kvg-gmbh.de . However my PCB can be implemented with classics DIL14 pins 1 7 8 14 footprints for people who has very bad computer clock or simply wants to put the clock outside the hot computer box or even outside the hot computer room. My goal is to keep internal machines on time to each other more than to keep an absolute clock. The internal ntp is enough for that as networks are 100M or 1 giga. The PPS is used only to MY stratum 0 (my PCB has 2 outputs as the max232 has 2 but I am using only one for the ntpd). The orphan mode is never used as long as a source is available. The 127.127.1.0 IS always available, it is this one that I need to get rid after the initialization. The problem is here: I need the local for initialization. But the local later on makes a conflict because it is a bad source. The time1 and time2 would have been the solution to adjust the phase on startup but I don't want to do that on each power up. I can do that if I would be able to use back quotes to call a script. Cheers I'd suggest not trying to use PPS but derive the system clocks from your ocxo. Otherwise you have a problem to synchronize the PPS to one of your systems. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
patrick200075...@gmail.com wrote: > I am trying run an electronic board I designed. > A super stable OXCO generates pulse per second. > The super stable means easily 1ppm which means about one second every 16 days. I'm not certain you are getting what you think you are getting out of that. consider: ANSI T1.101 Table 2 Clock Performance Requirements Stratum Free-Run Holdover Accuracy Slip Rate @Rearrangement LevelAccuracy in 1st 24 HoursDS-1 Rate MTIE 11x10-11 N/A ≤1 Slip in 72 days N/A 2 1.6x10-8 1x10-10 ≤1 Slip in 13 days 1 μs 3E 4.6x10-6 1x10-8≤7 Slips in 1 day 1 μs 3 4.6x10-6 3.7x10-7 ≤255 Slips in 1 day 1 μs 4 32x10-6N/A N/A 1 μs -- E-Mail Sent to this address will be added to the BlackLists. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
The idea is to keep a simple and cheap PCB with only the dividers from 10MHz to PPS What about If I patch the atom 22 driver ( or create a new fork 46 ). I add a global variable in order the poll function know how much time it has been called. If for instance the function has been called less than 10 times, it execute a code taken in the local driver (1) otherwise, it executes the normal one. By this way i) I can get rid of the local in the config file as I have a starting time. ii) I can measure the phase of my pulse and "forge" the flag2 or 4 to put the exact value Thanks ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
On 6/26/2013 12:27 PM, patrick200075...@gmail.com wrote: > The idea is to keep a simple and cheap PCB with only > the dividers from 10MHz to PPS I think the PC (or whatever system) would benefit more from having a better quality main frequency source like a OCXO, than feeding the PC (that drifts all over the place with temperature) with a more stable external PPS. > What about If I patch the atom 22 driver ( or create > a new fork 46 ). I add a global variable in order the > poll function know how much time it has been called. > If for instance the function has been called less than > 10 times, it execute a code taken in the local driver > (1) otherwise, it executes the normal one. (Shrug) You can rewrite ntpd to be a desktop calculator if you want. > By this way i) I can get rid of the local in the config > file as I have a starting time. ii) I can measure the > phase of my pulse and "forge" the flag2 or 4 to put > the exact value ... or you could get rid of local and set TOS orphan 11 {It is the same only different.} -- E-Mail Sent to this address will be added to the BlackLists. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Standalone PPS
Hi I may found the solution: I patch refclock_local.c to return a timeout error from the poll function after a certain number of polls. By this way I have an initial time and the atom 22 driver takes the full control after. To keep compatibility with everybody who uses the local driver (but it looks like nobody), I can use the unit variable to switch to this behavior if 127.127.1.1 is used Cheers ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions