This month I will start a series of experiments geared to develop a DCF77 clock decoder. The idea is of course to establish a binary clock for the Blinkenlighty.
You might wonder why I need a series of experiments for this. After all there are quite some DCF77 libraries readily available for download. Some are even featured in the Arduino playground.
The point is that they all perform very poor in the presence of noise. Unfortunately the DCF77 signal is almost always noisy. So my goal is to develop the most noise tolerant DCF77 clock decoder software ever.
As it turns out this is significantly harder as it appears at the first glance. Hence I will progress in steps that are hopefully not to hard to swallow.
My plan is to start with a standard library and then to refine it gradually:
- Exponential filtering of the signal
- Phase locked loop / optimal filter for 1Hz phase reconstruction
- Reconstruction of the seconds
- Hamming metric based reconstruction of the data
- Dealing with signal loss
- Tuning the crystal
Step (0) will already produce clocks that has superior filtering compared to most. After step (3) however we will have unprecedented noise resilence. An early prototype already locked to a signal with >80% noise – Something that is completely out of reach for any simple decoder.
Ironically there will be no video for the first stages of these experiments because my photo lights creates to much noise for the DCF77 receiver to demodulate any signal at all. No matter how much denoising is present, if there is no demodulated signal the clock has absolutely no chance.
Click on the diagrams to learn how I apply exponential filtering to improve an existing library.
In case you want to dig deeper into what I am going to do I strongly recommend the book Digital Signal Processing. A Practical Guide for Engineers and Scientists by Steven Smith. I also find Information Theory, Inference, and Learning Algorithms by David MacKay very inspiring. Basically I follow the ideas that you can find in these two books. A word of warning though: if you have no knowledge of mathematics they are not exactly an easy read 😉