Happy New Year DCF77 Project – Get ready for the real thing!

Last year I started my binary clock project for the Blinkenlighty.

This project gathered significant attention. Of course a lot is to be attributed to the project being mentioned by Hackaday. However this attention usually settles quickly. The DCF77 project though gets lots of revisits. Decembber 2012 was the first month ever with >20 000 page hits on my blog 🙂

The article also caused lively discussions in the Germany Arduino Forum. I am especially grateful for the experiments by Jurs. He benchmarked my first implementation with some DCF77 clock modules. As it turns out the different modules are not so similar as one might expect. His main point though was that my first implementation might only be marginally better than the better commercial modules. This is excellent news because now I can use the first implementation as a benchmark.

2013 I am really going to push the limits for DCF77 clock decoding on an Arduino. This will be quite hard for me as my DCF77 investigations are somewhat sabotaged by a Robbe Blue Arrow. I got this quadcopter for Christmas and is definitely a lot of fun. So I spent a lot of time practising.

But back to my project. In case you want to understand the theory behind my approach you might want to have a look into Digital Signal Processing. A Practical Guide for Engineers and Scientists by Steven Smith as well as Information Theory, Inference, and Learning Algorithms by David MacKay.

Alternatively you might want to read the original work of the Claude Elwood Shannon himself: A Mathematical Theory of Communication and Communication in the Presence of Noise. These papers are really striking. You have to look at the date when they were published to fully appreciate this scientific master piece. In addition these papers are very unusual as they are comparatively easy to follow.

In case you do not read (or do not understand) this stuff. Do not worry. The code will work anyway 😉

So let’s continue with step 2 of the project plan.

  1. Exponential filtering of the signal
  2. Phase locked loop / optimal filter for 1Hz phase reconstruction
  3. Reconstruction of the seconds
  4. Hamming metric based reconstruction of the data
  5. Dealing with signal loss

The result will be a phase locked 1 Hz pulse. Not excited? You could do this with less than half a page of code? Think about it again. I did not say approximately 1 Hz. As long as the code has a DCF77 phase lock it will be exactly 1 Hz (with at most 10 ms jitter). And this will work even in the presence of significant noise. Not yet impressed? Then have a look how the exponential filter performs are 80% noise vs. the new approach at more 95% noise and even more.


One final word before you go to the article and play around with my code. As it turns out a good local clock is absolutely mandatory. It follows that your Arduino must have a crystal. resonator based clocks are to inaccurate for our purposes. Especially the modern Arduino Uno has a clock that is to crappy for our purposes. So ensure that your Arduino is build on the “outdated” Duemilanove (or older) design. To make this absolutely clear: “outdated” means more expensive to manufacture. Just like the Blinkenlighty 😉

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.