DCF77
Radio Controlled Clock
C, MicroPython
The time signal transmitter DCF77 is a long wave transmitter in Mainflingen, Germany. It supplies most radio controlled clocks in Western Europe with the legal time in Germany
- you must live in Europe, more information about the range can be found on Wikipedia
- you need a DCF77 receiver module,
- for C
- an Arduino or compatible microcontroller
- Arduino IDE
- for MicroPython
- a microcontroller with MicroPython installed
- and an editor (IDE) with a serial interface (e.g. Visual Studio Code with serial interface extension)
Adjust the output for the onboard LED and the input for the DCF77 signal to your needs.
The 'BIT_TIME' should be a value between 100 and 200, 100ms means a logical 0, 200ms means a logical 1. I used polling for C because the Arduino software has problems with millis() and the serial port in interrupts. The transmitter sends one bit per second, the onboard LED should behave as follows:
Your setup should look something like this:
NOTE: after powering up, the receiver takes a moment to settle and should be kept away from sources of interference (e.g. computer monitors)
The following script shows how to decode the DCF77 signal using a microcontroller and C:
The following script shows how to decode the DCF77 signal using a microcontroller and MicroPython: