MSF clock module


Closed Thread
Results 1 to 8 of 8
  1. #1

    Default MSF clock module

    I bought a radio controlled clock yesterday from Argos for 8.99GBP and was pleased to see that it has an easily detatchable MSF receiver module. (ferrite rod antenna and small PCB with 5 connections). I am looking for information on the output from this module, I have had my oscilloscope hooked up and am getting 1 second pulses, with a train of different width pulses sent at the end of every minute. Im thinking about decoding the time/date information with a pic to make my own clock, possibly with nixie tubes. Im new to pic programming, but my first thoughts are on the 'pulsin' command. The NPL website seems to have a dead link for the data on the MSF signal.

  2. #2
    Join Date
    Aug 2008
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cunninghamjohn View Post
    I bought a radio controlled clock yesterday from Argos for 8.99GBP and was pleased to see that it has an easily detatchable MSF receiver module. (ferrite rod antenna and small PCB with 5 connections). I am looking for information on the output from this module,
    A search on Google for rugby time clock gives the answer in the first result, and there is a link on the resulting web page to the data sheet for the transmission format. It's sent in BCD using longer or shorter pulse gaps as you've seen with your 'scope.

    I suspect that you will have to use an interrupt routine to grab the incoming pulse stream so as not to miss one of those gaps.

    Please post if you're successful in this!
    Last edited by derryck; - 26th November 2008 at 16:44.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks for the quick response derryck. I have since found a pdf on the MSF data format from a link from: http://www.timstyles.me.uk/projects/...lock_page.html

    The site gives a design for a complete clock with date and time, but as a learning exercise I want to design my own from scratch.

    I think that for now, with my limited programming experience, I would be happy to just make a program which extracts the minutes pulses from MSF, and manually set the clock, perhaps with an LED flashing with the seconds pulses. Im also planning to include an alarm facility.

    Im also wondering about the power supply for the MSF module, it runs on a single AA battery, but i will be using a 5v power supply. Im thinking of wiring an LED and series resistor across the supply, and running the module on the higher voltage of about 2.1v or so. I hope the module will still be happy with this.

    Will the pic recognise 2.1v as a logic 1, or will I need to amplify this to 5v to drive the pic?

    How reliable is the MSF signal? I understand it does sometimes go off air for maintenance, so will it be necessary to provide a quartz based back up clock?

  4. #4
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Done this many years ago. But unfortunately the code was assembler and I last seen it 15 years ago?

    Few things to check. Is it MSF from Cumbria (Changed from Rugby) or DCF from Germany. Most of the new cheap clocks are DCF. The clock instruction leaflet should say what it is.

    Slight change in the protocol between the two but information on both are available on the web.

    Both transmit the time and date over the full minute so PIC would need to be dedicated for at least 1 minute in 3 or 4 keeping time in between. Using interrupts is the way to go enabling the PIC to do other things while getting the time signal.

    Have fun, it’s a good intermediate task,

    Bob

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thanks Bob. I am pretty sure the clock is for Rugby/now Anthorn. So far I have got the pic to decode the minute information, and I have an LED flashing once per minute. I have 2 other LEDs flashing the 1s and 0s of the time/date information. I have been sat with a pen jotting down the 1s and 0s but not yet deciphered it into anything meaningful.

    N var word
    PAUSE 1000
    HIGH PORTB.2
    START
    PULSIN PORTB.0,0,N
    IF N=>49000 and N=<51000 THEN PULSOUT PORTB.4,50000 ;500mS 'minute'

    IF N=<15000 and n=>5000 THEN PULSOUT PORTB.5,10000 ;100mS '0'

    IF N=>15000 and n=<25000 THEN PULSOUT PORTB.6,10000 ;200mS '1'

    GOTO START

    I hear what you say on using interrupts, but with my limited experience im thinking of using a separate pic to drive the display and provide alarm functions. I only started using picbasic a couple of weeks ago, prior to that I havent used basic for at least 10 years. The code above is what im using to drive the 3 LEDs so far.

  6. #6
    Join Date
    Aug 2008
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cunninghamjohn View Post
    I have been sat with a pen jotting down the 1s and 0s but not yet deciphered it into anything meaningful.
    That would be useful as a means of seeing if your receiver is correctly picking up the signal and as a learning aid, but otherwise not needed.

    Your clock will never be accurate until you decode a whole minute's worth of time information and set your clock from that. You can then use that to perhaps update a RTC chip, which in turn keeps your clock running until the next time you decide to do an update from MSF, if you want some form of backup.

    I won't comment on the supply to your receiver, or the level of its output as the latter might depend on how you ultimately decide to detect the pulses.

    If you care to PM me with your email address, I will send you a document that I prepared for the local U3A Science and Technology group which I think clarifies the major part of the data stream format, omitting the niceties.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cunninghamjohn View Post

    Will the pic recognise 2.1v as a logic 1, or will I need to amplify this to 5v to drive the pic?
    Hi John, I do not think it will @ 5v as 2.1 is less than 1/2 way, but if you operate a PIC on 3.3v, then I would say yes. Check Microchips web site for PICs made to operate at that voltage.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Thanks again for the replies on this subject. 'Derryck', i agree with your comments that it is a useful learning aid but nothing more. It would be easy enough to make a clock which was manually set and then incremented the minutes via MSF but im no longer satisfied with that idea and want to do something a little more sophisticated.
    I have no experience with RTC chips, so cannot comment on the use of those. Perhaps some research is required. I do however want to keep the hardware as simple as possible, and preferably use 'junkbox' components. I do not yet know whether the MSF signal will be reliable enough not to need a backup clock.

    Thanks for your comments Joe. The pic did not work with 2.1v pulses, so as it stands i am running the MSF module from a single 1.5v cell and 6v for the pic. I am using a simple common emitter amplifier to convert the pulses to logic levels (inverted of course)

    Just as a matter of interest, I tried this program

    pause 1000
    N VAR WORD
    M VAR BYTE
    START
    PULSIN PORTB.2,1,N
    LET M=N/200 ; so that M fits into a byte variable
    LCDOUT $FE,1,#M


    GOTO START

    This displayed the pulse lengths in mS/2. The LCD display gives 248 for the minute pulse, 98mS for a logic 1 and 47mS for a logic 0. ( my 4MHz clock for the pic must be out) This time the pen and paper exercise gave me the time and date information, so im pleased with the results so far.

Similar Threads

  1. Replies: 3
    Last Post: - 2nd June 2008, 22:00
  2. Shiftout/in
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd August 2007, 12:48
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36
  4. Rugby Clock MSF Receiver
    By srob in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th November 2004, 13:35
  5. Lcd Clock Module
    By dsicon in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th December 2003, 01:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts