Path: Home => AVR overview => Applications => DCF77 receivers   Diese Seite in Deutsch: Flag DE
DCF77 receiver logo Applications of
AVR single chip controllers AT90S, ATtiny, ATmega and ATxmega
DCF77 receivers
Note that parts of these pages have not been tested yet and provide preliminary information only! Some links do not yet work because this webpage is still under construction.

DCF77 receivers

Of course: there are cheap (but also very expensive) DCF77 receivers available (at least in Germany) and there is no need for home-brewing. So why built your own? Now, just because it is fun, and because you'll learn some RF basics, and as it is fine to handle RF by yourself (and not to end as a RF lay person while hanging on your mobile all the time). And if you live in some distance to Frankfurt/Germany: the commercially available receivers are so dump that you need some more amplification to get this signal and to build your own atomic watch for it. And what about those that operate their commercial receiver in an environment that produces lots of very-long wave signals, such as chinese switching power supplies or energy saving lamps? The commercial receiver then is overwhelmed by those signals, and does not find date and time in the air. Here you'll find receivers that are small enough to work correct even under these adverse circumstances.

Antenna Ribbon antenna Direct-Transistor Direct-TCA440 Regulated OpAmp Superhet DCF77 controller tn25 DCF-Controller DCF-Display AM-Rectifier PCB layout Interference Clock M324 Clock M48

DCF77 how-to

DCF77 is a transmitter that "officially" (yes, there is a law on that) sends time and date information continously. It transmits in the Very-Long-Wave band at 77.5 kHz. The time and date information is encoded into 59 bits that are send within one minute, with the 60th bit missing (signaling that the minute is over). These bits are sent by temporarily reducing the RF power of the transmitter down to 20% of its peak power for either 100 ms (which is a zero bit) or 200 ms duration (which is a one bit).

Amplitude DCF77 high and low That is how the two amplitudes, in a high and a low phase, look like over time during one-and-a-half sine waves. The information is encoded in that amplitude (amplitude-modulated, AM), so we have to detect the amplitude's height to decode the information therein.

That is why we cannot use amplifiers that have no gain regulation: either we have a too small gain and our amplitude rectifier does not see a signal at all, or we have a too large gain: then we get a rectangle, which has nearly the same peak voltage on the rectifier, no matter if the amplitude is high or low. And our information is lost in both cases.

So, we have to regulate the gain of the amplifier (automatic gain control, AGC), so that the amplified signal produces enough rectified voltage in high phases, but not too much so that the rectifier starts clipping the amplitude in that high phase. Just enough, so that we detect the loss of amplitude in the low phase. And: the gain regulation has to be slowed down, so that it doesn't increase the gain during the low phase, which can last either 0.1 or 0.2 seconds. The delay in regulation shall be longer than one second or longer.

So, all you need to do is to That is all it needs. If you want to do that with a PC or laptop running a modern operating system: forget it, you won't be able to get this modern operating system with its time-sharing and window reporting system to count 100 or 200 ms long pulse durations. Better use an ATtiny to do all this and transmit the date and time via a RS232 or whatever serial interface to the PC or laptop. An ATtiny works with less than one percent of the clock rate of a PC but is fast enough to react on even shorter pulses. Modern operating systems are neither designed nor able to react fast enough on those events.

Unable to program AVRs? Not willing to learn assembler programming? Yes, you can do that all with two hands full of CMOS-ICs. The time and date bits of DCF77 are 59 bits long, for that you need eight 8-bit shift registers. If you skip the first 20 bits, you need "only" five of those. To check the parity bits of the minutes and hours, you need two parity generators. If you want to check the parity of the 23 date bits as well, you need additionally three of those. If you want to display that on 7-segment digits, you'll need at least ten 4-bit-latches-and-decoders, if you want to see the seconds and the weekdays as well: additionally three of those and an 8-bit counter. If you want to be alarmed at a certain time, you'll need additional counters and comparers. And if you want your watch to function correct even when DCF77 is not transmitting due to local lightning, you'll need at least ten additional CMOS-ICs. And, due to the current-hungry 7-segment displays, at least a 500 mA power supply. In contrast to that: an ATtiny25 in an 8-pin-package and an ATtiny24 in a 14-pin-package, together with a four-line LCD do that all with less than 10 mA (mainly for the LCD's backlight). With a small rechargeable battery of 1,200 mAh you can operate this for days. No: do not fall back to the Eighties, it is not worth it. Just learn how to program AVRs and to write assembler programs rather than investing your time and brain in boring CMOS wiring.

On this web page you'll find all you need to receive, detect and decode the time and date.

DCF77 receiver basics

77.5 kHz is a bit faster than audio signals, but still is in the same range (ok, bats do not hear that any more). So RF of this frequency is less sensitive and does not need special RF transistors or high-speed opamps. So you can just amplify it with any transistor or opamp type, such as a 741. Ideal for a beginner in RF.

Special is only that the signals come in with a rather small voltage. Well below a standard dynamic microphone with its 5 mV. Here, at a distance of 40 km to Mainflingen near Frankfurt, a ferrite antenna tuned with a capacitor to 77.5 kHz produces a sine wave with roughly 5 mV, which already can be seen on an analog oscilloscope. But at larger distances, only a few micro-volt come from the ferrite, associated with lots of (random or systematic) noise.

Fortunately a simple ferrite rod, with some tens of windings of copper wire, and a capacitor of a few nF capacity are a very good RF filter. At resonance, its resistance is extremely high (approx. some 100 kΩ) and its related bandwidth is rather small (a few kHz). So a ferrite rod is
  1. a good receiver for that kind of RF,
  2. a good collector, as it collects RF over its complete length,
  3. a very good amplifier as it increases RF voltages if in resonance (not so much the overall power due to the high resistance but only the voltage), and
  4. also a good selector, suppressing 50/60Hz stray voltages as well as your local short wave transmitter signal with a few Megawatt power.
This page demonstrates, how a ferrite-free ribbon cable loop can be used to receive DCF77's signal with an air loop.

Unfortunately ferrite rods as well as air loops are sensitive to directions: if your ferrite or air loop points to the wrong direction, you'll get nothing but noise and nothing to derive time and date from. This web site also has a solution for that, see below.

Such low frequency waves propagate in at least two different ways: as electromagnetic wave or as magnetic wave. In short distance the magnetic waves dominate. Those propagate in the earth as well as in water. Magnetic waves need a magnetic material like iron to detect them, aluminium, copper or other metals are neither affected by magnetic waves nor are they shielding those waves. So, the ferrite material is ideal because it converts magnetic energy to electric energy.

In larger distance (more than 500 km) the electromagnetic wave dominates. Those propagate predominantly in air and are shielded by earth, ground and water. But those air waves can be reflected by ionized air layers, so their propagation can reach farer, e. g. 2,000 km or longer.

As the distance to the transmitter and the direction of the rod towards DCF77 play a role, and also propagation issues of the VLW band might play a role, an amplifier with a fixed gain, e.g. in my case 1,000 would be enough, is not a good idea. It is either too high, by that overloading the AM rectifier stage and no amplitude drop can be detected or it is too low and does not produce a DC signal, if its peak voltage is below the diode's forward voltage of 0.2 or 0.3 V. So, a good DCF77 receiver has to have a gain regulation. That makes a 741 opamp or a simple transistor amplifier a very bad choice.

Gain regulation should be able to regulate the amplifier gain by at least a factor of 10 (in the near-field) or 100 (in larger distances). And it should be automatically follow the changing signal strength, making it an AGC (automatic gain control). It should not be fast enough for the 100 ms or 200 ms long amplitude drops, so that gain regulation would mask the incoming bits, but should rather be able to average the signal over a few seconds.

If you are in a distance of several 100 km or even beyond 1,000 km, you need much more gain than 1,000 to get the DCF77 signal. If your necessary gain is in the 10,000 to 100,000 range, an issue plays a role that any amplifier of that gain has: stray signals can oscillate the amplifier. This is especially the case if each of your amplifier stages reverses the signal by 180 degrees (as usual transistor amplifiers do) and your third stage strays its signal back into the first stage's input: a perfect oscillator is working then. Self-oscillation is an issue, even at only 77.5 kHz and even if you regulate the gain to down below the oscillation point. So, the direct receiver always has a limited gain.

As, unfortunately, your ferrite rod is a perfect receiver for those stray signals, it helps to do the amplification of the signal on a different frequency than that the ferrite rod is tuned to. Here, the superhet principle comes into play: it mixes the input frequency (77.5 kHz) with an oscillator frequency (in that case e.g. 110.268 kHz), filters the subtracted product (in that case 32.768 kHz) and amplifies this. As 32.768 kHz is far away from the ferrite rod's 77.5 kHz, it does not interfere with that. And: this intermediate frequency (IF) can be filtered by using easily available xtals (for watches), so that even 10 or 20 Hz below or above signals are perfectly suppressed. This also disables noise and disables interfering signals from power supplies and energy saving lamps. This website shows how to do that, see below.

For the beginner in RF, a short intro to resonance might be useful. A coil is a resistor for AC: its resistance is depending from the AC's frequency and can be calculated by the following equation:
ZL = 2 * Π * f * L

with Z being in Ohms (Ω), Π is 3.141592654, f in Hz and L in Henry (H). The resistance increases if the frequency or the inductivity increases.

The same for capacitors, but in that case it is reversed:
ZC = 1 / 2 / Π / f / C

Z again in Ω, f again in Hz, C here in Farad (F). The resistance decreases if f or C increases.

The term 2 * Π * f is called circular frequency and abbreviated as small omega (ω). With that the above formulas are as follows:
ZL = ω * L
ZC = 1 / ω / C

At resonance both the inductive and capacitive resistance are equal, ZL = ZC, making
ω * L = 1 / ω / C

In case of resonance, the inductive and capacitive resistance increases with a quality factor, depending mainly from the normal (Ohm's) resistance of the coil. This factor is around 100 for a normal coil or 40 for a high-Ohm coil. That is why the ferrite resonant circuit has such a high resistance at 77.5 kHz.

Arithmetic says that you can calculate
inductivity by L = 1 / ω2 / C
capacity by C = 1 / ω2 / L and
frequency by f = 1 / 2 / Π / √(L * C)

That is all that you need in the math section. If you need more RF basics, visit this page for more RF basics.

What you get here

Antenna Ribbon antenna Direct-Transistor Direct-TCA440 Regulated OpAmp Superhet DCF77 controller tn25 DCF-Controller DCF-Display AM-Rectifier PCB layout Interference Clock M324 Clock M48

Overview on what is described here

Overview on the receivers Here are some descriptions of home-brew-able receivers for DCF77. Lots of different tastes are covered here:
  1. Ribbon cable loop antennas for DCF77, exclusively devellopped and described here, easy-to-build and impressive, receive DCF77's electromagnetic waves by using ribbon cable in a 30cm (26 single cables) or 95cm diameter (50 single cables) loop. Those can be build as cross antenna (see next paragraph), to get rid of directional issues. Small one- or two-stage pre-amplifiers allow to place the antenna far away from the receiver circuit.
  2. A cross antenna for DCF77, that makes reception of DCF77 independent from directions towards Mainflingen near Frankfurt, where the transmitter is located. A 90° and a 45° version has been designed, built and tested. The antenna includes a FET stage that serves as a buffer between the high-impedance ferrite antenna and the capacitor(s) that form a resonant circuit and the lower impedance of the following amplifier stages. To adjust the frequency of the resonant circuit exactly to DCF77's transmit signal on 77.5 kHz an automatic frequency control (AFC) has been added, consisting of a variable capacity diode (varactor), a capacitor and a resistor. Adjusting the AFC voltage allows to vary resonance frequencies between 77 and 78.5 kHz (for the 90° cross antenna and over a larger bandwidth for the 45° cross antenna. This brings an elevated noise immunity and a higher RF sensitivity.
  3. A direct amplifier for DCF77 RF with transistors: amplifies the 77.5 kHz RF by several thousand-fold to allow reception in the far distance to the transmitter. Works with standard electronic parts and does not use special parts. Two stages amplify the weak signal, while a third stage reduces the impedance to drive a low-impedance diode rectifier stage. Of course, the gain of the amplifier can be adjusted. This is done with diode attenuators, so that the working conditions of the transistor amplifiers remain unchanged. The diode's currents can be manually adjusted or via a PWM plus a PNP buffer stage. The upper box with an ATtiny45 provides the AGC voltage.
  4. As an alternative to transistorized stages a TCA440 amplifier can be used. This provides even more gain. The oscillator and mixer, also integrated in a TCA440, are not used, only the IF amplifier stages. The gain can be easily adjusted by applying increased voltages on the respective input pin. The TCA440 has an auxiliary output to drive a mechanical meter for the gain (leave that open if you don't need it). While the number of necessary parts is smaller than of a transistorized version, the accessibility of TCA440s is also smaller as the circuit is not in production any more.
  5. In a third variation of a direct amplifier receiver I have added a regulated opamp receiver. This amplifies the HF in two operational amplifiers that have a voltage divider in between. The voltage divider works with an FET, that is regulated with a negative gate voltage of 0 to - 4.6 V. This voltage is produced by a rectangle generator, a coil, two capacitors and two diodes. Automated regulation can be done with an ATtiny25, that switches the generator on and off.
  6. A superhet receiver with a TCA440: Reception and pre-amplification are on a frequency of 77.5 kHz, then mixed with an oscillator frequency to form a 32.768 Hz mixer product. Either 77.5+32.768 or 77.5-32.768 kHz can be used for that. The internal oscillator is working with an external coil and capacitor and works on 110.268 kHz. The mixer signal is then filtered with an LC circuit and 32.768 kHz crystal(s). That is fed into the IF amplifier. Its output, again filtered with a LC resonant circuit, is rectified and produces an amplitude dependent DC signal. The AGC of the IF amplifier works as described above.
  7. In a subversion, the TCA440's oscillator input is driven with a crystal-derived sine wave signal of 110.294 kHz, produced by an AVR ATtiny25, which is clocked with a 15 MHz xtal oscillator and divides this clock by 68 and by 2. Rectangle to sine wave conversion uses a 3-stage RC filter for the positive and negative output, which are fed into the TCA440's oscillator input. The box on the bottom shows this concept.
  8. Further boxes display:
  9. The rectification of the DCF77 signal from the direct receivers as well as of the 32 kHz IF of the superhet can be made with diodes. An alternative solution can be an ATtiny25 rectifier.
  10. An alarm clock, that integrates the rectifier, the controller and the display is under construction. The hardware is already working.
  11. An alarm clock, that receives synchrous serial time and date from an ATtiny25 controller and displays that all on an LCD with an ATmega48 is under construction here.

Direct receiver with regulated OpAmps As a bonus application I added a direct receiver that does it all in a small Tiny25: to detect the amplitude of DCF77, to generate voltages that control the frequency of the input LC ferrite circuit as well as the gain of two operational amplifiers, to decode the DCF77 amplitude drops, to convert it into time and date information with extensive error detection and to send the decoded information either over a synchronized serial interface or to transmit these over an asynchroneous serial interface. For displaying the information four different opportunities are presented, that span from displaying the received time and/or date information
  1. with an ordinary terminal program over a standard RS232 interface, or
  2. to receive it in async mode and synchronize a 7-segment display, e. g. with a large LED display, with that, or
  3. to receive it asynchronously and display it on a LCD of programmable size (single, double or four lines, 8/16/20/24 characters per line), or
  4. to receive it synchronously and display it on a LCD with programmable size.

Antenna Ribbon antenna Direct-Transistor Direct-TCA440 Regulated OpAmp Superhet DCF77 controller tn25 DCF-Controller DCF-Display AM-Rectifier PCB layout Interference Clock M324 Clock M48

Links to the pages

An optimized ferrite antenna receiver with a FET buffer stage receives DCF77 in any direction: the cross antenna described here.

Then I describe two kind of receivers using the direct principle (amplification on the receiver's frequency):
  1. with three transistors here, including the AC/DC rectifier used for all receivers here, and
  2. with a TCA440 integrated circuit here.
  3. with two regulated opamps here,
The superhet type of receiver is described here. It also comes in two versions: a) with an oscillator coil and capacitor and b) with an oscillator signal produced by a crystal oscillator driven ATtiny25 and RC filters for sine wave formation providing a symmetric oscillation signal.

Furthermore, a controller with an ATtiny45 has been designed that
  1. measures the generated AM-DC,
  2. adjusts the frequency of the ferrite circuit automatically (AFC) in a PWM channel,
  3. adjusts the gain of the amplifier (AGC) in a second PWM channel,
  4. analyses bits and pauses of the DCF77 signal, decodes the time and date information therein, and
  5. transmits time and date information as well as status information and error messages over a two-wire serial interface.
This ATtiny45 controller is described here. The advanced version of this works with an ATtiny25 and is described here.

To display time, date, status information and error messages, an ATtiny24 controller is described here.

The alternative rectifier with an ATtiny25 can be found here.

I develloped a few PCB layouts that you can use, those can be found here.

That is all you need for your DCF77 experiments.

The following documents can be downloaded from here: Potential interferences of the DCF77 signal with noise sources are closer described here.

The bonus application of a regulated OpAmp receiver is shown here. An incomplete alarm clock is planned here and here. The hardware description is fine, but the software is still under construction.

Antenna Ribbon antenna Direct-Transistor Direct-TCA440 Regulated OpAmp Superhet DCF77 controller tn25 DCF-Controller DCF-Display AM-Rectifier PCB layout Interference Clock M324 Clock M48

©2019-2021 by