You are on page 1of 13

instructables

"Astronomical" Clock

by Peter Balch

It seems to be neccessary for any Maker to make a wacky di erent speed. It's powered by two AA cells which
clock which is a bit hard to read. I don't know why but should last a year. You could use the same electronics to
who am I to defy tradition? run other clocks at other speeds. It was made using
simple hand tools but you could choose 3D printing.
I like any technology from the period when people are
rst developing it. It's all experimental and slightly I think this style of display would be classed as a
weird. Medieval clocks are a good example. There are a "Wandering Hour Clock". The most similar example I can
few still in existence the weirdest of which are nd was built by Pietro Tommaso Campani in the 17th
Astronomical Clocks. And perhaps everyone's favourite century. That clock uses a di erent mechanism in which
astronomical clock is the Orloj in Prague. the hours are on a larger disc whose axis is below the
axis of the minute indicator (i.e. the reverse of my
I'd love to make an astronomial clock but it's far too layout). As a consequence, like mine, the hour numbers
complicated. What I've here made isn't an astronomical are in a strange order around the hour disc. His minute
clock but is looks a little like one. scale extends over 180° (rather than my 150°).

It uses a standard clock motor modi ed to run at a

"Astronomical" Clock: Page 1


Step 1: How It Works

The animated GIF above shows how the clock works. they stay synchronised, they are tted with teeth. You
could use internal epicyclic gears, spurs or pegs. I
In the animation, the central hand (drawn on the hour reckoned pegs were easiest to make by hand but if you
disc) starts by pointing at the 2 hour. The 2 hour arrow use a 3D printer, you may think that spurs or gears are
(drawn on the minute ring) then rotates to point at the easier.
minutes between 0 and 59 on the minute scale. When
the outer arrow reaches 60 minutes, the central hand The hour disc is powered by a clock motor that's running
points now points at the 3 hour, and so on. at half-speed. It replaces the minute hand of the clock
motor.
The inner hour disc rotates 6 times for every 5 times that
the outer ring rotates. (5 and 6 are mutually prime) The The minute ring rests on the hour disc and is suspended
inner disc rotates once every two hours and the whole by it. Gravity keeps the minute ring in the right
arrangement repeats every 12 hours. It seems unlikely orientation.
but it all works.
The minute scale has marks for 0 to 60 minutes and
The 5:6 gearing works because the inner disc is 5/6 times forms a 150° arc (i.e. 5/12 of a circle).
the diameter of the outer ring that rests on it. To ensure

"Astronomical" Clock: Page 2


Step 2: The Clock Motor

"Astronomical" Clock: Page 3


You can buy electric clock motors for very little on eBay. only need a single hand (the minute hand). The hour
You probably have a couple of unused clocks around the hand is driven by the minute hand via gears which give a
house. I buy clocks whenever I see them for £0.50 in a 12-to-1 reduction.
car-boot sale. I'm sure all those clock motors will come in
handy one day. The hour hand and minute hand revolve around the
same axis of course. For strength, I decided to glue the
A clock motor is, of course, a stepper motor plus a timing hour hand and minute hand shafts together. The "hour
circuit. Stepper motors are cool and one that runs on a disk" will be attached to both of them.
few dozen micro-Amps is even more cool.
You could just remove the intermediate wheel that
It's a special kind of stepper motor called a "Lavet-type connects the hour wheel and the minute wheel then
stepping motor". glue the hour hand shaft inside the minute hand shaft.
Both shafts will then rotate together as if driving a single
In theory, a Lavet motor only runs in one direction and minute hand. But with my clock motor, the time adjuster
pulses of alternate voltage are sent to its coil. In a typical knob rotates the intermediate wheel. So instead, I cut o
clock, there's a positive-going pulse of 50mS followed the teeth of the hour wheel using scissors and then
one second later by a negative-going pulse of 50mS. A glued the shafts together.
clock motor runs on a 1.5V cell. An AA cell will last a year
or more. (Be careful not to get glue inside the minute shaft where
the second-hand shaft goes or on the teeth. I used UHU
Remove the hands from the motor. glue.)

Open the motor and take out the gears and the rotor. Unsolder the coil wires. They're very ne and delicate. Fit
Extract the coil and the small PCB. The battery contacts the coil and the rotor back into the case. I then soldered
should come out as well. the coil wires to some thicker varnished copper wire
then glued the thicker wire to the inside of the case to
More gears will have been revealed. They form the shafts provide some strain relief.
that carry the minute and hour hands. For this clock, we

Unsolder and keep the 32768Hz crystal. see that the "hour indicator" makes half a turn every
hour. So it is equivalent to a minute hand turning at half-
We want to make the clock run at a di erent speed so speed. We need to produce a pulse every 2 seconds
we need a circuit that will produce the pulses at the right instead of every second. A simple oscillator circuit or a
rate. In this application, the motor should run at half microprocessor should work.
speed. If you look at the simulation of the clock, you'll

"Astronomical" Clock: Page 4


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 rst thought was to use a 4000 series CMOS logic chip. I built the circuit shown above using a 4069 hex inverter. The
rst 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 rst 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 gures 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 di culty 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
"Astronomical" Clock: Page 5
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 nd rst 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 over ows (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 ne with 33pF capacitors.

As I say, mine worked ne with every crystal I tried but if you have di culty, 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 di erent 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

"Astronomical" Clock: Page 6


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 e ect 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. O cial 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 ts where the AA cell used to t in the clock motor.

"Astronomical" Clock: Page 7


Download

https://www.instructables.com/ORIG/FQG/1TKW/KQS29XPA/FQG1TKWKQS29XPA.txt

Download

https://www.instructables.com/ORIG/FIH/RD1V/KQS29XM1/FIHRD1VKQS29XM1.hex

Download

https://www.instructables.com/ORIG/FQH/IU88/KQSKDTZQ/FQHIU88KQSKDTZQ.ino

Step 4: Construction

"Astronomical" Clock: Page 8


I got an electric mantel clock in a car boot sale for £1. It's The Hour Disc is a circular disk with 5 notches. It is tight
not quite as "antique looking" as I'd like but I thought it t onto the motor shaft. Because the motor shaft
was OK. consists of the minute and hour shafts glued together,
it's stepped. You'll probably nd the shaft is also slightly
I considered 3D printing the parts but decided to cut tapered at the end. I carefully drilled and led some
them out of 0.75mm polystyrene sheet. Any modeller polstyrene sheet "washers". The hole in each is just the
will tell you that polstyrene sheet is great material for right diameter to be a tight t over part of the shaft. I
building things. You glue it with polystyrene cement of glued them together and, before the glue had set,
course. pushed them onto the shaft so they were aligned.
They're then glued onto the Hour Disc making sure the
I drew the clock face I wanted using PaintShopPro then disc is exactly parallel with the motor body.
got the parts printed in a local supermarket as two 5x7"
photos. I think they look good. A PDF of a plain-paper To make the clock look more like an astronomical clock,
version of the parts is attached below. You should print it there is a "Zodiacal ring" is raised above the level of the
the size you want then make a mock-up of the clock to hour disc. It's essentially "3D decoupage". The Zodiacal
see how it all ts together and whether it looks right. ring has two pointers - they are hands like the ones on
There's also a PDF of the photos I used but you'll the Prague Orloj. The Zodiacal ring is xed to the hour
probably want to draw your own. disc of course (unlike the Orloj) but it looks like it might
be part of a complicated mechanism.
The Minute Ring is made of a front plate, spacer and
back plate. The front plate has a hole big enough to The Face Plate carries the Minute Scale. You can see
reveal the "hour-hand" of the Hour Disc. The spacer is a that I put cheeks of the Face Plate so that the Minute
ring of polstyrene sheet 3mm high; 3mm means that the Ring cannot swing far to either side. In normal
Hour Disc can move freely in it. The back plate has a hole operation, they're not needed (the Minute Ring just
big enough for the Hour Disc to t through when you're hangs under gravity) but they're useful when you're
assembling the clock. carrying the clock around.

The Minute Ring has six pegs glued on its inside. They The Back Plate is glued to the motor. The Face Plate and
mesh with the ve "V" shapes cut in the Hour Disc. Back Plate are screwed together (with a spacer) so that
the whole assembly can be taken apart.
The photo face of the minute right has 12 hour pointers
in an unusual order.

"Astronomical" Clock: Page 9


"Astronomical" Clock: Page 10
Download

https://www.instructables.com/ORIG/FK7/EUTM/KQS29X1D/FK7EUTMKQS29X1D.pdf

Download

https://www.instructables.com/ORIG/FQR/L4IW/KQS29X6F/FQRL4IWKQS29X6F.pdf

Step 5: The Future

"Astronomical" Clock: Page 11


There are lots of unusual clocks you could make with a An Earth globe that rotates once a day would be nice. I
clock motor driven by a PIC. rather like the idea of having a set of globes - one for
Earth, one for Mars and one for the phase of the Moon.
In many parts of the world there are two tides a day
separated by about 12.5 hours. A tide clock usually If you balanced an "Earth" on top of the hour shaft of a
shows the number of hours until the next high tide or clock motor it would rotate in the wrong direction. There
low tide. are several instructables about reversing a clock motor
(here, here, here). And there are videos on the web.
The moon is the major in uence of the tides so a tide
clock is simply a clock that runs slightly slow. A "synodic When I generated simple 50mS pulses from a PIC or
month" (the lunar month with respect to the line joining Arduino, the clock ran backwards. I didn't investigate
the Sun and Earth) is 29.5305888531 days. So the second how reliable that was. It's certainly an easier way of
hand on a tide clock should tick every 1.03505 seconds. reversing a clock. A low-power Lavet stepper motor that
runs in either direction sounds intriguing. I can't think
If the timer over owed every 33917 counts (rather than what I would use it for - yet.
32768) then the error will be 1.2 sec per day.
Alternatively, if you make a clock with a 1 sec tick but Perhaps you would like a "Vetinari clock" that ticks
don't increment the hand when ((n mod 97 = 0) or (n apparently at random but keeps perfect time. Several
mod 40 = 0)) then your "lunar day" clock will be accurate have been made but I can't nd one that is low-current: I
to 0.1 sec per day. (A clock crystal is typically accurate to don't want to have to change the battery every
1 or 2 seconds per day). fortnight.

Perhaps you would like a clock that shows the time of Finally, it may be possible to use an Atmega chip for this
day on Mars. A Mars day (a "sol") is about 40 minutes project but I haven't been able to nd anyone getting
longer than an earth day. So to make a Mars clock, the the supply current below 3mA while running a timer.
pulses will be at 1.02749 second intervals. Perhaps you can do better.

"Astronomical" Clock: Page 12


"Astronomical" Clock: Page 13

You might also like