Truncated match.
PICList
Thread
'Clock timing'
1997\03\10@002240
by
TONY NIXON 54964
I need to make a clock that is accurate. It will be powered by the
mains, and I thought of using this as a time base as it is a fairly
stable waveform.
Does anyone else know of a way which will be more accurate?
Regards
Tony.
1997\03\10@010307
by
Vishram sarurkar
|
On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
> I need to make a clock that is accurate. It will be powered by the
> mains, and I thought of using this as a time base as it is a fairly
> stable waveform.
>
> Does anyone else know of a way which will be more accurate?
>
> Regards
>
> Tony.
>
hello,
i don't think using the mains for refrence frequency will give
you a stable clock. if you are using PIC for the clock the best idea is
to put it in some delay loop and keep on counting the number of passes.
PIC being driven by a crystal oscillator will give much more stable clock.
vishram.
----------------------------------------------------------------------
Life is like an onion: you peel off layer after layer, then you find
there is nothing in it.
----------------------------------------------------------------------
+------------------------------------------+
| Vishram A. Sarurkar |
| ^^^^^^^^^^^^^^^^^^^^^ |
| another hobbyist turned researcher |
| slogging @ Indian Institute of Science |
| ----------- |
| e-mail:spam_OUTvishTakeThisOuT
isu.iisc.ernet.in. |
| Phone:+91 (080) 3092487. |
+------------------------------------------+
1997\03\10@012704
by
TONY NIXON 54964
On previous experience, crystals do not give a good time base for a
clock as the frequency varies quite a bit with temperature. I can get
+/- five or ten minute error over 1 day. The mains is reasonably
accurate for this purpose. ( Most commercial clocks rely on this fact.)
I would like to know if this is the best method for long term
accuracy or if there is a better way. (Albeit cheap).
Tony
Just when I thought I knew it all,
I learned that I didn't.
1997\03\10@013514
by
Lee Jones
>> I need to make a clock that is accurate. It will be powered by the
>> mains, and I thought of using this as a time base as it is a fairly
>> stable waveform.
>>
>> Does anyone else know of a way which will be more accurate?
> i don't think using the mains for refrence frequency will give
> you a stable clock. PIC being driven by a crystal oscillator
> will give much more stable clock.
In the USA, I'd have to disagree. Mains here is 60Hz with
extremely good long term stability (second or so in several
months). Short term, the frequency may vary more than a
crystal would. For long term, power companies compensate.
Lee Jones
1997\03\10@020026
by
Don McKenzie
|
TONY NIXON 54964 wrote:
>
> On previous experience, crystals do not give a good time base for a
> clock as the frequency varies quite a bit with temperature. I can get
> +/- five or ten minute error over 1 day. The mains is reasonably
> accurate for this purpose. ( Most commercial clocks rely on this fact.)
>
> I would like to know if this is the best method for long term
> accuracy or if there is a better way. (Albeit cheap).
>
> Tony
Hi Tony,
As you possibly know, all AC mains voltages in capital cities in
Australia are trimmed to give an accurate cycle timing on any given day,
over any given week, etc.
I guess it depends on if you are counting cycles for some sort of
accurate timing application, or are you really needing a real time clock
that requires battery backup?
I feel the best method to implement a real time clock at a reasonable
price, is to use one of the chips designed for the job such as the
DS-1302 with battery backup, and the *** CORRECT *** load capacity
crystal. Even after all this, the time won't be accurate.
You will still need to trim it with software. If you are running a PIC,
you have a ready made micro to log the +/- offset say at midnight every
Saturday night. When you have a definitive result, you can adjust the
time once a week.
Most other 'cheap' methods won't give the result you need for an
accurate Real Time Clock.
Wrist watches are better time keepers. I don't know why!
Don McKenzie .....donKILLspam
@spam@dontronics.com http://www.dontronics.com
SLI, the serial LCD that auto detects baud rates from 100 to 125K bps.
SimmStick(tm) A PIC proto PCB the size of a 30 pin Simm Memory Module.
Covers all versions of the PIC16cxx family plus the Atmel AT89C2051.
1997\03\10@021419
by
Eric Johnson
|
Hi Tony,
In the US, the frequency of the mains is regulated by law. Both
short-term and long-term error are required to be within certain limits.
The long-term error limit is far better than most crystal controlled clocks.
If you clean up and current limit a signal from the mains, then keep tra
ck
of the average number of instruction cycles for each mains pulse, you can
_also_ keep very accurate time during a power outage. (Assuming you have a
rechargeable back-up battery on floating standby-- great for smoothing the
input power also.)
As for greater accuracy, the US government has short wave radio stations
WWV and WWVB in Colorado, and WWVH in Hawaii which broadcast atomically
accurate time signals. Some of their signals are formatted for computer
reception. Even the verbal time channels have beeps at regular intervals
which can be used to correct for crystal drift. The main problem with the
beeps method is that the time it takes radio signals to propagate from the
transmitter to you fluctuates. You would need a continuous, moving average
over a long period to get a good measurement.
Another source for greater accuracy is the internet. There are several
locations around the world from which you can request the exact time.
There is a lag for transmission through the network of servers, but the
long-term error of your clock would be nil.
For periodic resetting methods, you can use the trick of self-adaptive
precision. Each time the clock is reset, figure how long it has been since
it was reset and what the error was. You then adjust the number of
instruction cycles you wait between increments of the clock's smallest
unit. You can also have a daily correction factor to increase the
precision. (Pause or jump ahead x number of instruction cycles by modifying
the delay counter.)
Frequencies:
WWV: (male voice - Fort Collins, Colorado)
2,500 kHz 2.5 kWatts
5,000 kHz 10 kW
10,000 kHz 10 kW
15,000 kHz 10 kW
20,000 kHz 2.5 kW
WWVH: (female voice - Kekaha, Kauai, Hawaii)
2,500 kHz 5kW
5,000 kHz 10kW
10,000 kHz 10kW
15,000 kHz 10kW
WWVB: (continuous BCD time code - Fort Collins, Colorado)
60kHz 13kW
Many other countries have similar transmitters, often on similar frequencies.
Best Wishes,
Eric.
{Quote hidden}>On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
>
> I need to make a clock that is accurate. It will be powered by the
> mains, and I thought of using this as a time base as it is a fairly
> stable waveform.
>
> Does anyone else know of a way which will be more accurate?
>
> Regards
>
> Tony.
1997\03\10@061822
by
rrose
> Wrist watches are better time keepers. I don't know why!
I second that. My "cheap" $15 wrist watch has kept very accurate
time in relationship to the clock server I compare it to.
Within a second or two.
Richard Rosenheim
rrose
KILLspamaccessnv.com
1997\03\10@071256
by
Wolfram Liebchen
At 03:16 10.03.97 -0800, you wrote:
>> Wrist watches are better time keepers. I don't know why!
>
>I second that. My "cheap" $15 wrist watch has kept very accurate
>time in relationship to the clock server I compare it to.
>
>Within a second or two.
>
>
>Richard Rosenheim
>.....rroseKILLspam
.....accessnv.com
>
The reason may be, that the temperature of the wrist-watch is relativly
constant.
regards
Wolfram
+-----------------------------------------------------+
| Wolfram Liebchen |
| Forschungsinstitut fŸr Optik, TŸbingen, Deutschland |
| EraseMEliebchenspam_OUT
TakeThisOuTffo.fgan.de |
+-----------------------------------------------------+
1997\03\10@105918
by
Louis A. Mamakos
I think that you'll find that a power-line derived clock has good long-term
accuracy (that is, you'll observe the correct number of cycles per day),
but relatively poor short term stability. In some work that I've
done, you can clearly observe diurnal variations in the frequency based on
load/demand, but your wall clock will keep the correct time.
By "clock", I've assumed you mean time-of-day wall clock. If not, then
never mind :-)
louie
1997\03\10@113644
by
Andy Kunz
> i don't think using the mains for refrence frequency will give
>you a stable clock.
Vishram, maybe not in India but here in the USA the mains are a very
reliable source, accurate to within seconds per month. It varies in
reliability greatly from country to country. For a thing we did for
Taiwan, we were pretty certain there wouldn't be ANY power for extended
periods of time.
"It all depends..."
Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
Hardware & Software for Industry & R/C Hobbies
"Go fast, turn right, and keep the wet side down!"
==================================================================
1997\03\10@122038
by
David W. Duley
|
In a message dated 97-03-10 01:03:50 EST, you write:
<< On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
> I need to make a clock that is accurate. It will be powered by the
> mains, and I thought of using this as a time base as it is a fairly
> stable waveform.
>
> Does anyone else know of a way which will be more accurate?
>
> Regards
>
> Tony.
>
hello,
i don't think using the mains for refrence frequency will give
you a stable clock. if you are using PIC for the clock the best idea is
to put it in some delay loop and keep on counting the number of passes.
PIC being driven by a crystal oscillator will give much more stable clock.
vishram.
>>
vishram,
I disaggree. Using the 60hz mains on the average is quite accurate. It has
been used by many clock designs. It depends on Tony's intended purpose for
the clock he is building. If he wants a general purpose clock to tell time
by the average accuracy of the 60 cylcles is pretty closely controlled.
The other way is to use a separate osc. of 32768 hz and use a trimmer cap to
adjust the frequency to an exact known value. getting this right can be
tricky but it would be better than just using a 32768 crystal without the
cap (a technique used by mose cheap PC mother boards. This explains why most
computers time is off).
My few cents worth
Dave Duley
V.P. DreiTek Inc.
1997\03\10@134719
by
Reginald Neale
>>I second that. My "cheap" $15 wrist watch has kept very accurate
>>time in relationship to the clock server I compare it to.
>>
>>Within a second or two.
>>
>
>The reason may be, that the temperature of the wrist-watch is relativly
>constant.
>
>regards
>
Thirty years ago I got interested in celestial navigation (long before
GPS). Ever since then I have always had a WWV receiver and hacked my
digital watch against it every weekend. A long succession of watches,
mostly Casio, have typically varied by only a couple of seconds per week.
The watch is left on the bedstand at night. Whether it's fast or slow
depends on the season; obviously there is some temperature sensitivity, but
they've got it trimmed about right for an average user in an average
location. None of my computers keeps anywhere near that accurate time on
their internal clocks.
Reg
1997\03\10@142246
by
mike
In message <246B76F30FF
spam_OUTits-eng1.eng.monash.edu.au> @spam@PICLISTKILLspam
MITVMA.MIT.EDU
writes:
> On previous experience, crystals do not give a good time base for a
> clock as the frequency varies quite a bit with temperature. I can get
> +/- five or ten minute error over 1 day. The mains is reasonably
> accurate for this purpose. ( Most commercial clocks rely on this fact.)
Hmmm.
My (very inexpensive) watch uses a crystal and doesn't seem to loose
or gain time at all. Checked against the radio daily. Also, the crystal
clock in my car (which is subject to some fairly large temp varyiations)
keeps time remarkably well.
In the UK, there is a specification that the number of cycles delivered
in a 24 hour period is kept constant, but the variation within that
period can be as much as 10%. I can't imagine a crystal varying
that much.
Regards,
Mike Watson
1997\03\10@153222
by
peter
|
Andy Kunz wrote:
>
> > i don't think using the mains for refrence frequency will give
> >you a stable clock.
>
> Vishram, maybe not in India but here in the USA the mains are a very
> reliable source, accurate to within seconds per month. It varies in
> reliability greatly from country to country. For a thing we did for
> Taiwan, we were pretty certain there wouldn't be ANY power for extended
> periods of time.
>
> "It all depends..."
>
> Andy
>
> ==================================================================
> Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
> Hardware & Software for Industry & R/C Hobbies
> "Go fast, turn right, and keep the wet side down!"
> ==================================================================
Here in Heraklion the capital of Crete (a Greek Island approx 15,000
sq km., population 1,000,000)
At least one hour a week we have a power cut.
For two mounths last year the frequency (50hz) was controled
buy hand !!!
"it all depends...."
Is certainly the answer
--
Peter Cousens
email: KILLspampeterKILLspam
cousens.her.forthnet.gr
snailmail: Peter Cousens, karteros, Heraklion, Crete, 75100, Greece,
phone: + 3081 380534, +3081 324450 voice/fax
After Bill Gates announced to the world that he was Microsoft,
his wife was asked to comment. She said that as his wife, she
had been the first to notice this problem
1997\03\10@164651
by
wfdavis
|
On the question of using the frequency of the mains (at least in the
U.S.) for timing purposes, I operated an earth satellite tracking
camera during the IGY (International Geophysical Year) that had attached
to it a synchronous motor that rotated a chopper paddle across the
aperture of the camera once per second based on the 60 Hz frequency
of the mains. [The chopper introduced breaks in the streaks on the
negatives left by satellites, which could later be used to time the apparent
position of the satellite as it moved across the sky].
The chopper also generated a short pulse that I could align on an
oscilloscope with the 1 second time tick from the WWV time signal.
To my dismay, the chopper time ticks often drifted an unacceptable
amount from the WWV ticks in just a few minutes of operating the
camera. The problem was _not_ that the chopper motor was slipping,
but that the frequency of the mains was not that stable.
When I contacted the power company about it, I received the (to me)
now famous reply, "We sell power, not frequency!".
Thus, I learned that, at least within the U.S., the frequency of the
mains is generally not at all stable and cannot, on a short term
basis, be counted on to be an accurate 60 Hz standard. What the
power comanies do attempt to do over a period of hours, days and
longer is guarantee that the _average_ frequency is very close to 60
Hz. This is why ordinary wall clocks driven by synchronous motors
appear to be so accurate (in the U.S.) over periods of years
(provided, of course, there have been no losses of power).
Cheers,
--- Warren Davis
================================================
Davis Associates, Inc.
43 Holden Road
West Newton, MA 02165 U.S.A.
Tel: 617-244-1450 FAX: 617-964-4917
Visit our web site at: http://www.davis-inc.com
================================================
1997\03\10@172117
by
TONY NIXON 54964
Thanks to all who answered my question.
I think I'll stick with the mains frequency as a time base and use
some of Eric's ideas for powerfail.
Regards
Tony
Just when I thought I knew it all,
I learned that I didn't.
1997\03\10@173620
by
Martin McCormick
|
There was an article in the amateur radio magazine "QST" in which
someone built a line or mains monitor. The author had a very accurate time
base and stated that the mains frequency seemed to drop a little during
the wee hours of the morning and then come back up as the day wore on.
Since modern power distribution systems are made of hundreds and thousands
of generating plants tied together in a grid, the system tends to keep
itself synchronized by the fact that the generators tend to be pushed faster
by the rest of the grid if they attempt to slow down and the grid makes it
impossible for them to speed up if something tries to throttle them up.
What this means is that any power grid acts like a giant spinning
wheel with lots of inertia. Maybe somebody on the list knows how many major
grids there are in the Americas. Each one will be a separate frequency
generator.
The original message was about Australia, but I think the same
holds true for that part of the world except for the 50 HZ frequency.
I suspect the big grids have better frequency regulation than a small grid.
Of course a gasoline or Diesel generator is going to be as good as the
governor on the engine which may not be very good when one is talking about
a clock.
Martin McCormick WB5AGZ Stillwater, OK 36.7N97.4W
OSU Center for Computing and Information Services Data Communications Group
1997\03\10@211454
by
Dwayne Reid
|
>On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
>
>> I need to make a clock that is accurate. It will be powered by the
>> mains, and I thought of using this as a time base as it is a fairly
>> stable waveform.
>hello,
> i don't think using the mains for refrence frequency will give
>you a stable clock. if you are using PIC for the clock the best idea is
>to put it in some delay loop and keep on counting the number of passes.
>PIC being driven by a crystal oscillator will give much more stable clock.
>
>vishram.
My opinion, for what its worth, is that the AC mains in North America is
EXTREMELY accurate and quite suitable for a clock timebase. Power
generating utilities (agin, in North America) generally use atomic clocks to
ensure accuracy. A clock that shows consistant time errors usually does not
filter the noise present on the AC mains enough and it is the noise spikes
that mess up the accuracy. As I said, just my opinion. I have built clocks
that, except for power outages (I suppose that you could consider THAT to be
an extensive noise spike!), have not deviated by more than 1 second over
several months.
Dwayne Reid <RemoveMEdwaynerTakeThisOuT
planet.eon.net>
Trinity Electronics Systems Ltd Edmonton, Alberta, CANADA
(403) 489-3199 voice (403) 487-6397 fax
1997\03\10@211905
by
Bryan Hord
|
I used to work for a company that manufactured top of the line power monitors.
It's true that the frequency of the mains power in the U.S. is very
accurate. I've got the numbers from a recent survey somewhere but I think
it was +/-0.0001 Hz. It has to accurate so that the power companies can buy
power from each other. Imagine what would happen if the 59Hz power company
tries to connect to the 61Hz power company. What is not constant is the
electrical noise present on the mains supply. Dropouts of a several cycles
may be common in a house (just watch the lights when the washer changes
cycles) causing you to lose time. Phase disturbances caused by switching
inductive loads (or the power company switching grids) can cause multiple
zero crossings which can cause your time base to appear to speed up. Light
dimmers and mains based remote controls can cause a lot of noise right at
the zero crossing. These problems are not trivial and they can cause
repetitive problems that are hard to track down.
Now if I were in sales I'd try to sell you a $10,000 power line monitor!
Check my math but I think 60 +/-0.0001Hz works out to +/-25sec. a month. Is
that accurate enough?
At 09:10 AM 3/11/97 -1000, you wrote:
{Quote hidden}>Thanks to all who answered my question.
>
>I think I'll stick with the mains frequency as a time base and use
>some of Eric's ideas for powerfail.
>
>Regards
>Tony
>
>
>Just when I thought I knew it all,
>I learned that I didn't.
>
>
-----------------------------------------------------------------------------
spamBeGonebryanspamBeGone
wllink.com
Wireless Link Corporation
-----------------------------------------------------------------------------
1997\03\10@231733
by
Tony Matthews
TONY NIXON 54964 wrote:
>
> I need to make a clock that is accurate. It will be powered by the
> mains, and I thought of using this as a time base as it is a fairly
> stable waveform.
>
> Does anyone else know of a way which will be more accurate?
>
> Regards
>
> Tony.
Frequency deviation of the ac power line is as you say minimal and
intentionally compensated at the source for just that reason and
connecting a pic to the ac line requires only a resistor. My alarm clock
stays accurate for months or until I turn off it's power.But you did not
say how accurate.Start with a higher frequency and divide it down the
higher the source frequncy the more accurate the clock (generally).
1997\03\11@005841
by
Vishram sarurkar
|
On Mon, 10 Mar 1997, David W. Duley wrote:
> In a message dated 97-03-10 01:03:50 EST, you write:
>
> << On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
>
> > I need to make a clock that is accurate. It will be powered by the
> > mains, and I thought of using this as a time base as it is a fairly
>
> >Does anyone else know of a way which will be more accurate? (note
this !!!)
the mains frequency might be stable in u.s. (i didn't think on this
fact). i think it's apparent from tony's mail that he wanted an accurate
clock. so i suggested using a high frequency crystal oscillator (about 20
Mhz the time base of the PIC and not 32.khz etc). since the
frequency is fairly large i don't think variations in temp. etc. will affect
the stability of the clock. as tony'd seeked i just suggested another way of
doing the same thing. obviously the alternative is much more expensive, which
is the price paid for a stable clock.
regards,
vishram.
----------------------------------------------------------------------
Life is like an onion: you peel off layer after layer, then you find
there is nothing in it.
----------------------------------------------------------------------
+------------------------------------------+
| Vishram A. Sarurkar |
| ^^^^^^^^^^^^^^^^^^^^^ |
| another hobbyist turned researcher |
| slogging @ Indian Institute of Science |
| ----------- |
| e-mail:TakeThisOuTvishEraseME
spam_OUTisu.iisc.ernet.in. |
| Phone:+91 (080) 3092487. |
+------------------------------------------+
1997\03\11@095440
by
Andy Kunz
|
> the mains frequency might be stable in u.s. (i didn't think on this
>fact). i think it's apparent from tony's mail that he wanted an accurate
>clock. so i suggested using a high frequency crystal oscillator (about 20
>Mhz the time base of the PIC and not 32.khz etc). since the
>frequency is fairly large i don't think variations in temp. etc. will affect
>the stability of the clock. as tony'd seeked i just suggested another way of
>doing the same thing. obviously the alternative is much more expensive, which
>is the price paid for a stable clock.
32 KHz xtals are cut to be extremely accurate and stable. That's why they
are the standard for timekeeping purposes.
A 20MHz frequency is overkill and expensive. Let alone not usable in a '84
(which only is spec'd to 10 MHz).
Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
Hardware & Software for Industry & R/C Hobbies
"Go fast, turn right, and keep the wet side down!"
==================================================================
1997\03\11@201013
by
Larry G. Nelson Sr.
|
A clock using the 60 hz frequency of the mains in the US is accurate. This
is because each day the power grid is adjusted to insure the proper average
frequency is 60 hz. at any time the frequency may not be exact but it is
compensated so that long term it is correct.
At 11:34 AM 3/10/97 +0500, Vishram sarurkar wrote:
{Quote hidden}>On Mon, 10 Mar 1997, TONY NIXON 54964 wrote:
>
>> I need to make a clock that is accurate. It will be powered by the
>> mains, and I thought of using this as a time base as it is a fairly
>> stable waveform.
>>
>> Does anyone else know of a way which will be more accurate?
>>
>> Regards
>>
>> Tony.
>>
>hello,
> i don't think using the mains for refrence frequency will give
>you a stable clock. if you are using PIC for the clock the best idea is
>to put it in some delay loop and keep on counting the number of passes.
>PIC being driven by a crystal oscillator will give much more stable clock.
>
>vishram.
>
>----------------------------------------------------------------------
>Life is like an onion: you peel off layer after layer, then you find
>there is nothing in it.
>----------------------------------------------------------------------
>
> +------------------------------------------+
> | Vishram A. Sarurkar |
> | ^^^^^^^^^^^^^^^^^^^^^ |
> | another hobbyist turned researcher |
> | slogging @ Indian Institute of Science |
> | ----------- |
> | e-mail:
RemoveMEvish
TakeThisOuTisu.iisc.ernet.in. |
> | Phone:+91 (080) 3092487. |
> +------------------------------------------+
>
>
Larry G. Nelson Sr.
L.NelsonEraseME
.....ieee.org
http://www.ultranet.com/~nr
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- Today
- New search...