Pragotron Slave Clock

Whenever I am really busy it seems I get distracted, maybe a failing, I guess, but it always makes life interesting.  Recently I came across a number of articles on electrically driven clocks, slave clocks, which are mechanical devices that are driven from a central point by periodic electric pulses.  These clocks previously found in schools, factories, railway stations etc. are obsolete now, or at least the original electric ones are, and appear every now again on EBAY.


I first bid on a couple of large old clocks made by English manufactures of the past but always got outbid since these seem to be highly collectable despite many of the examples being in very poor shape.  But eventually I found a listing for a large Pragotron ( clock.


What a beauty!  It has only an hour and minute hand but that works well for my room as I do not want noise from a continuously moving second hand. The wire for the timing input enters from the bottom.


It’s large!  Roughly 47cm in diameter on the front and a bit bigger on the back with flat glass pane above a concave shaped face which has raised detail for the hour and minute markers.  (There are also smaller versions which are more common, those being around 33cm diameter)

On the back is a plaque showing it to be a PV42 requiring a 60 volt pulse once per minute. I think it’s made of Bakelite, not sure of date.


A little research reveals that the slave clock mechanism inside can have two settings: 60V or 24V.  I clearly wanted to use 24V as this was easier for me to generate so I tested the clock by applying +24V and the hands moved on one minute so I guess this modification had already been made by the previous owner (thanks!).  The mechanism requires that the polarity of the applied pulse should reverse for each pulse so I reversed the wires and it moved on again with a satisfying station clock clunk noise.  Awesome! We have a project!

I would like this clock to keep accurate time (i.e. must be radio, GPS or NTP controlled), be self-setting, automatically adjust for daylight savings and to be tolerant of power outages, fixing itself when power is restored.

It seems many of these clocks have been retro-fitted with new quartz movements some with radio clock receivers however I want to keep the clock as original as possible and in particular I want to retain the satisfying clunk sound that probably was heard across the platform in some East German train station counting down the minutes to  whisk the agent away from the Stasi…

Now this is will be interesting….



Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers – Part 6 – Decoding the signal

Decoding the signal

The specification for the NPL time signal (previously Rugby Time signal) is described at with each second of transmission encoding two bits (A&B) except for the minute marker which encodes zero bits but instead marks the epoch.

Time information when transmitted normally comprises 59 sets of two bits except for minutes that include an extra leap second (60 sets of 2 bits) or a absent leap second (58 sets of 2 bits).   My interpretation is that during an additional leap second minute the Year code starts in the 18th second and an extra second is inserted after the DUT code; during a negative leap second minute the 16th second (containing 16B of the DUT code) is omitted and the year code starts in the 16th second.  Detection of the length of each minute is not-obvious but can be detected by inspecting the 01111110 pattern that occurs in the last eight seconds of each minute.

Below is an example of a decoding of the sample captured at the end of previous post.


the protocol includes parity bits for the year, month/day, day of week and hour portions but is only resilient to a single bit error; in this example it indicates that all is intact.

The decoded time is 00:10 on Friday 19th June 2015 with BST in effect, no DST change imminent and DUT -700mS.  The message pertains to the following minute so the following minute marker indicates the epoch.

Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers – Part 5 – A closer look at the noise

Comparing samples from clean and noisy environment

I have a highly accurate time source in the form of a Motorola VP Oncore GPS which emits a short pulse every second which is within microseconds of UTC and hence can use this pulse as a reliable indicator of phase.

I set up a small program that synchronises to the GPS 1PPS pulse and then records samples every 1mS for the following second.  Each sample is then placed in a bucket of 11mS and the majority high or low is used to produce a 1 or a 0.  (11 is a good number as it is odd, i.e. there is never any doubt about whether high or low is in the majority, and it divides the second into a good number of samples).

Below is a sample shown for just the initial second, the minute marker, for several minutes in a ‘medium’ real-world noisy environment on the edge of my desk (where I would like my clock to reside) and then lastly two samples from a ‘quieter’ environment near the window.


The numbers of the right hand side are, total samples, number of hi in first 50 buckets (555 samples), number of hi in last 50 buckets (555 samples), and three numbers indicating the population of 3 buckets in each of the estimated mid-points for the 0-100mS, 100-200mS and 200-300mS pulses.

It is noteworthy that at the start of each sample is a quiet period of around 17mS.  My distance from the transmitter translates into only a couple of mS so this delay must be due to the lock-up time on the phase locked loop of the receiver.  I think it is fair to say that observations so far suggest the PLL takes around 20mS to lock and around 50mS to unlock.

Analysis of the mean and deviation of the sample suggests that the minute mark may be recoverable with very limited confidence level.

A closer look at second 59

Continuing on our investigation with the second that precedes the minute marker which we always know will be A=0,B=0


Here we really see the effect of the noise with the external RF interference knocking the PLL out of sync and producing spurious streams of erroneous data.

Statistical analysis here shows that averaging across signals would not produce the correct result, the noise has overwhelmed the receiver.

Final reflections on noise

The receiver module I am using does the majority of the work for us, it receives the 60kHz CW signal and using a tone decoder/phase lock loop of some kind translates this to a logic output (and helpful inverts it).  The receiver works very well in ‘quiet’ environments but in realistic noise environments around my computer (the location I would like my clock) it cannot cope with the PLL losing lock and producing highly spurious outputs.

Once you know the accurate time (slightly against the spirit of trying to decode the signal in the first place) it is possible to generate the local signal prediction (especially if you gloss over the details of leap seconds and day light saving changes) in which case the problem would reduce to one of calculating phase only but even this seems to be challenging in the RFI environments I was considering.

Spectral analysis suggests a noise peak at 144.5Hz so a low pass filter might help but statistically from the samples I have taken it would still not give a good level of confidence with the signal.

Therefore it seems that rather than any further signal processing in the noisy environment I need to relocate my receiver to a quieter location or seek an alternative time source.  It should be noted that even in a quiet location there will be some spurious noise but this should be easily eliminated by averaging… more of that later.

And finally a look at what we get when we do find a quiet spot

It’s a bit disappointing to conclude that signal processing won’t really help us recover a signal in the presence of real-world noise but if you accept that fact and relocate the receiver a metre or so away to a quieter spot the receiver module (here) does a great job on its own.

fullMinNext we will look at recovery of the time/date from a relatively noise free sample.

Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers – Part 4 – Noise

Comparing signals from two receivers

I have two receivers so thought it would be interesting to put one in a good reception position, approx 2 metres away from any electrical equipment, and another on my lab desk and compare the signals from each.  As has been observed previously receivers near my computer monitor shows rapid flickering and loss of lock whereas the ones near the lab window shows a contented pulsing as it receives the time signal.

Control configuration – Two receivers, both away from noise

By way of a control I first put both receivers away from PC equipment and compare output from each receiver.


Here we see two nicely correlated traces.  The amplitude differs because each has an independent supply, one being powered from the 5v USB supply of the PC and the other by 2 AA-cells but otherwise these signals are clean of noise and illustrate that when well sited the receivers can produce a clean, easily decoded output.

Moving one receiver closer to the computer – Feel the noise!


Here we see the clean signal at the bottom whilst at the top the signal is blown away by the computer induced noise.  No chance of decoding the top receiver!

A closer inspection shows that the two peaks in the lower trace, this is an A=0,B=1 second are not easily visible in the top trace. There is some information in the top trace but recovery looks challenging.


Looking at some other examples and differencing the traces, see middle line, shows that in the upper trace some features have been completely erased by the noise.  No amount of signal processing will recover those!


Again, here we see the top trace showing no sign of the 100mS pulse in the lower, the trace has effectively flat-lined for the first half of the measurement missing the 100mS entirely, we can assume that both A and B bits would be unrecoverable in this scenario.


Moving the roving receiver to a position that is mid-way between the computer and the lab window, i.e. middle noise levels, shows a different situation.  Here we see noise on the top trace but the information is clearly present and some form of integration/low pass filter may be able to recover it.  However the width of the pulses is not consistent, the bottom trace might be A=1, B=0, whereas the top trace looks more like A=0,B=0.  Looks like these pulses really aren’t able to cope with much real-world interference before they become unrecoverable.



When a clear signal is present the receiver does a good job of filtering the input and presenting a precise representation, near sources of significant interference, (computer power supply, computer monitors, computer keyboards?) the noise can be significant enough to make recovery of the signal impossible, implementation of clever digital filtering techniques seems pointless.  However, when the receivers are adjacent but not too close to noise sources creates a mode where the MSF signal may be recoverable with a degree of signal conditioning.

To start with I think I will go for the simple case where noise has been effectively discriminated by the receiver, the aerial having been located in a favourable position, later I may look at averaging to increase reliability in the presence of moderate noise.  Tricky stuff!

Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers – Part 3 – MSF Minute Marker

At the start of every minute

Each  minute starts with a minute marker comprising 500mS carrier off and 500mS carrier on with the details of this minute having been encoded in the 58 (negative leap second), 59 (normal), or 60 (positive leap second) seconds preceeding.

The signal is shown below (inverted).


Personally I don’t find the official specification at very clear on exactly where the minute transition is relative to the two 500mS sections so I have been doing some investigation and came across an interesting page at which shows a waterfall plot of two time signals during a leap second transition.


And if you zoom in very closely you can see the waterfall for just one second of MSF signal timestamped against a locally NTP synchronized PC clock, my interpretation of this is that the start of carrier off is the minute transition. i.e. the carrier is off for the first 500mS of the new minute and then on for the next 500mS.  (Note: Signal in my oscilloscope screenshot above is inverted).

As an aside it is very interesting to discover which allows you to listen to signals around the world over a huge range of frequencies. For my purposes WebSDR in Peterborough, England (IO92VO) at yielded a nice waterfall of the MSF signal although I’m not sure of the latency of these feeds so won’t rely on them for determining the minute transition.


I’m pretty happy to have concluded that the minute starts with the carrier turning off for the minute boundary. i.e. a positive edge for my inverted signal.  However clearly the minute marker is yet to arrive at this point so my software implementation will use the initial transition but combine this with receiving the preceding of A-bits 01111110, once these two conditions are met I will consider a good minute mark.

Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers – Part 2

Looking at the MSF received signals…

Having established a receiver away from the computer equipment that was causing all my noise issues it was time to investigate the signals so wired up the trusty Rigol oscilloscope and see what we are getting… The MSF Signal is divided into 1 second long segments with normally 60 segments per minute but where leap seconds are present this may change to 59 or 61 seconds. Each minute has a single minute marker segment. The actual signal is encoded as is described here with the encoding being based on either the presence or absence of the 60kHz carrrier, however presence of carrier is considered to be a 0 and absence of carrier is a 1 (i.e. Negative Polarity Bit Signalling). The receiver module I am using helpfully produces an inverted output so on the traces below a hi signal is a 1 and a lo is 0 which reduces confusion considerably!

The minute marker

Once per minute a special minute marker signal is sent.  This comprises, according to the specification 500mS carrier off (i.e. a one) followed by 500mS carrier on (i.e. a zero).  The actual receiver has to determine when the tone is present or absent and therefore introduces a certain amount of stretching/hysteresis to the received signal.


The observed, by the receiver signal, is presented on its output as a 520mS hi followed by a 480mS lo.


The minute epoch is, I believe, on the initial lo to hi transition although the specification is slightly unclear on that point.

The AB Bits in the other segments

Each second other than the minute marker encodes a pair of bits in the form of a 100mS carrier off and then two bits each of 100mS followed by 700mS of carrier on. Bit A is encoded between 100mS and 200mS and Bit B is encoded between 200mS and 300mS of the initial carrier off (i.e. high output from receiver’s inverted output).


00Full 00

The 100mS carrier off has been stretched in the receiver and presents as 136mS of hi.


The encoding of A=0, B=1 causes the signal to create a two hump display.  The intial hump is the 100mS initial carrier off, the valley is the A bit and the next hump is the B bit.   01

The 300mS transmitted signal presents as a 312mS stretched combination which is worth looking at in detail…


The initial carrier off is approx 124mS being a stretched 100mS.

The A bit is in the next 100mS but the receiver only holds the line low for 90mS at most and in some cases even less…


with the A=0 be encoded in only 76mS of low!  That’s a good deal less than 100mS and we will need to take that into account when decoding the signal.


The B bit follows and is slightly stretched at around 106mS


As per each segment the A=1, B=0 encoding fits exactly into 1.00sec


with the leading carrier off and the A=1 (remember it’s an inverted polarity bit encoding) combining to make a long pulse of 200mS but stretched to 224mS by the receiver.



Finally the coding of A=1, B=1, which again fits exactly into the 1.00 second interval


Here the initial carrier off and A and B combine to a single pulse of 300mS from the transmitter but stretched to 320mS at the receiver.


Final observations

As we can see from the traces the signals are crystal clear now that I have moved away from my computer monitors, they demonstrate the stretching of the theoretical pulses by the receiver and in particular the compression of the A=0 bit in the A=0,B=1 segments to have only 70mS of low for the A bit in some cases.  Armed with this knowledge we can embark on decoding the signal using a controller and do this in a way that hopes to be resilient to some noise.

Posted in Uncategorized | Leave a comment

MSF Clock Synchronisation for Microcontrollers

I have been far too busy recently with real work to be able to dabble in any hardware design but there has been a project that has been nagging away at the back of my brain for many decades and I thought it about time I started thinking about getting it done. I’ll leave the details of the project itself unsaid for the interim but one component I knew was essential was an accurate time source as the project would not work well if its view of time drifted from official time (OK, it’s a type of clock!)

There are many ways of finding the time with GPS (see my previous dabblings with VP Oncore timing and NTP), NTP to the internet etc all being possibilities but in environments which have no good line of sight to the sky and where network connectivity isn’t immediately available an old fashioned way is to use the long wave time signal from Rugby. In the decades since I first had an interest in this signal it has now moved home from Rugby to Cumbria but the principle remains the same and is described at

Receiving the signal requires a 60kHz receiver of some kind and the SYMTRIK module sold by PV electronics and described at is a good starting point and is reasonably priced (although if you have a spare radio clock lying around you could probably just hack that). The signal itself is Carrier Wave (CW) with either 60kHz present or absent indicating a zero or a one respectively. The receiving circuitry comprises a ferrite rod wound with enamelled wire and tuned to 60kHz, the module itself then detects the presence of the carrier or not and then inverts this and sends a logic level output to whatever micro-controller you wish to add.

“Any sufficiently advanced technology is indistinguishable from magic.” Clarke.

Getting the thing to work is another matter! I attached the module to a controller I had lying around (an Espruino) and then started experimenting with decoding the inbound signal but got absolutely no-where. The LED on the receiver module was flickering so I assumed that information was being received but analysis of the bit stream yielded nothing sensible.

After a bid of consideration I decided that the receiver module must be suffering from noise issues due to the hardware I had connected to it, specifically the controller is powered from the USB connection of my PC, which in turn is powered by the PSU within the computer. The Computer PSU is a switching power supply where frequencies akin to the MSF signal are used so it was possible that a 60kHz ripple was coming through my USB lead and disrupting the reception. I tried a few things and did alot of googling which suggested adding a low pass filter and/or ferrite beads/filters to the power supply but rather than embark on that I decided on a process of elimination.

I removed the module from the controller and attached it to my lab power supply which is a linear device so should not have much in the way of switching noise and was flabbergasted to see that the random flickering continued. I then went a stage further and powered the module directly from two AA cells and still the issues continued, the problem was not power supply noise!

Positioning of the device is very important, especially the ferrite rod aerial which is highly directional (a fact that is very useful for radio direction finding e.g. in ARDF/Radio orienteering competitions!) but no amount of rotation solved the problem.

Finally I relocated away from my lab desk toward the window and all the flickering disappeared! I had been at two different desks and had issues at both but now I was away from either suddenly sensible data was coming out of the receiver. It was at this point that it dawned on me! The issue wasn’t power related, not even controller related, it was the fact that on my desks I have a computer monitors that seem to be disrupting the receiver, a bit of research later and it seems the timebase for monitors is often exactly the 60kHz the receiver is trying to discriminate.

I made a little video to show the effect with the hope that others won’t have to go through the pain!

The moral of this story is that MSF receivers and modern computer monitors and possibly computer switched power supplies do not mix. Not such good news for having a clock based project on my desk. The solution seems to be to at least have the receiver reasonably far away from the monitor, perhaps connected by a 2m wire, we shall see.

Once the receiver was away from the computer equipment I put the output into the oscilloscope and started looking at the details which I’ll discuss in my next post but suffice it to say the signal looks reliable with very little noise, it’s looking possible.

(And if you find you have a radio clock that isn’t syncing…. think about moving it further away from your computer screen!)

Posted in Uncategorized | Leave a comment