DCF77 Simulator

In the spring 2010 Hans Sundgren designed and built a DCF77 simulator/demonstrator as part of a PIC programming course at the Royal Institute of Technology (KTH) in Stockholm. [ IL131V Tillämpad digitalteknik med PIC-processor ] sch Application

The project was presented May 5th in KTH Campus, Kista.

The acronym DCF77 stands for:
D=Deutschland (Germany)
C=Long wave signal
77=frequency: 77.5 kHz.

DCF Simulator and demonstrator

A simulator and demonstrator

The DCF77 Simulator is a combined simulator and demonstrator. It generates DCF77 time code at the same time as it displays the code in different views. The time code to be generated can be set to any time between 2000-01-01 and 2099-12-31.

The simulator can control DCF clocks via two interfaces:

  • Electrical
  • Radio-signal via a built in low-power transmitter

DCF77 protocol (in Swedish)

Simulator front panelOverview of mechanical design

DCF simulator, designed by Nick Raptis

Other designs: Greece

Greece flag 2012 January: Based on the information on this web page other people have succeeded building the simulator, with smaller or larger personal adjustments. One of them is Nick Raptis from Greece. Extracts from Nicks report 2012-01-24 published with his permission:

... I'm an electronics engineer living in Athens, Greece and the reception of DCF-77 signal is rather pure as I suppose is, also, the case in certain parts of Sweden. Especially in my lab, I had no success to receive it and even less luck to test or troubleshoot any circuits designed to use this signal.

I found your site almost after you published this circuit, during summer 2010, and started gathering all necessary components. Unfortunately, I got lazy during the process and left this project behind although not forgetting about it. During last Christmas holiday period I pulled myself together and started building it. I used almost the same method as you did, by point to point wiring. The first tests with the main signal generating microprocessor were succesfull and I continued to the end. Although, I didn't follow your method of the very professional front panel construction, my approach was quite good looking and generally acceptable. Even more, I have enriched my electronics lab with a trustful DCF-77 signal generator ready for any upcoming project.

Just for your knowledge, as I could not find anywhere the 77,5 KHz crystal and the antenna required (my father could not help me as yours did!!), I ripped these components from a Conrad DCF-77 receiver module. ...

DCF simulator, designed by Pasan

Other designs: Sri Lanka

Sri Lanka flag 2013 August: Pasan built the simulator on experimental board and has plans to do an SMD variant.

Controls on front panel

The controls

Start/Stop: Starts and stops the time signal according to the DCF77 protocol and the set time.

Transmit: Switches the transmitter on/off. Can only be activated when signal generation is in progress.

View: Switches between 4 different viewing modes:
a) Shows the set time and transmitted bit value, without LCD background light
b) Shows the set time and transmitted bit value, with LCD background light
c) Shows an overview of all 60 bit values for a complete minute interval, where the current bit is underlined
d) Shows a dynamic explanation of the bit information currently sent.

Set time and -/+ dial: Activates setting mode where the time can be set using the -/+ dial. The time parameters are sequentially stepped through: Hour, Minute, Second, DST, Year, Month, Day, Weekday. The set time is finally stored in EEPROM.

Sound: Activates a audio indication to complement the text display. The dial is a normal volume control. In addition, it controls the sound types. By quickly turning the knob up+down, 5 different sound types are stepped through:
a) No sound, amplifier off. b) Click sound. c) Tone sound. d) Tone sound inverted, high frequency. e) Tone sound inverted, low frequency.


The external connections

77.5 kHz: Connection to external antenna, if required.

Pulse: Pulse interface for electrical connection to a DCF clock. The signal simulates the output from a DCF77 receiver.

9-12 V: External power supply, if required.

DCF Simulator block diagram

Block diagram

The simulator is built around a PIC-processor for the DCF77 simulation and control. In addition the following modules are included:

  • Radio interface with a low power test transmitter 77.5 kHz
  • 4x20 characters LCD display
  • Two support processors for sound selection and sound generation
  • Audio amplifier with digital potentiometer

Block diagram

Part of program code for PIC16F886

Program code

The code is written in the programming language C, for the B Knudsen Cc5x C-compiler - not ANSI-C.

Source code
Hex file
html DCF Simulator – PIC16F886 first part  
html restricted DCF Simulator – PIC16F886 code dcf_sim_886_0503.hex
html Sound selection PIC16F690 code dcf_sound_selection_0502.hex
html Tone generatorPIC16F628 code tone_generator_0502.hex
Prototype with PIC16F628

The 1:st prototype

The DCF77 simulator was first designed with PIC16F628, a two-row LCD display and an electrical interface to the clocks.

code 2010-02-07_prototype_pic16f628.c

Test of simulator connected to a DCF clock

Prototype with PIC16F690

The 2:nd prototype

After upgrading to PIC16F690 a rotary encoder could be used for setting time. In addition, a 4-row LCD display with several "views" could be utilized thanks to the larger program memory.

Prototype with PIC16F886

The 3:rd prototype

The final simulator design added sound to emphasise the "display" of the time signal. A rotary encoder is used for both volume control and for selecting sound type.

This final version uses PIC16F886 as the main processor with the two previously used processors as support processors taking care of the sound selection and generation.

Part of circuit diagram

Circuit diagram

Besides the 3 PIC controllers the circuit also uses an amplifier, a digital potentiometer and a MOS-FET relay.

Circuit diagram

Eagle schematics file:

sch dcf77_simulator_circuit.sch

DCF77 circuit board

Circuit board

The simulator is built on a strip-board, also known as Veroboard. The board also holds the loudspeaker.

Besides pin connectors to the front panel controls, battery and antenna there are also 3 pin connectors for in-circuit programming (ICSP™) of the three PIC controllers on the board. The PICkit™ 2 programmer can be plugged in directly onto the connectors.

Circuit board top Circuit board bottom

Front panel detail

Front panel

The front panel was drawn in Front Panel Designer and sent to Schaeffer AG for milling and engraving. More >>>

Fronr Panel Designer file:

fpd dcf77_simulator_frontpanel.fpd

Definition of screw holes

Ferrite antenna

Transmitter antenna

The low-power transmitter is connected to a ferrite antenna with capacitors.

Antenna position on the rear

Back side of front panel

Mechanical design

The front panel is the base for the unit. The LCD display is base for the circuit board.

Back side of front panel, without wiring Mechanical design top

Hans Sundgren solder the last parts of the DCF77 Simulator

The construction work

The project was completely designed and built in the kitchen using a soldering iron from Biltema.

To verify the function several different radio controlled clocks were used, some of them digital and some of them analog.

Test bench on the stove

Sture Sundgren soldering

Assistance from father

Sture Sundgren (88) had a suitable ferrite antenna and helped Hans tuning the antenna to the frequency 77.5 kHz. Only a low-power transmitter was used in the project. The cover range is only some meter.

Oscilloscope showing 77.5 kHz signal


The PIC processor

To be able to control all push-buttons and rotary encoders and to display the DCF protocol in different views, the PIC16F886 was required. The processor was purchased from Kjell & Company in Västerås during a lunch break for SEK 49. This little chip includes:

  • 8 kBytes program memory for code
  • 368 Bytes RAM memory for storing variables
  • 256 Bytes EEPROM for storing data
  • Internal clock oscillator 8 MHz
  • 24 Input/outputs
Rough strip board layout


Even though the computer was used for most of the development some design was made by pencil and paper, for example the strip-board layout.

First idea of a front panel

DCF77 Simulator

The simulator finished

Report front pageAs part of the course IL131V Basic Digital Theory with PIC-processor, a report had to presented.

Hans wrote it in Swedish.

Rapport: DCF77-simulator - med display och ljud

Some programs used during the development

PFE screen dump

Programmer's File Editor 1.01

The program code was written with PFE. The text editor requires no installation, as it is run as an exe-file.

PFE icon

Compile command from PFE

CC5X 3.4

The C-code was compiled with CC5X C Compiler for the PICmicro Devices (B Knudsen).

CC5X icon

Eagle screen dump

Eagle 5.7.0 Light

The circuit diagram was drawn in Eagle. The program is an easy to use drawing tool with the possibility to define your own components.

Eagle icon

Front Panel Designer screen dump

Front Panel Designer 4.0

The front panel was designed with the Front Panel Designer. It is possible to make cut-outs in different shapes and specify engraving with different styles and sizes. A menu command Pricing presents a detailed price specification. When the design is ready, the order is sent to Schaeffer AG in Germany by some clicks. After some weeks the front panel is delivered, exactly as drawn.

Front Panel Designer icon Price calculation Sending the front panel order

PICkit 2 Programmer


PICkit 2 icon