Sync accurate timing to milliseconds

I want to have two arduinos which should be in time sync up to milliseconds. I need to get on both stations the time with milliseconds in an interrupt method.
Somebody an idea of some very accurate timing devices?
My idea was to use an GPS module and it´s 1pps output signal with an interrupt. Do you think that´s accurate enought?

A RTC module like the DS3231 can also be set to provide a 1pps signal and as it's temperature compensated will/could be quite accurate over days/weeks.
How long do these synced devices need to run for?
If you mark the internal MCU time every 1 second pulse you can work out how much off the MCU resonator is compared to your 1pps and adjust your code timings to match.

I am already using a DS3231 with the 1pps signal but the problem it´s not accurate over years.
The stations need to stay in sync over years (1-3) and they never get connected together so i think gps sync is the way to go isn´t it?
And how do i get the tiem in the interrupt method from an gps module? (As i know in the interrupt method no serial software nor hardware serial can be used)

Or get rid of the need to be in sync

Mark

holmes4:
Or get rid of the need to be in sync

Mark

That´s not an option. I need to use it for sports timing.

Then, sorry to say, it's not going to happen. Milliseconds over years is an absurd accurate timing.

For a relay run here they had enough trouble to make 6 synced enough devices to record the race. And to get accurate readings they sync them the day of the race. They don't stay synced for year.

If you are in parts of the world that still support it, you may be able to use the time signals broadcast on longwave or shortwave radio

Another option is to use a Rubidium+standard, i.e have your own atomic clock.

If you want to see if this method would suit your purpose, you can buy second hand rubidium standards on eBay and there are various blogs which show how to rejuvenate them.

The stations need to stay in sync over years (1-3)

This seems like a odd system. Prior to GPS you would have needed to calibrate by physically getting both devices next to each other on a fairly regular basis. Probably at least once a year.

BTW. You have not mentioned if these devices are under harsh physical conditions.

It sounds like you are building a system that is required to time to millisecond accuracy over large distances for incredibly large periods of time.

If it wasn't for that fact that you can just use GPS, I'd advise you to get a commercial hardware company to build you a decent system, using dedicated hardware and atomic clocks using a rubidium standard or equivalent.

rogerClark:
If you are in parts of the world that still support it, you may be able to use the time signals broadcast on longwave or shortwave radio

Radio clock - Wikipedia

Another option is to use a Rubidium+standard, i.e have your own atomic clock.

If you want to see if this method would suit your purpose, you can buy second hand rubidium standards on eBay and there are various blogs which show how to rejuvenate them.

Rubidium standard for sale | eBay

This seems like a odd system. Prior to GPS you would have needed to calibrate by physically getting both devices next to each other on a fairly regular basis. Probably at least once a year.

BTW. You have not mentioned if these devices are under harsh physical conditions.

It sounds like you are building a system that is required to time to millisecond accuracy over large distances for incredibly large periods of time.

If it wasn't for that fact that you can just use GPS, I'd advise you to get a commercial hardware company to build you a decent system, using dedicated hardware and atomic clocks using a rubidium standard or equivalent.

Using a radio clock is i think a bit more tricky (specially in different countries) than an gps.
The stations are in harsh conditions. Most of the time very cold (0- -20C). Don't you think an GPS Module is the best method? What are the negative effects of using GPS? I thought it can be used to get very accurate time (to 100th of a seconds).

The stations are in harsh conditions. Most of the time very cold (0- -20C).

High altitude or high latitude?

GPS may not be such a good option in high latitudes.

perotom:
I am already using a DS3231 with the 1pps signal but the problem it´s not accurate over years.
The stations need to stay in sync over years (1-3) and they never get connected together so i think gps sync is the way to go isn´t it?
And how do i get the tiem in the interrupt method from an gps module? (As i know in the interrupt method no serial software nor hardware serial can be used)

If it's to sync up over several years then GPS or radio clock modules are the way to go assuming you can receive either at the device locations.

AWOL:
High altitude or high latitude?

GPS may not be such a good option in high latitudes.

It has to work in altitude til 2000m above sealevel. I termes of latitude it will be used in the begining in the area of middle europa. I don't know much about gps but why is high altitude bad?

I didn't say high altitude was bad, I said high latitude was bad.

AWOL:
I didn't say high altitude was bad, I said high latitude was bad.

Oh sorry mixed it up :wink:

perotom:
That´s not an option. I need to use it for sports timing.

What an absurd application. You're going to time an event that takes years and need it to be within milliseconds?

KenF:
What an absurd application. You're going to time an event that takes years and need it to be within milliseconds?

I think i haven't described the problem enought. The two devices need to be in sync. The timespan which needs to be stopped is about 2 minutes. The problem is when the two devices run out of sync the time will be wrong.

GPS modules can output data at 10Hz update, 100mS, example

If both units are updating time every 100mS they can surely keep track of time for 100mS after that using micros() and be accurate to some number that is within tens of microseconds to each other.
Commercial airlines can, and they are moving much faster than a typical sporting event; even car racing only reaches 200MPH type speeds, airliners move 3x that speed.

I think i haven't described the problem enought.

I'm fascinated! What sports events take place under harsh conditions, over the course of several years but last only two minutes?

I would use the pps signal on GPS units as the modules being synched will receive the pps signal within +/- 10-30 nanoseconds of each other so millisecond resolution of the synching is easy.

I think GPS is the only way to go, but none of this makes any sense to me and I can't imagine any "serious" sports sanctioning body that would accept a homemade timer.

Usually the equipment is supplied by TAG Heuer, or Rolex, or somebody like, and then I'm sure it's calibrated & certified by some independent recognized company or organization.

How far apart are they? Can you send a start signal via radio module? Then only one unit needs to worry about the timing.