Picture of Lunar Phase Clock

In this Instructable we will be building a dynamic lunar lamp with the Raspberry Pi. With your very own lunar clock you'll always know the current phase of the moon, no matter the weather!

Remove these adsRemove these ads by Signing Up

Step 1: History and Theory

Picture of History and Theory

Budding astronomer? Recently bitten by a werewolf? Whatever your lunar-phase-knowing needs, the Lunar Phase Clock has you covered! If you're interested in getting started on the build, move on over to the next step. Here we'll talk about the astronomy behind the project.

So what are the phases of the Moon?

Just as the Earth orbits the Sun, so too the Moon orbits the Earth. The Moon is tidally locked to the Earth, which means that because the Moon completes its own rotation in the same time it take to orbit around the Earth, we always see the same side of the Moon. While we may be stuck to the same view of the Moon, the relationship between the Earth and Sun as the Moon completes its orbit is constantly changing. This means that it will be illuminated to varying degrees (or not at all!) and will take on a distinct shape. These distinct shapes are what we refer to as the lunar phases. The Moon completes a cycle around the Earth every 29.53 days; this is referred to as a synodic month.

Step 2: Materials

Picture of Materials


Raspberry Pi (RadioShack #277-196)
SD card
protoboard (RadioShack #276-168)
(2x) LED strip (RadioShack #55065456) web only
(8x) n-channel MOSFET (RadioShack #276-2072)
(8x) 10K resistor (RadioShack # 271-1126)
12V AC adapter (RadioShack #Catalog #: 273-318)
USB wifi adapter (RadioShack #55044156) web only
USB power supply (RadioShack #55075817) web only
Micro USB cable (RadioShack #26-2738)
22 gauge wire (RadioShack #278-1218)
(2x) 4/40 nut (RadioShack #64-3018)
(2x) .75" 4/40 machine screw (RadioShack #64-3011)
(4x) 2" 6/32 screw
(4x) 6/32 nut

1-40 of 41Next »
SnakoM14 days ago

Whoa. Really cool! DJ, you are very smart and this is an awesome project.

veryvexing1 month ago

Am I blind or are the dimensions for the plywood not listed? I'm only afraid to do this project because of the woodwork needed.

Aleator777 (author)  veryvexing1 month ago
Theyre not explicity stated since it was orignally cut with a laser. If you download the vector files on step 11, you can see the dimensions when you open them up. Send me a message if you need anything else!
mojoatomic2 months ago


mswope3 months ago

Not to be an ass about this, but your original parts list on the first page doesn't mention the terminal blocks... They do make for a nicer install.

spylock3 months ago

They sell a lunar phase nightlight at Chinamart,as well as the other warehouse type stores.Its a little larger than this design,but what I was getting at is you could take the electronics out of the nightlight,and put them into his design which is a lot more pleasing to the eye,the nightlight can be programmed with the true moon phase,and they even have a remote for around $11.00.

Aleator777 (author)  spylock3 months ago

Cool idea! It could definitely be made with other such parts. This clock does show the true moon phase already though.

Right,all I suggest was using the guts out of the Moon phase light in the making of
his design.Like I said,the night light has all the LEDs ready to install in his design and with the remote that comes with it,one can program it to do true moon phase,or go through them fast,or whatever.It would make it easier for those who would like to do this Able without having to do any of the electronics.
Robibame spylock3 months ago

two things. First, great thought on using the ready-made lunar clock..... and second thing... I laughed pretty hard at the word Chinamart. ..... much better than WallyWorld.

spylock Robibame3 months ago
No doubt bro,I would like to know how may Made in America items they have in any given store,not including food items I would bet no more than a couple dozen,what do you think?
jtetreault23 months ago
Love it,.. Sadly not many of us have a laser cutter readily available... Ever consider offering the parts as a "diy kit". For a reasonable price I'd love to be able to build this. Also just a thought adding into the algorithm a way to calculate lunar eclipse's and add some red LED's to activate at the eclipse to give the proper coloring.

I dig your idea of the red LED's for during an eclipse. that would be too cool ..... as for the use of laser cutters.... you could use a reciprocating saw, or some sorta' LARGE hole-saw (the can shaped bit put in a drill to cut door knob holes etc.) to cut the hole in the wood body of the clock... then for the curved ribs within the hole you could carefully bend some cheap aluminum angle-iron. aluminum strips are pretty cheap and can be found at most hardware stores or farm supply stores. :)

This is an amazing and ingenious project. Using lights and no moving parts to indicate the moon's phases is awesome. At 65 years of age comments like jtetreault2 left do sadden me. I have made projects from wood, metal, glass and paper for most of my life long before laser cutters were invented. At its most basic the clock case is a woodworking project that can be constructed by hand with simple woodworking tools and time. At one time the worth of a project was judged by the hand work and craftsmanship that went into it. Today it is more the idea and the programming skills that are admired. Nothing wrong with that but let's not forget that many projects can still be made without a laser cutter and CNC machine.

It saddens me too... My grandfather was a carpenter / cabinet maker... Sadly he passed before I was old enough for him to pass on any of his knowledge in that field to me. I'm going to try but lacking the knowledge and skill it's going to be hit or miss i'm afraid.
Aleator777 (author)  Johnkaye3 months ago

Wow, thank you very much! Yes, this most certainly could be made using traditional woodworking techniques. I had a rather short timeline to build this, so I turned to the laser cutter. There are definitely many other ways it could be made!

Aleator777 (author)  Johnkaye3 months ago

Wow, thank you very much! Yes, this most certainly could be made using traditional woodworking techniques. I had a rather short timeline to build this, so I turned to the laser cutter. There are definitely many other ways it could be made!

Aleator777 (author)  jtetreault23 months ago
True. Really, as long as you had some stiff material like thin sheet metal, or even cardboard to bend as dividers between the light segments behind a round face, it could work just the same. The outer body is arbitrary. Eclipse mode would be a cool feature!
Robibame3 months ago

that is freakin' cool.

Jan_Henrik3 months ago

Wow, im very impressed!! It looks awesome!

boocat3 months ago

I love this! Very cool family project.

Eunix3 months ago

This is such a cool concept! Of course, it would have been cooler if the moon was in 3D... But still, great project!

psavas Eunix3 months ago

Might not be too hard to do, really. I think software exists to take a 2D photo and create a 3D printable model from it...

jtetreault23 months ago
Looks like the NASA web site even tells you the specific times for each phase of the eclipse, so just adding a red led to each segment and some logic to the program to light and sunlight them at the proper times and you could watch the eclipse progress... I think I'll play with it and see what I can come up with.
Constructed3 months ago


Jdsardone3 months ago

Awesome Clock!

I wonder if you could use a large magnifying glass lens instead of acrylic to give a 3D round appearance to the moon.

Aleator777 (author)  Jdsardone3 months ago
Thank you! Ooh, good idea. That would look great!
iamtar3 months ago

This is a really great tutorial but I only have a ardunio board.... is there anyway to make it work with that or should I just buy the pi... I'll try in the mean while to see what I can do to make it work.

Aleator777 (author)  iamtar3 months ago
This would work great with an arduino. You'll need to convert the python code to arduino style c++, but it shouldnt be too bad. A simple rtc like the ds1307 for timekeeping will work too. Since the algorithm measures units in days, slight innacuracies in the time keeping shouldnt have a noticeable effect. Post a photo if you do!
doodlecraft3 months ago

Speechless! This is amazing and beautiful! Great work! :)

wliu33 months ago
Think the correct from the rpi is big enough to drive the LEDs. So why are you using the mofsets?
Aleator777 (author)  wliu33 months ago
The RasPi pins can only source a few mA each. The led strips need ~300 mAh each.
wliu3 Aleator7773 months ago
I see. But I was told that those mini LEDs only need ~40mA. Do they work well in this application?
Aleator777 (author)  wliu33 months ago
I think so. They're quite blidingly bright to look at directly.
salexandridis3 months ago

Great idea for a project! Really like how well the light is diffused! Btw, you can replace the back acrylic sheet with a white one for even better results.

Aleator777 (author)  salexandridis3 months ago
Thanks! True, I didn't have any on hand, but it would be worth trying. I've been thinking about making a mini one...
craftclarity3 months ago

I really like the stain you used. Along with the brass fasteners, it has a sort of ship's-clock atmosphere.....

Aleator777 (author)  craftclarity3 months ago
Thanks, I was definitely aiming for that aesthetic :)
rimar20003 months ago

Very interesting idea, well done.

that is real cool

It looks awesome! Great to see it in action!

1-40 of 41Next »