Sunday 17 February 2019

Radio-Controlled Clock

Date of completion: 2010

I am a Time-Lord! My job is to keep the local church clock, built in 1850, chiming somewhere near the right time. I can hear the chimes from home, but our clocks in the house are generally only accurate to the nearest minute, at best. So I designed and built this radio-controlled clock to display the correct time digitally to the nearest second. Then I could judge how many seconds forwards or backwards I needed to adjust the church clock. The radio-controlled clock uses the LW signal (MSF) transmitted from a site in Cumbria, UK, containing time information from a caesium atomic clock and it is therefore highly accurate. The signal is, however, very weak (we are a long way from Cumbria.) So to avoid having to design and build a receiver tuned to the correct frequency, I deconstructed a cheap analogue radio-controlled clock from Ebay, i.e. I ripped out its receiver and used it here!

Design

The heart of the clock is a 16F628 PIC with a 16 character LCD display. The PIC and display are powered from a 9V mains adapter via 7805 voltage regulator, but I noticed that the MSF receiver needed a single AA cell. It turned out that the output from the receiver is sufficient to drive the PIC, if set up judiciously, and the cell has very little current drawn from it (so rarely needed replacing.)

There are actually two clocks here: the second is run by the PIC itself, which takes over if the signal from the receiver is too weak. An interrupt routine is triggered by the receiver and this decodes the basic information of time and date. Most of the rest of the assembly language program is concerned with formatting for display (hours, minutes, seconds, day, month, year) and error-trapping (as the signal is VERY weak, and the device only works near a window - or, better, outside!)

I no longer have the clock, as I have now constructed a GPS clock, which uses a rather more powerful signal from GPS satellites for time information. See "GPS Clock" for further details.

Circuit Diagrams

Tiny CAD (.dsn) file: Clock


Source code and other files

Clock.asm  All files (.zip)

No comments:

Post a Comment