gonium.net » dcf77 http://gonium.net/md so much time, so little to do. Sat, 11 Sep 2010 16:42:09 +0000 en hourly 1 http://wordpress.org/?v=3.0.1 DCF77 Radio Receiver – Filter Signals http://gonium.net/md/2009/09/16/dcf77-radio-receiver-filter-signals/ http://gonium.net/md/2009/09/16/dcf77-radio-receiver-filter-signals/#comments Wed, 16 Sep 2009 15:36:46 +0000 md http://gonium.net/md/?p=157 Broadcast Tower

I live close to the DCF77 radio transmitter, so my signal was always pretty strong and clear. This is of course not the case for everybody :-) Gwen Roelants did run into problems. He writes:

Although your code works (thanks for that!) it looked like it was very sensitive to how the antenna was positioned.
I found that I did receive a signal every second, but that for the longer signals, I sometimes got a short flash interrupting it, causing the library to add 2 seconds instead of one. Since I got such a flash in almost every minute it could take a very long time before a proper sync was found, and because 2 seconds were counted the time would also drift during the time no new signal could be decoded.
I found a rather simple fix for your code that greatly improved the reliability and time to find a correct signal.

I don’t have an Arduino around so I did not test it, but the proposed changes seem to be reasonable. You can find the changes in the Arduino forums. Thanks, Gwen!

The photo was CCed on flickr by Nathan Gibbs.

]]>
http://gonium.net/md/2009/09/16/dcf77-radio-receiver-filter-signals/feed/ 0
Tweaking the code http://gonium.net/md/2007/04/18/tweaking-the-code/ http://gonium.net/md/2007/04/18/tweaking-the-code/#comments Wed, 18 Apr 2007 14:54:47 +0000 md http://gonium.net/md/2007/04/18/tweaking-the-code/

Thanks to Lasse Lambrecht, I can release a new version of the DCF77 code – now you can run it on the ATMega168-based Arduinos.

The ATMega8 differs slightly from the ATMega48/88/168-series: The latter chips have an extended Timer2-hardware and therefore need different initializations. Lasse send me a nice adjustment of the code, basically he uses preprocessor flags to figure out which initialization commands to use: #ifdef ATMEGA168 TCCR2B |= (1<
  • arduino-dcf77-clock-0.2.1.tar.bz
  • For the hardware setup, please refer to my initial post. ]]>
    http://gonium.net/md/2007/04/18/tweaking-the-code/feed/ 12
    Arduino DCF77 v0.2 released http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/ http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comments Sat, 06 Jan 2007 22:52:15 +0000 md http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/ 4:57 nixietube clock

    The sketch for decoding the time radio signal DCF77 is greatly improved: I use interrupts for handling the signal and a backup timer has been added.

    Note that there is no interface at the moment, the time is simply put to the serial line. But it should be easy to add a display to show the time. The sketch eats roughly 6000 bytes of memory – if you want to add a user interface, you should consider buying a 16 kb Arduino ;-)

    Of course, you also need the DCF77 receiver module and a pullup-resistor, as described in my old post.

    You can download the code here:

    BTW: The picture above shows a Nixie tube clock. I ripped the picture shamelessly from flickr, there’s a photostream showing the creation of the clock. Cool project.

    ]]>
    http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/feed/ 14
    Arduino DCF77 radio clock receiver http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/ http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/#comments Sun, 05 Nov 2006 20:31:08 +0000 md http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/ DCF77-arduino.jpg

    As a first sketch, I developed a little DCF77 library for the arduino. The DCF77 sender broadcasts the exact time in Germany. It uses a binary format which needs to be decoded – which is exactly what the library does.

    There are others around who wrote a DCF77 decoder: I would like to thank Captain for his DCF77 code. You need to have an Arduino and a DCF77 receiver in order to use this sketch.

    I use the “DCF-Empfänger BN 641138″ of Conrad. You need a pull-up resistor as displayed here:

    arduino-dcf77-setup.jpg

    arduino-dcf77-schematic.jpg

    When everything is connected, the exact time is printed on the serial line. Note that this is a very early release of the software – there is a lot of functionality missing. From the README:

    The current todo list is:
     * Use interrupt routines for detecting signal changes
     * Use interrupt routines to add seconds automatically
       (currently, the 59th second is shown properly)
     * Implement parity checks to prevent faulty time
       signals to be evaluated
    

    The sketch eats up 6400 of the 7168 bytes in the Arduino. I am currently considering to upgrade my board to the ATMega 168 processor in order to have 16kb of memory…

    You can download the code here:


    The code is released under terms of the CC-GNU GPL.

    ]]>
    http://gonium.net/md/2006/11/05/arduino-dcf77-radio-clock-receiver/feed/ 24