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 coupler 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.



