Professional Documents
Culture Documents
"Astronomical" Clock: Instructables
"Astronomical" Clock: 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°).
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
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
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:
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 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.
Option(0x8F)
STATUS = 0
bTMR1ON = false ; Timer1 is NOT incrementing
TMR1H = 0 ; TIM1H:TMR1L = 0 gives 2 second
TMR1L = 0
GPIO_1=false
GPIO_2=false
while (true)
SLEEP
And the interrupt handler produces alternate positve and negative pulses
b = not b
if b then
Pulse(GPIO_1) ; positive pulse
else
Pulse(GPIO_2) ; negative pulse
endif
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.
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
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.
https://www.instructables.com/ORIG/FK7/EUTM/KQS29X1D/FK7EUTMKQS29X1D.pdf
Download
https://www.instructables.com/ORIG/FQR/L4IW/KQS29X6F/FQRL4IWKQS29X6F.pdf
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.