Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Standalone PPS

62 views
Skip to first unread message

patrick2...@gmail.com

unread,
Jun 10, 2013, 10:34:40 AM6/10/13
to
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<u>/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)

David Taylor

unread,
Jun 10, 2013, 11:02:47 AM6/10/13
to
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

unruh

unread,
Jun 10, 2013, 2:33:03 PM6/10/13
to
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


Maarten Wiltink

unread,
Jun 10, 2013, 5:48:21 PM6/10/13
to
<patrick2...@gmail.com> wrote in message
news:aed3fdb6-3f27-4361...@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


patrick2...@gmail.com

unread,
Jun 13, 2013, 8:01:41 AM6/13/13
to
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

Terje Mathisen

unread,
Jun 13, 2013, 8:45:36 AM6/13/13
to
patrick2...@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
>


--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

unruh

unread,
Jun 13, 2013, 1:49:15 PM6/13/13
to
On 2013-06-13, patrick2...@gmail.com <patrick2...@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?

David Lord

unread,
Jun 13, 2013, 3:57:26 PM6/13/13
to
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

E-Mail Sent to this address will be added to the BlackLists

unread,
Jun 13, 2013, 7:09:13 PM6/13/13
to
patrick2...@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
Level Accuracy in 1st 24 Hours DS-1 Rate MTIE
1 1x10-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-6 N/A N/A 1 μs

--
E-Mail Sent to this address <Blac...@Anitech-Systems.com>
will be added to the BlackLists.

patrick2...@gmail.com

unread,
Jun 26, 2013, 3:27:36 PM6/26/13
to
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

E-Mail Sent to this address will be added to the BlackLists

unread,
Jun 26, 2013, 6:20:39 PM6/26/13
to
On 6/26/2013 12:27 PM, patrick2...@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.}

patrick2...@gmail.com

unread,
Jun 30, 2013, 1:55:32 PM6/30/13
to
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
0 new messages