My DCF77 project is getting into its final stages http://blog.blinkenlight.net/2013/07/01/keeping-time-no-matter-what/ (http://blog.blinkenlight.net/2013/07/01/keeping-time-no-matter-what/) resp. http://blog.blinkenlight.net/experiments/dcf77/local-clock/ (http://blog.blinkenlight.net/experiments/dcf77/local-clock/) --> By now it can even deal with complete signal loss. Although not completely finished I think this is the most noise resilent DCF77 clock project that you can find under any open source license :)
Good investigation of the signal and how to use parts of it.
Do I understand correctly that you also update on "field level" e.g. only update the seconds if (only) that field is decoded correctly?
What I do is to recursively phase lock the signal. That is: I basically synthesize ALL possible signal trains and sync to the signal train with the highest match. However I will only keep the results if the hamming distance of the best to the second best is above some threshhold.
Once all of the partial signals are good enough AND the parities are also reasonable I will use this to sync the local clock. Once the local clock is synced I can fall back to tick it with the phase locked low level signal train. If even this can not be recovered I will stick to the crystal oscillator. The next version of my clock will improve this low level locking by synthesizing DCF77 completely locally --> I can then phase lock to the signal on the lowest level which in turn improves recovery in case phase sync gets lost.
The end result is that I get a digital gain of more than 20 dB over simple filter based implementations (like my exponential filter setup). N.B. even the exponential filter setup is much better than most other implementations :)
Next step could be to add an NTP server ;)
Well, IMHO it is pointless to make an Arduino a NTP Server, this is something that should be done with a RASPI. Creating a stratum 1 server with just one clock is also somewhat lame. So what I would do is add another two receivers (I already own a trimble thunderbolt :) ) But then the noise resilence would be established by completely different means.
Currently I think about investigating suitable alternatives for antennas though.
Well, IMHO it is pointless to make an Arduino a NTP Server, this is something that should be done with a RASPI.
Why? I could do it with a Tiny85 and a cheapo Ethernet module (http://www.ebay.com/sch/i.html?_nkw=ENC28J60) for less money and in a much smaller space.
Although I do not doubt that you can setup a server with a tiny85 and an ethernet module I have my doubts that you can setup a *reliable* stratum 1 ntp server with such a setup. If you can prove me mistaken by actually connecting 3 independent reference clocks to a tiny84 and expose it as a stratum 1 ntp server I will happily put it into my ntp configuration :) I would even copy your setup. Until then I doubt that something like this can actually be pulled of easily.
If you can prove me mistaken by actually connecting 3 independent reference clocks to a tiny84 ...
What happened to the DCF77 decoder?
The decoder is fine. But it would provide only one stratum 0 clock. AFAIK it is good practice to connect 3 independent stratum 0 clocks to a stratum 1 NTP server. In addition any reasonable NTP server usually has an algorithm to compute the "proper" stratum n+1 time from the connected stratum n time sources. With other words: a DCF decoder is only a small part of the equation.
By now I finished the final version: http://blog.blinkenlight.net/2013/08/01/the-real-thing/ (http://blog.blinkenlight.net/2013/08/01/the-real-thing/), http://blog.blinkenlight.net/experiments/dcf77/the-clock/ (http://blog.blinkenlight.net/experiments/dcf77/the-clock/).
Once locked iit now synthesizes the DCF77 signal locally. Hence it can faster reacquire a phase lock after signal loss. It also includes quality measures and different display modes. I am pretty sure that this is ***the*** most noise resilent open source DCF77 clock that works with a "standard" decoder.
Think you made a new reference, not only for DCF77 quality but also how to handle a project, and last but not least determination.
After this project you deserve the title Mr. DCF77
What will be your next project? (after a well earned holiday ;)
Some minor stuff, e.g. putting it into a library. Also I will evaluate some of the DCF modules I experimented with. Besides that I now have a RASPI to play with.
some very good news on my DCF77 project. A lot of people complained that my library http://blog.blinkenlight.net/experiments/dcf77/dcf77-library/ (http://blog.blinkenlight.net/experiments/dcf77/dcf77-library/) and my other DCF77 experiments did not yield the desired results. The issue was that I used a newer version of avr-gcc during development. However with Arduino 1.5.7 beta the "official" compiler got upgraded. I highly recommend to install 1.5.8 beta. So far I noticed that the new compiler produces significantly better (= more compact and faster) code.
Time to upgrade :)