Section Top Credits Functions Generator Analyzer Generator Detail DCF77 Signal DCF7 Weather Leap Second Analyzer Detail Rear Panel Rasp.Pi RTC Lolin D32 Pro Atmega 328 5" TFT Front Panel Case Build Vero Board Schematic Switches Code
DCF77 SIGNAL GENERATOR & ANALYZER
Set your DCF77 clock or project wirelessly or directly to any date & time including leap seconds and summer winter changes.
This project uses a standard Raspberry Pi with a 5" TFT screen along with an Arduino to generate the DCF77 code and a Lolin D32pro to analyze the DCF77 signal on a 2.8" TFT display.
Incoming or Generated DCF77 signals can be analyzed bit by bit.
Credits
The DCF77 Analyzer used in this project was designed by tobozo
and the DCF77 Generator was designed by Udo Klein
Functions
Generation of all DCF77 signals including leap years, leap seconds and summer winter changes
Wireless setting/testing of DCF77 clocks
Direct digital setting/testing of DCF77 circuits
Bit by Bit analyzing of generated DCF77 signals on a 2.8" TFT
Bit by bit analyzing of received DCF77 signals on a 2.8" TFT
DCF77 test signals can be directly entered from Raspberry Pi interface
8 preset DCF77 test signal selected by a rotary controller
Raspberry Pi can be used as a fully functioning stand alone device
USB socket in rear panel connected to Raspberry Pi can be used to program/communicate via installed Arduino IDE
Case
The industrial style case is constructed from 9mm plywood and is screwed together.
I set the slope of the case to match the optimum viewing angle of the TFT displays.
The handles help pull the front panel from the rear box and also protect the displays.
Micro Processors
Raspberry Pi 3 Model 3+
Lolin D32 Pro v2
Atmega 328 (Arduino Uno)
DCF77 Generator
DCF77 Signals are generated and sent via RF at 77KHz direct to your DCF77 Clocks aerial or direct to your DCF77 projects decoder input in DCF77 digital format.
DCF77 time code being sent is monitored on a DCF77 Analyzer via a 2.8" TFT display.
Any combination of time and date can be entered via the Raspberry Pi interface.
There are 8 preset time/date events for quick testing of your clocks.
Can be used for initial DCF77 clock setting if you are in a bad reception area and need to set a new clock or change the batteries.
DCF77 77KHz RF output can be disabled, DCF77 digital output is always enabled.
The screen shot below from the Pi shows the standard Arduino serial monitor communicating with the DCF77 Generator on the Arduino.
DCF77 Analyzer
Works in reverse as a DCF77 Analyzer by plugging in a DCF77 signal in the back.
The Analyzer will also decode the DCF77 weather from your signal and display detailed info on the Raspberry Pi screen.
I use a Raspberry Pi 3 model B+ with a small wireless keyboard with built in mouse.
The Pi is not modified at all and will still function as a standard Pi if required within the tester.
A spare USB socket is brought out to the rear panel and can be used for example as another serial monitor.
DCF77 Generator Detail
The DCF77 signal generator by Udo Klein uses an Arduino (must have a quartz crystal) and uses parts of his dcf77_xtal library to form the bases of the code.
All the clever work is done in the code including generating a 77.5 kHz carrier signal from a 16Mhz Arduino leaving a very simple loop of wire and a resistor to set the time and date on the clock through it's aerial.
The image below shows the setup for setting the clock through it's aerial. A single loop of wire from the "DCF77 RF OUT" terminal and Eth is loosely wrapped around the clock.
The DCF77 signal from the generator is inducted into the clock.
I have added a couple of digital outputs to compliment the RF output as well as a switch to disable the RF out.
I have also added a rotary control to preset 8 different time and date settings.
Note the basic circuit uses a 1K resistor but Udo advises to set this resistor according to the DCF77 signal strength in your area.
Use a larger resistor the further away from the transmitter you are. This is because the signal will be weaker so you will need less power to overcome the DCF77 signal from Germany.
I checked my transmitted range by using a spare DCF77 receiver and found a 10K resistor gave a range of about 100cm.
Using the DCF77 Generator
Clock setting command formatting
Commands are sent to the DCF77 Generator over the Rasp. Pi serial port via the Arduino IDE serial port interface.
There are two types of command modes "simple" & "extended".
Simple Mode
sYY.MM.DD hh:mm:ss
e.g. s20.11.29 17:15:01 would set the clock to 29th Nov 2020 with the time set to 17:15:01
Extended Mode
xYY.MM.DD hh:mm:ss w sbtl
xYY.MM.DD hh:mm:ss follows the same format as simple mode but it is then followed by the day number and four extra set codes sbtl
Day numbers are Sun 1, Mon 2, Tues 3, Weds 4, Thurs 5, Fri 6, Sat 7
the extra set codes are
s summertime
b backup antenna
t timezone change sheduled
l leap second scheduled
Here are some examples:
x00.01.01 00:00:00 7 0000 = midnight 01/01/00 start of new centuary
x14.03.30 01:56:00 1 1000 = 01:56:00 30/03/14 gmt+0 trigger clock +1 hour
x14.10.26 02:56:00 1 1000 = 02:56:00 26/10/14 gmt+1 trigger clocks go back
x20.02.28 23:56:00 6 0000 = 20.02.28 23:56:00 6 0000 28 Feb leap year
x19.02.28 23:56:00 5 0000 = 28.02.19 23:56:00 5 0000 28 Feb Non leap year
x09.12.31 23:56:00 5 0000 = 23:56:00 31/12/09 new year test
x99.12.31 23:56:00 5 0000 = 31.12.99 23:56:00 5 0000 milenium test
x09.01.01 00:56:00 4 0001 = 00:56:00 01/01/2009 gmt+0 triggers a leap second
Setting a commercial DCF77 clock or any other DCF77 clock through it's aerial
The DCF77 transmitter always send the time and date of the next minute.
If you are setting a clock to the correct time always set the time and date of the next minute.
Locate the "DCF77 KHz RF Out" sockets on the back of the tester.
Plug in a short length of cable from the " DCF 77Khz Out" socket and plug the other end in the "Gnd" socket.
Turn on the Raspberry Pi and the Main Power switch
Run the Arduino IDE under "Electronics" in the main menu.
Select the serial port connected to the Generator.
Then select the serial monitor.
Set the baud rate to 115200 then press "Send".
This will load a basic instruction file showing the formats of the time and dates etc.
Wrap a single loop of this cable around the clock to be programmed.
On the control panel set the "DCF77 77KHz" switch to ON.
If a preset time and date value is required set that now by turning the rotary control to the relevant setting.
Press the RED "SET TIME" button.
This resets the Generator Arduino and loads the settings - DCF77 77KHz ON and in this case the preset date 28/02/19 23:56:00 a Non leap year.
This is the output from serial monitor.
After the instructions you can see "DCF77 77KHz output enabled" this shows that the "DCF77 77KHz" switch to is set to ON.
The next line shows a preset value is in effect and it will also give you a summary of what the preset has set the clock to.
The final line gives you the output pins on the Arduino and what they are set to.
Note the first position of the rotary control apart from setting a preset time and date of 01/01/01 00:00:00 also prints out a detailed list of the presets and what they do.
This is a useful reference for setting your own times and dates.
Manual setting of times and dates
Manual entry of new time and dates can be input at any time even if a previous preset or manual entry is running.
From the screen shot below you can see the 77KHz RF out has been disable so digital out is ON (digital is always on).
The current running time is a Preset of 23:56:00 31/12/09 and is a new year test.
In the top row I have typed in a manual entry "x20.02.28 23:56:00 6 0000.
This will set the clock to the new date and time of 28/02/2020 23:56:00 which is a leap year.
Hit "Send " and this time and date is sent to the clock overriding the previuos setting.
If you are watching on the DCF77 analyzer the current minute will error before setting to the new time.
Setting a "Jumbo" DCF77 wall clock
to a leap year 23:59:55 to test that it steps to 29th Feb.
Flashing
DCF77 symbol indicates the clock is WTG for a new signal.
The clock
in this case just sits on the aerial wire from the DCF77 generator as
it's a weak signal area.
In a strong signal area you may need to wrap
the aerial wire once around the clock.
The jumbo wall clock on the left is not yet in sync while the DCF77 analyzer is in sync to the new time and date.
The jumbo wall clock gets sync at 23:59:55 and updates the display.
Short video showing details of clock setting
Setting a clock through DCF77 digital inputs
The main use of this function would be testing the DCF77 decoders in your own projects.
I used the generator to test my Arduino Calendar Clock. The clock had a two electric clock motors to indicate the day and month.
Both stepper motors had set 60 tooth gears so the Arduino worked out how many steps were required to keep the hands in step with the date including leap years etc.
The generator allowed me to quickly step through all the different date combinations to confirm the code was correct.
To use the digital output connect the Gnd output to the Gnd of your circuit under test and the 5v or 3.3v output from the "DCF77 Digital Out" to your DCF77 input on your circuit.
On the control panel set the "DCF77 77KHz" switch to OFF as the RF output is not required.
If a preset time and date value is required set that now by turning the rotary control to the relevant setting.
Press the RED "SET TIME" button.
This resets the Generator Arduino and loads the settings - DCF77 77KHz OFF and in this case the preset date 23:56:00 31/12/09 "new year teat".
The generator will immediately start sending the new time and date settings to your DCF77 decoder.
As before manual settings can be sent to your circuit under test at any time by typing in the time and date in the correct format and then hitting send.
Monitoring the DCF77 Generator on the DCF77 Analyzer
To monitor the DCF77 generator signal set the "DCF77 Source" switch to "DCF77 GENERATOR".
Once set the Raspberry Pi can be shut down (via the menu then the PASP.PI POWER" switch.
The TFT will start displaying the signal output by the DCF77 generator.
Here is an example of a full minute decode.
The DCF77 Signal
DCF77 is a German long wave time signal and is transmitted from Mainflingen
Germany, about 25 km south-east of Frankfurt am Main.
The DCF77 signal is an amplitude-modulated, pulse-width coded 1 bit/s data
signal. As each bit is transmitted every second it makes it a very visible time
signal for displaying on the TFT display.
Map showing the distance from the DCF77 transmitter in Germany.
n Kenley UK we are able to get very good DCF77 reception. I monitor this 24/7 and show live charts see below so you can see if your signal interference is similar to mine.
Live charts showing DCF77 signal reception in Kenley UK
1 = all 60 bits of data received with no errors in the last minute. 0 = 1 or more data bits received in the last minute had an error.
DCF77 is controlled by the Physikalisch-Technische Bundesanstalt (PTB),
Germany's national physics laboratory and transmits 24/7.
Most service
interruptions are short-term disconnections of under two minutes. Longer lasting
transmission service interruptions are generally caused by strong winds,
freezing rain or snow induced T-antenna movement.
This manifests itself in electrical detuning of the antenna resonance circuit
and hence a measurable phase modulation of the received signal. When the
maladjustment is too large, the transmitter is taken out of service temporarily.
Over a year this will typically be a few hours.
The time code sent is either in Coordinated Universal Time (UTC)+1 or UTC+2 depending on daylight saving time.
The time is represented in binary-coded decimal. It represents civil time, including summer time adjustments.
The time transmitted is the time of the following minute; e.g. during December 31 23:59, the transmitted time encodes January 1 00:00.
The chart below shows the makeup of the DCF77 time code transmitted at 1
pulse per second over 60 seconds
This chart shows details of the transmitted code
DCF77 Weather Data
Encrypted weather data is transmitted, alongside the time and date information, from the DCF77 transmitter.
In each minute there are 14 bits which are sent and one weather message consists of three consecutive minutes of 14 bits of weather data. In total 42 bits are used.
Note bits 1 and 8 from the first minute are not used.
In addition there are 40 bits needed derived from the time signal itself, this acts as the cypher.
The 42 bits of data are collected from bits 1 to 14 over 3 minutes.
Serial monitor showing decoded weather info after 3 consecutive error free minute decodes.
There are 480 of these pages in a day making up the weather/forecast for the DCF77 area
14 encrypted weather bits are transmitted every minutes making 42 bits in total
The transmission starts again after 24 hours at 10 p.m. UTC with region 0.
A total of 90 regions in Europe are supplied with weather data.
60 with a 4-day forecast and 30 with a two-day forecast. This results in the
following sequence:
Start at 10 p.m. UTC with
region 0 - 59 maximum
values 1st day (today)
region 0 - 59 minimum values 1st day (today)
region 0 - 59 maximum values 2nd day (tomorrow)
region 0 - 59 minimum
values 2nd day (tomorrow)
region 0 - 59 maximum values 3rd day
region 0
- 59 minimum values 3rd day
region 0 - 59 maximum values 4th day
region
0 - 59 Weather anomalies and wind data for the 4th day.
Since no minimum
values are transmitted for the 4th day, one uses the capacities freed up for
region 60 - 89 maximum values 1st day
region 60 - 89 maximum values 2nd
day
It should be noted that the data for two regions are transmitted in
the last 60 data records transmitted.
Weather Code Times in London note shown in CET take an hour off for GMT
Transmission Minute CET | Area Code | City/Country | 4 Day Forecast Day = | 4 Day Forecast Night = |
00:56 | 18 | London (Great Britain) | 1 | |
03:56 | 18 | London (Great Britain) | 1 | |
06:56 | 18 | London (Great Britain) | 2 | |
09:56 | 18 | London (Great Britain) | 2 | |
12:56 | 18 | London (Great Britain) | 3 | |
15:56 | 18 | London (Great Britain) | 3 | |
18:56 | 18 | London (Great Britain) | 4 | |
21:56 | 18 | London (Great Britain) | 4 |
Regions
Region No. | Region/City | Region No. | Region/City | Region No. | Region/City | Region No. | Region/City | Region No. | Region/City | Region No. | Region/City |
0 | FRANCE Bordeaux | 15 | BRITAIN Swansea | 30 | GERMANY Erfurt | 45 | GERMANY Strasbourg | 60 | ITALY Napoli | 75 | IRELAND Galway |
1 | FRANCE la Rochelle | 16 | BRITAIN Manchester | 31 | SWITZERLAND Lausanne | 46 | AUSTRIA Klagenfurt | 61 | ITALY Ancona | 76 | IRELAND Dublin |
2 | FRANCE Paris | 17 | FRANCE le Havre | 32 | SWITZERLAND Zuerich | 47 | AUSTRIA Innsbruck | 62 | ITALY Bari | 77 | BRITAIN Glasgow |
3 | FRANCE Brest | 18 | BRITAIN London | 33 | SWITZERLAND Adelboden | 48 | AUSTRIA Salzburg | 63 | HUNGARY Budapest | 78 | NORWAY Stavanger |
4 | FRANCE Clermont | 19 | GERMANY Bremerhaven | 34 | SWITZERLAND Sion | 49 | AUSTRIA Wien | 64 | SPAIN Madrid | 79 | NORWAY Trondheim |
5 | FRANCE Beziers | 20 | DENMARK Herning | 35 | SWITZERLAND Glarus | 50 | CZECH REPUBLIC Praha | 65 | SPAIN Bilbao | 80 | SWEDEN Sundsvall |
6 | BELGIUM Bruxelles | 21 | DENMARK Arhus | 36 | SWITZERLAND Davos | 51 | CZECH REPUBLIC Decin | 66 | ITALY Palermo | 81 | POLAND Gdansk |
7 | FRANCE Dijon | 22 | GERMANY Hannover | 37 | GERMANY Kassel | 52 | GERMANY Berlin | 67 | SPAIN Palma | 82 | POLAND Warszawa |
8 | FRANCE Marseille | 23 | DENMARK Copenhagen | 38 | SWITZERLAND Locarno | 53 | SWEDEN Gothenburg | 68 | SPAIN Valencia | 83 | POLAND Krakow |
9 | FRANCE Lyon | 24 | GERMANY Rostock | 39 | ITALY Sestriere | 54 | SWEDEN Stockholm | 69 | SPAIN Barcelona | 84 | SWEDEN Umea |
10 | FRANCE Grenoble | 25 | GERMANY Ingolstadt | 40 | ITALY Milano | 55 | SWEDEN Kalmar | 70 | AN Andorra | 85 | SWEDEN Oestersund |
11 | SWITZERLAND La Chaux | 26 | GERMANY Muenchen | 41 | ITALY Roma | 56 | SWEDEN Joenkoeping | 71 | SPAIN Sevilla | 86 | SWITZERLAND Samedan |
12 | GERMANY Frankfurt/M | 27 | ITALY Bolzano | 42 | NETHERLANDS Amsterdam | 57 | GERMANY Donauechingen | 72 | SPAIN Lissabon | 87 | CROATIA Zagreb |
13 | GERMANY Trier | 28 | GERMANY Nuernberg | 43 | ITALY Genova | 58 | NORWAY Oslo | 73 | ITALY Sassari | 88 | SWITZERLAND Zermatt |
14 | GERMANY Duisburg | 29 | GERMANY Leipzig | 44 | ITALY Venezia | 59 | GERMANY Stuttgart | 74 | SPAIN Gijon | 89 | CROATIA Split |
Leap Second
A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC), to accommodate the difference between precise time (as measured by atomic clocks) and imprecise observed solar time (known as UT1
and which varies due to irregularities and long-term slowdown in the Earth's rotation). The UTC time standard, widely used for international timekeeping and as the reference for civil time in most countries,
uses precise atomic time and consequently would run ahead of observed solar time unless it is reset to UT1 as needed.The leap second facility exists to provide this adjustment.
Because the Earth's rotation speed varies in
response to climatic and geological events,UTC leap seconds are irregularly
spaced and unpredictable. Insertion of each UTC leap second is usually decided
about six months in advance by the International Earth Rotation and Reference
Systems Service (IERS),
to ensure that the difference between the UTC and UT1 readings will never exceed 0.9 seconds.
Insertion of Leap Seconds
The scheduling of leap seconds was initially delegated to the Bureau International de l'Heure (BIH), but passed to the International Earth Rotation and Reference Systems Service (IERS) on January 1, 1988. IERS usually decides to apply a leap second whenever
the difference between UTC and UT1 approaches 0.6 s,in
order to keep the difference between UTC and UT1 from exceeding 0.9 s.
The UTC standard allows leap seconds to be applied at the end of any UTC month,
with first preference to June and December and second preference to March and
September. As of January 2017, all of them have been inserted at the end of
either June 30 or December 31.
IERS publishes announcements every six months, whether leap seconds are to occur or not, in its "Bulletin C". Such announcements are typically published well in advance of each possible leap second date – usually in early January for June 30 and in early July for December 31.
Some time signal broadcasts give voice announcements of an impending leap second.
Leap Seconds since 1972
Year | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | Year | Total | |
Jun-30 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | Jun-30 | 11 | 27 |
Dec-31 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | Dec-31 | 16 |
However, the spacing is quite irregular and apparently
increasing: there were no leap seconds in the six-year interval between January
1, 1999 and December 31, 2004,but there were nine leap seconds in the eight
years 1972–1979.
Unlike leap days, which begin after February 28 23:59:59
local time,[a] UTC leap seconds occur simultaneously worldwide; for example, the
leap second on December 31, 2005 23:59:60 UTC was December 31, 2005 18:59:60
(6:59:60 p.m.) in U.S. Eastern Standard Time and January 1 and January 1
00:59:60 CET Central European Time.
DCF77 Leap Second
The Leap Second is announced in the DCF77 signal 1 hour before the leap second is due. This is signaled by Bit 19 of the DCF77 signal being set to 1 an hour before the leap second.
Therefore DCF77 clocks will receive 60 of these before the leap second bit is sent.
The leap second bit (always 0) is sent on the 60th bit and is followed by the normal minute marker.
This means that minute will last for 61 seconds rather than 60.
Below looped animation -leap second being received on my DCF77 Analyzer
The inner ring shows the incoming DCF77 signal in real time (Grey is 0 and Red is 1).
The inner ring shows the DCF77 buffer and is labeled 0 to 59 for the 60 seconds of the minute being received.
Normally buffer 59 is blank as per the corresponding mark on the outer ring for the last minute. A leap second is inserted here shown by an extra 0 on buffer 59.
The time is the time on the RTC and this resets itself as normal to 01:00:00 after 59 seconds but the buffer store inner ring is not reset nor is the current time buffer store updated.
The Analyzer picks up the extra leap second bit then resets the whole buffer store and updates the current buffer outer ring with the new time and resets the RTC to 01:00:00 again 1 second later.
The RTC is now 1 second slower after the insertion of the Leap Second
This image shows the leap second as an extra 0 bit on the inner ring buffer store.
The RTC has reset to 01:00:00.
"Leap Second Inserted" warning appears below the time.
The time & date of the last leap second is displayed on the TFT.
Looped animation showing the leap second detail and how it makes the DCF77 controlled clock lose 1 second.
Master Clock Leap Second Test
My master Clock drives slave clocks in other rooms in my house.
Here the DCF77 Generator was set to send a leap second on 31st Dec 2014 at midnight as my Master Clock is set to GMT.
The clocks were set in a test rig side by side so I could check if my master Clock handled leap seconds correctly.
The slave clocks seconds should not step at 23:59:60 to stay in sync with the corrected time.
DCF77 TFT Analyzer Detail tobozo
Modelled on Eric The DCF77 analyzer works on a ILI9341 TFT via a Lolin D32 Pro v2 board.
It seems to work on all 2.2" ILI9341 TFT displays but for some reason only works on 2.8" ILI9341 touch displays.
tobozo has created a branch off the main esp-DCF32_Analyzer_Clock on github for this version.
Emulating Erik de Ruiter's DCF77 Analyzer Clock the analyzer displays the DCF77 time code on 2 rings of 60 "LEDs" on the TFT display.
The inner ring shows the live time code for the next minute as it is received
and the outer ring shows the current time as long as the previous minute was received error free.
Decoded time and date in UTC + 1 or UTC + 2 are shown in the middle of the "LED" rings along with the chosen City and forecast for that city.
Note I have not added adjustments for GMT my home location as I don't use this as a clock just an analyzer.
The animation below shows a full minute of data capture and decode.
The top right of the screen is used to display DCF77 pulse timings and bit information along with the buffer number and number of errors.
The bottom right of the TFT shows the week number, leap year, CET/CEST and also the day of the week.
Top left has DCF77 status indications that change colour depending on their state-Green for good grey no status and red for bad.
There are indicators for DCF77 sync, Minute mark, RTC, Buffer Full, Buffer Overflow, Pulse width error and period of time error.
The bottom left of the display shows the parity for Minutes, Hour and Date in 3 colours.
These are Grey-waiting parity check, Green-parity check OK & Red parity check fail.
Note the very bottom left of the display is not in use and will probably be used for Meteo data info in the future.
The full TFT display on a 2.8" TFT
The illustrations below give further details on the displays
As per the Erik's original analyzer there is an option to do an (LED) test on boot.
Not really necessary on a TFT but a nice touch anyway.
Animation showing the DCF77 Analyzer Boot-up Screen
![]() |
DCF77 Initial Sync
On boot the time and date are fetched from the RTC.
If this is the first boot the time and date will no be correct as the RTC is set once a complete DCF77 signal is received and decoded.
After this if the analyzer is powered down the RTC stores the time and date.
This animation shows the clock receiving it's initial sync.
The buffers are initial empty and after the analyzer detects a minute mark the received data is loaded into the inner ring once per second.
If no pulse timing or parity errors are found the data is loaded into the outer ring and decoded updating the RTC and filling out the missing data on the display.
The inner ring is emptied ready for the next minutes worth of data.
Note weather data will not be loaded until the weather information for your chosen city is received.
This information of each city is sent over 3 minutes worth of data at various times of the day.
See the DCF77 weather section above for full details.
DCF77 Meteo Data display
Unlike Erik's analyzer tobozo has included full DCF77 weather decoding in his version.
The weather information for your chosen city is displayed on the analyzers TFT screen.
The full weather decode is sent out over the serial port and can be displayed on a serial monitor.
My analyzer has a built in TFT serial monitor display.
Unlike the Arduino serial monitor my TFT monitor is limited in the information it can display.
I have modified the serial printing so all the data for each city fits onto my TFT display.
The data for each city is received over three consecutive minutes in 14 bit sections.
During a 24hr period there will be up to 7 separate TFT "pages of data sent".
Each page contains different weather info for each city and there are 480 pages sent containing data for 90 cities, 60 with a 4-day forecast and 30 with a two-day forecast.
The illustration below shows the weather page for Nuernburgh in Germany and is built up over 3 minutes.
Every minute the received "meteo" bits are checked and if OK the line Received Meteo Bits x-xx ae shown.
If the received meteo bits contain errors they will be rejected and the line for that data will be missing.
If the analyzer does not receive all these bits 1-14, 15-28 & 29-42 over the three minute period the weather page can't be decoded and won't be displayed.
Rear Panel Connections
Power - a minimum of 6v at 2amps is required ( most of this is for the Raspberry Pi).
DCF77 RF Out - This is the output to set a DCF77 clock via the clock's aerial. Just take a short length of wire from the Gnd to the DCF77 Khz Out terminal and loop it arounf the clock to be set.
DCF 77 Digital Out - These are digital out puts to directly drive a DCF77 decoder circuit and will set it to the time from the DCF generator. There is a choice of 5v and 3.3v outputs.
DCF77 Digital In - These inputs take DCF77 coded inputs at 5v or 3.3v and feed them to the DCF77 Analyzer.
If the 3.3v input not required omit SW4 and 3.3v socket
The spare USB socket on the Raspberry Pi is taken out to the rear panel.
Raspberry Pi 3 Model B+
I have used a Raspberry Pi 3 Model B+ as I had this and the TFT screen laying around for ages.
Any Pi should work but you may need to change the screen to match.
The Raspberry Pi 3 Model B+ is the final revision in the
Raspberry Pi 3 range.
Specs
Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit
SoC @ 1.4GHz
1GB LPDDR2 SDRAM
2.4GHz and 5GHz IEEE 802.11.b/g/n/ac
wireless LAN, Bluetooth 4.2, BLE
Gigabit Ethernet over USB 2.0 (maximum
throughput 300 Mbps)
Extended 40-pin GPIO header
Full-size HDMI
4 USB
2.0 ports
CSI camera port for connecting a Raspberry Pi camera
DSI display
port for connecting a Raspberry Pi touchscreen display
4-pole stereo output
and composite video port
Micro SD port for loading your operating system and
storing data
5V/2.5A DC power input
Power-over-Ethernet (PoE) support
(requires separate PoE HAT)
I have measured the current drawn by the Pi in this circuit and it never goes above 1000mA and often sits around 600mA.
I have fitted a separate regulator module rated at 3amp.
I have also fitted a heat sink to the Pi and a 30mm case fan that only comes on when the Pi is powered up.
The Pi has been fused at 2amp.
3Amp Power supply module
I have fitted a tiny heat sink to the regulator feeding the Pi.
The heat sink comes fitted with 3M 8810 thermal conductive adhesive tape.
A second identical regulator is used for the other parts of the circuit fused at 500mA and has no heat sink fitted.
RTC DS3231 I2C
This module stores the time from the decoded DCF77 signal.
The built in clock has temperature compensation and has battery backup in case of power failure.
Note the RTC module is modified by removing R5 so it takes non rechargeable batteries.
Atmega 328 Pinouts for the DCF77 Generator
A Lolin D32 Pro v2 is used for the DCF77 Analyzer
Lolin D32 Pro
Lolin D32 Pro v2 pinout
Lolin D32 Pro v2 schematic
Click image for PDF version
Lolin D32 Pro v2 Pin Table
Pin | Default Configuration* | Optional Configuration* | Remarks / Prerequisites | Configuration |
GPIO22 | I2C_DEV(0):SCL | I2C Interfaces | ||
GPIO21 | I2C_DEV(0):SDA | I2C Interfaces | ||
GPIO18 | SPI_DEV(0):SCK | SPI Interfaces | ||
GPIO19 | SPI_DEV(0):MISO | SPI Interfaces | ||
GPIO23 | SPI_DEV(0):MOSI | SPI Interfaces | ||
GPIO5 | SPI_DEV(0):CS0 / LED0 | SPI Interfaces | ||
GPIO4 | SPI_DEV(0):CS1 | SD Card CS | when module sdcard_spi is used | SPI Interfaces |
GPIO1 | UART_DEV(0):TxD | Console (configuration is fixed) | UART interfaces | |
GPIO3 | UART_DEV(0):RxD | Console (configuration is fixed) | UART interfaces | |
GPIO36 | ADC_LINE(0) | ADC Channels | ||
GPIO39 | ADC_LINE(1) | ADC Channels | ||
GPIO34 | ADC_LINE(2) | ADC Channels | ||
GPIO35 | ADC_LINE(3) | VBat measurement (GPIO is not broken out) | ADC Channels | |
GPIO32 | ADC_LINE(4) | TFT_LED | when TFT is connected | ADC Channels |
GPIO33 | ADC_LINE(5) | TFT_RESET | when TFT is connected | ADC Channels |
GPIO25 | DAC_LINE(0) | DAC Channels | ||
GPIO26 | DAC_LINE(1) | DAC Channels | ||
GPIO0 | PWM_DEV(0):0 | MRF24J40/ENC28J60 RESET | when module mrf24j40/enc2860 is used | PWM Channels |
GPIO2 | PWM_DEV(0):1 | MRF24J40/ENC28J60 CS | when module mrf24j40/enc2860 is used | PWM Channels |
GPIO13 | - | MRF24J40/ENC28J60 INT | when module mrf24j40/enc2860 is used | |
GPIO15 | - | |||
GPIO12 | - | TS_CS | when TFT is connected | |
GPIO14 | - | TFT_CS | when TFT is connected | |
GPIO27 | - | TFT_DC | when TFT is connected |
5 inch TFT screen with HDMI in.
800 x 480
high resolution.
Directly-pluggable into any revision of Raspberry Pi (only
except the first generation Pi model B which requires an HDMI cable).
Driver
provided (works with custom Raspbian directly).
HDMI interface for
displaying, no I/Os required (however, the touch panel still needs I/Os).
Backlight can be turned off to lower power consumption.
Product description
Features:
The LCD display is 5
inches.
Resistive touch screen.
LCD display HDMI.
Compatible for
Raspberry Pi XPT2046
5 inch resistive touch screen LCD.
HDMI interface.
For Raspberry Pi (Pi 1/2/3) Model B B+ A+.
Specifications:
Pixel: 800 x 480
Colour: green
Dimensions: 120 x 75 x 8
mm
Raspberry Pi mounted under TFT display
Wireless keyboard dongle inserted in a spare USB port
Additional micro USB port on the right of the TFT to power the TFT if required.
Front Panel
I have used inkjet transfer paper to made the panel labling.
The front panel is printed out full size on white paper. The TFT rectangles are cut out with a craft knife and then the template is placed on the alluminium panel.
Tape the paper down and center punch all the holes through the paper ready for drilling.
Draw around the paper and the inside of both TFT rectangles cutout earlier.
Remove the template to show the cut lines and hole centers.
Cut out the panel and the rectangles for the TFT monitor.
Drill out the holes to fit the screws, switches and handles.
Rub down the alluminium panel ready for painting.
The rear of the front panel has strips of plastic tape around the TFT cutouts to protect the screens.
The panel needs priming and then painting with acrylic spray paint
The inkjet transfer is then sprayed with clear acrylic varnish.
Once dry the transfer is soaked in water then applied to the panel.
Leave the transfer to dry and then spray with a thin coat of varnish.
Finally cut out the clear transfer film from all the openings and give a fianl varnish coat to seal the cut edges.
Rear Panels
I used the same method on the rear panels
Case
The case is simply constructed from 9mm plywood with screwed joints and measures 305mm x 205mm
The case is quite large as I had to leave space for the Raspberry Pi USB connectors.
I have shown screw holes on the front cover but these are just temp screws so i could hold the front panel in place while I fitted the final fixture.
The case showing screw holes filled and sanded smooth.
The removable front panel has cutouts for the control switches, Raspberry Pi with TFT and the 2.8" TFT display.
The slot for the rear panel banana connectors can be seen through the cutout.
The case is painted white and wooden tenons are screwed to the front panel in all four corners.
One of the wooden tenons is visible through the front panel cutout bottom left.
These will allow screws to hold the front panel in place from the side.
Ventilation holes can be seen in the base. A 30mm exhaust fan is fitted in the top of the rear panel.
Rear of case showing plug panel, USB socket and fan location.
Rear panel showing SW4 in place
Vero Board, rear panel & fan mounted ready for Raspberry Pi, TFTs & switches to be fixed to the front panel.
With the four screws holding the front cover in place the front panel can be slid out to access the boards and wiring.
Detail of the wooden tenons fitted to the front cover. These are fixed to the rear box through the sides (see above) with four screws.
Alluminium Front panel temporally fitted.
The alluminium front panel is fixed to the wooden front panel by small round headed screws.
The handles are fixed through both panels.
Two of the front panel fixing screws can be seen on the side of the case.
These are screwed into the four wooden tenons that are fixed to the front panel.
Completed analyzer
Dimensions
Vero Board Layouts
Click on boards for full size images
Rear flipped down
Schematic
Switch Locations on the main panel.
Switch Locations on the rear panel.
Switch Functions
Selects 8 differnet preset times/dates or events.
To activate turn knob to selected time/date and then press "STE TIME"
The presets are
x00.01.01 00:00:00 7 0000 = midnight 01/01/00 start of new centuary
x14.03.30 01:56:00 1 1000 = 01:56:00 30/03/14 gmt+0 trigger clock +1 hour
x14.10.26 02:56:00 1 1000 = 02:56:00 26/10/14 gmt+1 trigger clocks go back
x20.02.28 23:56:00 6 0000 = 20.02.28 23:56:00 6 0000 28 Feb leap year
x19.02.28 23:56:00 5 0000 = 28.02.19 23:56:00 5 0000 28 Feb Non leap year
x09.12.31 23:56:00 5 0000 = 23:56:00 31/12/09 new year test
x99.12.31 23:56:00 5 0000 = 31.12.99 23:56:00 5 0000 milenium test
x09.01.01 00:56:00 4 0001 = 00:56:00 01/01/2009 gmt+0 triggers a leap second
SW4 (rear panel)
Selects input voltage of incoming DCF77 signal
If 3.3v input not required leave out SW4 and 3.3v socket
Sets the preset time/date/event from VR1 (resets the DCF77 Signal generator)
Turns on the DCF77, and DCF77 Analyzer circuits
Turns on the Raspberry Pi and also the case fan
Turns the TFT backlight of the DCF77 Analyzer On/Off
Turns the internal DCF77 RF transmitter On/Off
Only effective once "Set Time" is pressed.
Selects the signal source for the DCF77 Analyzer
DCF77 Generator is the internal source to view what new setting is being sent to your clocks.
Ext is any external source normally the signal from the DCF77 transmitter itself.
Testing the DCF77 Generator Output
The DCF77 Generator digital DCF77 output fed into my DCF77 Analyzer.
The DCF77 Analyzer displays on both should be exactly the same.
Code
The code is made up of 2 separate parts the DCF77 Analyzer using a Lolin D32 Pro v2 and the DCF77 Generator using a Atmega 328 (Arduino Uno must have a quartz crystal)
![]() |
![]() |
TFT DCF77 Analyzer 115200 Baud | DCF77 Signal Generator |