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
Moon Machine 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.
Step 1: 1 - Theory
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!
Step 2: 2 - Design
Attached is a diagram of the machine's workings.
First we have the input. This consists of a crank that is to be turned once a day.
The input rotation of the crank is then divided by 29.53 (one lunar month) to give the phase of the Moon.
At the same time the input is divided by 365.2425 (approximate amount of days in a year) to give the current date.
The date and lunar phase are then sent to the date and phase display respectively.
The date and the lunar phase are then added together to get the lunar angle, which in turn is converted to a sinusoidal signal.
Finally we either add or subtract the sine signal from the lunar phase. This gives us the rise and set times of the moon, which are then sent to their respective displays.
This may all seem fairly complex, but I will try to explain how each of the steps work.
Step 3: 2.1 - The Date Calculator
Here you see the mechanism that divides the input by 365.2425 and then displays the date.
The crank you see in the foreground is the input. 365.2425 revolutions of this crank results in one complete revolution of the big wheel in the background. Dates are printed along the edge of this wheel, and by looking though the eye of a needle placed in front of the wheel, you are able to determine the current date.
Each of the big gears are connected to a smaller gear on the other side. More specifically, the gears are as follows:
Yellow: 14 teeth
Blue: 38 - 15 teeth
Red: 38 - 15 teeth
Green: 38 - 15 teeth
Purple: 36 - 11 teeth
Teal: 31 - 10 teeth
Light Yellow: 31 teeth
The first number is for the gears you can see and the second is for the smaller gears on the other side.
Step 4: 2.2 - The Lunar Phase Calculator
The mechanism that calculates the lunar phase is very similar, except it also includes a device that converts from one rotation axis to another (the interface between the red and the lavender gear). The purpose of this conversion is purely aesthetical.
The teeth numbers are as follows:
Yellow: 14 teeth
Blue: 38 - 10 teeth
white-ish: 34 - 10 teeth
Purple: 32 teeth
Green: 32 teeth
Red: 32 teeth
The purple, the green and the red gear all have the same number of teeth and therefore rotate at the same speed. The reason that there are three instead of one is to have the lunar display and the input to the next mechanism rotate in the right direction
Step 5: 2.3 - The Lunar Angle Calculator
We now calculate the lunar ecliptic angle. The green and the light yellow are the output from the phase and date calculators. The output from the phase calculator rotates the carrier in the planetary gear, and the date output rotates the annular gear. The planetary gear then outputs the lunar ecliptic angle through the sun gear.
Green (phase output): 40 - 10 teeth
Orange: 20 teeth
Red: 40 teeth
Blue and lavender: 20 teeth
Purple (carrier): 30 teeth
Planet gears: 10 teeth
Sun gear: 20 teeth
Annular gear: 40 inside - 50 outside teeth
Light yellow (date output): 26 teeth
Step 6: 2.4 - The Rise And Set Calculators
The sine conversion is show in the first figure. Basically one full rotation from the teal gear (ecliptic angle output) is converted into one sinusoidal period. This is then converted to back-and-forth-rotation of the brown gear, which corresponds to an offset of +- 3 hours. Teeth numbers:
Teal and green: 20 teeth:
Blue: 7 teeth
Brown: 50 teeth
In the second figure we see the calculation of the lunar rise time. The big green gear is the output from the lunar phase calculation. In this case the sun gear and the carrier acts as inputs, and the output is read off of the annular gear. The annular gear has numbers from 1 to 24 printed along the edge and the rise time can thus be read directly. The set time calculator is basically works exactly the same way, the only difference being that the sine function is offset by 180 degrees.
Green: 40 teeth
Sun gear: 20 teeth
Planet gears: 10 teeth
Annular gear: 40 teeth
Step 7: 3 - Construction
Here you see an illustration of all the different parts added together to form the machine.
As mentioned previously I forgot to take pictures of the build process, but I can tell you it involved a lot of time and a whole lot of super glue.
I experimented with a couple of different materials to make the machine from. In the end I decided to use 3mm plywood. I choose this because it looks nice and is easy to cut to shape. I got a friend of mine to cut out all the parts using a laser cutter he had access to at the time.
The bearings for the cogs were made from steel rods inserted into brass tubes. This interface between brass and steel creates a consistent and fairly low amount of friction. This combination is used in many wrist watches for the same reasons.
I unfortunately do not have a lathe at hand to make spheres with, so I ended up making the phase display from an old roll-on deodorant, which worked surprisingly well.
I've attached an animated max file of the complete machine that you can play around with, provided you have 3ds Max 2013.
Step 8: 4 - Closing Thoughts
And there you have it. The completed Moon Machine!
I've attached a bunch of photos so you can get a good look of the machine. It basically looks the same as the 3D model, but in my opinion, much prettier.
Because the machine doesn't take into account the elliptical nature of the Moon's orbit, it's is not as precise as I would have liked. After running the machine for six months the average deviation from actual rise and set times seems to be about 30 minutes, with the absolute extreme being 1.5 hours.
Were I to create another one of these machines, there are some things about the design that I would most likely change:
First of all - While plywood looks pretty good, it's far too brittle in the scale I used it in. I had several gear teeth break on me, and they were very bothersome to replace. I would like to have the made the gears out of brass, but that would complicate the cutting process tremendously.
Secondly - Because the Moon's ecliptic longitude is a linear function of time, the center planetary gear that calculates it could be replaced by a simple gear train. This would most likely increase the accuracy because the laser cut gears exhibit a good deal of slip.
Finally - Accuracy could be increased by a considerable amount by accounting for the elliptical nature of the Moon's orbit. This could be accomplished by using elliptical gears, but making those would most likely be an entire project in itself!
In closing I would like to thank you reading this instructable, I sincerely hope you enjoyed it and are able to find inspiration from it.