Reading the DCF signal

I managed to attach the DCF77-Receiver to my Arduino and found a source code that works with it and reads the correct time as well as the correct date. Too bad I’m not going to use the date part.

I started with some posts from gonium.net, but didn’t get very far. He seems to be using an older Arduino design, the code is written for an ATMEGA 28 processor, with some modifications for an ATMEGA 128. This code doesn’t seem to work with the ATMEGA 328 though, I was able to compile it and load it on the Arduino, but it only prints out the seconds how long it has been running.

I found the solution in this thread on the Arduino forum. I had to modify the circuit, connecting Pin3 from the DCF77 with analog 1 instead of digital 7 on the Arduino, but then it worked instantly. Every minute it prints out the individual values on the serial console, it shouldn’t be very hard to take these values and light the correct LEDs.

This is a schematic of the circuit I have. Other people used an 8K Ohm resistor, I only had a 7K Ohm transistor handy, so I used it. It seems to be working fine. Here some example output:

A1 = 0
Z1 = 0
Z2 = 1
A2 = 0
S = 1
DW = 4 (Thursday)
DD = 15
MM = 12
YY = 11
HH = 21
MM = 2
SS = 0
CET

Now that I am a step closer I guess I’ll have to work on the front plate again.

Published by

Gerald

Diplom-Informatiker (DH) in Darmstadt. Ich blogge über Entwicklung, Internet, mobile Geräte und Virtualisierung. Meine Beiträge gibt es auch bei Google+ und Facebook.

Leave a Reply

Your email address will not be published. Required fields are marked *