Radio Controlled Clock

MartinM57

Moderator
I'm having an idea about creating the above - ie a clock that sets its time from the Rugby(?) radio time signals.

There would be some sort of radio receiver i2c IC that either maintains it's own time or would be used to set a DS1307 to maintain the time.

The trouble is, I can't find the radio receiver IC anywhere - I know that they exist, because my £9.99 radio controlled clock from Argos (http://www.oregonscientific.co.uk/product.asp?p=58) has one in it, but it looks like a surface mount chip and my soldering iron isn't that small!

Any ideas anyone?
 

hippy

Technical Support
Staff member
With the recent change to Daylight Saving Time / BST, that also crossed my mind. The 60kHz MSF Rugby transmission format is quite simple, slow and should be decodable by a PICAXE.

After doing some research there's the EM2 MSF Receiver module from Maplins ( MK68Y - 20 GBP, apparently made by Galleon ) and a matching aerial ( MK72P - 5 GBP ) and some ready build MSF to serial units around ( Galleon, Arcron ). I couldn't find much else, and they are all quite pricey.

Companies like Oregan Scientific have the benefits of scale to reduce costs. So it may be easier to take a feed from a commerical product if one can be found.

I don't know how easy it is to build a simple receiver for MSF, but someone who is familiar with RF might know. None of the single-chip Radio Receivers I could find would go down to a low enough frequency. This has a discrete receiver circuit, but is more than a couple of transistors which is what I guess most of us would prefer ...

http://www.hanssummers.com/electronics/clocks/radio/radioclk.htm
 

hesinije

Member
I do not know whether you can receive the DCF77 signal. The company Conrad (www.conrad.de or www.conrad.nl) sells DCF77 modules for radio controlled clocks.

Herman, NL
 

MartinM57

Moderator
Thanks to you both.

The standard time signal in the UK is MSF (rather than the German DCF77) so I'll try to stick with that.

A bit more investigation has uncovered:
http://g4irx.nowindows.net/fivemegs/tardis.php
- where the author has used the guts of the same clock I have to provide the components for £9.99!

Now I just have to work out how to interrogate/decode it to find out what time it is telling me - which does not look that trivial to me :(

...unless someone has already done it, or can give me some ideas about RS232 and PICAXE?
 

hippy

Technical Support
Staff member
That was a good find for the module in the Argos clock; well done. I'd assumed most ready built clocks wouldn't have such an accessible and usable MSF module in them - Wrong again !

You probably don't need to get involved with RS232 as the clock module should interface straight to the PICAXE with just a suitable current limiting resistor. You can probably use the clock as is and simply feed the signal off to a PICAXE as well ( along with 0V ).

The MSF timecode is relatively simple and is described in ...

http://www.npl.co.uk/time/ctm001v03.pdf
 
The conrad module is based on the T4224 chip and there's a big change your clock has this one too, i found is page which discribed the working of a Sony clock complete with pulse diagrams. maybe this is some help ?

http://www.leapsecond.com/pages/sony-wwvb/

 

MartinM57

Moderator
Thanks Dave - the one in my clock is exactly like the one I found at
http://g4irx.nowindows.net/fivemegs/tardis.php
...and the output will be the MSF code rather than the WWVB in the article you found.

However, I note the following from the article you found:
<<
# Don't expect perfect reception.
# Interpreting the timecode could require significant software error tolerance and signal processing.
# Synchronous detection is required.
# Allow for hours or even days of loss of good data.
# Compare several consecutive frames to assure data integrity.
# Average many bits to determine correct edges.
# Use fixed marker positions to gain synchronization and check signal quality
>>
- I think I had thought of most of them, and it seems a bit of a challenge - I've started by modding my clock so that it has a jack socket on the side of my clock where I can take off the MSF signal into a PICAXE - I just need to design some sort of algorithm and then code it up. Could take me some time....!
 

hippy

Technical Support
Staff member
I found a Zeon Tech MSF clock wich doesn't have a separate module but does have two distinct chip-on-board (COB) 'blob' IC's and it looks like one is entirely dedictated to MSF reception. All to do now is try and find a take-off point for a signal - easier said than done without an oscilloscope. A LED may work if I just look for pulses every second.

One thought has hit me about doing such a take-off is that the module may get powered down when the clock isn't synchronising up to MSF; that may only be done once a day or so. It may require permanently powering up the module separately.

The best way to start interfacing is to have a PICAXE look for the 500mS 'pulse' which occurs every minute and the 100mS/200mS/300mS pulses every second, and simply light LEDs up when you get them, and - perhaps more importantly - Flash a LED whenever a pulse isn't within an acceptable time period. That will give you an idea of how well the signal is being picked up and what corruption is being seen.

To decode a signal, the easiest way is perhaps to build up a 'bit list' from a 500mS pulse until the next 500mS pulse occurs. Any out-of-spec pulse simply causing a restart back from the next 500mS pulse. If you reach the minute pulse you've got a packet in the right format.

Getting two consecutive packets will allow you to compare the two and determine if they are both valid and sequential, if so, you can use that as the legitimate time.

The first thing to note is that it may take up to three minutes to synchronise to a time.
 

MartinM57

Moderator
Hippy,

The Oregon Scientific clock MSF receiver has three inputs - 0V, V+, PON (hold low to enable, high to effectively go to standby) amd one output - the MSF signal as a pulse train of '0's and '1's

I did a bit of debugging in-situ on my clock - I also have no scope, so its a bit difficult. When the clock is turned on, PON is low and the MSF output is showing signs of being an irregular pulse train. Coincidentally with the clock showing that the MSF time has been captured (2-3 minutes), PON goes high and the MSF output is permanently low (or high maybe - I can't remember!)

I presume that periodically (once a hour, once a day maybe) the clock part sets PON low again and re-captures the time, turning PON high when it has done so. I expect I could find the period fairly easily if I wanted - but in the URL I mention, PON is permanently low, so the MSF output is always active. Looking at the specs, the standby current (ie PON high) is very very low, as opposed to the active current which is very low. I think the Mk1 version will have PON permanently low!

As for decoding MSF, my current idea is to have a 50ms repeating interrupt, with the interrupt code examining MSF and trying to derive where we are in the one-minute cycle. e.g. 10 highs in a row and we are at the start of a minute. I need to draw some timing diagrams to see the effect of the interrupt not being synchronised with the MSF pulse transition points - maybe I need a (much) higher speed interrupt initially to determine any transition point and then set up the 50ms interrupt so that it occurs in the 'middle' of the spec'ed MSF periods (if you see what I mean). Might be a bit of experimentation here (and headaches!) - and a scope is almost certainly required to see when the interrupt is occurring wrt the MSF pulses and any drifting that occurs.

Further thoughts? - I'm sure it can be done (my £9.99 clock can do it!) but I'm a bit worried that the PICAXE might be too slow to do all this...

There's still other problems to be solved:
- actually displaying the time. I want to use 7-segment LEDs and want minimal component count, so the PICAXE also needs to be doing a mutiplexing loop at the same time
....I have an idea floating around my mind that I should use two PICAXEs and interface them via a DS1307 ie one decodes the MSF and sets the time into the DS, the other reads the time from the DS and multiplexes it onto the display - I would need some sort of circuitry to make sure that both PICAXEs aren't the master on the i2c bus at the same time - do you think there is a technical solution to that?
- setting the time manually when there is no MSF signal/it's too corrupt to be decoded etc etc


Soory about teh victorian novel - it is helping me clarify my thoughts try to write it down!

PS am off in a few hours for a long weekend break with no Internet access, so won't be around for 4-5 days, but I'd appreciate your thoughts...
 
Top