Chrono-tomic Shield Helps Your Arduino Keep Perfect Time

chronotomic-arduino-shield

[Josh] and his lab partner [Eric] needed a final project for their Embedded Systems Design class, and thought that designing an Arduino shield would be a cool idea. They noticed that there are plenty of ways to get an Arduino to keep time, though none that they knew of utilized WWVB (Atomic Time) signals directly.

The Chrono-tomic Arduino shield uses a C-MAX radio to demodulate the WWVB signal, demodulating it and passing it along to a PIC16F1824 microcontroller. The PIC decodes the data frame and verifies it is valid, sending the time to an MCP79410N real-time clock module.

We can hear the “Yo dawg I herd you like microcontrollers so I put a microcontroller on your microcontroller shield” jokes already, but the pair says that they offloaded the time processing to the PIC in order to let the Arduino focus on whatever tasks it has been delegated. The Arduino code merely needs to request the time from the RTC whenever it is required, rather than deal with the decoding itself.

Is it overkill? Perhaps – though we think it heavily depends on your application and configuration. We can certainly conjure up situations where it would be useful.

28 thoughts on “Chrono-tomic Shield Helps Your Arduino Keep Perfect Time

  1. Pair the WWVB RX with a servo driver, write some code that boils down to “read da time, translate in some lookup tables and such, write to da servos, sleep for about half a second, repeat”
    Make some artsy – craftsy clock dial type thingies for the servos, and you’re in business. Instaclock.

    Note that you can buy 60 second sand clock/egg timer elements for quite the reasonable price… Then you turn them into what amounts to 7 segment display sand timer clock. Mechanically complicated, yet cool.

  2. offloading the time keeping task to a separate UC is good enough, but why mix disciplines of PIC and AVR. using a second Atmel chip? More advanced Arduino users could tweak the processor on the shield without having to invest in Microchip gear.

    1. We had thought of just using another AVR for this project, but went with a PIC to learn something new. Also, I happen to be “tooled up” for the PIC series owing to the fact that my dad is an FAE for Microchip.

    2. Tweaking the PIC seems like a theoretical requirement only. What other useful functions can it serve other than returning an accurate time?

      And if you can think of one, wouldn’t it either:

      1) Be easy enough to code on the Arduino, and not require direct access to either radio or RTC, or
      2) Require you to have enough knowledge about the radio and RTC that you could interface them directly to the Arduino anyway?

      1. Depends on what you consider reliable. Over here in Michigan, the signal does not reach far enough during the day for us to pick it up. At night it’s a totally different story. Seems to have worked very well so far…

      1. Some PICs like the 16F88 have a timer with its own xtal driver for applications like this. Just use the internal oscillator for running the core, and throw on a 32KHz crystal scavenged from any of a million places, and the code pretty much writes itself.

  3. For one of my projects I bought a cheap radio controlled clock from Clas Ohlson and dismantled it to find that the DCF77 receiver was on its own board – all it needed was a 3V power supply and it generated a nice clean digital logic signal that was a doddle to decode using a pin change interrupt on an AVR. The biggest problem was shielding it from interference generated by the AVR!

    1. Thats actually a really great idea. Probably the best option if you are just building this for your own personal projects. The requirements for this project prevented us from doing this since we had to have a bill of materials with the suppliers detailed on it.

  4. Nice but a if you want “perfect” time you need to sync to a good GPS receiver with a PPS signal. They usually have a precision of +/- 1 microsecond from UTC. But I guess the radio signal is good enough for an alarm clock :-)

  5. I’m currently doing a long-term experiment that requires accurate timekeeping.

    The problem with common solutions is that they are based on a crystal oscillator, and the frequency drifts for various reasons (temperature and age).

    The amateur-accessible versions of GPS (and presumably WWV) drift because the signals have to travel through the atmosphere, where the speed of light changes with differences in moisture content. The GPS signal is retrieved using a serial port running at 9600 baud, so the resolution isn’t great. You can’t timestamp an event with more than about a half-second resolution.

    (Consider the recent project which was measuring seismic waves. Suppose you use several units synchronized in time to calculate the epicenter.)

    Also, GPS and WWV receivers don’t work well indoors.

    My best solution so far is to use an OXCO chip, available on eBay for $20. These have very low drift, on the scale of 12 PPB. That’s 12 seconds of drift every 30 years.

    If the system can access the internet, then you can synchronize with a system that uses NTP for a resolution of a few tens of milliseconds. With an OXCO chip, occasionally synchronizing to NTP gives you a very accurate timestamp.

    1. Okian, that’s why you need a GPS with a PPS signal. The PPS (PulsePerSecond) signals the start of every second while the serial data from the GPS get you the time and location. The variance in atmosphere is accounted for by the GPS as it locks to 3 to 12 satellites. My stratum 1 NTP servers drift +/- 5 microseconds. If the connection to the GPS satellites are lost then it’s good to have the OXCO though. A GPS without a PPS signal is no good as an accurate time source.

  6. Since the editors want to be sardonic about it:

    Yo dawg, I herd you’re skeered of hooking up wires. So to provide a total of four connections (two power, two data), I put a full set of Arduino headers on a peripheral. The headers cost more than the extra MCU, lolz!!1

    Some funny perspectives around here. IMO, the extra MCU goes further to making this device easy to use than Arduino headers, for less money.

  7. Nice project. You don’t happen to have a couple of extra boards around you might want to part with, maybe with the parts? I have a CMMR-6P-60 and CMMR-6P-100 and was just getting ready to “try” and design this same thing for a couple of data loggers. Thanks for sharing and hope you got the A.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.