Diagnostic software for the DCF receiver board


The circle shows the pollin module attached to the pins A0 - A3

Targets

Even if you have strong signals that interfere with the DCF signal for radio controlled watches you still want to receive the correct time.
We try to support these modules:

Conrad 641138
Pollin 810054
Reichelt DCF77 MODUL
ELV 68-09 16 10

Under good conditions and without interference they will give you clear pulses of 100 ms respectively 200 ms. And there is a lot of software to calculate the correct time.
Otherwise these times will differ, you get additional pulses and some are missing. So evaluation is much harder.

Always keep in mind, these modules a built to deal with a wide range of signal strength.
So, the automatic gain control at this band width will need a long time to generate a stabil response. That is why you should not give up too early.

How it was done

The output signals of some modules are too low to drive a digital input. To avoid additional hardware (transistor, amplifier, ...) we use the analog input instead. The limit between HIGH and LOW and even the polarity can be adjustes by software.

Some of the modules come with a china connector. So all you need is some wire and a screw driver. The Pollin module comes with a 4-pin connector. To make things easy we place it immediately into the inputs A0 - A3. (You loose some inputs but in most cases you won't need them.) Still you have to take care the module get the power they need (1.5 - 3.3.volts).
The signal is scanned 100 time per second. If no interference were there a short pulse produces 10 HIGH samples, a long one 20.
The bits get shifted into a queue of 32 bits (= 4 bytes). That is equivalent to an interval of 320 ms.
Each new sample is entered into the queue. Then it is calculated how much the contents of the queue differ from an ideal "0" or "1" signal.
Only when the difference is below the limit the signal is found valid and is added to the buffer. If not, an error code is generated.

To enable control even without connecting a PC there are three LEDs:

The LEDs will flash for 500 ms to show the state. Even if no signals were detected the red LED will flash (10 ms) each second to show the system still works.

For diagnostic purpose the following commands are implemented:

Examples:

a = analog value. The analog-values are printed

     0   550   550   550   550   550   550     0     0     1     1     0     2     1     0     2     1     1     0     0     1
     0     1     0     1     1     0     0     0     1     0     1     1     1    54   550   550     0     1     0     0     0
     1     0     0     1     0     0     0     0     1     0     0     1     1     0     0     0     1     0     0     0     1
     1     0     0     1     1   550   550   550   550   551   550     0     1     1     0     0     1     1     0     0     1
     0     0     1     1     0     0     1     0     0     0     0     0     0     1     1     0     1   550   550   550     1
o = oscillograph. These data are shown in an oscilloscope-like manner.
___---______________________________---_______________________________------_________________________
__---______________________________---______________________________----_____________________________
_---________________________________________________________________---______________________________
-------__________________________-------___________________________---______________________________-
---______________________________---______________________________---______________________________--
c = crosscorellation
Short: :::::::::::::::::::::::::::::::::::::::::::::::::;<=>?@ABCDDB@><:864202468:<>@BDDCBA@?>=<;::::::::::
Long:  DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEFGHIJIHGFDB@><:::::::::::<>@BDFGHIJIHGFEDDDDDDDDDD
------                                                                     ^ 0
Short: ::::::::::::::::::::::::::::::::::::::::::::::;<=>?@ABCDDB@><:864202468:<>@BDDCBA@?>=<;:::::::::::::
Long:  DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEFGHIJIHGFDB@><:::::::::::<>@BDFGHIJIHGFEDDDDDDDDDDDDD
------                                                                  ^ 0
Short: ::::::::::::::::::::::::::::::::::::::::::::::::;<=>?@ABCDEDCBA@?>=;9999999999;=>?@ABCDEDCBA@?>=<;::
Long:  DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEFGHIJIHGFEDCBA@?>=;9753113579;=>?@ABCDEFGHIJIHGFEDD
------                                                                        ^ 1

d = datagram. The series of identified "0" and "1" is printed.
0??????????????iiiii1mmmmmmmphhhhhhpttttttwwwMMMMMJJJJJJJJp

00110001000101000010111101101010010011000011110001110010000
01101000110100000010100011101010010011000011110001110010000
00110000110111000010110011100010010011000011110001010010000
t = time. If there was no error the received time will be printed at the end of each minute.
hh:mm TT.MM.JJ
12:43 03.11.13
12:44 03.11.13


s = show statistics. A statistic diagram will be printed from the values stored in the EEPROM.
For the hours of the day (0 - 23) and the days of the week (0 = Monday, 6 = Sunday) you get
the amount of valid datagrams (first column) and the amount of datagrams with errors (second column).
        0 Error     1 Error     2 Error     3 Error     4 Error     5 Error     6 Error
00      0     4     0     0     0     0    19     9    51     6    69     9     6     2
01      0     0     0     0     0     0     2     5    32     5    63     9    24     4
02      0     0     0     0     0     0    23     3    88     5    81     4    32     4
03      0     0     0     0     0     0    49     3   103     7    99     9    53     5
04      0     0     0     0     0     0    34     0   107     7   103    11    51     8
05      0     0     0     0     0     0    54     2   110     5   108    10    51     3
06      0     0     0     0     0     0    36     2    88    11    96     5    36     7
07      0     0     0     0     0     0     6     3    25     5    39     7    18     2
08      0     0     0     0     0     0     0     0     1     3     0     0     0     0
09      0     0     0     0     0     0     0     0     0     0     0     0     0     0
10      0     0     0     0     0     0     0     0    25     9    12     3     0     0
11      0     0     0     0     0     0     6     2    47     4    16     5     0     0
12      0     0     0     0     0     0    25     2    54     3    22     4     0     0
13      0     0     0     0    32     2    25     3    52     2    32     3     0     0
14      0     0     0     0    16     1    22     4    52     5    14     1     0     0
15      0     0     0     0     0     0    20     4    45     2     0     0     0     0
16      0     0     0     0     0     0     3     6    21     7     0     0     0     0
17      0     0     0     0     0     0     0     0     9     4     0     0     0     0
18      0     0     0     0     0     0     5     1     3     1     0     0     0     0
19      0     0     0     0     0     0    73     3    81     5     0     0     0     0
20      0     0     0     0     0     0   103     9    94     6    17     2     0     0
21      0     0     0     0     0     0    97    10    99     5     5     0     0     0
22      0     0     0     0     3     5   100     5   110     6     0     0     0     0
23      1     0     0     0    20    10   107     6   107     5     0     0     0     0

The statistice give you the opportunity to find out whether the errors occur at certain times of the day
(as a result of different reflections of the signal at a long distance from the transmitter)
or at certain days of the week (as a result of industrial noise level of electromagnetic waves).

Implementation details

The 32-bit queue could be implemented by a long integer variable. To make things easier we took 4 byte variables instead.

To shift data form one byte to another you need the CARRY flag. This cannot be done from "C", so you have to use some assembler statements.

Interrupt service routines (ISR) have to be as short as possible. So they main work cannot be done there. The ISR sets a flag to tell the loop procedure that there is work to be done.

To make it possible to read the error statistice even if there is a power cut these data are stored in the EEPROM.

Download software


contact: nji(at)gmx.de