Skip to content

DCF77 Atomic Radio Clock

It will be more interesting is, to set the real time via the german DCF77 Atomic Radio Clock

In the datasheet is the pinout description.

Wiring

P1 is an enable/diasable pin and MUST be connected to ground AND the Module MUST be connected to 3.3V otherwise the Module will be damaged.

DCF77 Uno
P1 GND
T A5
P2 N/C
G GND
V 3.3V

Installing the Libraries

In the Arduino Ide I’ve to install the Library dcf77_xtal. During the installation I’ve red an interesting information.

I never knew, that newer Arduinos doesn’t have a 16Mhz crystal anymore.
To be sure, to have a correct model for the test, I took an older “official” Arduino Uno from the Arduino Foundation.
On the homepage from the library developer blog.blinkenlight.net/experiments/dcf77/ are many useful information’s about the signal, the modules, the library and the example sketches.

First Test

I used the DCF77_Scope example sketch for my first tests

I the sketch I changed a view lines, which I’ve commented in the following snippet

// pin settings for AVR based Arduino like Blinkenlighty, Uno or Nano
const uint8_t dcf77_analog_sample_pin = 5;
const uint8_t dcf77_sample_pin = A5;  // Changed to A5 because, the T-Pin is connected there
const uint8_t dcf77_inverted_samples = 0;
const uint8_t dcf77_analog_samples = 1;
const uint8_t dcf77_pin_mode = INPUT;
//const uint8_t dcf77_pin_mode = INPUT_PULLUP;  // disable internal pull up. IT's not needed for my module

const uint8_t dcf77_monitor_led = 13; // Changed to 13, for the Arduino internal LED

My output looks like this

Compared to the documentation it doesn’t look optimal, but the module generally works.

Second Test

For my next test, I used the Superfilter example sketch and made the same changes as shown above.

The output is similar, to the scope test, but with more useful information’s.
After starting the sketch, I’ve got the following output

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.??(?,?)??:??:255 CEST 0,0 0 p(424-314:6) s(6-4:0) m(0-0:0) h(0-0:0) wd(0-0:0) D(0-0:0) M(0-0:0) Y(0-0:0) 0,0,0,255
[1]        18, XXXXXXXX9-+---------+---------+---------+---------+---------+---------+---------+---------+-------3X
[2]        18, XXXXXXXX9-+---------+---------+---------+---------+---------+---------+---------+---------+-------3X

After a view minutes, the time has very slowly came up.
Here are some output snippets.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.??(?,?)??:??:02 CEST 0,0 0 p(1781-0:111) s(15-2:3) m(0-0:0) h(0-0:0) wd(0-0:0) D(0-0:0) M(0-0:0) Y(0-0:0) 0,0,0,255
[1]        98, XXXXXX8---+---------+---------+---------+---------+---------+---------+---------+---------+-----5XXX
[2]        98, XXXXXX8---+---------+---------+---------+---------+---------+---------+---------+---------+-----5XXX

.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.??(?,?)??:50:33 CEST 0,0 0 p(2354-0:147) s(15-2:3) m(6-4:0) h(0-0:0) wd(0-0:0) D(0-0:0) M(0-0:0) Y(0-0:0) 0,0,0,255
[1]       129, XXXXXX1---+---------+---------+---------+---------+---------+---------+---------+---------+----6XXXX
[2]       129, XXXXXX1---+---------+---------+---------+---------+---------+---------+---------+---------+----6XXXX

.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.??(?,?)10:51:38 CEST 0,0 0 p(3455-0:215) s(23-2:5) m(12-8:1) h(4-2:0) wd(0-0:0) D(0-0:0) M(0-0:0) Y(0-0:0) 0,0,0,255
[1]       194, XXXXXXXXXXXXXX8-----+---------+---------+---------+---------+---------+---------+---------+--1XXXXXX
[2]       194, XXXXXXXXXXXXXX8-----+---------+---------+---------+---------+---------+---------+---------+--1XXXXXX

.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.16(?,?)10:52:42 CET 0,0 0 p(4420-0:255) s(31-2:5) m(18-12:1) h(8-4:1) wd(3-2:0) D(12-10:0) M(3-2:0) Y(3-2:0) 2,1,1,255
[1]       258, XXX1------+---------+---------+---------+---------+---------+---------+---------+---------+-6XXXXXXX
[2]       258, XXX1------+---------+---------+---------+---------+---------+---------+---------+---------+-6XXXXXXX

.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.03.16(2,?)10:52:51 CET 0,0 0 p(4561-0:255) s(31-2:5) m(18-12:1) h(8-4:1) wd(6-4:0) D(12-10:0) M(6-4:0) Y(3-2:0) 2,1,1,255
[1]       267, XXXXXXXXXXXX7-------+---------+---------+---------+---------+---------+---------+---------+-1XXXXXXX
[2]       267, XXXXXXXXXXXX7-------+---------+---------+---------+---------+---------+---------+---------+-1XXXXXXX

.

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     21.03.16(2,2)10:52:58 CET 0,0 0 p(4633-0:255) s(31-2:5) m(18-12:1) h(8-4:1) wd(6-4:0) D(12-10:0) M(6-4:0) Y(6-4:0) 2,1,1,255
[1]       274, XX5-------+---------+---------+---------+---------+---------+---------+---------+---------+-6XXXXXXX
[2]       274, XX5-------+---------+---------+---------+---------+---------+---------+---------+---------+-6XXXXXXX

.

Decoded time: 21-03-16 2 10:53:59 CET ..
dirty:       21.03.16(2,2)10:54:58 CET 0,0 1 p(5697-0:255) s(47-2:8) m(30-20:1) h(16-8:2) wd(12-8:1) D(24-20:1) M(12-8:1) Y(12-8:1) 6,3,3,255
[1]       394, +---------+---------+---------+---------+---------+---------+---------+---------+--------8XXXXXXXXX7
[2]       394, +---------+---------+---------+---------+---------+---------+---------+---------+--------8XXXXXXXXX7

.

Decoded time: 21-03-16 2 10:54:30 CET ..
synced:      21.03.16(2,2)10:55:29 CET 0,0 2 p(5871-0:255) s(55-2:10) m(36-24:2) h(16-8:2) wd(12-8:1) D(24-20:1) M(12-8:1) Y(12-8:1) 8,4,4,255
[1]       425, +---------+---------+---------+---------+---------+---------+---------+---------+-------6XXXXXXXXX9-
[2]       425, +---------+---------+---------+---------+---------+---------+---------+---------+-------6XXXXXXXXX9-

The hole process took round about 10 minutes.
I made this test in the HBK-FabLab. After testing it at home, I got no signal !

Decoded time: 00-01-01 1 00:00:00 CET ..
useless:     ??.??.??(?,?)??:??:255 CEST 0,0 0 p(0-0:0) s(21-21:0) m(0-0:0) h(0-0:0) wd(0-0:0) D(0-0:0) M(0-0:0) Y(0-0:0) 0,0,0,255
[1]       674, +---------+---------+---------+---------+---------+---------+---------+---------+---------+---------
[2]       674, +---------+---------+---------+---------+---------+---------+---------+---------+---------+---------

I made a second test on an other point in the room. I got a signal there, but with a poor quality. After 1,5h of waiting syncing the clock, I stopped the test.
I noticed an other reproducible problem: When I plug in the power supply of my Laptop, the signal is completely lost !
The DCF-77 module is very sensitive against electromagnetically noise.

This seems to be useless for my case !