Introduction: "Astronomical" Clock
It seems to be neccessary for any Maker to make a wacky clock which is a bit hard to read. I don't know why but who am I to defy tradition?
I like any technology from the period when people are first developing it. It's all experimental and slightly weird. Medieval clocks are a good example. There are a few still in existence the weirdest of which are Astronomical Clocks. And perhaps everyone's favourite astronomical clock is the Orloj in Prague.
I'd love to make an astronomial clock but it's far too complicated. What I've here made isn't an astronomical clock but is looks a little like one.
It uses a standard clock motor modified to run at a different speed. It's powered by two AA cells which should last a year. You could use the same electronics to run other clocks at other speeds. It was made using simple hand tools but you could choose 3D printing.
I think this style of display would be classed as a "Wandering Hour Clock". The most similar example I can find was built by Pietro Tommaso Campani in the 17th century. That clock uses a different mechanism in which the hours are on a larger disc whose axis is below the axis of the minute indicator (i.e. the reverse of my layout). As a consequence, like mine, the hour numbers are in a strange order around the hour disc. His minute scale extends over 180° (rather than my 150°).
Step 1: How It Works
The animated GIF above shows how the clock works.
In the animation, the central hand (drawn on the hour disc) starts by pointing at the 2 hour. The 2 hour arrow (drawn on the minute ring) then rotates to point at the minutes between 0 and 59 on the minute scale. When the outer arrow reaches 60 minutes, the central hand points now points at the 3 hour, and so on.
The inner hour disc rotates 6 times for every 5 times that the outer ring rotates. (5 and 6 are mutually prime) The inner disc rotates once every two hours and the whole arrangement repeats every 12 hours. It seems unlikely but it all works.
The 5:6 gearing works because the inner disc is 5/6 times the diameter of the outer ring that rests on it. To ensure they stay synchronised, they are fitted with teeth. You could use internal epicyclic gears, spurs or pegs. I reckoned pegs were easiest to make by hand but if you use a 3D printer, you may think that spurs or gears are easier.
The hour disc is powered by a clock motor that's running at half-speed. It replaces the minute hand of the clock motor.
The minute ring rests on the hour disc and is suspended by it. Gravity keeps the minute ring in the right orientation.
The minute scale has marks for 0 to 60 minutes and forms a 150° arc (i.e. 5/12 of a circle).
Step 2: The Clock Motor
You can buy electric clock motors for very little on eBay. You probably have a couple of unused clocks around the house. I buy clocks whenever I see them for £0.50 in a car-boot sale. I'm sure all those clock motors will come in handy one day.
A clock motor is, of course, a stepper motor plus a timing circuit. Stepper motors are cool and one that runs on a few dozen micro-Amps is even more cool.
It's a special kind of stepper motor called a "Lavet-type stepping motor".
In theory, a Lavet motor only runs in one direction and pulses of alternate voltage are sent to its coil. In a typical clock, there's a positive-going pulse of 50mS followed one second later by a negative-going pulse of 50mS. A clock motor runs on a 1.5V cell. An AA cell will last a year or more.
Remove the hands from the motor.
Open the motor and take out the gears and the rotor. Extract the coil and the small PCB. The battery contacts should come out as well.
More gears will have been revealed. They form the shafts that carry the minute and hour hands. For this clock, we only need a single hand (the minute hand). The hour hand is driven by the minute hand via gears which give a 12-to-1 reduction.
The hour hand and minute hand revolve around the same axis of course. For strength, I decided to glue the hour hand and minute hand shafts together. The "hour disk" will be attached to both of them.
You could just remove the intermediate wheel that connects the hour wheel and the minute wheel then glue the hour hand shaft inside the minute hand shaft. Both shafts will then rotate together as if driving a single minute hand. But with my clock motor, the time adjuster knob rotates the intermediate wheel. So instead, I cut off the teeth of the hour wheel using scissors and then glued the shafts together.
(Be careful not to get glue inside the minute shaft where the second-hand shaft goes or on the teeth. I used UHU glue.)
Unsolder the coil wires. They're very fine and delicate. Fit the coil and the rotor back into the case. I then soldered the coil wires to some thicker varnished copper wire then glued the thicker wire to the inside of the case to provide some strain relief.
Unsolder and keep the 32768Hz crystal.
We want to make the clock run at a different speed so we need a circuit that will produce the pulses at the right rate. In this application, the motor should run at half speed. If you look at the simulation of the clock, you'll see that the "hour indicator" makes half a turn every hour. So it is equivalent to a minute hand turning at half-speed. We need to produce a pulse every 2 seconds instead of every second. A simple oscillator circuit or a microprocessor should work.
Step 3: The Electronics
A typical "quartz clock" runs for a year on an AA cell. It would be nice for the new clock to do the same. Perhaps we need two AA cells to give 3V to power a processor but we want the current to be 100uA or less so they last a long time. An AA cell holds 1000mAh of charge; a year is 8760 hours; so that's 1/8760 amps which is 114uA.
The 32768Hz crystal that we unsoldered from the clock motor could be used as the basis of the timer circuit. "Clock crystals" often keep better time than the crystal you get in an Arduino.
My first thought was to use a 4000 series CMOS logic chip. I built the circuit shown above using a 4069 hex inverter. The first part is a 32768Hz oscillator using the clock crystal. The second part is an approximately 13kHz oscillator which is prematurely reset by the output from the first oscillator. The whole thing runs at exactly 16384Hz. I planned to use it to drive the little pcb taken out of the clock; the little pcb includes a divide-by 32768 counter and a pulse generator.
The oscillator worked well but I couldn't get the current consumption below 3mA.
An Arduino could do the job but, once again, it's hard to get low power consumption. You start with an Arduino Pro Mini (i.e. it doesn't have a USB chip) and unsolder the LED. Then you program it to be in one of the low-power "sleep" modes. Here are some figures for an Atmega328:
- Normal running: 15.5 mA
- SLEEP_MODE_IDLE: 15 mA
- SLEEP_MODE_ADC: 6.5 mA
- SLEEP_MODE_PWR_SAVE: 1.62 mA
- SLEEP_MODE_EXT_STANDBY: 1.62 mA
- SLEEP_MODE_STANDBY : 0.84 mA
- SLEEP_MODE_PWR_DOWN : 0.36 mA
The difficulty is that we want a Timer running so that we can produce accurate pulses every 2 seconds. The only sleep modes that leave a Timer running use at least 1.62mA. Arduinos are not very good at low power. Perhaps we can use an external clock chip to wake it up from "Power Down" mode? No. The power consumption would still be at least three times too much. An ATTiny is not much better.
If you look at chatrooms, the typical answer to "I want an accurate clock" is "just buy an RTC chip like the DS1307". The DS1307 uses well under 1uA and it can produce a 1Hz pulse. Sounds great.
But what do you do with that 1Hz pulse? You still need to make the positive/negative 0.5Hz pulses that a clock motor needs. So you need some more circuitry which will take more power.
Finally we come to PIC chips. I'm a much bigger fan of Microchip than Atmel. Of course there's a PIC chip that can do it. There's always a PIC chip that can do what you want.
I chose a PIC 12F629. It's the one I happened to find first in my box of PICs. I guess any of the small PICs would do instead - it might not even need changes to the code.
The PIC circuit is shown above.
The PIC processor runs using its 4MHz internal oscillator but spends most of its time asleep. Timer1 uses an external oscillator: the 32768Hz crystal from the clock motor. Whenever Timer1 overflows (every 2 seconds), the PIC wakes up and calls an interrupt. The interrupt produces a pulse in the motor coil then returns to the "main program". The main program goes back to sleep.
The total average power consumtion when it's driving the clock coil is around 50uA. It needs two AA cells and they'll last a year. Great!
The Timer1 oscillator is "low power" - it drives the crystal with a low current. Clock crystals need a lower current drive than you would normally use on, say, a processor crystal. I tried the PIC circuit with a few 32kHz crystals and they all worked fine with 33pF capacitors.
As I say, mine worked fine with every crystal I tried but if you have difficulty, here are some hints. Clock crystals use much less power than a standard crystal. If you over-drive the crystal it might not oscillate or might oscillate in the wrong mode at the wrong frequency. If your crystal doesn't work, you could try different capacitors or put a resistor is the lead of the crystal. Microchip have an application note "AN949 Making Your Oscillator Work". (it's claimed that R1 in Figure 4 is wrong). A 220k resistor for might be the right value. There's a useful application note about Timer1.
I've attached the hex and the assembler for the PIC code I used.
In my code, the initialisation sets up timer 1 (shown here in pseudocode):
Option(0x8F) STATUS = 0 bTMR1ON = false ; Timer1 is NOT incrementing TMR1H = 0 ; TIM1H:TMR1L = 0 gives 2 second TMR1L = 0 INTCON = 0<br>PIE1 = 1 ; Enable TMR1 Interrupt PIR1 = 0<br>bPEIE = true ; Enable Peripheral Interrupts bGIE = true ; Enable all Interrupts T1CON = 0x0E ; Enable T1 Oscillator, Ext Clock, Async, prescaler = 1 bTMR1ON = true ; Turn Timer1 ON CMCON=7 ; lowest power GPIO_1=false GPIO_2=false
The main program is simply a loop which says
while (true) SLEEP
And the interrupt handler produces alternate positve and negative pulses
bTMR1IF = false ; Clear Timer1 Interrupt Flag //TMR1H = 0x80 ; for 1 sec overflow //TMR1H = 0xC0 ; for 1/2 sec overflow. b = not b if b then Pulse(GPIO_1) ; positive pulse else Pulse(GPIO_2) ; negative pulse endif
So the remaining question is: what shape is a pulse?
A typical clock circuit produces a positive-going pulse of 50mS followed one second later by a negative-going pulse of 50mS. Each pulse is 1.5V.
If you simply connect the coil to a PIC or Arduino and produce those pulses, the clock goes wrong. The problem seems to be that Lavet stepper motors are sensitive to the pulse current and width. The current in the coil from a 3V battery to twice as big as it should be. In my case, the clock ran backwards.
I tried shortening the pulse but the clock either ran backwards or it stopped.
Putting a resistor in the coil lead worked well. The coil resistance is 233ohm and a 220ohm resistor roughly halved the current. The clock then behaved properly.
But resistors waste power so I chose to use PWM. The "pulse" is replaced by a 50% pulse train about 30mS long.
for a=1 to 70 pin=true Delay 200uS pin=false Delay 200uS next
That has the effect of halving the current without wasting any power. The clock motor seems happy with it.
(I've included an Arduino sketch so you can play with it but I recomend using a PIC. If you don't have a PIC programmer, you can build one with an Arduino but why bother - a PicKit programmer is around £10. Official Microchip programmers are more expensive but Microchip publish the circuit and code so anyone can build them. Clone prgrammers on eBay are cheap and almost as good.)
I built the PIC circuit on a small piece of stripboard. It fits where the AA cell used to fit in the clock motor.
Step 4: Construction
I got an electric mantel clock in a car boot sale for £1. It's not quite as "antique looking" as I'd like but I thought it was OK.
I considered 3D printing the parts but decided to cut them out of 0.75mm polystyrene sheet. Any modeller will tell you that polstyrene sheet is great material for building things. You glue it with polystyrene cement of course.
I drew the clock face I wanted using PaintShopPro then got the parts printed in a local supermarket as two 5x7" photos. I think they look good. A PDF of a plain-paper version of the parts is attached below. You should print it the size you want then make a mock-up of the clock to see how it all fits together and whether it looks right. There's also a PDF of the photos I used but you'll probably want to draw your own.
The Minute Ring is made of a front plate, spacer and back plate. The front plate has a hole big enough to reveal the "hour-hand" of the Hour Disc. The spacer is a ring of polstyrene sheet 3mm high; 3mm means that the Hour Disc can move freely in it. The back plate has a hole big enough for the Hour Disc to fit through when you're assembling the clock.
The Minute Ring has six pegs glued on its inside. They mesh with the five "V" shapes cut in the Hour Disc.
The photo face of the minute right has 12 hour pointers in an unusual order.
The Hour Disc is a circular disk with 5 notches. It is tight fit onto the motor shaft. Because the motor shaft consists of the minute and hour shafts glued together, it's stepped. You'll probably find the shaft is also slightly tapered at the end. I carefully drilled and filed some polstyrene sheet "washers". The hole in each is just the right diameter to be a tight fit over part of the shaft. I glued them together and, before the glue had set, pushed them onto the shaft so they were aligned. They're then glued onto the Hour Disc making sure the disc is exactly parallel with the motor body.
To make the clock look more like an astronomical clock, there is a "Zodiacal ring" is raised above the level of the hour disc. It's essentially "3D decoupage". The Zodiacal ring has two pointers - they are hands like the ones on the Prague Orloj. The Zodiacal ring is fixed to the hour disc of course (unlike the Orloj) but it looks like it might be part of a complicated mechanism.
The Face Plate carries the Minute Scale. You can see that I put cheeks of the Face Plate so that the Minute Ring cannot swing far to either side. In normal operation, they're not needed (the Minute Ring just hangs under gravity) but they're useful when you're carrying the clock around.
The Back Plate is glued to the motor. The Face Plate and Back Plate are screwed together (with a spacer) so that the whole assembly can be taken apart.
Step 5: The Future
There are lots of unusual clocks you could make with a clock motor driven by a PIC.
In many parts of the world there are two tides a day separated by about 12.5 hours. A tide clock usually shows the number of hours until the next high tide or low tide.
The moon is the major influence of the tides so a tide clock is simply a clock that runs slightly slow. A "synodic month" (the lunar month with respect to the line joining the Sun and Earth) is 29.5305888531 days. So the second hand on a tide clock should tick every 1.03505 seconds.
If the timer overflowed every 33917 counts (rather than 32768) then the error will be 1.2 sec per day. Alternatively, if you make a clock with a 1 sec tick but don't increment the hand when ((n mod 97 = 0) or (n mod 40 = 0)) then your "lunar day" clock will be accurate to 0.1 sec per day. (A clock crystal is typically accurate to 1 or 2 seconds per day).
Perhaps you would like a clock that shows the time of day on Mars. A Mars day (a "sol") is about 40 minutes longer than an earth day. So to make a Mars clock, the pulses will be at 1.02749 second intervals.
An Earth globe that rotates once a day would be nice. I rather like the idea of having a set of globes - one for Earth, one for Mars and one for the phase of the Moon.
If you balanced an "Earth" on top of the hour shaft of a clock motor it would rotate in the wrong direction. There are several instructables about reversing a clock motor (here, here, here). And there are videos on the web.
When I generated simple 50mS pulses from a PIC or Arduino, the clock ran backwards. I didn't investigate how reliable that was. It's certainly an easier way of reversing a clock. A low-power Lavet stepper motor that runs in either direction sounds intriguing. I can't think what I would use it for - yet.
Perhaps you would like a "Vetinari clock" that ticks apparently at random but keeps perfect time. Several have been made but I can't find one that is low-current: I don't want to have to change the battery every fortnight.
Finally, it may be possible to use an Atmega chip for this project but I haven't been able to find anyone getting the supply current below 3mA while running a timer. Perhaps you can do better.