Pico railway clock
By Nicola King. Posted

Readers may remember a fantastic Teasmade project that we featured back in The MagPi issue #114, made by Swiss-based team Martin Spendiff and Vanessa Bradley. Well, while browsing their YouTube channel, we noticed that – in a new upcycling project – they have taken a vintage railway clock and transformed it with a Pico. Naturally, we wanted to know what made it tick.
Advertisement
Head to head: Raspberry Pi + Raspberry Pi Zero + Raspberry Pi Pico.
Old timer
“We bought a railway station clock from a flea market and were a bit crestfallen when nothing happened when we plugged it in,” explains Martin. “The nice man who sold it seemed adamant that it worked, so after a bit of reading, I found out that it was waiting for a signal from a ‘Mutteruhr’.”
As the duo explain in their YouTube video, often when you see such clock in a station setting, there is a delay between the second hand reaching 12 and the minute hand advancing; this is because the clock is waiting for an electrical pulse from the ‘Mutteruhr’, or mother/master clock. This pulse drives the minute hand forward and then the second hand is free to complete another cycle.

Martin and Vanessa had purchased what was essentially a secondary clock – ineffective without a mother clock. To get it working, they decided to build a mother clock themselves with a few additional components and some code running on a Raspberry Pi Pico microcontroller.
Inner workings
Attaching a ferrite antenna – to pick up the DCF77 atomic clock long-wave radio signals in Europe – to Pico was a first step, along with incorporating a real-time clock (RTC). “There is a text file that tells the code the time that is showing on the clock,” explains Martin. “You enter that manually. When Pico is plugged in, the code checks if the recorded time is the same as the RTC time – if not, it sends a pulse to the clock, updates the recorded time by a minute, and says ‘what about now?’ It just keeps doing that.”

The pair encountered few issues during the build and think it would be a relatively easy make to replicate. “The Python code needed to be tweaked a little, but it was relatively plain sailing,” says Martin, who reveals that they have now updated the code to also work in the US using the WWVB signal. A radio signal is not essential, however: “Setting the RTC manually would get it to work. The only difference is that the code would not update the RTC.”
The 3.3 V output from Pico’s GPIO pins is converted to 24 V by a step-up module, before being routed to an H-bridge to send the pulse to the clock, although the voltage will depend on the timepiece used. “Some bigger clocks need a bigger electrical ‘kick’,” notes Martin.

The pair’s interest in old clocks has led to quite the collection. Indeed, Martin admits they now have “too many”, but he has a cunning plan to free up some wall space, as he says some will likely become birthday presents “for people that were foolish enough to look interested as we explained to them how they worked!”
As for upcoming ventures, they are certainly not short of spare horological parts. “We’ve got a box with 74 clock movements in it,” reveals Martin. “We mentioned in the video that people often take the original movements out and replace them with quartz movements – we found one of those people, and convinced him to give us the leftovers.” They are not entirely sure what they will do with all their clock components: “ideas welcome!"
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles

Raspberry Pi vs Raspberry Pi Zero 2 vs Raspberry Pi Pico in Raspberry Pi Official Magazine 159
Without an operating system, any computer – including your Raspberry Pi – is just a dumb lump of sand. Put Raspberry Pi OS on it however, and you’ve got yourself a working system that can handle games, web browsers, emails, programming and everything else we bang on about here all day every day. The latest […]
Read more →

Win one of ten M.2 HAT+ Compact
The ability to connect NVME SSD drives to Raspberry Pi 5 is very cool, although it does slightly limit the cases you can use. With the M.2 HAT+ Compact, you can even fit an SSD-powered Raspberry Pi into the official case – and we have ten to give away below. Win one of ten M.2 […]
Read more →

Raspberry Pi 500+ in Raspberry Pi Official Magazine issue 158
We’re quite taken with Raspberry Pi 500+. But when you don’t need all that processing power, and just want a board that will make a plastic skeleton jump around in a terrifying manner, you’ll find Raspberry Pi Pico more than up to the job. There’s more terror in the magazine (which is only right as […]
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.