Electronics
DCF77 atomic time
Introduction
DCF77 is a transmitter for atomic time in Europe. It's situated in Mainflingen, Germany, near Frankfurt. With a reception radius of 2000 km the whole of Europe is covered. DCF77 operates in the low-frequency band, at 77.5 kHz (that's what the "77" in the name refers to).
DCF77 began transmitting on 1 January 1959. At that time there was a need for a simple coding scheme, requiring only the most simple electronics to decode. The coding that was devised encodes date and time in 59 bits which are transmitted 1 bit per second. A sync second completes the minute.
You can buy “analog” DCF77 clocks, digital clocks (with or without weather station), or just DCF77 receivers. Pictured is a receiver module sold by Conrad. These modules are easy to use, though you should pay attention to 2 things:
- the signal output is open collector, so you'll have to place a pullup resistor (typically 10 kΩ) between the output and Vcc. Or you can use the microcontroller's internal pull-up.
- the ferrite antenna rod should be placed perpendicular to the direction of Frankfurt, Germany. The more the orientation deviates from this perpendicular line, the worse the reception will be.
On this particular module the connections are as follows (left to right):
- inverted DCF77-output (negative pulses), open collector, maximum 30 V, 1mA
- DCF77-output (positive pulses), open collector, maximum 30 V, 1 mA
- Vcc, 2.5 V to 15 V.
- ground
At 3.3 V I measured a current consumption of 90 µA, which is very low indeed. Note that you have to add the current through the pull-up resistor to that, and at 3.3 V and 10 kΩ this is another 330 µA. If you want to keep current low it's better to use the inverted output (active low), because then this 330 µA only flows on average 15% of the time, whereas this would be 85% of the time for the normal output (active high). So, with a 10 kΩ pull-up total current would be 90 + 0.15 × 330 = 140 µA when the inverted output is used, 90 + 0.85 × 330 = 370 µA when the normal output is used.
Coding
A data packet consists of 59 bits, sent 1 bit per second.
The coding that was devised encodes date and time in 59 bits which are transmitted 1 bit per second. A sync second completes the minute. Each bit is sent as a single pulse, 100 ms wide for a logical “0”, 200 ms wide for a logical “1”. The start of a pulse indicates the start of that second.
Data format
| Bit | Type | Weight | Level | Description |
|---|---|---|---|---|
| Preamble | ||||
| 0 | M | 0 | Minute start | |
| 1..14 | n/a | Reserved | ||
| 15 | R | Reserve antenna (0=inactive, 1=active) | ||
| 16 | A1 | Daylight Saving Time announcement, during the hour before the switch, starting at minute 1 | ||
| 17 | Z1 | Daylight Saving Time bit, Summer time (MEZ = 0, MESZ = 1); so Time zone = UTC + 2 * Z1 + Z2 | ||
| 18 | Z2 | Daylight Saving Time bit, Winter time (MEZ = 1, MESZ = 0); so Time zone = UTC + 2 * Z1 + Z2 | ||
| 19 | A2 | Leap second announcement, during the hour before the leap second, starting at minute 1 | ||
| 20 | S | 1 | Start of the time information | |
| Minutes | ||||
| 21 22 23 24 25 26 27 |
1 2 4 8 10 20 40 |
Minutes 1s Minutes 2s Minutes 4s Minutes 8s Minutes 10s Minutes 20s Minutes 40s |
||
| 28 | P1 | Parity bit over bits 21 through 27, even parity | ||
| Hours | ||||
| 29 30 31 32 33 34 |
1 2 4 8 10 20 |
Hours 1s Hours 2s Hours 4s Hours 8s Hours 10s Hours 20s |
||
| 35 | P2 | Parity bit over bits 29 through 34, even parity | ||
| Date | ||||
| 36 37 38 39 40 41 |
1 2 4 8 10 20 |
Date 1s Date 2s Date 4s Date 8s Date 10s Date 20s |
||
| 42 43 44 |
1 2 4 |
Weekday 1s (Monday=1, Sunday=7) Weekday 2s Weekday 4s |
||
| 45 46 47 48 49 |
1 2 4 8 10 |
Month 1s Month 2s Month 4s Month 8s Month 10s |
||
| 50 51 52 53 54 55 56 57 |
1 2 4 8 10 20 40 80 |
Year 1s Year 2s Year 4s Year 8s Year 10s Year 20s Year 40s Year 80s |
||
| 58 | P3 | Parity bit over bits 36 through 57, even parity | ||
| 59 | Sync | Sync marker, no pulse | ||
| When a leap second is added this becomes bit 59: | ||||
| 59 | L | 0 | Leap second | |
| 60 | Sync | Sync marker, no pulse. Only after leap second | ||