[sci.electronics] Getting timing from line cycles

brendan@otc.otca.oz (Brendan Jones) (01/04/91)

in article <5972@mint17.UUCP>, wilner@motcid.UUCP (Corey S. Wilner) says:
> From what I understand, using the 60Hz line as a reference for timing is not
> a good practice if you want any accuracy.  I have heard that cycles can be
> longer or shorter than 1/60th of a second and some cycles can be lost completely.
> Anyone care to comment on this with more substance other than my glaring
> generalities?!

Although a given instant of the line frequency may not be exactly 60 Hz (or
50 Hz over here in Australia) you should find that over the long term the
*average* frequency is exactly 60 Hz, as the power companies speed up and slow
down the cycles in the long term to maintain the line frequency exactly.

In Australia, the power companies maintain their line frequency to the atomic
time standard in Melbourne, so that's pretty damn accurate.

I built a clock that uses nothing more than counting cycles of 50 Hz mains
frequency as its timebase - no crystals, no battery backup, no oscillators.
I have found that although its accuracy varies by up to (but no more than)
+/- 3 seconds per day, that over the long term (ie weeks and months) it is
*exact* to the second.  I never have to set the thing! (unless there's an
outage!!)

For building clocks, using line frequency as a timebase is one of the best
things you can do, I reckon!

-- 
Brendan Jones  | ACSnet:  brendan@otc.otca.oz.au               | What does
R&D Contractor |   UUCP:  {uunet,mcvax}!otc.otca.oz.au!brendan | your
Services R&D   |  Phone:  (02)2873128     Fax:  (02)2873299    | company
|||| OTC ||    |  Snail:  GPO Box 7000 Sydney 2001, AUSTRALIA  | export?

myers@hpfcdj.HP.COM (Bob Myers) (01/08/91)

/ hpfcdj:sci.electronics / squishy@casbah.acns.nwu.edu (Shishin Yamada) /  7:56 am  Jan  3, 1991 /

     On a side-note, if you might try modifying the clock frequency by
Message-ID: <2369@casbah.acns.nwu.edu>
Date: 29 Dec 90 12:06:30 GMT
References: <1833@umriscc.isc.umr.edu> <3023@lamont.ldgo.columbia.edu> <4391@alliant.Alliant.COM>
Followup-To: 4391@alliant.Alliant.COM
Distribution: sci.electronics
Organization: Northwestern University
Lines: 35

"missing beats," that is, every nth oscillation, skip the clock's
increment. On a 24h:00m:00s normal day, there are 86,400 seconds. If the
clock counted by using the 60Hz line, this makes 5,184,000 beats. On a
23h:56m:00s sideral day (24 normal hours to us), there are 86,160 seconds.
This makes for 5,169,600 beats on a 60Hz line.
     Therefore, if you skipped a beat every 14,400 beats of a 60Hz line,
your clock would then count sideral time.  In this manner, you could have a 
counter that went up to 14,400 beats, and then have it blank the next
(14,401th beat) of the 60Hz line. This correction would occur every 240
seconds (4 minutes). This introduces a very small error into your clock,
since the 240th second will be 59/60th of a normal second, but not much as
it corrects itself every four minutes. Pretty accurate, I think.
It's a weird idea, but then again, I just thought of it! Hope you like it!
     If you'd like more of my  weird ideas, please e-mail me on BitNet. I
am fastest to reply on that medium!
======================================================================
Shishin "SQUISH" Yamada        | BitNet: squishy@casbah.acns.nwu.edu
Senior Undergraduate, EE       | Compuserve: 76636,3254
Northwestern University        | Prodigy: KTVB99A
=======================================================================



Newsgroups: sci.electronics
Subject: Re: Sidereal Time Clock
Summary: 
Expires: 
References: <1833@umriscc.isc.umr.edu> <3023@lamont.ldgo.columbia.edu> <4391@alliant.Alliant.COM>
Sender: 
Followup-To: 
Distribution: sci.electronics
Organization: Northwestern University
Keywords: 
----------

myers@hpfcdj.HP.COM (Bob Myers) (01/08/91)

Sorry about the last post.  #%$$%@$($^! thing got out to the net quicker
than I could delete it.  Sigh.

Anyway, as has already been mentioned, skipping a beat won't work.  Remember,
a sidereal day is *shorter* than a "real day," so you want the clock to
reach 00:00:00 *sooner* than a "regular" clock; it needs *more* beats per
day to do this.  Adding one "beat" every four minutes, rather than skipping
one, would be the way to go - although I'm taking your word for it on the
four minutes, as I haven't worked out the math myself.


Bob Myers  KC0EW   HP Graphics Tech. Div.|  Opinions expressed here are not
                   Ft. Collins, Colorado |  those of my employer or any other
myers@fc.hp.com                          |  sentient life-form on this planet.

ossmann@hp-and.HP.COM (Bill Ossmann) (01/09/91)

>In article <5972@mint17.UUCP> wilner@motcid.UUCP (Corey S. Wilner) writes:
>>From what I understand, using the 60Hz line as a reference for timing is not
>>a good practice if you want any accuracy.  I have heard that cycles can be
>>longer or shorter than 1/60th of a second and some cycles can be lost completely.
>
>Power frequency varies a bit in the short term to suit the power companies'
>convenience, but over the long term it is *extremely* accurate, referenced
>to atomic clocks and very carefully kept spot-on.  They even crank in the
>leap seconds.

Eh??  Why do leap seconds matter when all you are controlling is the
(integral) number of cycles in a single second?  Or do you mean that
they actually slow things down a bit so that people with clocks
running off the power line don't have to insert the leap second by
other means?

Bill Ossmann
HP Imaging Systems
ossmann@hp-and.an.hp.com

bame@hpfcbig.SDE.HP.COM (Paul Bame) (01/09/91)

> From what I understand, using the 60Hz line as a reference for timing is not
> a good practice if you want any accuracy.

Interesting article in '73 magazine this month about using TV horizontal
sync as a frequency standard.  Seems the networks use expensive, stable and
accurate sources to generate their (nationwide) timebase.  The '73 circuit
uses an inductive coupling to a TV to grab the sync and then a PLL-based
circuit to turn it into a useful frequency.  This could be
adapted to the sidereal clock problem.  You can also use the colorburst
but it requires connection to the TV.

Note, that local cable companies may re-generate colorburst and/or
Hsync of dubious accuracy.  Satellite and air-wave reception seems like
the best chance for a stable source.  Also note that local material
(read: commercials) inserted by affiliates may be of dubious accuracy.
The article mentions (I think) that PBS is a good choice.

			-Paul "Spice is the Variety of Life"
			bame@hpfcbig.sde.hp.com	N0KCL

strong@tc.fluke.COM (Norm Strong) (01/10/91)

In article <2137@otc.otca.oz> brendan@otc.otca.oz (Brendan Jones) writes:
}in article <5972@mint17.UUCP>, wilner@motcid.UUCP (Corey S. Wilner) says:
}> From what I understand, using the 60Hz line as a reference for timing is not
}> a good practice if you want any accuracy.  I have heard that cycles can be
}> longer or shorter than 1/60th of a second and some cycles can be lost completely.
}> Anyone care to comment on this with more substance other than my glaring
}> generalities?!
}
}Although a given instant of the line frequency may not be exactly 60 Hz (or
}50 Hz over here in Australia) you should find that over the long term the
}*average* frequency is exactly 60 Hz, as the power companies speed up and slow
}down the cycles in the long term to maintain the line frequency exactly.
}
}In Australia, the power companies maintain their line frequency to the atomic
}time standard in Melbourne, so that's pretty damn accurate.
}
}I built a clock that uses nothing more than counting cycles of 50 Hz mains
}frequency as its timebase - no crystals, no battery backup, no oscillators.
}I have found that although its accuracy varies by up to (but no more than)
}+/- 3 seconds per day, that over the long term (ie weeks and months) it is
}*exact* to the second.  I never have to set the thing! (unless there's an
}outage!!)
}
}For building clocks, using line frequency as a timebase is one of the best
}things you can do, I reckon!

I suppose it depends on what kind of "clock" you have in mind.  If a quick
visual check of the time of day is what you want, the power line is just
the ticket. 

If you want to keep track of the time precisely, for navigation, &c, make
a crystal oscillator; the power line is--by the actual testimony above--
useless. 

How you can say that the line frequency is exact over a period of time,
but may vary by +/- 3 seconds per day is beyond me.  If it can be off by
that much in any one day, it can be in any other day!  In other words, it
can be off by 3 seconds any time.  

True, this doesn't seem like much over the course of a year (10E-7), but
it's miserable for one day.  My $15 wristwatch is several times more
accurate than that--short term.  Check your numbers again.  I can't
imagine the power company letting 150 cycles get away from them in one
day.


-- 

Norm Strong  (strong@tc.fluke.com)
2528 31st S.   Seattle WA 98144

henry@zoo.toronto.edu (Henry Spencer) (01/11/91)

In article <13650001@hp-and.HP.COM> ossmann@hp-and.HP.COM (Bill Ossmann) writes:
>Eh??  Why do leap seconds matter when all you are controlling is the
>(integral) number of cycles in a single second?  Or do you mean that
>they actually slow things down a bit so that people with clocks
>running off the power line don't have to insert the leap second by
>other means?

That's right.  Believe it or not.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry