DCF77 Signal Filtering And Decoding


[Udo] decided to build a clock using the DCF77 radio module seen above. This of course has been done before: the hardware draws a clock signal from the atomic clock in Braunschweig, Germany. So he grabbed a library for Arduino and got to work. But he was getting rather poor results and upon further investigation realized that the library had been written for 20 Hz modules and his operates at 300 Hz. This means better accuracy but the drawback is that the hardware is more susceptible to noise.

So began his journey to filter, process, and decode the DCF77 protocol. That link goes to the project overview. It will be in several parts all of which will be linked on that page. So far he has applied a low-pass filter and coded some exponential smoothing. He has yet to write the other four parts, but does mention that early testing shows that this technique will make the reception better than what is achieved with commercially available clocks. He was able to lock onto a signal that had more than 80% noise ratio. That’s impressive!

Just want to see a clock that uses a DCF77 module? Check out this PIC-based atomic clock.

22 thoughts on “DCF77 Signal Filtering And Decoding

    1. Yes they did. However I did extensive research on the internet and found none that really implemented extensive denoising and error correction. If you look at my project goals this is what I will do. So yes, open source DCF77 decoders are not new. On the other hand I am not aware of any project that succeeded in implementing and documenting high quality noise supression / error correction. Wait and see ;)

      1. It was more an information, if you needed to check some part, and in the article there are many other decoding of this type ;)

        I’ll take a look to your error correction, maybe suitable for one of my project ;)

  1. I can see you put in some effort to try to implement some “robust” dcf decoding but I really don’t see the point to this. In my opinion it’s far better to use some kind of quality estimation of the dcf signal and reject all time signals which are below your expected quality.

    Some years ago I wrote an function which just uses the pin change interrupt to measure the pulse time with a free running counter. (on an atmega8). This code sometimes rejects all time signals for hours, but it resynchronises the clock, usually during the night, when DCF reception is much better and the time signals are more reliable. Even without checking the parity bits this code only once gave a false “true” in the 8 years it has been running.

    I don’t know if those cheap commercial dcf clocks use the parity bits but I’ve seen more time decoding errors on those. Maybe it’s a bit paranoid, but if I thought it would be really important to make sure the signal is right I would implement some code and only accept the dcf time If its deviation from the internal clock is small or the time signal is decode correct several times in a short amount of time.

    I’ve also noticed that dcf clocks with longer antennas have better reception of the dcf signal.

      1. One more comment: if I really need reliable accurate timing I do not use DCF77 at all. I have a used trimble thunderbolt around here. I doubt that I can find any time source below the EUR 120 that I paid for it with close the performance. The question is: how far can I push DCF77?

  2. Just to clarify the article. While the time signal is synced to atomic clocks in Braunschweig, the signal itself is transmitted from just outside Frankfurt (the F in DCF77).

  3. Exponential smoothing takes into account all past samples. If you receive a strong outlier (say, a burst of interference), it would seem this would taint your smoothing. Perhaps a moving average filter with limited memory would be better?

      1. Here is the post http://blog.blinkenlight.net/2013/01/01/dcf77-project-part-1-get-ready-for-the-real-thing/ as well as the blog entry: http://blog.blinkenlight.net/experiments/dcf77/phase-detection/

        This is the first stage for a significantly better DCF77 decoder. Right now it can deal with up to 98% noise. If I would have a better local clock I could push this even further. The only thing that stops me is the accuracy of the crystal oscillator. Read my blog for the details.

  4. I bought one of those clocks that sets itself over the radio for 50 cents. It even displays indoor and outdoor temperatures (although I never put my receiver outside), and the phases of the Moon too. Yard sales FTW!

    This one looks just like the one I have but I’m not sure if mine says La Crosse Technology on it or not. Pretty messed up because I look at the thing every day when I wake up.


    I don’t feel like going upstairs right now to check either. Ah, I just found the manuals I downloaded for mine on this PC. I have a Skyscan brand. It is identical to that thing. I knew La Crosse didn’t sound right. Yup this is it:


    Crappy pic I know, it is an old model and I think it is discontinued now or something. Still works though. All I had to do to get it up and running was put batteries in it.

  5. “and coded some exponential smoothing”

    How is it “everyone” seems to know how to write software filters, GUI’s, and FFT’s for micro controllers now, like it’s no big deal ??????
    Really, I tried to read up on it and get my head around the math, but since I haven’t seen or used some of the formulas (integration I think was the first),so I’m thinking this isn’t something you all just picked up on after completing “hello world” and “blink the LED”.

    Is FFT’s like a required but minor module in all software engineering classes now ?!!?

    If there’s an online course that teaches this topic starting from “hello world” level, like university of India on-line for example, PLEASE post a link.

    Really, you all know this???

    1. Maybe because it is no big deal? IMHO FFT is university beginner level stuff. Most probably this is taught even outside universities. However you need some mathmatical background to grasp it. So a “hello world” level example is probably a little bit to ambitious.

      With regard to all this fancy stuff for MCs: I think this is because MCs are so much more accessible to software experts than they used to be.

      And yeah, I know all this stuff. In fact I know significantly more. Wait till you see my next post ;)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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