Occasionally, you may find office or station clocks available at a great discount. To maintain uniform time display within an organization, like the railway system, and to avoid issues related to daylight saving changes or battery replacements, these clocks are usually synchronized to a clock pulse network driven by a master clock or radio signal. The master clock emits a pulse every minute, with alternating polarities for successive pulses. When using such a clock, precision is essential. The circuit described here ensures accurate timekeeping and offers the following features:
- It is synchronised to the DCF77 time reference signal at 77.5 kHz (from Mainflingen, Germany) so the time is always correct;
- It is inexpensive – by using a microcontroller (in this case a PIC16F648A), the circuit requires only a few components, and it can easily be assembled on a piece of perfboard;
- It generates pulses at one-minute intervals with alternating polarity;
- It also shows the time and date on an alphanumeric LCD module;
- Automatic switching between winter and summer time;
- Time data is backed up in case of power failure (stored in PIC EEPROM).
When using a clock of this sort, note that some models have jumpers that can be fitted or removed to configure the clock for different working voltages. If you have this type of clock, select the lowest voltage (usually 24 V). Based on the author’s experience, clocks from the Dutch PTT (former postal and telecommunication authority) also work OK at 12 V.
Schematic and Components
Figure 1 illustrates the hardware schematic, centered around a PIC16F648A microcontroller operating at 4 MHz. A standard two-row LCD (HD44780 compatible) is connected for displaying operational instructions or date and time. The circuit operates on a DC voltage range of 9 to 18 V supplied by an AC mains adapter. A voltage regulator (IC2) produces a stable 5V supply for the electronics. The TI4427A MOSFET driver IC, connected directly to the clock coil, handles clock movement.
Clock Coil Operation and Decoupling
The TI4427A MOSFET driver IC has an operating range of 4.5 to 18V and a maximum output current of 500mA (1.5A peak), usually sufficient for most clocks. Additional current can be achieved by adding a transistor or relay to the output stage. The clock coil, characterized by high inductance, is thoroughly decoupled with several ceramic capacitors (C1–C4) and an electrolytic capacitor (C5).
Time Reference Signal: DCF77 Receiver/Decoder Module
A DCF77 receiver/decoder module from Conrad Electronics (p/n 641138) provides the time reference signal. It is powered by the 7805 voltage regulator and connected to port RA4 of the microcontroller. For optimal reception, especially in metal enclosures, the DCF module is recommended to be housed in a separate plastic box, placed a distance away from the clock.
Software Implementation: Functionality and Operator Interface
The source code, developed in Flowcode 3 Pro, is available for free download on the Elektor website. It is based on the software for the EBlocks DCF clock published in the December 2007 issue (075094-11). The software has been adapted and extended to generate a pulse signal on ports B6 and B7, alternating polarity every minute.
Pushbutton Switch S1: Operator Functions
The pushbutton switch S1, connected to port A1, serves various functions:
- During power-on without S1 pressed, a warm start occurs, retaining saved analog time and polarity from EEPROM after power failure.
- Power-on with S1 pressed executes a cold start, essential for the initial circuit use.
- Pressing S1 during normal operation displays variables ‘a_hrXX’ and ‘a_minuteXX,’ enabling analog clock setting.
- For clocks lacking manual setting, holding S1 during power-on generates clock pulses for synchronization. Release S1 when the analog clock reaches 12 o’clock.
- For manually set clocks, set it to 12 o’clock and power on the circuit with S1 held pressed. Release S1 upon LCD displaying ‘cold start… done.’ Proper DCF signal reception aligns the analog clock with the digital clock within minutes. In case of a one-minute difference between analog and LCD time, swap the two leads within the minute for correction.