msf anthorn radio time code receiver

Hi Folks
Not sure if it's me or what. For a little while now have been working on a MSF radio clock, but no matter what I do, with any of the code packages i cannot load them with my arduino uno to the Atmega A328.

When loading the software it always seems to throw up a programming error, I have used this Arduino uno for many other projects and it worked fine.

Some software I have tried like Jarkman calls it up as simple and basic starter, it must have worked I would have thought, no idea why it will not load on mine.

I have managed to load some of the dcf77_xtal software but apart from signal test, nothing else seems to
work

If this is a custom board, we will need a lot more information.

We have nothing to go on, no code, no specific errors, no schematics. Thanks for the anecdote.

Hi Folks
Understand, I did not wish to put up more info as to make the reading a bit long winded.

my kit is

EM2S MSF which is a MSF Anthorn receiver unit, this receives on 60 Khz their timecoded signal
this is connected to a ferrite antenna, the output of the receiver is decoded time data in BCD.

I have also a MCM RS232

Its just a suggestion, but do you think you could provide links to the parts\stuff you are using so the volunteers that inhabit these forums are not required to search the Internet for the parts\stuff you are using ?

Just a suggestion.

Hi
sorry seem to have lost parts of my pervious reply

so to continue The MCM -RS232 is not now in circuit as I took it to try and make the units more simple, as I do not yet need the RS232 to TTL convertor

All these units came for Galleon Systems www.galleon.eu.com, so have the receiver and ferrite antenna connected and working off MSF Anthorn.

my Arduino is Uno with Amega 328 micro controller .

I have seen the data output from the receiver, which 60 seconds packets of BCD all looks fine, I then feed this signal into my Arduino on analog pin 5, as requested by the code i have tried to load.

What I wish to end up with is a Atmega 328 chip I can use to display time from the receiver viewed on a LCD16x2

The first code I tried was from Jarkman www.jarkman.co.uk , it's his MSF time receiver, when I load this it callup an error "minute" was not declared in this scope, red highlighted over the piece of code printDigits(minute());

I have tried other old versions of IDE like 1.6.1 and1.6.3 with similar results, so now back to latest 1.18.13 on Windows 10

I can load some of DCF77 German code dsf77_xal and view on the serial monitor, but not sure if it works as it show or not as I have the MSF UK timecoded data

I have up to now had no problems with all the code for other projects i have used the Arduino uno for, but this is bit above my paygrade, to sort, my back ground is electronics not software I world like to learn though.

Any help or pointers would be helpful Thanks Tony Smith

menbed:
my back ground is electronics not software I world like to learn though.

First pointer is don't bite off more than you can chew. If you really want to learn, copying and pasting large bodies of code you don't understand will make progress at a snail's pace. Start with just an arduino and your PC, and run through the basics, an LED and resistor etc. an input, timer, serial communication... but you only make progress on code you can write, read and understand. This is coming from a hardware guy just like you.
That said, if you took your code from this page. then you are probably missing the H and CPP files here and here, which is why minute() (note the parenthesis) is not defined. Now you get to learn how to install a library. I'll cut you some slack because you're new, but use code tags and post the code you are running.

You wrote: " 60 seconds packets of BCD ". That sounds like digital. what are the voltages of the signal? Are they 0 and 5 volts? If so, why are you using an analog pin? Is the program trying to measure the the times between 5 volt transitions? That could be done digitally.

Paul

Hi
Thank you Perehama for your help, looking into this. Paul_KD7HB the way the MSF Anthorn time coded signal works, is it's transmitted on VLF transmitter (Very Low Frequency) at 60kHz, it makes the data by switching off the transmitter carrier. the sequence start is carrier off for 500ms(.5 second)then on for 500ms, this is second 00, the unique start bit, the next second has a carrier off for between 100, 200, 300,
or off for 100, on for 100, followed by a off for 100ms.

So it's not the level of the pulse it's the duration, (Having said that once decoded it can be converted to data signal, of either TTL or RS232, with another decoder and MAX 232 chip)

These timed outages form bit A and bit B, 100ms bit A=0 & bit B= 0, 200ms bit A =1 & bit B =0, 300ms bit A= 1 & bit B =1, I will not write it all up here, you can look it up at NPL (people who operate the atomic clock in uk) website.

These bits are assigned different values using BCD, binary coded decimal system, like say bit A of 17th second(first 16 seconds used for scientific folks) has a BCD value of 80, (1010000 looks like this as BCD number) as carrier off duration for 17th second is 200ms, A=1 B=0

The 18th second has a value of bit A= 40,(101000) so again 200ms bit B is used but not as much as bitA
I think you see the pattern.

Each carrier hole is a second, so 60 seconds= end of 1 minute string, we see then 500ms off and 500 ms on denotes the start of next minute, and it's all starts over again.

Each second has it's different information attached to it, which remains constant, like second17-24 bit A contains year data, seconds 25-29 bit A, contain the month information (bit B could have a value here but it will flag up different part of the time signal) this is just a taste to get the full story look up on the net.

Its down to your system as to how you decode to get the time out of the signal, many use the analog input of the Arduino.

May I say a big thank you to Dr.Jonathan Hare for his postings on this subject, taught me a lot

Tony Smith

For a hardware guy, you might be interested to see this. from position 5 on is already built into the ATmega328P. Pins 12 and 13 (Arduino pin numbers 6 and 7) can be configured to serve as your inputs to an internal analog comparator, and pin 12 (6) can be tied to the internal reference voltage, so all you need is an appropriate resistor to ground for the voltage divider. You don't really need to use the analog pins (port c, Arduino pins A0-A5) because it actually makes more work for you.

For what it's worth I bought the same kit from Galleon, I could not get their decoder to work. I eventually took the raw data from the MSF receiver and wrote my own decoding software.

My final year project 30 years ago was a decoder for the MSF time signal! Designed my own pcb around an 8085 and 6 7-segment displays. I always remember the excitement of waiting, sometimes 2 minutes, if you'd just missed the start of a minute, wondering if the correct time would magically appear on the display.

Thanks for reigniting the memory. I'm now on the lookout for a 2nd hand MSF clock on eBay to scavenge a receiver from so I can roll my own code once again.

markd833:
I'm now on the lookout for a 2nd hand MSF clock on eBay to scavenge a receiver from so I can roll my own code once again.

Mark, where do you live? I will send you one.
[EDIT] To be clear I mean an MSF radio receiver and ferrite aerial, it outputs 1 bit per second data.

Hi folks

Thank you again Perehama, You latest post is most helpful, will take time to check this out more.

Perry Bebbington The Galleon purchased dedcoder I have is MCM-RS232/MSF it's really a convertor from
BCD to RS232 or TTL to RS232.

To do this you need a MAX 232, but check the full number on the chip(like ECPE on the end.)

This calls up the value of the pump capacitors, C1-C5 which provide the extra or not pulse voltage needed if
your converting say to RS232, normally this way calls up 10uF caps 16v, give RS 232 +/- 15volt chain data.

If you want to go to TTL from RS232, then the value of C1-C5 can be 1uF, or .uF, the other part of the chip is just 4x single in and out amplifiers, which give 2x TTL in and out, also 2x RS232 in and out.

So depending on which you want to feed to your PC it's either TTL 1 in say from PC to MCM-RS 232 via TTL1 out, or RS 232 from PC to MCM-RS232, then you get a sync out from the MCM-RS232 TO your PC, via the other TTL2 in and out, or the other way around.

The one circuit guide I have seen for Galleon interconnection of all the modules (also has R.Leggett EM2) on the diagram title,it is doing the RS232 interface, so will need the larger C1-C5 10uF to generate the extra +/-10vots for the RS232 data voltage swing as the voltage, on the chip output, as the MCM-RS232 cannot run on more than +3volts.

I took mine out of circuit, as I required a BCD to go into the Atmega Micro controller.

Galleon do call up they do not supply the MAX chip, so put a link to a supplier, Maplin, would you believe, bit out of date.

Tony Smith

Perry Bebbington The Galleon purchased decoder I have is MCM-RS232/MSF it’s really a converter from
BCD to RS232 or TTL to RS232.

Hi Tony, BCD (binary coded decimal) to RS232 makes no sense. BCD is a way of storing numbers, RS232 is a serial port specification, there is no conversion between them. The MCM-RS232 is a decoder for the MSF 1 bit per second data that takes the MSF data and uses it to synchronise a clock it maintains then outputs that as RS232 at 3V logic levels, data sheet attached. I gave up trying to get it to work: it output the time data OK but would not synchronise to the MSF data. I gave up and wrote my own software.

MCMRS232 MSF.pdf (36.3 KB)

Hi Perry Bebbington

Have you seen the connection guide by Galleon? the output of the MSF receiver BDC, is fed directly into the X3 input of the MCM-RS232 (MSF IN) the MCM has X5 as serial out, and X2 as serial in (do we agree so far?)

The X5 serial out needs buffering they call up a BC547 transistor( I used a better type) depending on which IC your going to used to sync the buffers may need a pull resistor to +5volts( are we still in agreement?)

This then goes to a what Galleon term a RS232 to TTL ic, similar to MAX232 xxx, then output from the chip as RS232 rxd to the pc, the MCM-RS232 also requires an input from the MAX 232xxx ic out via another buffer transistor BC557, again may need a pull up resistor(both transistors are PNP)this is a output from PC into X2 pin on MCM-RS232(Are we still in agreement).

The clock sync is carried out via this process, the IC has five capacitors(pumps) can be thought of a voltage doubler etc so depending on the IC type,and cap values it can give up to +/- 10volts so the RS232 is more like its native voltage.

Without this processing path i would say no clock sync could be a problem.

The only other connection apart from ground on the MCM-RS232 is PON or the timed rail feed to the MSF receiver(LP2) (Enable) this is just not used in most cases LP2 is tied to ground also X8 out on the MSM is not used(ext sw).

That is the way the decoder should work, mine sort of worked but I really never required it as yet

Tony Smith

0

Tony,
All that sounds reasonable. The only thing I was questioning was the

BCD to RS232

part, which makes no sense.
I now use time from an NTP server, which I usually access using an ESP8266.

Hi Perry Bebbington

Having outlined the connection of the MCM, what software , apart from the software you have written were you running on the PC, as it should be similar to Galleon's Time Clock, what the modules we have were built for.

like speed 300bps
Data bit count 7
Stop bit count 2

Also you need to ask for time from the MCM RS232 decoder unit ,looking on some of their handouts, the request for time is sent lower case 'o' along with carriage return.

The decoder should reply with a series of 16 numbers which indicate the following(see where the BCD comes in)

1 hours tens
2 hours units
3 minutes units
4 minutes tens
5 seconds units
6 seconds tens
7 Day of Week 1 = Monday 7= Sunday
8 day of the month tens
9 day of the month units
10 month Tens
11 month units
12 year tens
13 year units
14 = BST/UTC status bit 7 parity
bit 6 always 0
bit 5 always 1
bit 4 always 1
bit 3 always 0
bit 2 = 1 if UTC is complementary to the BST bit
bit 1 = 1if BST according to the BST bit
bit 0 BST/UTC change impending bit = 1(in case of change impending)
15 status
bit7 parity
bit6 always 0
bit5 always 1
bit4 always 1
bit3 = 1 if battery low
bit2 = 1 if last time reception failed but a valid time information (could be + )

bit1 = 0 if last reception ok,= 1 if at least one reception attempt since 2:30 am was ok
bit0 = 0 no reception since 2:30 was ok, 1 = if the display clock contains a valid time, this bit will go to 0 after a reset.

I have not , maybe you have, much more information than this I picked up but as I say I have put this item out of circuit to concentrate on the software to decode the raw BCD data

Tony Smith

Hi Sorry Perry

I was writing this up when you posted your reply, it's maybe a bit long winded but I thought this info may help answer your question

Tony Smith

Hi Tony,
The problem was not that I could not get the time from it, it maintained a clock and output the time. The time was always wrong, it was not syncing with the data from the receiver. I connected it according to the schematic from Galleon Systems, attached.

EM2 Circuit Guide.pdf (65.6 KB)