Computing stuff tied to the physical world

Atomic clock via a DIP

Let’s build an atomic clock. Ehm, wait, no – that’s a bit too hard…

But instead of building one, we could listen to the signals from one hooked up to a radio transmitter – the DCF77 station operated by the Physikalisch-Technische Bundesanstalt in Germany, and located near Frankfurt. There is lots of info about DCF77 on the PTB site.

The reach of DCF77 is “most of Europe”, as seen in this map. All it takes is a small receiver, such as this one from Pollin (there is also a very similar one available from Conrad):

DSC 4829

The receiver has 4 pins: VCC, GND, DATA, and PON (power on). The current consumption is only 90 µA, meaning that this receiver can be attached and powered from a few I/O pins:

DSC 4830

Note that all 6 pins on the header are attached to the LPC’s I/O pins, there is not even a ground connection on the header.

In this case, it’s no problem at all, since we can simply define one pin as “1” and another as “0”, and then use these as power supply for the attached radio. Who says I/O pins have to be used for signalling? One more output pin is used as PON, and of course there is an input pin to read out the received signal.

This has limited power, but great flexibility, since any configuration can be defined in code.

Simple DCF77 decoding is a matter of detecting rising pulse edges and reading the signal at specified times. The “clock” demo in the jcw/embello repository has it all.

Here is some sample output as received from the serial port, one line per minute:

DCF 149444 ?
DCF 141c98 MHD Thu 2014-12-11 18:58 CET
DCF 141460 MHD Thu 2014-12-11 18:59 CET
DCF 147e10 MHD Thu 2014-12-11 19:00 CET
DCF 144c04 MHD Thu 2014-12-11 19:01 CET
DCF 14446e MHD Thu 2014-12-11 19:02 CET

Depending on signal strength and radio noise levels, the decoder may at times fail, but it will automatically latch back onto the time signal once reception conditions improve.

If you need better decoding capabilities under noisy conditions, see the Blinkenlight blog which does an amazing job of explaining the whole process, and has excellent reception.

So there you have it: a few components is all it take to get a steady stream of atomic clock data. You could even leave off the diodes and use just an LPC810 plus 0.1 µF capacitor.

[Back to article index]