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.

Comments

  1. Vince Mulhollon says:

    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. justDIY says:

    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.

    • Bill says:

      I agree. While I won’t debate which is better, usually people are tooled for one or the other.

    • Creepr says:

      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.

    • Chris says:

      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?

  3. DonB says:

    So where do people pick up (small quantities) of these CMMR-* receiver boards? Everyone seems not to have them in stock.

  4. Tim says:

    Yo dog, I heard you like projects. So we put a project on top of your project, so you can work while youre working!

  5. Stefan says:

    Why an RTC? Seems to me the pic could do that too while it’s sitting there being overkill.

    • macpod says:

      I was wondering the same thing and also how reliable those wwvb signals were.

      Are there any manufacturers aside from c-max who make a front-end for the wwvb and other clock signals too?

      • Creepr says:

        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…

    • Creepr says:

      The PIC probably could handle timekeeping, but the RTC adds easy battery backup and is probably more accurate than using a µC as an RTC.

      • chango says:

        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.

  6. Ben Ryves says:

    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!

    • Creepr says:

      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.

  7. Pete S says:

    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 :-)

  8. Kris Lee says:

    I see that this is university project. Could you offload it somewhere where it could survive your graduation? All info there is very interesting.

  9. Denbo says:

    God I am so lazy. I needed accurate time so I simply punted and grabbed the time from a GPS. At least it only takes up one pin.

  10. Hackerspacer says:

    1 wire RTC not good enough for ya :) ?

  11. Okian Warrior says:

    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.

    • Pete S says:

      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.

  12. Chris says:

    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.

  13. Bobb says:

    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

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 94,103 other followers