Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

12" Electro mechanical calendar & tide clock

Not open for further replies.


I have almost completed the basic design and look of my calendar & tide clock. This will be driven by my master clock.



The enclosed pic is a mockup with the dial printed on paper and the hands laid on the dial. I may change the hands depending on what I can get/what I can file off.

The days are displayed using the min hand of a 30sec movement. The hand steps 120 times per revolution and will require 3 pulses at midmight to step to the next day. At the end of the month it will require 30,31,32 or 33 pulses to set it back to 1 depending on the month/leap year.

The month is displayed using a standard quartz movement with the quartz driver cut out so I can step it using pulses. The second hand is used and at the end of each month will need to be pulsed 5 times to step to the next month.

The tide is displayed using a tide only movement so can be driven from the 1 sec master pulse with the quartz driver cut out as the month movement above. Most tide only clocks include the seconds hand but I may leave this out on the final design.

I have most of the parts now and will build the clock and run it manually until I figure out how to link the day & month into my master. The month should not be a problem as I can configue it to step when the days have reached the end of the month. The days will be the biggest problem as they vary each month/year.

I will be interested to hear if anyone has a circuit that can do these calculations using logic or PICs.


    119.1 KB · Views: 726
Hi Brett

See your off again creating!!

Like the project as it's similar to something I was looking at.

I'm not sure if I can help as my project differs slightly from yours, I have more hardware in mine.

I have a GPO. master clock that I use to send a 30 sec pulse to a GPO. 24hr programmer the 24 hr pulse is then sent to a modified 30 sec slave movement.I took out the 120 toothed wheel and put in a 31 toothed wheel this then as you would imagine gives me enough hardware for a calender.

Now like you I wasn't quite happy with having to alter the date manually so with extensive help from a friend who wrote software for a PIC. to do all the date changes automatically. (cheers E.:))

The PIC. has to be programmed with a start date and takes care of all the different days in the month and also the leap year, It goes on a 4 yearly cycle.

The PIC. circuit would sit between the 24hr programmer and the 31 toothed slave.It receives one pulse every 24 hours and then does all the calculations.The PIC. then send the required pulses to the slave giving the required extra pulses where required.

My Pic could be used to suite your needs but would require the 24hr pulse from a logic circuit and your slave needs to be altered.

I'm no expert on PIC's so would be the wrong person to ask for advice.I can help you with the softwhere.

It would be interesting to see a logic circuit also.



Hi Mark.
Your PIC software sounds very interesting. Maybe I could mod it to work my day indicator?

Would it be possible to get a copy of the pic software? I am completely new to pics so it would be nice to have something to work from.

I use Turbo Cad to draw my dials and then tranfer then to metal dials using Lazertran paper. You could prob draw each Roman numeral in a cad package to make a custom set. In Turbo cad I think you can scale fonts to make them any dimension you want. I presume you can get Roman fonts?



New Member
I would do it with a PIC.

The software in the PIC would need to know the current date (month/day/year) so it can calculate days per month and leap years, so you'll need buttons or some kind of input to set this. You'll need some way to synchronize the hands with the stored date in the PIC as well, perhaps a button that resets the PIC to January 1 and then you press the buttons to step the hands to 1/1, or add some kind of "home sensor" to the hands so the PIC can "know" when they reach the 1/1 position.

From reading your master clock thread, it has a 1 second pulse and a 24 hour pulse, right?

Feed the 1 second pulse directly into your tide clock movement. The 24 hour pulse would go into the PIC to trigger the new day change. When the PIC receives the 24 hour pulse, it would increment the day of the month and advance the day hand on the dial. If a new month begins, the PIC would advance the month hand and (for months < 31 days) advance the day hand back to 1.

To save power, you could have the PIC sleep until it receives the 24 hour pulse. You'll probably want a button cell backup to keep the PIC's memory alive during power outages, or use a PIC that has a data EEPROM and store the current date in there.

Another idea: you said the day movement has 3 steps per day, right? You could advance the hand one step every 8 hours, that way it gradually advances toward the following day instead of stepping suddenly at midnight. To do that you'd need something other than a 24 hour pulse controlling the movement.
Last edited:


Thats right my master outputs 1 second and 24 hours pulses. My tide clock will work fine with the 1 second master clock pulses and I'm sure it would be easy to pulse the month display.

It is the day display that is the tricky one and I think you are right a PIC is the ideal device for it.

I will build the setting switches now so I can use the calendar manually until I get the clock working in auto mode.
I want to keep the days hand stepping 3 pulses at midnight as it will look a bit odd 1/3 then 2/3 past the day if pulsed every 8 hours.

Part of the reason for using a 30sec clock movement is the lack of "backlash" on a large 12" dial compaired to a quartz movement. A quartz movements hand will slip backwards before the 12 oclock position then slip forwards after the 12 oclock position and will not indicate a precise number.

I will build battery backup into my master using a 12v battery. I have a 6v battery backup system built with help from members of this forum but my master needs just more voltage than the battery can supply so I am going to have to mod it to work off a 12v battery.


New Member
For the year you don't really have to set the actual year (e.g. 2009). Instead you could set it to "number of years since the last leap year" (0-3). Every year it would increment, and wrap to 0 after 3, and if it's 0 it's a leap year. A little trickier to set initially, but simpler to code and maintain. Store it in a PIC's data EEPROM and you may never have to change it again, even if you disconnect the clock for a period of time. You could even set it when you flash the firmware into the PIC, so it'll come up with the correct year/leap year status already.

In fact, if you store the entire date in the EEPROM, the entire thing could be powered down during a power failure (except for the tide clock), and still keep the correct date as long as it has power when the midnight pulse happens. Flash the date into the chip when you program it and you won't need date setting buttons, just a way to synchronize the hands (maybe just set them by hand).

Depending on how much current your midnight pulse can produce, and how long it stays on, you could conceivably power the calendar hands entirely from the midnight pulse. Midnight pulse appears, PIC powers up, advances date, moves hands, and then when the midnight pulse turns back off, the clock goes back to sleep. You'll have minimal power consumption that way.
Last edited:


Well-Known Member
Most Helpful Member
I would suggest that a microcontroller of some kind would be required for your project. Are you able to program pic chips? If so, I would be happy to help write the code that is required. Do you have any programming experience?



Thanks for the replies.
When not stepping the drive motors will not take any current so the only current will be from the PIC circuit. I will supply power to PIC and quartz motors from the Master clock. The 30 sec clock takes max 500mA so this will come from the power supply that drives my slaves and electro mechanical chime.

Thanks for the offer. I am just waiting on a email from someone who has some software already written for pics to do just this. If this option is no good I would gladly like some help writing the code.
I must warn you I have only very basic skills in programing (basic)so I would be learning as I go along.
I have a working Junebug kit so I can program PICs physically if not mentally.

The actual clock case is almost complete. I got an old 12" Oak dial clock surround off ebay and have built a back box in Oak to match. I have bleached the Oak surround to make it a bit lighter and have cut in a new brass bezel and dial blank.

I should have the new dial painted and "lettered up" over the weekend ready for the clock control switches to be mounted. Once the new hands have been cut & filled to shape I will be ready to start thinking about the electronics in detail.

I'll post a picture when this stage is complete.

Bill Yeah I know. May order the remaining parts when I get the switches for my latest project.



Well-Known Member
You do beautiful work. :)

I would suggest putting the whole PIC controller INSIDE the calendar clock. That would be a level of elegance fitting the calendar design itself. ie you just connect it to your main clock wiring at it is a fully self contained calendar device.

That would require a little thought as to the construction etc. It could easily be a low power device and only needs a couple mA aervage to keep it running, but you need a way to set the day/month/year etc.

It might be best to decide on a spec for the construction and the method of setting it, then make the PIC controller side to suit that spec.


Thanks Mr RB.
I agree the PIC controller should sit inside the calendar clock. I'll run the power and pulse feeds from the master. I have a junction box under the floor so I can get to the pulses without disturbing my master.

I have been sent some code for the PIC from a very kind person. I can't share it with the forum as it is copyright but it is not far off what I need.

As for power the day display will need max 500mA for .5 sec once a day and then 15 seconds once a month again at max 500mA as it steps round to day 1 from 28, 29, 30 or 31. The month will need 5 pulses once a month to drive a quartz motor & the tide clock will require the power for a normal quartz clock.



Well-Known Member
Almost all modern PICs have a second oscillator designed to run a 32,768Hz crystal. Normally that'll make TIMER1 overflow every 2s, but there are many tricks to get it to overflow every second. Same trick should work for every 0.5s

If you stick with an 18F PIC you may find Swordfish BASIC makes it very easy to write programs.

Sidenote, the second oscillator can wake the PIC up from sleep on overflow so power consumption is very very low.
Last edited:


New Member
He has a master clock already so he won't need a 32k crystal in the calendar unit. Just set the calendar PIC to sleep and wake when it receives a pulse from the master. When it wakes, it sends whatever pulses it needs to move the appropriate hands and then goes back to sleep.

That way the PIC in the calendar is asleep for 24 hours at a time and drawing almost no power.

You would only need 1 input pin to receive the 24 hour pulse, and 2 output pins to control the month and day hands. Add a couple buttons for setting the date (also set to wake up the PIC when pressed), and you could do it with a cheap 8-pin PIC12 series. Use one with an EEPROM to store the current date, and you could wire the thing to power the PIC down completely (not even asleep, 0 power) when it's idle.

Are you going to make it possible to move the hands manually, in order to set them to match the date stored in the PIC? If not, you'll need to write some code to allow you to move the hands a step at a time with a button to synchronize them with the date stored in the PIC. Or better yet, set them intially to the 1/1 position, then use a button to set the date and use the hands to tell you what date you're set to. Once it's set, the hands will be on the current date, and the PIC will know the current date.
Last edited:


Well-Known Member
I see. Hmm just thinking aloud, if it only wakes up once a day when you program it you could save the date in EEPROM. You'd have to install in 24hrs.

I'd also update the EEPROM once a day incase of a power fail.


The 30 second slave used for the day indicator can be stepped manually via the armature. If you want a quick set you can hold down the armature and spin the main drive cog by hand. This way the day hand can be spun a whole month in a couple of seconds. There is no easy way of turning it backwards but as there is only 1 hand this is not a problem.

The month indicator uses the seconds drive of the quartz movement so I will use a double pole toggle to step the hand around the same as on my Regulator.

I plan to set the date on the PIC then match it manualy on the calendar.


Well-Known Member
Nah you have to think more like a PIC guy and less like a clock guy... ;)

Put some buttons on the back of the unit, say one button for each clock mechanism you need to step.

Then get the PIC to auto-step the mechanisms, probably with 2 speeds so single presses of the button makes a single step, and holding the button down steps it quickly to quickly position the hands.

But I don't think you've addressed the main issue of operation... Assuming the unit updates itself properly in operation;

1. how do you set the initial calendar day month year etc as stored in the PIC eeprom?
2. how do you know that the PIC eeprom has the correct data stored at any time?
3. how do you fix the stored data if the unit experiences a fault, power outage etc?

As a worst case you could do this;

1. you program in the calendar/tide settings on the day you activate it
2. you would know if something is wrong at each month end/leap year etc if the calendar fails
3. it's never gonna fail because your Julian calendar/tide map etc was alll perfect in every way the first time you programmed it and it will never get a broken wire or power outage

These are all pretty poor solutions.

A more pro solution would be to put a little numeric display on the back of the device that with a button press would show you the hour/day/month/year etc. This would also make it easier to set the internal settings if/when they need to be changed updated etc. But that might be too complex.

Like every design there might be a clever intermediate solution.


I have decided to use remove the seconds hand from the Tide clock as it makes it look too modern. As it now only uses 1 hand the tide hand it can be set from the back by turning the hand. The tide is programed in the gearing so I don't have to worry about it.

The 30 second movement is not designed for rapid pulsing. In the exchanges where I used to work when the slave clocks had to be set forward for summer time an advance switch was thrown on the master and all the clocks in the building would step forward 30 seconds increments every second. In winter when the clocks go back a retard switch was thrown so all the slaves just stop until an hour later the correct time is reach and the retard switch was released.

If I was making a clock with 30 sec movements and a PIC I would step it 122 times for summer and stop it 60 x 1 sec pulses for winter. Fine if you have a large building with hundreds of clocks where the movements are sealed in dust proof cases high up on walls. In my case with 1 calendar clock with a flip open main dial which has a mechanical button already built in the armature and a rapid set in the main drive wheel which is far faster then any pulse drive from a PIC. My master mimics the old method and has advance and retard switches to set my 2 30 sec slaves.

The code I have been given stores a programmed date in the PIC so all I do on first setting is set the clock hands manually then power up the PIC and wait for a midnight pulse.

I like the idea of the numeric display in the back but I feel that will have to wait untill the "simple solution" works.


The case is now complete and all the movements have now been fitted. I am still waiting for the main day indicator hand but have moded an old hour hand for now. The movement for the day hand needs spacing back a bit as it sits too far forward from the dial.

The 2 quartz movements have been moded ready for the PIC circuit and switches. The tide clock is running off quartz for now and is set to show the tide at Middleton on Sea Sussex.

I'm off now to read up on PICs. The basic code I have is for a 16F628A but my Junebug works with a 18F1320 so I'm hoping there is not too much to change.

Enclosed a few photos of the calendar clock in rough position in my hall.

The longcase clock in one of the pictures is where my master driven electro-mechanical chime is hidden(the longcase clock chime is disabled).



  • Cal02.jpg
    65.9 KB · Views: 262
  • Cal03.jpg
    63.7 KB · Views: 243
  • Cal01.jpg
    51.7 KB · Views: 148
Last edited:
Not open for further replies.

Latest threads

EE World Online Articles