Arduino Perpetual Calendar Clock

The clock uses 2 electro mechanical clock movements controlled by an Arduino to display the Day and Month. A third quartz controlled movement displays the time tide Low or High tide.

The Calendar is fully automatic and takes into account leap years as well as summer and winter time changes.

The clock also has full Westminster chime of all 4 quarters and hourly chimes.

The clock is stand alone no Master Clock required.
It has a built in Decoder for the DCF77 “Atomic Clock”.

An Auxiliary LCD display shows time,date and also DCF77 signal and decoder information.

See my Calendar Clock web page here.

Step 1:

The clock is designed around a 12″ (300mm) English Office Dial Clock case that I picked up off Ebay with no movement.

The metal dial was stripped off, repainted and re-lettered using my own dial design

The oak dial surround was stripped back, disassembled re-glued and screwed. It was then bleached to lighten the colour.

I fitted hinges and a catch so the dial can be opened to get access to the controls/electronics inside.

fig 1&2 show the clock components mounted on the back board.

fig 3 shows the empty back box behind the dial.

fig 4 shows the 3 clock movements mounted on the back of the dial. The 30 second Day movement is bolted direct to the dial. The Month and Tide movements are mounted on bars screwed to the wooden dial surround.

This hides the fixing nuts from view.

Step 2: Connections

Chimes fig 1 adafruit Audio FX Sound Board

The clock sounds the Quarter hours and hours via an adafruit Audio FX Sound Board + 2x2W Amp

16MB of storage on the board itself, so you can store up to 15 minutes of quality compressed audio. Double that if you go with mono instead of stereo
Built in Mass Storage USB – Plug any micro USB cable into the Sound Board and your computer, you can drag and drop your files right on as if it were a USB key

Compressed or Uncompressed audio – Go with compressed Ogg Vorbis files for longer audio files, or uncompressed WAV files

High Quality Sound -44.1KHz 16 bit stereo. The decoding hardware can handle any bit/sample rate and mono or stereo

11 Triggers – Connect up to 11 buttons or switches, each one can trigger audio files to play

Stereo line out – There’s a breakout for both left and right channels, at line level, so you can always hook up to any kind of stereo or powered speaker

Five different trigger effects – by changing the name of the files, you can create five different types of triggers which will cover a large range of projects without any programming

There are 2 different chime options available for this clock

Option1 The hour chimes are recorded from a 4″ longcase clock bell and the quarter chimes from a Glockenspiel. Option 2 The hours chime is a combination of hand bells and a long case clock bell while the Qtr chime is on hand bells.

Each note has been sampled separately and then put together in Audacity to make each section of music for the chimes.
For each type there are six chime samples in total, four for each quarter and two for the hour chime. The quarter chimes are made up in sections and give a Westminster type chime.

Option 1 (Glockenspiel) see zip folder above

There are for sections

Section 1 notes FAGC Quarter Chime T01.wav

Section 2 notes CGAF Half Chime T02.wav

Section 3 notes AGFC Three Quater Chime T03.wav

Section 4 notes CGAF Full Chime T04.wav

Quarter Past the Hour plays Section1

Half Past the Hour plays Section 1 then section 2

Three Quarters past the hour plays Section 1,2 then section 3.

Full Hour plays section 1,2,3 then Section 4.

Note the full hour chime is played on 59min 49 seconds so it can play out before the hour chime starts on the hour. Mod the code at line 843 to 49 eg if ( minutes == 59 && seconds == 49 && chimepwr == 1) // allows full Westminster chime to sound before hour chime starts was 49 old chimes

The hour chime comprises of 2 samples both single chimes. The first sample lasts just under a second and then the chime is faded out at the end. Hour Short T06.wav

The second sample lasts 9 seconds and contains the full single chime as it slowly fades away. Hour Long T05.wav

In a real clock the hammer hits the bell causing it to ring. Normally it would gently fade out to nothing but if the clock strikes the bell again e.g. if it is chiming more than 1 o’clock then the bell stops fading out and rings again loudly.

To simulate this effect all but the last chime are short chimes the last 9 second chime giving the effect of the bell ringing out.

Option 2 (Hand bells) see zip folder above

There are for sections

Section 1 notes FAGC Quater Chime T01.wav

Section 2 notes CGAF Half Chime T02.wav

Section 3 notes AGFC Three Quater Chime T03.wav

Section 4 notes CGAF Full Chime T04.wav

Quarter Past the Hour plays Section1

Half Past the Hour plays Section 1 then section 2

Three Quarters past the hour plays Section 1,2 then section 3.

Full Hour plays section 1,2,3 then Section 4.

Note the full hour chime is played on 59min 47 seconds so it can play out before the hour chime starts on the hour. Mod the code at line 843 to 47 eg if ( minutes == 59 && seconds == 47 && chimepwr == 1) // allows full Westminster chime to sound before hour chime starts was 49 old chimes

The hour chime comprises of 2 samples both single chimes. The first sample lasts just under a second and then the chime is faded out at the end. Hour Short T06.wav

The second sample lasts 9 seconds and contains the full single chime as it slowly fades away. Hour Long T05.wav

In a real clock the hammer hits the bell causing it to ring. Normally it would gently fade out to nothing but if the clock strikes the bell again e.g. if it is chiming more than 1 o’clock then the bell stops fading out and rings again loudly.

To simulate this effect all but the last chime are short chimes the last 9 second chime giving the effect of the bell ringing out.

There is also a test wave file that is played when the “Test Tone Button” is pressed. This allows you to set the volume without having to wait for the clock to strike. T00.wav

Hour Chime Sequence

On the hour.

1 o’clock- long chime

2 o’clock- short chime then long chime

3 o’clock- short chime, short chime then long chime

4 o’clock- short chime, short chime, short chime then long chime. etc.

Step 3: Control Panel

Apart from the Arduino reset switch on the main board the control panel houses the switches to control the calendar clock.

See table fig 4 above for details on each switch.

Step 4: LCD Display

The clock has a 4×20 LCD display mounted on the back board.

The display is used to monitor the DCF77 library and some basic clock functions. A switch on the control panel is used to turn the display on and off and is normally left on only when the clock is opened.

The display shows the following info.
Row 1

Time and date. Note the date is in the UK format dd/mm/yyyy

Row 2

Section 1 rotates between 3 states

1 Displays the next calculated leap year

2 The quartz tuned frequency as set by the DCF77 library

3 The quartz crystal accuracy in Hz.

Note this is not the clock accuracy but the quartz crystal accuracy should the DCF77 signal be lossed. The DCF77 library auto tunes the Arduino quartz crystal frequency by comparing it to the DCF77 signal.

Section 2 time zone and summer/winter time indicator

Row 3

Section 1 Shows if the chimes have been disabled on power up. Chimes are disabled on power up as the sound board defaults to full volume on power restore. I don’t want to be woken up by full volume chimes in the middle of the night after a power cut. Chimes are enabled by pressing the “Chime On” switch on the control panel. Once on they stay on until the power cut and restored. There is a manual ” Speaker On/Off” switch on the control panel if needed.

Section 2 Displays the DCF77 library status “Sync’d”, “Locked”, “Dirty”, or “Fail”

Row 4

Section 1 Shows Signal match as a percentage. The library predicts what the signal should be and compares it to the incoming DCF77 signal.

Secton 2 Displays the status of the Month Motor logic.

Step 5: Dial

fig 1 dial with bezal ready for mounting the clock movements

fig 2 blank dial designed in Turbo Cad

The Calendar Clock dial was designed and drawn up using Turbo Cad.

The final design is then printed out on A3 Lazertran inkjet paper as a giant decal.

The original dial is first rubbed down to remove all old paint and lettering. It is then primed and painted an off white colour (white looks terrible in an old clock case). The dial decal is then applied to the blank dial and then when dry 3 coats of acrylic varnish are sprayed over the top. This makes the decal background go clear so the off white dial can be seen with the dial lettering on top.

Step 6: Day Movement Control

The day movement is a 30 second slave movement. These movements were fitted to clocks in offices and factories and were stepped once every 30 seconds by a master Clock.

I use the Synchronome movement fig 1 in this clock as it is more compact.

fig 2 & 3 Most 30 second slaves work in the same way as the larger Gent type movement.

The parts and operation are as follows .
A is the main ratchet-wheel, having 120 teeth

B the operating electromagnet

C the armature

D the armature lever

E the driving pawl, which moves the ratchet-wheel one tooth on the release of the armature

F the driving spring, which normally holds the driving pawl in engagement with the ratchet wheel, and the armature away from the electromagnet

G the back-stop lever, which prevents movement of the ratchet-wheel when the armature is attracted, as might be possible from vibration or on clocks with exposed dials – by pressure of wind on the hands

H the momentum stop, which prevents the ratchet wheel being moved more than one tooth per impulse and, with the pawl E, locks the ratchet wheel between pulses

J the stroke-limit stop, which limits the travel of the armature, and

When electromagnet B is energized by a pulse from the Master Clock, the armature C is attracted, pawl E is propelled to the right against the pressure of spring F, and drops into the next tooth on ratchet-wheel A. When the pulse ceases, spring F drives the paw! E forward, and the ratchet-wheel rotates one tooth, equivalent to a half-minute on the dial. The ‘minute’ hand is attached to the. ratchet-wheel which also drives the ‘hour’ hand through a train of gears having a reduction ratio of 12 to 1.

Operating current The operating current for the movement is 250 mA. The resistance of the electromagnets is between 7.5 and 10 ohms and they may be connected in circuit without reference to polarity.

The minute hand drive is used to indicate the day of the month. This hand is directly connected to the 120 tooth wheel driven by the clock motor ratchet.
Therefore in the original clock 120 x 30 second pulses would drive the minute hand exactly 1 hour.

fig 4 the 120 tooth wheel is enlarged and superimposed over the clock display to show how each tooth relates to the day of the month. There are a maximum of 31 days in each month so 120 teeth divided by 31 gives 3.87 teeth to move the hand 1 day segment. This clearly is not possible so the clock is designed to move the day hand 3 teeth each day. This uses a maximum of 3×31 days or 93 teeth in a month. At the end of each month extra pulses are added to move the day hand to the 1st of the month. As the number of days in each month varies the Arduino Microcontroller works out when each month ends and how many extra pulses are required to move the day hand to the 1st of the month.

fig 5 shows how many extra pulses are required to step the day hand back to the 1st from the end of each month.

This can be seen in fig 6. To move the day hand from 1 day to the next requires 3 pulses so for example at the end of a 31 day month an extra 30 pulses are sent to stop the day hand at the 1st of the month.

Step 7: Month Dial

fig 1 Month Dial

The month hand is driven by a Lavet type stepping motor.

The motor is sourced from a quartz clock movement with the quartz control board cut out. The motor requires very low current to drive it and can be driven direct from the Arduino output via a trimmer resistor. The resistor is used to adjust the current to the motor so it works without being over driven.

fig 2 The motor is driven by reversing the polarity to the drive coil which causes the permanent magnet toothed rotor (in red below) to turn 180°. The toothed rotor will continue to turn in the same direction each time the drive motor polarity is reversed.

2 output pins from the Arduino are used to pulse the drive motor with 1 pin always the opposite to the other.

The Month indicator hand is connected to the seconds cog wheel. This wheel turns once every 60 polarity changes and as there are 12 months in a year the clock motor has to be stepped 5 times (60 teeth/12months) to move the month hand 1 month on the dial.
Note the code always sends 6 pulses as the first pulse will be ignored as the polarity will not have changed. At the end of the 6 pulses both Arduino pins are set to “LOW” so no current is passed through the drive coil until the next month.

On initial setup the month hand can be controlled by 2 switches, “stepmonth 1” & “stepmonth 5”. This is a single centre off locking switch. The “stepmonth 1” switch applies single alternating pulses to the month motor once per second and is held on until the hand starts to move. If the switch is left on the month motor will continue to step until the switch is moved to the centre off position. The “stepmonth 5” switch applies 5 alternating pulses to the moth motor once per second. To use move the switch to the on position and wait for the month hand to start moving then return to the centre off position. The month hand will then advance 1 whole month then stop. To set the month hand first use the “stepmonth 1” switch to set the hand to a month then use the “stepmonth 5” switch to step whole months until the correct month is shown.

For More Details: Arduino Perpetual Calendar Clock

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top