DCF77 signal filtering and decoding

dcf77-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.

Comments

  1. natsfr says:

    If I’m not wrong Elektor already published an article on this topic.

    • 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 ;)

      • natsfrr says:

        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 ;)

  2. This is an italian circuit: this send to serial the data of time/date … Read (if u know italian) from page 9 to 16: http://www.pannullo.it/Riv_1_35/RIV33_1.pdf

  3. skytoastar says:

    Where can I get a WWVB receiver? The CMMR-6 is no longer available and I’m having trouble finding anything else. Anyone know?

  4. kd0pgm says:

    Is there a guide somewhere to winding the ferrite antenna?

  5. bkubicek says:

    there exists a somewhat difficult to find german description of the weather forecast data that is contained in the dcf77 protocol: http://tinyurl.com/dcf77protocol However using that would require license fees.

  6. Agent_Shrader says:

    Off topic. But for me it would be a shorter way to throw a cable over the fence of PTB in Braunschweig. Ok. 1000m cable. ;-)

  7. Paul. says:

    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.

  8. Matthew Casserly says:

    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).

  9. Drone says:

    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?

  10. pcf11 says:

    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.

  11. Cap't Starbuck says:

    “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???

    • 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 ;)

  12. For the advanced decoder I now added decoding of seconds: http://blog.blinkenlight.net/2013/02/01/the-second-decoder/ . The next step will be minutes and hours ;)

  13. The final version of the decoder is now ready http://blog.blinkenlight.net/experiments/dcf77/the-clock/. I also have openend a bounty at stackoverflow. So if you know any prior work on better or similar implementations you may earn reputation points here: http://stackoverflow.com/questions/18029614/dcf77-decoder-vs-noisy-signal.

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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,598 other followers