Fun With An Atomic Clock


I want to share with my friends here a quick project that I have had a lot of fun with, its a self (time/date) adjusting clock controlled by MSF radio time signal from the atomic clock in Anthorn Cumbria. This could be the basis of a self adjusting RTC (real time clock) for a robot, here is a link

User-inserted image

I found on the net that for just over 8 quid you can get a MSF 60 KHz Time Receiver module with Antenna!

First I needed to work out how to decode the very strange serial transmission.

Once I got my head round this, I wrote code to decode the signal on an 14pin PIC microcontroller. Once this was done I thought it would be a good way of keeping a regular (I2C) RTC module continually accurate to a fraction of a second and it will also automatically adjust for daylight saving times where our UK time changes by an hour twice a year and we all have to adjust our clocks.

I then found on ebay a great little RTC I2C module for just over 3 pounds.

It was pretty easy to set this all up, I wrote some more code for the PIC to decode the I2C RTC data and display this on the LCD. Then connecting the MSF module in I modified the code so at power-up the PIC gets the current time/date data from the MSF module (from the atomic clock) and sets the RTC module with it, then after every hour that passes it does this again, so the displayed time is always highly accurate. I could update more (maybe every 5 mins), but I am not sure it is needed.

Now what am I going to do with this gizmo? Well I am thinking about building a stand alone (simple) home automation system. Many people use mains timers to switch lights on and off automatically in their homes, this is very useful for security also. I know people that have 8 or more of these timers and its a real pain to keep adjusting all the units throughout the year when the sunset keep changing, here in the UK this probably needs to be done once a month to all the units. What I am going to do next is add my X10 wireless controller code to the PIC so it can control mains lamp modules, from this the self adjusting RTC can now control the seasonal on/off times of all the lighting thats on the X10 circuits via a look-up table in the PIC. For instance in the South East UK sunset is around 4 PM at the start of January and by June its 9:20 PM, so automatic lights on would be 4 PM in January and 9 PM in June etc. Also the RTC will automatically adjust when the hour changes twice a year. The next thing I going to add is an I2C temperature module to the I2C bus and display this on the LCD.

Hope this has been of interest, it has been a lot of fun playing with these cheap clock modules!



Thanks Tony , This is pretty cool. I love animation and things that take care of themselves. When the the first Atomic Clocks hit the market years ago I went out an bought a few for my house. Now almost all my home clocks except the classic ones (Grandfather and mantel clocks) have this feature. I'm a clock nut anyway and it bugs me when they are off. The first animation feature I set up in my home years ago was a simple outdoor timer for the night lights I put into my Halloween pumpkins instead of using a candle. I then used this on my Christmas lights. I know, this is pretty prehistoric compared to your wizardry but it thrilled me at the time. Smile

Again, thanks for sharing and showing us another window into your talents. The things you come up with makes me smile and shake my head. Smile


Thanks Dave, for the kind words. I know its relatively simple stuff, but with this system, I just find it cool that it sets the time/date by itself, no permutations of buttons to be pressed (that I always forget) to change the time, also it always accurate.


Your curiosity and work is amazing!
Steve S