Connect with us

fact or myth?

Discussion in 'Electronic Basics' started by Robert Monsen, Oct 14, 2003.

Scroll to continue with content
  1. The powerline is synced to the atomic standard... Any small changes are
    compensated to ensure that there are exactly 86,400 cycles each day.

    Is this true? I don't believe it, based on a clock built to follow the
    powerline. It appears to drift up to 20 seconds a day.

    Bob Monsen
  2. Don Bruder

    Don Bruder Guest

  3. Strictly speaking, you are correct. However, long term accuracy is
    actually pretty decent. If a clock is drifting twenty seconds per day
    every day in one direction, I'd suspect the clock is not working
    correctly. If it runs fast, it may get "ticking" off extra seconds
    whenever spikes or surges appear on the line. This is all assuming that
    it's an electronic clock and not motor driven.

    This guy knows a little bit about time and measuring it:

  4. CFoley1064

    CFoley1064 Guest

    The powerline is synced to the atomic standard... Any small changes are
    If you're getting 20 seconds of drift a day, your problem isn't the power line
    -- you might want to check the IC that's picking up the 50/60 Hz AC from the
    transformer or line -- something's definitely wrong there.

    Good luck.
  5. its a PIC. The tick is the output of a small transformer (actually, the
    transformer that provides power for the system) put through a 1MEG resistor.
    The transformer is a 120VAC -> 12VAC 2VAC center tap transformer.

    The PIC has input clamp diodes to prevent overvoltage, and a bit of
    hysteresis to prevent retriggering.

    The error seems to be erratic, sometimes lagging my wristwatch, sometimes
    leading it. The watch is very accurate, so I don't think its that...

    I'll run it for a few more days, and keep track of the errors in a log.

    I was really hoping that somebody from the power industry would answer... I
    poked around on the PGE (the northern california power company) site, but
    didn't find anything useful.

    Bob Monsen
  6. John Larkin

    John Larkin Guest

    I've measured the period of the AC here in San Francisco, and it's
    usually 16.6665 or something like that milliseconds... amazingly good.
    An old-fashioned AC synchronous-motor-type clock will be a whole lot
    better than 20 seconds per day... more like one second per year maybe,
    as the utilities *do* shoot for longterm stability. And the
    synchronous motor has excellent glitch rejection.

  7. Hi Robert,

    I did a home project that required the PIC to sinchronize to the power line.

    I have actually used a comparator and I fed the PIC with a nice square wave.
    I thought it was cleaner that way. But definitely you should get better than
    20 seconds accuracy.

    Here are my suggestions:
    1)If you want to keep the circuit simple, then I guess it is OK to supply
    the sine wave directly to the PIC input as long as you provide enough swing,
    you use the input with hysteresis and, something I haven't seen mentioned by
    your post, do a bit of low pass filtering. The Power is usually quite noisy,
    so a 60 Hz low pass filtering helps a lot. Actually all the digital clocks
    I've seen use that RC filtering scheme.

    A quick calculation results in C=1/(2*pi*f*r)=1/(2*pi*60*1e6)=2.65nF. I
    guess a 2.2nF should do it.
    Also, make sure the signal goes rail to rail (or close) at the PIC's input.

    2) Same scheme, filter in, but go through a comparator that provides rail to
    rail square wave. That provides nice edges and reduce the stress on the
    clamping diodes. I am somehow reluctant to rely on them for signal limiting.

    Hope it helps,
  8. Why not do the filtering in the PIC? Look for the 0->1 transition,
    wait 1/60s (minus delta), perhaps in a timing loop, before looking for
    the next 0->1 transition. The timing loop isn't critical. It simply
    has to lock out another transition around the zero crossings until the
    next full cycle.
  9. Bob Myers

    Bob Myers Guest

    Semi-myth. The powerline (actually, the power *grid*) is not
    directly controlled by a single standard, but it IS held to a very
    good average accuracy in terms of frequency. Everything on
    the grid HAS to be synced together, and the overall grid tracks
    pretty close to 60.000 Hz OVER THE LONG TERM. But there
    is a lot of what might best be considered "inertia" in terms of
    being able to change the frequency, so nothing changes very

    A clock using the AC line that's drifting that badly is probably
    either seeing missing cycles, for whatever reason, or is being
    false-triggered by noise on the line.

    Bob M.
  10. Charles Jean

    Charles Jean Guest

    The frequency of "60" Hz from your power company does vary slightly
    throughout the day, especially with load pickups or dropouts. The
    power company readjusts the frequency at several times throught the
    day with a goal of producing exactly 60*86400 cycles in a 24 hour time
    period. They try not to let any errors accumulate so that adjustments
    are not drastic.

    You can check this by listening to WWV(5,10 Mz). Their time is set to
    the atomic clock. Even with propogation delay, etc, their accuracy is
    good to certainly the low millisecond range by the time it reaches
    your ear/brain. Listen to the "on the minute" tone, and record the
    times on your ROLEX quartz and an electric(AC frequency controlled,
    not quartz) clock. Do this check several times in one day. Don't be
    surprised if you see the AC time low on some of the readings, but
    HIGHER on others, sometimes as much as 3-4 seconds, as the power
    company makes their adjustment. This is not electronic drift. A
    quartz clock with 50 ppm electronic drift will gain or lose about 4
    seconds/day, but alway gain or always lose time. This is drift and
    will allways be a consistent loss or gain relative to WWV, never a

    If God hadn't intended us to eat animals,
    He wouldn't have made them out of MEAT! - John Cleese
  11. Yes, I was getting comparable results for a while (three or four days it was
    within a couple of seconds), but a day or so ago the clock began to drift. I
    wonder if I managed to somehow destroy the input pin? There isn't any
    protection against high voltage glitches (other than the input diodes in the

    The fact that its on the other side of the transformer from the power lines
    should afford some protection. The PIC App notes suggest a direct connection
    to the powerline through, variously, a 5M resistor, a 20M resistor, and a 1M
    resistor, so I thought I was safe.

    Bob Monsen
  12. A series diode with the resistor would be nice. ;-)
    I assume you're talking about external clamping and not just relying on
    the internal protection diodes. Sign up for the mailing list at
    Some of this is normal throughout the day. Check out the link I posted,
    it shows that loads on the system cause slight variation that the power
    company keeps track of. They then make adjustments. I wouldn't be
    surprised if at any given moment, your watch (you really should be using
    something more accurate like WWV for your testing) is likely to be
    several seconds or even a minute or two in disagreement. It's the long
    term accuracy that's maintained, the short term accuracy sucks. ;-)

    That's a good way to do it, you need to check the long term accuracy
    over several days. You also need to make sure that you are not counting
    extra cycles or dropping them. You may need to "clean up" your input a
    bit more by using a comparator, I suspect you're getting spikes and/or
    missing cycles when surges/sags occur.
    Check out the link I posted, it shows what appear to be adjustments
    being made by the power company. There are sudden and sharp corrections
    on his graph amidst what would appear to be random variations in the
    line frequency. Interestingly, they occurred at precise times of the
    day on the hour or half hour. This would make sense as the grid needs
    all the suppliers to work together.

    Good luck and keep tinkering. ;-) Check out that guys site, he's got a
    bunch of neat stuff out there. I'm biased though as I collect old
    clocks myself. I think one of my next projects will be a pendulum
    reinforced by a magnetic "nudge" on each swing. The pendulum will still
    swing at it's natural rate, and that will be the time base for my clock.
    A hall effect or optical sensor will indicate when to provide the
    impulse to the pendulum. Should be fun getting it tweaked out. Not my
    idea, but it sounds too good to resist for a PIC project. ;-)

  13. N. Thornton

    N. Thornton Guest

    I think 20 secs in a day is acceptable power frequency variation, but
    it is corrected cumulatively so that timing equipment functions

    The old synchronous motor clocks were well known to drift out upto a
    few minutes sometimes, but they'd always self correct, as they were
    following cumulatively corrected mains frequency.

    Regards, NT
  14. I've been running the clock for a few days, and its much better. I modified
    the software to wait 4mS after detecting the zero crossing of the powerline.
    Perhaps it was getting double triggered due to spikes on the line.

    Bob Monsen
  15. Jan Z.

    Jan Z. Guest

    I asked the power company here in Alaska about that during a tour of one of
    their facilities. I was told they have extremely accurate computer equipment
    that logs the on going average. They do not attempt to keep the timebase
    particularly accurate on a day to day basis but they make sure it averages

    So for example, if they are 5 seconds off in the frequancy count after a one
    week period, they will tweek things and compensate for the error the next
  16. Also watch for the opposite crossing. Depending on what timers
    you have available, I'd time the positive crossing and make sure
    you're blind until just before the crossing on the next full
    cycle (or use both crossings and count twice).

    Think of it as a simple digital filter. ;-)
  17. I'm watching for crossings in either direction, after a pause of 4ms.

    Actually, however, I think my prior posting was in error. Turns out the
    watch I've been using to test it is starting to run slow; the battery is
    apparently running low (just at the wrong time, sts).

    Thus, when the powerline clock started running 'fast', it was probably my
    watch that was slowing down! Once I started checking it against nist, it
    seemed far more accurate (which is what I've been doing since posting.) My
    wristwatch, on the other hand, that was keeping time within 60 seconds a
    year is now 7 minutes slow... I guess its time for a battery.


    There is a lesson for me in here about trusing test equipment, I guess.

    Bob Monsen
  18. Good plan. You're then counting 120Hz? (well, you'd be further
    off than 20 seconds...)
    I do believe others called on you to compare to WWV(H), or even
    some Internet time standard.
    Thre is also a lesson here about using three standards when one
    is in question. If they're all wrong, it's time to find another
    hobby. ;-)
  19. My guess is that his watch calibrator box uses a regular crystal
    oscillator. Unless its calibration is traceable to the NIST freq
    standard, then it's not accurate enough to measure a few seconds a

    @@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@,@@[email protected]@[email protected],@@[email protected]@[email protected]@[email protected]@
    ###Got a Question about ELECTRONICS? Check HERE First:###
    My email address is whitelisted. *All* email sent to it
    goes directly to the trash unless you add NOSPAM in the
    Subject: line with other stuff. alondra101 <at>
    Don't be ripped off by the big book dealers. Go to the URL
    that will give you a choice and save you money(up to half). You'll be glad you did!
    Just when you thought you had all this figured out, the gov't
    changed it:
    @@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day