How to generate 1 second period sync locked to mains freq

Discussion in 'The Projects Forum' started by THE_RB, Jun 4, 2011.

  1. THE_RB

    Thread Starter AAC Fanatic!

    Feb 11, 2008
    Hi, I have done some testing of the accuracy of the mains frequency (for possible use in calibration etc) and thought people may be interested in the results.

    Here is a sample chart of mains freq error over about 17 minutes logging time;


    And there are a couple of proposed systems for generating accurate 1 second clock periods phase-locked to the mains frequency but still able to tolerate faulty mains cycles, glitches etc and short term complete loss of mains frequency;


    And this system below generates each second with a high stability (always less than 50 PPM error) but always generates the same long term accuracy as the mains freq, for clock use etc;


    The same page also has some other info about testing the xtal accuracy against a GPS reference;
  2. studiot

    AAC Fanatic!

    Nov 9, 2007
    I don't know how your electricity regulations work, but in the UK one second is too short.

    Essentially if you reduce the frequency you reduce the power supplied. In periods of peak demand the supply companies reduce the frequency slightly and in periods of low demand they increase it slightly. So at 5pm the frequency may actually be, say, 49.7Hz

    The supply regulations require that over a 24 hour period the exact number of cycles are supplied. This ensures that equipment that derive their control from electrically timed clocks even out over the day.

    go well
  3. Wendy


    Mar 24, 2008
    I've suspected that a good crystal oscillator with a crystal oven is better. I really like the one at your site RB.
  4. THE_RB

    Thread Starter AAC Fanatic!

    Feb 11, 2008
    Studiot- Yep I knew that. It's the same here that the mains can have periods up to about 2000 PPM slow (that's 49.90Hz) with corrections later, so that the overal number of cycles per day is pretty exact. That's what the PCL system is for, to sync a clock to the *exact average* mains freq but keep the clock more stable over each second than the mains is.

    Bill Marsden- Thanks! A few people have liked that little minimal xtal oven. :) I have working designs at the moment using PIC for xtal temp control to keep the xtal at very exact temp and also to send data out via serial so it can display (or log) the xtal temp at the same time.

    It's all going into a page on "Open source xtal oven designs" that is half written up at the moment with some photos, schematics and charts. Hopefully I'll get some time to get the page up on my site over the next week.

    One of my short term goals is to make a "xtal oven based digital frequency generator", far more accurate than the analog or digital freq generators I have at the moment.