Meteotime

Like many others I have tried to receive the DCF77 time signal. I also want to decode the meteotime weather information from www.meteotime.com.

Meteotime is transmitted from the DCF77 50kW transmitter situated at mainflingen in Germany. It has a 2000km range. I used the commonly used parts from Conrad.  The antenna is a small wound ferrite rod of 60mm.
I innitially  had many receiving problems. These were certainly in part due to interference from lamps etc.  After discovering this link  i found out that there were ways to improve reception.
The people at C-Max were so kind as to send me a sample of the larger ferrite antenna of 100 mm (CMA-77-100)  and together with some aluminium foil and a toilet roll i was able to get a good reception.

Meteotime arduino setupMeteotime antenna configmeteotime shop

Now that i was getting a consistent signal what could i decipher from the data stream.
Obvious would be to get the time signal. I used the software from Thijs Elenbaas which i found to be very good. He also has some nice helper programs to get you started by visualizing the DCF77 signal as it is coming in. This helped me a lot de determine that the signal was not good and that i needed to fix the antenna issue described above first.
I especially used his demonstration of how the library processes the binary data and returns a time and date. In order for the example to give output on the binary stream make sure that logging is turned on in the DCF library. You can do this by adding the #define VERBOSE_DEBUG 1 in Utils.cpp. There was a small imperfection in the software which displayed the first bit after the buffer full flag (BF) and before the time lag consistent statement.  You can see this also on the output example Thijs has on his site (shown below). I think this is due to the timings around the interrupt. I made a small correction to his program in order to fix that. In addition i wanted to decode the Meteotime signal which is also transmitted via this time signal using the first 14 bits of three consecutive minutes. To do that you need to sort out the overall bitstream into the blocks of data that can be used for the decoding. Some more modifications to this program also fixed that. You can see from the output below right how the different data bits are put into place. (actually you can’t because its wrong in the picture. You need 40 bits though as shown)
What you need is the BCD code for MIN units, MIN tens, Hr units, HR tens, Day units, Day tens, Month units, Month tens (1) , Weekday (3), year units, Year tens. Each is 4 bits unless the number in brackets indicates different.
It’s a total of 40 bits.

Meteotime outputMeteotime explanation

 

Of course the library needs to be changed also and you can find that here.

The second step for decoding the Meteotime part of the signal is to decode the bit stream received from the DCF77 signal. There are two ways of doing this.

1) Meteotime decipher chip

The first way to decode meteotime is to use a decipher chip. This has been developed for Meteotime by HKW and is used in many of the commercial weather stations you can find. The chip is called the HKW581 or sometimes DC-IC or Deciphre-IC.
You can find a description here.  I contacted HKW to buy a chip. This way i would be paying for the licence etc and everything would be fine.
Their answer was “You are right, the Chip is ours. It is possible to buy the Chip, but we sell it only in high quantities (more than 1000 pieces per year) and you have to sign a contract with us. If you are interested please contact me. You can also buy a module with the Chip on Board. The price is 95 Euro.”
I did not want to buy 1000 pcs as i am just an individual user. You can buy Meteotime weather stations complete for much less than that. (This is a 27.95€ example.)
I also contacted Meteotime but received no answer from them so far.
There are several examples you can find on how to dismount the chip from the receiver, what the connecting pins are and how to input the decoder stream.
This chip has pins for: Data in, Data out, Clock in and Clock out
You set the first bit on data in, and then give a clock pulse.  This you do 82 times for all 82 bits.
Now the decoding chip is calculating. If this is done, the clock out pin rises up to high level.
From now on the clock out is inverted to clock in (this indicates data on data out).
If clock out has high level, on output is the first bit.
Now I give the next clock pulse, then the next bit is on data out.
This you do 22 times to collect all the bits.

Sending data to the chip: –> Set the bit on the data in line
–> Pull clock in to high 
<– Chip puts clock out to high
–> Pull clock in to low
<– Chip pulls clock put to low 

Receiving data from the chip:
<- Chip pulls clock to high
-> Pull clock out to high
<- Chip pulls clock in to low
-> Pull clock out to low
<- Chip puts data to data out
<- Chip pulls clock out to high

The data needs to be collected from three consecutive minutes so it can be done very slowly.
In total 82 bits are sent. (42 bits from the three consecutive minutes 3 * 14) and 40 bits from the time part of the transmission. Bit 1 and 8 are not used in the algorithm.
If you send an incorrect telegram you allways get the same answer.
0100000000000000000000000
Meteotime uses 22 bits of data with 2 bits additionally indicating the status of the decoder.
These status bits are 10 if all is OK and 00 in case of a failure.
It has also been reported that the chip can make corrections in case of inverted bits. In that case a 01 or 11 is given.

1234567890123456789012345678901234567890123456789012345678901234567890123456789012 = 82 bits
Here is an example input to the DECHIFFRIER-IC   “0101111000101011010110100111101001100100110100000000000000000011000010010001001000″
123456789012345678901234 = 24 bits
This gives an output of “011001000000011011000110″ including the last two status bits.

 

2) Meteotime using arduino

The second method for decoding the meteotime data stream is to use an arduino. Using this method you need to construct the bits into a format that can be used in the DES decoder.
The DES decoder is just software within the arduino, so that no HKW581 meteotime chip is needed. The bits that are needed are derived from the DCF77 meteotime time signal.
The first 42 bits are the 3 successive first 14 bits from each minute constitute the meteotime bits.
The second part is just the time which can be constructed according to the  following method. 
from the 82 bits string you mis out bit 1 and 8. These are used by the civil defense system but are not needed for meteotime decoding.
From the above example:

Cipher =               [0]101111[0]00 0xBC      10101101 0xAD  01101001 0×69      11101001 0xE9      10010011 0×93

Cipher flip =                     00111101 0x3D     10110101 0xB5   10010110 0×96      10010111 0×97      11001001 0xC9   <– This is Meteotime DES cypher
Key =                                01000000 0×40 00000000 0×00 00001100 0xC0     00100100 0×24     01001000 0×48
Key flip =                         00010010 0×12    00100100 0×24 00110000 0×30   00000000 0×00    00000010 0×02 <– This is Meteotime DES key
These are the two inputs that are needed by the DES algorithm. It then gives a plaintext output.
Plaintext =                     0×16 0×50 0×62 0×02 0×36     <– This is decoded plaintext from DES decryption algorithm
It is then manipulated to give checksum and Meteo data
Checksum = 0x[1]6 0x[50] 0×6[2] 0×02 0×36
Checksum = 0×2501 –> Its OK. The 0×2501 is needed for the data to be valid. This can be used by the arduino program to correct wrong error bits.
This involves repeatedly flipping one bit and looking for this 0×2501 answer.  Assuming the 0×2501 is received then the other parts of the plaintext is the decrypted weather data.
I have not yet implemented this in my decryption routine. The time part of the 82 bits contain several parity checks and can also be compared to previous minute data so that you can assume this is accurate.
You only need to invert the 42 bit weather data bit by bit.
result =                    0×26               0×60             0×63
result =              00100110    01100000    01100011
result flip =      01100100    00000110    11000110    –> Meteo data output from DECHIFFRIER-IC
As you can see this is the same as the output for the above input of the DECHIFFRIER-IC which is 24 bits long.
I am not clear what the position of Meteotime is on the decoding of this information and i am at the moment trying to establish contact with them.
Until this is clarified i will not publish this part of the software.
Below you can find an output from this program which is a Meteotime DES encryption and decryption program.
The encryption part can be used to encrypt weather data for instance received from METAR weather data on the internet .
With a simple transmitter one can then send the appropriate time and weather data to a Meteotime receiver station and “program” the weather forecast.

The final step is to translate this weather data into a human understandable form.
What the different bits mean is according to a table http://www.hkw-elektronik.de/pdfdeutsch/DB%20W-Protokoll-V%201.pdf
This also explains the meaning of the decoded Meteo data. Unfortunately there are some errors in the document.
Thomas berends has found solution to this which he uses on his website. I will incorporate these into the software below as soon as possible.
The following program does this translation job. I have by no means done exhaustive testing so more work is needed here.
It uses the flash library from arduiniana which you need to install from here.

You can download it from here.

Below you can find a screendump from this program. You can see the time the data was collected from was 2hrs 20mins.
This means  it is from Region 0-59 and contains night data. The city number can be calculated by looking at the lookup chart. In this case number 26.
This makes the city Muenchen in Germany. Then follows the decoding of the weather information. You can find how this is done here. 

There is little information on internet about the civil defense warning system. I only found the following incomplete articles.
If someone can tell me more i would appreciate it.
http://www.nafuo.din.de/sixcms_upload/media/2609/Vortrag%20INS%20Bevoelkerungswarnung%20Hannovermesse%202008.pdf
Vortrag INS Bevoelkerungswarnung Hannovermesse 2008.pdf local copy
http://www.fact4ward.com/wordpress322/pdf/ei08_09_064.pdf
Meteotime DCF77Meteotime WM5002

Meteotime HKW571Meteotime conrad receivermeteotime shop


Meteotime map

Links to pages about DCF77 and a few on meteotime

Funkuhrempfänger, Zeitzeichenempfänger, DCF77, MSF, WWVB, JJY, Funkempfänger, Langwelle, Langwellenempfänger ready made receiver from kundo XT
DCF77 TIME SIGNAL RECEIVER MODULE check ready made DCF77 receiver
DCF77 Simulator DCF simulator is what ist says
Elektronik.de.vu – DCF77-Signalerzeuger, Zeit, Datum und Wochentag einstellbar another DCF77 simulator.
An active DCF77 antenna masking a DCF77 active antenna including circuit diagram
www.dcf77logs.de – Software DCF-Generator DCF77 generator online by thomy_pc
Homebrew DCF-77 Transmitter homwbrew DCF77 signal transmitter
DCF77 – Wikipedia is what it says
www.dcf77logs.de – Software DCF-Receiver V2 – Neu! version 2 of the soiftware from thomy_pc
Arduino DCF77 radio clock receiver – Hardware | Thijs.Elenbaas.net This is the standard for DCF77 software and the one i have used.
DCF, MSF and WWVB Receiver Modules ready made DCF77 and MSF receivers
MSF Receiver msf receiver
Electronic circuits,projects and schematics DCF interface – Stego simple article about DCF77 reception
DCF77 MODUL – DCF 77 Empfängermodul bei reichelt elektronik DCF77 receiver module
DCF receiver board buy now – Conrad Electronic SE SHOP_B2C_GLOBALTOPOFFER Electronics Online Store This is what most peoploe use. I do not consider this to be the best
DCF-Empfangsmodul DCF1 – Bausätze / Module – Module – - Pollin Electronic DCF77 receiver module pollin
www.mas-oy.com/uploads/Data sheets/DAEV6180B1COB_004.pdf another DCF77 receiver
Ferrite rods | GES-ELECTRONICS ferrite rods by themselves
Fair-Rite Catalog | Antenna/RFID Rods another site with RFID rods
‘duino Lab artivle about an almost accurate clock
‘duino Lab: Decoding WWVB Time Data -> Frame Reject decoding WWVB
novatech-instr.com/Fun/Dcf77.pdf DCF77 transmitter
Freq standard article about frequency standard around DCF77
marvellconsultants.com advanced DCF77 receiver with 6th order filter
DCF77 Sync Article about DCF77 frequency standard
www.nafuo.din.de/sixcms_upload/media/2609/Vortrag INS Bevoelkerungswarnung Hannovermesse 2008.pdf cuvil defense warning system using DCF77
Arduino DCF77 radio clock receiver – Library | Thijs.Elenbaas.net The mother of DCF77 sites
Arduino Library for Decoding DCF77 Time Signals | fiendie.net another library for DCF77 signal
Zendamateur.COM • Toon onderwerp – DCF77 ontvangen PC based DCF77 breceiver

 

Leave a Reply