Master Clock Keeps Time for All Other Clocks

accurate clock

[Brett] just finished construction and long-term testing of this extremely accurate timepiece. It keeps such great time by periodically syncing with the atomic clock in Mainflingen, Germany.

The core of the project is an ATMega328 which uses the new DCF77 library for decoding the signal broadcast by an atomic clock. The libraries written by Udo Klein significantly increase the noise tolerance of the device reading the signal, but they will not work with any project that use a resonator rather than a crystal.

In the event of a complete signal loss from the atomic clock, the micro driving the clock also has a backup crystal that can keep the clock running to an accuracy of within 1 second per day. The clock can drive slave clocks as well, using pulses with various timings depending on what [Brett] needs them to do. The display is no slouch either: six seven-segment displays show the time and an LCD panel reads out data about the clock. It even has chimes for the hour and quarter hour, and is full of many other features to boot!

One of the most annoying things about timekeeping is daylight savings time corrections, and this clock handles that with a manual switch. This can truly take care of all of your timekeeping needs!

Comments

  1. Irish says:

    Take my money…I want one.

  2. Mart says:

    wow a very nice and well documented project

  3. Johan G says:

    Wow. Beautiful cabinet outside as well as inside. Nice wiring harness by the way. Gives it a clean, professional look.

    Well documented. Enough for Irish to build one himself. :-P

    Nitpicking a bit, one little thing irks me though: GMT instead of UTC?! (In essence the GMT is dead, long live the UTC.)

    • jam555 says:

      As I best recall, they’re close enough (though apparently are in some way NOT identical) that it’s reasonable for us chronological laity to use one of the contractions to refer to the other :P .

    • Brett says:

      I think UTC was adopted back in the 70s but here in the UK most people have never heard of UTC or DST we use GMT and BST (British Summer Time) instead. Me I just think GMT sounds better cos I have always used it.

  4. bobfeg says:

    Geeky and beautiful!
    Bravo :-)

  5. Steven says:

    How accurate is this time piece? It is showing an impossible/unlikely date – year in the photo for the current refference of time.

  6. Andrew says:

    Very nicely written code, and it’s pleasant to see a clock that actually tries to discipline the local oscillator rather than just stepping it. 1 second per day isn’t actually “extremely accurate”, but I think this code actually does quite a bit better than that unless you have a particularly bad crystal!

    • arodland says:

      (specifically it’s the DCF77 library that has very nice code).

    • Brett says:

      Andrew you are correct 1 second per day in not “extremely accurate”. The actual clock using the DCF77 library to auto tune will be accurate to within than a second a day over many days without any DCF77 signal. The actual DCF77 signal has never been off for more than 30mins (during a lightning storm) according to the DCF77 site.

    • The 1s figure is because Brett tested my library for 1 day with 1s resolution. He then found that it was better than his old library. If people would start to read the details on my library they would find that it is ***significantly*** better both with regard to noise tolerance as well as the tuning.
      Technically the statement is not wrong though. It’s like saying “New York City: population > 200 000″.
      In technical terms: in the short term the library phase locks to DCF77 with 10 ms resolution. In the long term it frequency locks. Depending on the crystal and especially the temperature it will tune the frequency to something between 1-16 Hz. Right now (after 3 days of retuning after a cold start) I notice that it deviates by ~ 20 ms per day or 1/4 ppm.
      Also the noise tolerance is much better than any other open source library. It is also much better than most closed source stuff. Actually it is better than any closed source stuff that I got hold on. I do not know how it competes the top of the line though. I found at least 2 closed source publications that hint at a probably more cabable implementations – but they used an FPGAs and a dedicated tuner including high speed D/A converters. So the hardware is already far superior. For low cost hardware I am pretty much sure that there is nothing that competes with my library.

  7. wolfy02 says:

    they had these back in the 50s in America. Many apartment buildings and public buildings(schools/courthouses/etc) still have them. They probably don’t run off the closest atomic clock freq though, but it wouldn’t be hard to make something that would set all the clocks in those buildings though.

    neat hack!

  8. pcf11 says:

    I have a radio clock. It’s pretty cool. I don’t have to set it for daylight savings because it does it by itself. I figure the time is right on it for the most part too. Mine doesn’t set any of my other clocks though.

    • Will says:

      They’re generally very accurate. I just called the USNO talking clock (202-762-1401 or 719-567-6742) and it exactly matches the radio clock on my desk and the one on the wall.

    • Brett says:

      The clocks main displays always correct for daylight saving time and leap seconds but the 30 second slave clocks need to be manually started and will then will auto adjust. This is because they are quite noisy in operation and I not not want to have clocks pulsing 120 times in the middle of the night.

  9. Mystick says:

    I think that the “1 second per day” deviation could be improved.

    Neat project, though.

    • Brett says:

      Using the DCF77 library to auto tune will the clocks will be accurate to within than a second a day over many days without any DCF77 signal. With any sort of DCF77 signal noisy or otherwise they are 100% correct.

  10. Brett says:

    I have posted a 4K You Tube video of this clock chiming 10 o’clock here http://youtu.be/gwhSe5WHQ7c

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,545 other followers