DCF77 DCF-2 module from ELV with Arduino

It took me several days and four false starts to get the DCF77 module working with the DCF77 library from Thijs Elenbaas.

I bought my DCF-module from ELV elektronik AG. The DCF-2. The module operates from 1.2 - 15V, gives a pulse between 0 and 5V and therefor easy to connect in the Arduino environment.

The DCF77 library is part of the Arduino software IDE and with the examples it is easy to start. Unfortunately not all is as easy as one would like it to be. Especially if the system is not working.

Produktabbildung DCF-Empfangsmodul DCF-2
This DCF-2 module gives a reversed signal what results is that 0 bits becomes a 1 and 1 bits zero in the software.
The blue line is what is measured direct from the DCF77 module (no signal at 5V and a pulse at 0V) and the yellow line what it should be (0V signal with a pulse of 5V).
To get this inversed (yellow) signal a inverter was made with a PNP-transistor BC327.

The 4.7K resistor is for pulling down the signal. The 2.2K resistor is for safety. With out the resistor the circuit also operates.
The 100 nF ceramic capacitor is added for a smoother signal.
A BC556 transistor also works well.

Update June 2016
What would life be easy when documentation was complete and clear. The library contains a flag to invert the signal.

The library initialization contains a third parameter. OnRisingFlank. This is default set to true (HIGH).
Initialize the library as follows: DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT, LOW);

Below are the functions the library gives you to use:
DCF77(DCF77Pin, DCFinterrupt, OnRisingFlank); // Initialize library
time_t getTime(); // Returns the current time in CET
time_t getUTCTime(); // Returns the current time in UTC
Start(); // Start listening to DCF77 signal
Stop(); // Stop listening to DCF77 signal


Nice links with info about DCF receivers:
Online signal from Mainflingen on website
Explains the bits in the received string Arduino projects 4you
HKW-Elektronik GmbH  Sells all kinds of receivers
Rheinturmfunkuhr mit Arduino
Arduino DCF77 radio clock receiver ,Matthias Dalheimer
Github Thijs Elenbaas
Conrad receiver

Update September 2016

After updating the libraries and boards some compiling errors occured

after changing
#include "Time.h"
in
#include "TimeLib.h"
the source code compiled again without errors

 

 
Ed Nieuwenhuys, September 2016  
< -- Back to the Word clock project