Introduction: Hanging Gear Clock

About: Research is what I'm doing when I don't know what I'm doing.

Gears never fail to capture the interest of anyone observing them. The inspiration for this clock was a minimalist approach to a gear clock. By simply hanging an incremented gear onto a small driven gear and letting gravity and mathematics do their thing, an eye catching clock can be made.

This project is aided through the use of a CNC router, however, it is possible to adapt these plans for use with other workshop equipment. All plans provided can be printed at a 1:1 scale and used as guides to help those who are not using computer assisted machining.

This project also uses a micro-controller and stepper motors to make the gears move and keep time. Detailed information regarding wiring and coding is also included in this instructable, but please comment if I've left anything out :)

Step 1: Materials

Bill of Materials -

The Wood Bits:

Lime wood/Basswood - Most of the clock is made from lime wood, it's light, bright and easy to carve. I used two thick pieces for the clock base and body, each is 29 mm thick and 120 mm wide. the total length was close to 350 mm but was cut in two as shown in the picture.

A thinner piece of lime wood was used for the light coloured gears, the original size was 15 mm thick by 150 x 150 mm.

Walnut - I used walnut for the larger gear and the front insert used to cover the motors. The only piece I could find was a 45 x 45 mm spindle blank which I sliced up and made into a board measuring 180 x 220 x 13 mm. If you can find a board close to these dimensions, you'll save yourself a task :)

Ply Wood - An A4 sheet of 3 mm ply was used as an access panel for the base unit of the clock.

The Electronic Bits:

Arduino Nano - I actually used a clone board based on the Arduino Nano. The board I used was the Cylewet CH340G 5V 16M Micro-controller board. It works just the same as the Arduino but costs a lot less.

Stepper Motors - The steppers I used are Elegoo BYJ48 5V steppers.

Stepper Drivers - The boards that drive the stepper motors are ULN2003 drivers and are usually supplied with the motors.

Power - You will also need a 5V DC mains adapter, and a barrel jack adapter of appropriate size.

Wires - You can get away with using jumper wires but if you have some soldering skill, this would be better.

Step 2: Cutting the Parts

The clock is made from 8 parts in total, this includes 4 gears, a body, a base, an insert (motor cover), and an access panel. The Vector files for all these parts are provided below and are 1:1 scale. If you're using a CNC machine, I'll presume you have your preferred method for operation and so I'll keep it brief. For anyone not using CNC, you can print out the svg files and glue them to your work pieces to use as a guide.

The Body -

The first part I cut was the body. This was cut from 29mm thick lime wood using a 6 mm 4 flute straight cut tool. Using the svg file I have provided below, I used makercam.com to generate the g-code for free. The body consists of a number of pockets which house the stepper motors and provide a channel for the wires. As the wires for the top stepper have to go behind the lower stepper, there is an extra deep section of channel to allow this. The diagram above shows the depths of each area.

The Gears -

For the gears, I used a much thinner 1.5 mm cutting tool to give better definition to the gear teeth. The thinner tool can also be used for carving numbers by using the "follow path" operation in makercam. I cut the large hour gear from walnut and the smaller gears from lime wood. (I also cut a a few small gears from the walnut so I'd have a choice of colours).

The Base -

This was also made from 29 mm thick lime wood using the 6 mm straight cutter. I made a box by pocketing out most of the material, leaving a lip and corners for screws. This allows me to attach the access panel later. You could also make a base box by any method you like, just be sure it has a hole to allow you to connect the body.

Access Panel -

This is just a rectangle of plywood :)

Step 3: Fit the Steppers

The stepper motors come with some screw attachments that I had to remove. I found the best way to remove them was to use bolt cutters, but they could easily be removed a number of other ways. I also gave them a little bit of a clean up with a file to neaten the cut.

Next, make sure the steppers fit into the body, be sure to feed the wires of the top stepper behind the lower stepper as shown in the photo.

After checking the fit, it's a good idea to remove the steppers and then sand the front of the body now. Once the steppers are fixed in place, sanding will be tricky. The walnut insert needs to be sanded flush with the body, now is the time to make sure it sits flush and looks neat.

Step 4: Electronics and Code

An unfortunate flaw in the design of this clock is the inability to access the stepper motors once the insert has been glued in place. For this reason, it is recommended to test your motors before you realise one of them is broken!

The photo above shows the testing of the circuit, but a clearer description is shown in the diagram.

The Nano micro-controller works exactly the same as an Arduino Nano. You need to connect it to a computer via a USB cable and have the Arduino IDE installed. You may also need to install the drivers for the micro-controller, however, newer versions of the Arduino IDE may already come with the driver installed. If you find you need the driver, it can easily be found on Google by searching for "CH340G drivers".

Be sure to select the correct COM port, board type (Arduino Nano) and processor type (ATmega238P). You should now be able to Upload the code provided below.

This is the code that runs the clock, for testing purposes you may want to change some of the numbers to see more noticeable changes, otherwise you'll be looking for small movements every 20 seconds or so :)

I'll talk more about how the code works later in this instructable.

Step 5: Body Assembly

Now we can be sure our steppers are not duds, it's time to fix them into position.

I used a standard grip clamp to press the small gears onto the stepper shaft. Take note of the walnut insert in place between the gear and stepper. The gear is a tight fit and once it is pressed on, you will have a hard time getting it off again, so make sure the walnut insert is already in place.

Now we can fit the steppers and walnut insert into the main body and glue the insert in place. You can glue the steppers if you like but don't use too much glue as there is already limited space inside the body. I found they remained in position without the need for glue.

Next, feed the stepper wires through the base hole and glue the body to the base.

Make sure the body does not slope forward!

If the body is leaning forward, the gears will slowly work their way off the driver gears and fall off the clock. Make sure the body is upright or even leaning slightly back.

Step 6: Finishing Touches

I gave the dial gears some paint to make the numbers stand out. Just ordinary acrylic paint works well, and you don't even have to be particularly neat either. Once the paint is dry, sand off any paint that didn't make it into the carved numbers and you'll be left with some neat looking numbers.

I drilled a 10 mm hole in the back of the base to allow the barrel jack adapter to sit.

Lastly, I found some small screws which allowed me to attach the boards to the inside of the base. The photo shows a slightly different wiring configuration which is something I was experimenting with; I would recommend sticking with the original wiring shown in a previous step. I would also recommend doing away with the jumper wires and having a go at soldering the connections as this saves a lot of space. This is something I will be doing next.

Step 7: Closing Remarks

Comments on the Code -

The core of the code was provided by Instructables user curtis63 who posted it as a comment to Mohannad Rawashdeh who made an excellent instructable on the BYJ48 stepper motors.

The code keeps time by splitting an hour into 128 units, then advancing each stepper by an appropriate number of steps, after accounting for the time that motion takes, the code then delays the rest of the 1/128 hour period. If that wasn't complicated enough... Here comes the maths...

How the code keeps time:

The inner gear (minutes gear) has 28 teeth and the outer gear (hour gear) has 52 teeth. Each of the driver gears have 8 teeth, giving gear ratios of 3.5 and 6.5 respectively. This means the inner driver must turn 3.5 times each hour and the outer gear must turn 6.5 times every 12 hours.

We know from the product specs that the BYJ48 steppers have 4096 steps per rotation. So that's

3.5 x 4096 = 14336 steps every hour

6.5 x 4096 = 26624 steps every 12 hours

12 hours is 43,200,000 milliseconds (what the Arduino works in) which when you divide down gives 1344 steps every 337500 milliseconds for the minutes stepper and 208 steps every 337500 milliseconds for the hours stepper. As 1344 steps is almost a quarter of a rotation, and I wanted the movements to be subtle, I divided that down again, this time by 12 to give 112 steps every 28125 milliseconds.

Moving the motors takes time so this is accounted for by putting a known delay in each step. The main loop is a for loop that loops 12 times. Each loop moves the minutes stepper by 112 steps (which takes 112 x 64 milliseconds) then delays by 19917 milliseconds. The code then moves the hours stepper by 208 steps taking 208 x 60 milliseconds. The total number milliseconds is then:

(12 x 112 x 64)+(12 x 19917)+(208 x 60) = 337500

I'll admit it's not an ideal method as it assumes a single step is instantaneous, which it isn't. I'd like to eventually incorporate a real time clock (RTC) into this project to keep accurate time and I'm open to any suggestions for improvement.

Thank you

Thanks you for reading this instructable :D please leave a comment or suggestion, I'm still working on this project and I'd welcome any ideas, suggestions, recommendations, and potential improvements.

Clocks Contest

Second Prize in the
Clocks Contest