UPDATE ( 17-04-2014 )
Thank you all for the very nice comments. They really mean a lot!
I've attached the file I used to laser cut the parts in a couple of different file formats, so you should be able to open at least one of them. Some of the parts are redundant because I changed the design a bit after I had it cut.
It's going to take a while for me to get a video of the machine, but in the meantime I've made this animation
The gears are all programmed to move as they do in real life, so it's pretty close to the actual thing.
My older brother turned 30 recently, and I decided I would make a special present for him.
He practices biodynamic farming, a field (no pun intended) where the phase of the Moon is considered important in deciding when to plant and harvest crops.
I figured a clock that displays the Moon's phase would be a fun thing to make for him. That would, however, be far too easy. I therefore gave myself the challenge to make a machine that would also show the rise and set times of the Moon - a Moon Machine.
This is my first instructable so please bear with me as I unfortunately forgot to take any pictures during the making of the machine. I suppose illustrations will have to make do.
Before we can get started we need to get some theory straight.
Lunar Rise And Set Times
You can get a rough estimate of the rise and set times of the Moon using the following table along with the phase of the Moon:
Because the Moon's orbit is inclined relative to the ecliptic plane, this table is only accurate if you happen to live on the equator. Otherwise we have to calculate the Moon's ecliptic longitude, that is, the angle between the Moon and the vernal equinox relative to earth.
Luckily, this is fairly easy.
The Moon's ecliptic longitude is found by simply adding the Sun's ecliptic longitude with the Sun-Earth-Moon angle (i.e. the lunar phase).
Now you have to take sine of this angle and multiply by a factor depending on your latitude. Where I live (55 degrees north) that factor is about 3 hours (See more at this link).
To get the rise time you simply add the sine function value to the value from the table above. Similarly you get the set time by subtracting the sine function form said table.
This process is fairly arduous to do by hand, but by using a couple of gears it can be automated.
Using ordinary spur gears is a fairly simple process. When you rotate one, the other one rotates by an amount proportional to the ratio of their number of teeth
b = a * Nb / Na
Planetary gears are a bit more complicated. They consist of a center gear (the sun gear) that is surrounded by several smaller "planet gears" that are in turn connected to a common base (the carrier). The entire system is surrounded by an internal gear (the annular gear). I know this is a poor explanation, but you should be able to get the picture by looking at the attached figure.
The planetary gear is governed by the following equation:
(Na + Ns) * c = Na * a + Ns * s
Where Na and Ns are the number of teeth on the annular and the sun gear respectively. a, s and c are the angles for the annular gear, the sun gear and the carrier respectively.
This means that you can use a planetary gear to add together numbers by rotating any two gears and reading the output from the third. I think that's pretty cool!