Intro: The Astronomy Clock
Shortly after the first mechanical clocks were invented in the 14th century, inventors started looking for ways to represent the motion of the heavens. Thus, the astronomy clock was created. Perhaps the best known astronomy clock was created in Prague in about 1410. Instead of just showing what time it is, it also shows the relative position of the stars as the Earth rotates on its axis and revolves around the Sun.
In this project, you will learn how to create an astronomy clock that you can have in your home. It displays a map of the stars that are currently in the sky - day or night. The sky map changes as the earth rotates. The project involves mechanical, electronic, and software components. You will need access to a 3d printer, a laser cutter, and some woodworking tools to finish the project. I also used Python to create the star maps and design incorporated in the clock. Perhaps my favorite part of the project was integrating all these technologies together.
This project was completely original. I wrote the software to run the clock, created the laser designs for the case, and even built the gears and drive train. I also wrote the software to do the layout of the star map.
The final result seemed well worth the time I spent putting it together.
Step 1: Gathering the Parts
For this project, you will need the following supplies:
2 - pieces of 11x14 (0.093 inch thick) acrylic
1 - 1x6 board 6 ft long.
1 - Arduino Uno
1 - Real time clock module
1 - stepper motor 28bjy-48
1 - stepper driver - UNL2003
1 - 5 volt power supply
1 - 36 inch led strip light
1 - 1/4 inch plywood sheet - 2x4 ft
1 - 8mm metal shaft
2 - 608 ball bearings
1 - pieces of black foam board - about 12 x 12 inches
Misc: wire, wood screws (#6 x 1 1/4 inch), bag of 6x32 x 0.75 inch machine screws + nuts, another bag of 4x40 x 0.75 machine screws, wood stain (optional)
You will also need the following tools:
Access to a 3d printer
Access to a laser etcher capable of cutting 1/4 in acrylic and wood
A table saw + router to create the case for the clock
Step 2: Print the Gears and Plastic Parts
To begin, you will need to print the gears and plastic parts for the clock. I used a Prusa I3 MK3, Slic3r, and PETG for my clock. However, almost any variation should work fine for this project. The primary constrain is that you need a large print bed to create the plate holder and 72-tooth gear.
This is a quick description of the files you need to print out:
bearing holder - The bearing holder holds two 608 bearings to support the drive shaft. It bolts onto the back of the middle plate in the clock.
coupler - This plastic piece links the plate holder and the 72 tooth spur gear. It is 25mm long, so it is designed for a clock with a two inch space between the front plate and the middle plate that holds the bearings.
plate holder - The plate holder couples the acrylic plate and its backing to the drive shaft.
shaft holder - This is the file for an 8mm diameter ring that is used to hold the shaft in place as it pass through the bearing holder. You need to print two of these for the project.
Spur Gear (18 teeth) - This spur gear squeeze fits on the shaft of the stepper motor.
Spur Gear (72 teeth).- This gear couples to the drive shaft of the clock and turns the plate holder and acrylic plate.
motor holder - a plate to hold the stepper motor
The basic mechanical design is shown in the diagrams above. The front plate is attached to the portion of the star map that rotates (the Rete). This is connected through a shaft to a 72-tooth gear. The stepper motor (28BYJ48) drives an 18-tooth gear that runs the clock. The motor itself sits in the motor holder plate so it can be adjusted on the central plate of the clock.
The bearing support system that holds the shaft is bolted onto a central plate within the clock. The bearings used are normal 608 bearings (22 mm outer diameter, 8 mm inner diameter, 7mm thickness) that go on the inside and outside of the the bear support piece. Shaft couples to the gears, and everything is glued on the shaft to hold it all together.
The gears and plastic parts were created using Fusion 360. I am a bit new to the software, but the add-on gear generation tool worked really well for putting this together. Figuring out how to use the software was one of the primary purposes of this project for me.
You can access design file for the 3d parts here: Fusion 360 Astronomy Clock
Step 3: Laser Etch the Acrylic Parts
The acrylic templates for the Rete (the part with stars on it) and the Plate (the front piece) are attached above. This star map was set for a latitude of about 40 degrees North, and should work pretty well for most people. The maps themselves were generated using software I wrote in python.
I wouldn't recommend digging through unless you really like python coding and astronomy. It isn't all that well documented yet, but it is available if you want to use it. I spent a lot of time working on aesthetic issues like star size, fonts, label location, etc. The result seemed similar to any other planisphere, and certainly other planisphere designs would work for this project.
There are basically two categories of files:
plate - The pieces that have the star map printed on them.
rete - The pieces that have the window that you view the stars through printed on them.
You do NOT need to print all of them, but I thought it might be helpful to include them in a variety of formats.
After I produced generated the Rete and Plate using the python code, I imported it into Adobe Illustrator to add the graphical elements needed for the etching. I flipped the star map it is etch on the back side of the acrylic to make the back lighting look a bit nicer.
If you don't have access to a laser etcher, you could just print the Plate and Rete on paper and then glue them to a plywood base. It wouldn't have the glowing acrylic look, but it would still but still would be a nice clock to have on the mantle to show you the rotation of the stars each day. Etching a metal design would give the clock a cool steam punk look.
(Note: there was a correction in the acrylic plate template that was added after some of the picture were taken.)
Step 4: Laser Etch the Wooden Parts
The Adobe Illustrator files for the plywood parts for the clock are attached above. There are four plywood parts that need to be laser cut. You could easily use a CNC machine to make these parts, or even just cut there with a table saw and a scroll saw. You just need to match the printed parts from the last step plate and clock front.
clock-back-plywood - This is just an 11x11 inch sheet of 1/8 in plywood that serves as the back of the clock. I put a star design on it, because it looked cool.
clock-center-plywood - This is is also an 11x11 in sheet of plywood, but I cut it out of 3/8 inch plywood. It has a 9mm diameter hole at the center for the drive shaft. The stepper motor, the driveshaft, and the electronics for the clock are mounted on this piece.
clock-front-plywood - This is the front piece of the clock. Again, this is an 11x11 inch piece of 1/8 in plywood. It has a circular hole in the center along with 4 holes for the 6x32 screws that attach the plate to the front.
clock-plate-plywood - This plywood piece (1/8 inch) allows you to mount the plexiglass plate. You will eventually sandwich a piece of black foam board between the plywood and the acrylic. This piece also mounts on to the 3d printed plate holder.
Step 5: Assemble the Clock Case
The box that holds the clock is made of a 1x6 piece of wood that was about 6 feet long.
The basic idea is to make a box that holds the 11x11 inch pieces of wood in dado grooves. I sized my box to have an outer dimension of 12 inches and an inner dimension of 10.5 inches. All the pieces of the clock need to have three dado grooves routed into them. For my version, I have to pieces of wood that are 12x6x0.75 and two pieces of wood that are 10.5x6x1.
The grooves for the front and back of the clock are inset about 1/2 inch from the front and back of the wooden pieces. I used a 1/8 router bit on a router table to make these slots. After checking the fit with the plywood, I offset the router table fence by a smidge (about 1/32 of an inch in Imperial units) and then ran it through again.
The center dado groove that holds the center plate was also cut on the router table, Since I used 3/8 in plywood for this piece, I did a further adjustment of the router table fence to make the wider hole. You have about 2 inches of space between the font plate and the center plate in the box, so adjust the table accordingly.
For both cuts, I did a couple passes for each board. I also ran the boards through a few times to make sure the cuts were clean.
The dados for the two side boards were for the full length of the board. However for the longer top and bottom pieces, I used two stop blocks on the router table to plunge the blade into the wood about 1/2 inch away from the beginning and end of the wood pieces. Basically, I didn't want the grooves to be visible on the outside of the case. All the grooves are about 1/4 deep to hold the plywood.
Once you have cut the pieces, temporarily assemble the case and rough sand any edge that might be sticking out. You also will want to take any sharp edges off the outer parts of the clock case. When you are happy with the case, take the remove the top panel and ensure that the plywood plates actually fit into the grooves you routed. I found out that I needed to take an 1/8 off my plates with a table saw to make things fit comfortably in the box I created.
Because this was a prototype, I cut a few corners when making the case in this project. I used poplar for my clock, but only because I had a board sitting in my shop readily available. It would look nicer in cherry or walnut. I also used just simple screw joints to hold it together with a simple overlap construction. The screws will be on the top and bottom of the clock, so they won't be very noticeable when it is on the mantle by my fireplace. (Also, did I mention this was a prototype?). The next version of the clock will use mitered joints.
Step 6: Assemble the Mechanical Parts for the Clock
Assembling the mechanical parts of the clocks takes a few minutes, but it is relatively straight forward.
Connect the star plate, the plywood plate, the 72-tooth spur gear, and the plastic plate holder together:
- Using the plywood plate holder as a template, cut out a piece of black foam core board to be the same size. I an Exacto knife to create this piece, but a scroll saw might work just as well. (Important note: DO NOT LASER CUT FOAM CORE. It produces toxic fumes.)
- Center the wooden plate holder on the 3d printed plate carrier. Measure and then drill four screw holes to align with those in the plastic carrier. Attach the plastic carrier to the plywood plate holder using 6x32 1-inch bolt and nuts. Cut small holes in the foam board to accommodate the bolt heads.
- Sandwich the acrylic star plate, the foam board with the screw holes in it, and the plywood plate together. There are four holes in the plywood plate and in the acrylic star plate. You will need to use 6x32 1-inch screws to connect these pieces together. Of course, you will need to drill a hole through foam core board and through the construction paper at the appropriate locations.
- Glue the coupler to the plate carrier. I added a 0.1mm tolerance between the tabs and the holes to make sure this fits well.
- Glue the 72-tooth spur gear to the carrier. This will complete the assembly of the clock star plate. I used Gorilla glue to cement the 72-tooth gear, the coupler, and the plate carrier together.
Step 7: Begin to Assemble the Case for the Clock
Assemble the front plate: Screw the acrylic rete to the plywood front plate of the clock using four 6x32 1-inch (or even 3/4-inch) bolts and nuts.
Add the backlight LED strip:
Take the LED strip and fasten it between the middle plate of the clock and the front plate of the clock. (It may help to remove the front plate of the clock to do this.). Make sure the strip is securely fastened and doesn't interfere with the rotation of the clock mechanisms or the stepper motor. You may wish to use staples or glue to hold it into place. Put the plywood front with the acrylic rete into the clock case. Place the middle plate with the clock mechanism into the clock case as well. Make sure to run the power wire for the LED strip carefully through the middle plate. A hole has been placed at the base of the board to do this.
Step 8: Assemble the Middle Plate and Wire the Clock
Now it's time to put together the middle plate of the clock. This includes the mechanical support of the drive axis and motor, along with the wiring the electronics for the project.
Mount the bearing holder and the stepper motor on the middle plate:
Attach the stepper motor to the middle plate using two 6x32 bolts and nuts. Run the wire from the stepper to the back of the board. Take the 3d printed bearing hold, and squeeze fit two 608 bearings into the front and back of the holder. You might need to adjust this part if your 3d printer is slightly off, however I managed to get a snug fit using PETG and my Prusa printer. Bolt the holder to the back of the middle plate. Assemble the clock mechanisms to the drive shaft: Push the 8mm metal shaft through the 72-tooth spur gear and through the plastic hole plate so it abuts next to the plywood plate holder. Place the other end of the 8mm metal shaft through the central plate and the bearing holder. Place the central plate into the box, making sure there is enough clearance for the star wheel to rotate behind the screws that hold the front plastic rete into place. Measure and mark a place to cut the shaft so it fits comfortably in the box. You will want to have enough of a shaft to glue on two of the shaft lock pieces before and after the bearing. Once you have made this measurement, remove the gear/plate assembly and take the shaft out of the bearing holder. Cut the shaft using a hacksaw so it will fit completely within the case, but also have a 0.5 to 1cm second that stick out of the back of the bearing holder. Once the shaft is cut to the right length, reassemble the plate/72 tooth spur gear to the plate and glue it into place. Add a shaft lock just behind the assembly, then put the shaft through the bearing holder. After you have re-confirmed the fit, glue the shaft lock to the shaft. Glue a second shaft lock to the shaft behind the bearing holder.
The order of the clock mechanism will be :
- acrylic plate
- foam core board
- plywood plate holder
- 3d printed plate holder
- 72 tooth gear
- shaft lock
- central support plate bearing + bearing holder + bearing shaft lock
- shaft lock
As a final step, press fit the 18-tooth spur gear on to the stepper motor. Adjust and tighten the stepper motor so the 72-tooth and 18-tooth gears mesh together and move smoothly. Tighten the stepper motor bolts into place.
Wire the electronics:
The wiring diagram for the clock is relatively simple. You need to connect the real time clock module to the SDA and SCL pins, along with the +5 volt and ground on the Arduino. You also need to connect the IN1 through IN4 pins on the UNL2003A stepper driver to the pins 8 to 11 on the Arduino, along with connecting the ground. A switch and a 1k Ohm resistor needs to be connected between the ground and pin 7 of the Arduino. Finally, a power supply needs to be attached to the UNL 2003A board and to the Arduino from a 5 volt powers supply.
Here is a more detailed set of descriptions:
- Solder a wire one side of the push button. Attach this to the pin 7 on the Arduino.
- Solder a 1k resister on the other side of the push button so the input button is grounded when it is not being pushed.. On the other side of the button, tie it to +5 volts..
- Connect the four wires between pins 8, 9, 10, and 11 to the UNL 2003A pins IN1, IN2, IN3, and IN4.
- Connect the SCL and SDA points on the Real Time Clock Module to the correct pins on the Arduino.
- Connect the ground of the Arduino to the Real Time Clock Module and to the UNL 2003A boards.
- Create a power splitter for your 5 volt supply (2 amps should be sufficient), and connect it to the Arduino and the UNL 2003A board.
- Finally, you need to attach the LED power supply through the middle layer of the clock and thread to the back of the case. You will want the LED controller to stick out the back so you can change the lighting pattern on the clock.
You will need to tie +5 volts to the stepper driver and +6 to +12 volts to the Arduino. I tried unsuccessfully to use a single power supply for this, but I probably would have used a 2 amp 7 volt system with a power regulator for the stepper if I had a bit more time.
Make sure the tension between the motor and the gears is neither too tight or too lose. Double check everything. When all the wiring is in place and the parts are secured, carefully slip the assembly into place.
However - don't hook up the power supply yet. We need to program the board first!
Step 9: Program the Arduino
Programming the Arduino was pretty straightforward. This is how the code works:
- When the code starts, it initializes a step counter and grabs the time from the real time clock module. The number of steps for the motor are initialized as well, along with a few other variables about the system.
- The time is converted from local time into local Sidereal time. Since the Earth revolves around the Sun while it rotates on its axis, the time it takes for the stars to rotate is about 4 minutes shorter than the time it takes to rotate to the Sun's (mean) position. The Sidereal time subroutine in the code was modified from this site. However, there were a few mistakes in the code, so I updated to use the full approximate Sidereal Time algorithm created by the US Naval Observatory.
- When the main loop begins, it calculates how much time has passed (in Sidereal hours) since the clock was turned on. It then looks at the current step counter, and calculates how many steps should be added so the rotation of the clock is aligned with the current time. This number of steps is sent to the Arduino to move the disk.
- If a button is pushed in the main loop, the disk moves forward at a faster rate. This allows you to set the disk to the current time and date. The clock does not preserve the number of steps after a power reset, and there is no encoder to indicate the absolute position of the disk. I may add this in a future version of the project.
- After moving the clock, the system goes to sleep for some period of time, and repeated the last two steps.
I did a bunch of experiments with the stepper to make sure I knew how many steps were ACTUALLY needed for a single rotation. For my stepper, it was 512 x 4 with the standard Arduino Stepper library. In the code, I set the RPM to be at 1. All though this is painfully slow when you are setting the clock, higher speeds tended to have more missed steps.
Step 10: Plug It in and Set the Time.
After you have uploaded the code, hook up the power supplies to the Arduino and the stepper. Plug everything in, including the back light. Use the remote to turn on the light.
Now all you need to to is press the button to align the time and the date. Just make sure the current time on the outer plastic rete is aligned with the month and day on the inner acrylic plate. Congratulations! You have an astronomy clock.
Once the time is set, you should get pulses from the stepper every 8 seconds or so to update the star field. It is a SLOW 24 hour rotation, so don't expect a lot of action on this. Obviously, you can (and should!) finish the case.
As I have said, this is a prototype. I am generally happy with he results, but I would tweak it a bit in the next version. When I rebuilt it, I probably will use NEMA steppers instead of the cheap-o versions. I think the holding power and reliability would make them easier to use. The gearing worked well, but I feel like I put a bit too much play in the gears I designed. I probably would do that over differently as well.
Finally, I wanted to thank the folks at the MTSU Walker Library for their help in building this. I used the Laser Etcher in their Maker Space to do the acrylic and wood cut parts, and had many productive discussions with Ben, Neal, and the rest Makerspace gang when thinking about the clock.
Second Prize in the