EmbeddedRelated.com
Forums
Memfault Beyond the Launch

"What time is it?" aksed the microcontroller

Started by Unknown May 21, 2004
Assume that someone find a magical way to sync all omputers with the
accuracy you want.
How can you verify that?


Paul Keinanen wrote:
> If only synchronised time but not absolute time is > needed and all devices are connected to the same > synchronised national/continental AC power grid, > it can be used to generate a common clock signal > to all devices.
Interesting thought, once the initial sync can be achieved. SOme thoughts on this... The power grid clock is not constant (it varies +/- throughout the day), but probably isn't adjusted at a rate that would cause problems for this approach. However, I understand that grids are often inter-linked with DC, so it may work in some areas but not others. It all depends on the timing accuracy required. And I wonder how well it'd work behind UPS systems - many operate with batteries "on-line" (power is rectified, then re-alternated), so the output may not be sync'd with the grid.
> Also the field and line sync pulses from a local > TV-transmitter (or TV satellite) has been used in > the past to synchronise receivers far apart
Good point. Even with digital TV, there's bound to be a timing signal you could sync from. Cellular would be another option.
Richard wrote:

...
> Good point. Even with digital TV, there's bound to be a timing signal > you could sync from.
I've heard that public television transmits a time signal during vertical retrace. Would that help? - RM
On Sun, 23 May 2004 10:07:44 -0700, Richard <rh86@azglobal.com> wrote:

>Paul Keinanen wrote: >> If only synchronised time but not absolute time is >> needed and all devices are connected to the same >> synchronised national/continental AC power grid, >> it can be used to generate a common clock signal >> to all devices. > >Interesting thought, once the initial sync can be achieved.
We once used the serial line break signal at system startup to set all the clocks in various moving systems in a large hall. The break signal bypassed the protocol stack and also any UART buffering, so you could get a quite accurate timing and the system worked for that day after this single reset. Some units measured signals that were time stamped at the source. Based on these measurements the central unit preloaded (on serial lines) commands to other units which executed the command in the future, at a time specified in the command frame. The original system used the same reset principle but relied on identical processor cards and their CPU clock oscillators to maintain a common time base. Some units were in boxes, while other in open frame structures moving around and thus cooled by the air stream and by the cold winter air coming through the doors when large equipment were moved in or out from the hall. The CPU clocks could be off by a second or two only after half an hour requiring a system stop and new reset. Using the common mains as the clock solved all the problems. No extra wires were needed, since the mains was needed at each unit anyway.
>The power grid clock is not constant (it varies +/- throughout the day), >but probably isn't adjusted at a rate that would cause problems for this >approach.
Even if the absolute time would be off by a few seconds during the day, the same error would be at all stations and there would be no differential error.
>However, I understand that grids are often inter-linked with >DC, so it may work in some areas but not others.
At least most part of continental Europe is in the same synchronised area. There are other separate synchronised areas in CIS, Scandinavia and the British Isles, which are connected to the continental system by DC links only. Within the same synchronised area you could use for instance a dial-up modem in non-error correcting, non-compressed mode at 4800 or 9600 bit/s to reset the clock and then let the systems run independently.
>It all depends on the timing accuracy required. And I wonder how well >it'd work behind UPS systems - many operate with batteries "on-line" >(power is rectified, then re-alternated), so the output may not be >sync'd with the grid.
It will work only if all the equipment are fed by the same UPS.
>> Also the field and line sync pulses from a local >> TV-transmitter (or TV satellite) has been used in >> the past to synchronise receivers far apart > >Good point. Even with digital TV, there's bound to be a timing signal >you could sync from.
With the amount of lip sync and subtitle timing problems in DVB-T, I very much doubt that you could get any usable timing :-)
>Cellular would be another option.
Depending on the system, something usable might be available. Paul
jiang wrote:

> Assume that we have a group of computers. Some of them are PCs and others > are small microcontroller boards of different types. Some of the PCs running > Linux and others running Windows, vxWorks or QNX. Microcontroller boards > have no operating system but some embedded program that we are going to > provide. > > Our mission is "some how" synchronize their time as accurate as possible. > What we are going to debate is the following special cases; > 1. All computers (PCs and controllers) are placed next to each other and > we are free to connect them together any way we want (freedom in electronics > and in sw).
Install in all units a TimerPCB with CPLD, and 100'sMHz Clock. Sync all units from a star-cable pulse (equal cable lengths) Should attain in the 2-5ns time sync, time drift depends on the Local Clocks, but you can also run a common clock signal
> 2. Computers are in the same room but separated from each other with few > meters
Same as 1. (equal cable lengths)
> 3. Computers are in different rooms of the same building.
As 1., or you can assign all units to Reset on POWER_UP, and then start counting. Flick the mains switch [+run fast] to (re)Sync Precison will depend on the Power-UP deltas in the units, but expect 10ms-1second region.
> 4. Computers are in the same campus.
As 3, but be prepared to run faster when the whole campus power is interrupted for your sync, but the debate brief mentions nothing about disruption to others :)
> 5. Computers would be anyware (in the same town or city, country, > continent, on the world or near Earth orbits).
1-4 are out, wireless is now needed. Look up the specs on GPS time, not just the time-ref pulse rate, but its precision and jitter
> > What would be your suggestions ? How to connect them together? Which sort of > HW and SW would you use ? How accurate the time sync. you would acheive > (minute, secont, milli sec, micro sec, nano sec )?
The debate brief should really have included notions of absolute(Standards) and relative(local) time. Ask your tutor to re-write the brief, to ask a better question :) -jg
Rick Merrill wrote:
> I've heard that public television transmits a time signal during > vertical retrace. Would that help? - RM
A sore spot among time sync fans. It's there, and it's often poorly maintained (i.e., out of sync by minutes+). There are stories of station engineers that didn't realize they were broadcasting time, then upon tracking down the box had no idea how to re-sync it to UTC.
<jiang> wrote in message news:<40ae398e$0$31679$afc38c87@news.optusnet.com.au>...
> Assume that we have a group of computers. Some of them are PCs and others > are small microcontroller boards of different types. Some of the PCs running > Linux and others running Windows, vxWorks or QNX. Microcontroller boards > have no operating system but some embedded program that we are going to > provide. > > Our mission is "some how" synchronize their time as accurate as possible. > What we are going to debate is the following special cases; > 1. All computers (PCs and controllers) are placed next to each other and > we are free to connect them together any way we want (freedom in electronics > and in sw). > 2. Computers are in the same room but separated from each other with few > meters > 3. Computers are in different rooms of the same building. > 4. Computers are in the same campus. > 5. Computers would be anyware (in the same town or city, country, > continent, on the world or near Earth orbits). > > What would be your suggestions ? How to connect them together? Which sort of > HW and SW would you use ? How accurate the time sync. you would acheive > (minute, secont, milli sec, micro sec, nano sec )?
Ah yes, now I remember why I fled university. Robin
<jiang> wrote in message news:<40ae398e$0$31679$afc38c87@news.optusnet.com.au>...
> Assume that we have a group of computers. Some of them are PCs and others > are small microcontroller boards of different types. Some of the PCs running > Linux and others running Windows, vxWorks or QNX. Microcontroller boards > have no operating system but some embedded program that we are going to > provide. > > Our mission is "some how" synchronize their time as accurate as possible. > What we are going to debate is the following special cases; > 1. All computers (PCs and controllers) are placed next to each other and > we are free to connect them together any way we want (freedom in electronics > and in sw). > 2. Computers are in the same room but separated from each other with few > meters > 3. Computers are in different rooms of the same building. > 4. Computers are in the same campus. > 5. Computers would be anyware (in the same town or city, country, > continent, on the world or near Earth orbits). > > What would be your suggestions ? How to connect them together? Which sort of > HW and SW would you use ? How accurate the time sync. you would acheive > (minute, secont, milli sec, micro sec, nano sec )?
Ah yes, now I remember why I fled university. Robin
On Mon, 24 May 2004 00:45:29 +1000, "Michael" <Michael Mich> wrote:

>Assume that someone find a magical way to sync all omputers with the >accuracy you want. >How can you verify that? >
Easy ... just use Thiotimoline based components and slave them all to a common clock source. George ============================================= Send real email to GNEUNER2 at COMCAST o NET
On Fri, 28 May 2004 05:29:57 -0400, George Neuner
<gneuner2@dont.spam.me> wrote:

> On Mon, 24 May 2004 00:45:29 +1000, "Michael" <Michael Mich> wrote: > >> Assume that someone find a magical way to sync all omputers with the >> accuracy you want. How can you verify that?
> Easy ... just use Thiotimoline based components and slave them all to > a common clock source.
Don't forget to use Black Hole Diodes at the end of the chain or the excess energy will be sucked back in time and kill your grandfather. -- -| Bob Hauck -| To Whom You Are Speaking -| http://www.haucks.org/

Memfault Beyond the Launch