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 receiver
Logo
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.

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). 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.

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.
Do not try ferrite-free air coils, they do not have enough inductivity (or otherwise are extremely large for that low frequency).

Unfortunately ferrite rods are sensitive to directions: if your ferrite 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.

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 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 is 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.

What you get here

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. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Further boxes display:

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.
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 serial interface.
This ATtiny45 controller is described here.

To display time, date, status information and error messages, an ATtiny24 controller is described here. That is all you need for your DCF77 experiments.

The following documents can be downloaded from here:

©2019 by http://www.avr-asm-tutorial.net