[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.
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 ;)
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 ;)
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
Where can I get a WWVB receiver? The CMMR-6 is no longer available and I’m having trouble finding anything else. Anyone know?
Is there a guide somewhere to winding the ferrite antenna?
Pretty sure if you look carefully thats a foam core antenna.
What is the permeability of foam anyhow?
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.
Unfortunately they will not license to non business entities. However the code was already broken. If you search around long enough you can find the keys on the internet.
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. ;-)
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.
Well, the point is
1) Learn about denoising
2) Get a more accurate time. With your approach you can never be better than 0.1s. My current prototype is accurate to 0.01s.
3) Because I can ;)
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?
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).
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?
Wait till my next post. I will deal with strong outliers. The current setup is just the benchmark. The goal is a ***significantly*** better filter.
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.
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.
http://common3.csnimages.com/lf/49/hash/968/422350/1/Silver+Atomic+Wall+Clock+with+Moon+Phase+%26+Indoor%2FOutdoor+Temperature.jpg
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:
http://www.equalreviewer.com/wp-content/uploads/2011/10/Skyscan-88800-88801.jpg
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.
“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 ;)
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 ;)
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.