Introduction: The Moon Machine

Picture of The Moon Machine

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.

Step 1: 1 - Theory

Picture of 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:

  • New Moon Rise: 06:00 Set: 18:00
  • Young Cresent Rise: 09:00 Set: 21:00
  • First Quarter Rise: 12:00 Set: 24:00
  • Waxing Gibbous Rise: 15:00 Set: 03:00
  • Full Moon Rise: 18:00 Set: 06:00
  • Waning Gibbous Rise: 21:00 Set: 09:00
  • Last Quarter Rise: 24:00 Set: 12:00
  • Old Cresent Rise: 03:00 Set: 15:00

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.

Planetary Gears

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

Picture of 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

Picture of 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

Picture of 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

Picture of 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.

Teeth numbers:

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

Picture of 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.

Teeth numbers:

Green: 40 teeth

Sun gear: 20 teeth

Planet gears: 10 teeth

Annular gear: 40 teeth

Step 7: 3 - Construction

Picture of 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

Picture of 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.



Karroo Oakey (author)2015-09-16

Hi,does the orange gear in the center mesh with the green and red gear?


Karroo Oakey (author)2015-09-06

Just Beautiful!

What did you make the Half sphere out of that goes round your "moon"?

af042 (author)2015-07-22

What diameter stock did you use for the tubing and rods?

euvremer (author)2015-05-21

You should look at a documentary about Anticitaire engine. there was an elyptic gear inside.. As well maybe 3D print ?

shaman5188 (author)2014-11-18

Engineering is safe as long as artisans like you construct such beautiful machines. Outstanding work 10/10

blarcher (author)2014-05-08

Amazing ! I love to lookaround at instructables and find this kind of work, there are a lot of things that I would like to give a try, but where I live, there are no "techshops" or no way to get the parts... This is one of the bests things I've ever seen.

Congrats !

Snortimer (author)blarcher2014-05-19

you could look into or and see if they'll ship to you, depending upon where you are. There are also often other small shops that will take on small cutting jobs if you look around.

jamesb21 (author)2014-04-29

your pdf is also missing the gear with 25 teeth

Testudinidae (author)jamesb212014-04-30

That might be an issue with the program you ude to view it because it's there when I open the PDF.

melvinkat (author)2014-04-22

Very nice project!! Thanks for sharing it.

GrantLevy (author)2014-04-20

Can this device be driven by a standard clock motor? Do you have the gear ratios worked out for the gear train that will replace the planetary gears?

Testudinidae (author)GrantLevy2014-04-21

Driving it with a motor would be problematic: The input is designed to be incremented in steps of full rotations. The continuous rotation from a clock moter would mean that the rise and set times would change over the course of the day.

It's only the center planetary gear that could be replaced, the other two would still be needed. I haven't worked out the exact ratios, but you would need a gear train that devides the input by 27.32. It would also require a major redesign of the support structure to fit in all the new gears for this train.

imperio (author)2014-04-18


works even in leap years!

MrTravisHiggins (author)2014-04-18

The line thickness can make your holes/cuts skewed if not set correctly.

MrTravisHiggins (author)2014-04-18

When you laser cut do you make sure to set your line/ stroke thickness to 0.001 ?
I usually use adobe illustrator to make my laser cut files and print with a vls printer/program - works great. Let me know maybe I can help!

jdahl2 (author)2014-04-18

Wow that's a piece of art you made there. Wonderful

Testudinidae (author)2014-04-18

I'm afraid I don't have them. I had some issues with the laser cuts not coming out in the exact same scale as in 3D model. So I opted to drill the holes by hand to make sure everything lined up properly.

Penolopy Bulnick (author)2014-04-18

Thanks for the animation! It looks awesome!

jmarie26 (author)2014-04-18

You are brilliant!
Beautifully made and explained :)

balloondoggle (author)2014-04-18

My first thought was to motorize it, then I realized that would pretty much ruin the aesthetics of it. Plus, if you're planting by moon phase, you probably have an interest in turning the crank every day instead of automating it.

Gorgeous machine, and a fun way to apply math.

robi_ncc (author)2014-04-18


tlaminty (author)2014-04-18

Stuff like this makes the internet a wonderful place.
Thank you.

mosmond (author)2014-04-17

Ive been on instructables for a while, and although I've yet to publish my own "ible", I've spent countless hours browsing through others' generous submissions. I've seen a lot of wondeful instructibles, but this one may be my all-time favorite. I love everything about this project: the craftsmanship, the nerdy math, the playfully "frivolous" purpose - all of it is just perfect! Thank you so very, very much for making and sharing this wonderful object!

Dio772 (author)2014-04-17

Your machine is a work of art.

Bill Hooper (author)2014-04-17

Beyond Excellent! I'd really like to create this with a 3D printer. At least the first one. Then maybe by hand since I don't have access to a laser. The 3D printer should be able to do this nicely. Different gears in different colors. There is a 3D printer at our local library I'll have to see what kind of format it needs to create the parts.

Thanks for a GREAT project...

jackthursby (author)2014-04-17

are you going to publish the laser cutter files ?

voltski (author)2014-04-17

fantastic... this is the most detailed project I have ever seen... you are a genius !

AuralVirus (author)2014-04-17

Very impressive.

As you say this in brass would take it to the next level. This is art.

I'd love to be
able to buy a kit of this or even the mapping for a 3d printer to
construct as I haven't the time, skill or tools to build this myself.

Is there such a thing?

reminds me of the antikythera mechanism.

Gadisha (author)2014-04-17

I love it!

GPlatek (author)2014-04-17

Great design and Idea! What if the gears were laser cut from acrylic? Then the teeth wouldn't splinter off. Thanks!!!

stechi (author)2014-04-17

Brilliant project. Thanks for sharing it.

kjlpdx (author)2014-04-17

what a cool project for a cnc router. I've seen this software to create elliptical gears. "gearotic". agreed, gears cut from plexi would be gorgeous, especially if they had spokes machined in them. I would love to have a .DXF file, although you have given enough info to figure it out, but why reinvent the gear? :-)

graham641 (author)2014-04-17

This is the stuff I love to see here. Applied mechanics, thoughtful application and the skills to make it. Congratulations on your first instructable. It was clear and understandable for a technically challenging application. I surely hope to see more of your creativity.

Aristarco (author)2014-04-17

Awesome! Please, say you have plans for an Antikythera!!

Viali Jones (author)2014-04-17

Wow, what an amazing project! I commend you on your patience and skill - and I'm sure your brother will be thrilled to receive this.

I8mAll (author)2014-04-17

That is amazing,

Thank you so much. Your work is so well explained and laid out. It is a joy to see such kindness in sharing. Jolly well done.

Now how about a clock like that of Hampton Court.

pcoyle (author)2014-04-17

I would love to see a video of the thing working if possible. What nice work you have completed. +1 from me. I noticed you used a laser to cut the timber.

MercuryCrest (author)pcoyle2014-04-17

I'll second the vote for a video. :)

MercuryCrest (author)2014-04-17

Duly voted.

This is a fantastic project and I'm looking forward to making one and putting my own "spin" on it.

Well done!

flardier (author)2014-04-17

Man,, I am amazed and delighted to see that people like you stil exist and have the balls to get involved in such time consuming projects when it is said that time is of utmost value. Congratulations, I envy your brother. I wish I had such a great idea for the birthday of mine. please carry on !

Frederic (from reunion island)

taytayou812 (author)2014-04-17


Wish it was my Birthday too!

johnfixesstuff (author)2014-04-17

Have you guys heard of the antikythera mechanism? It was discovered at the bottom of the ocean in 1900 and dates back around 2,000 years. Here is a great video on it on the pbs website:

askjerry (author)2014-04-17

I'm a pretty smart guy... but if you locked me in a room for a couple of years I seriously doubt that I could have ever come up with this... amazing... you handled all the individual calculators beautifully... then managed to fit them all together as well... that alone deserves a standing ovation!

I also love the details like the spherical moon turning to show the phases... just incredible!!!

Fulcanelli (author)2014-04-17

Hello Testudinidae!

Is a wonderfull work. I'm post a link to here it in a Astronomy forum.


...and your brother very happy! :-)

Note: add a video.

motenay (author)2014-04-17

It's great! I really like it! Just a suggestion.

Could you add a readymade pdf with all the gears and parts to cut by hand (for example... will be less precise, but a great didactic experience!) or the stl for exporting to lasercutter or similar? TNX!!

Misac-kun (author)2014-04-15

Funtastic, that's really impressive. How much did that cost to you?

Testudinidae (author)Misac-kun2014-04-17

It was pretty cheap, actually. Because I didn't have to pay for the laser cutting, I probably used less than 50 € on it.

Testudinidae (author)2014-04-17

I used this

There's also an offline version with more features, but that isn't free.

ksykes (author)2014-04-17

Awesome idea and build. It totally got me reminiscing about the Aughra's lab in "The Dark Cyrstal"

About This Instructable




More by Testudinidae:The Moon Machine
Add instructable to: