Hanging Gear Clock

20,639

315

34

Published

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

This is an entry in the
Clocks Contest

Share

    Recommendations

    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    3 Questions

    can a pattern be made from something like plastic and be done with a router?

    I don't see why not :) I think someone here even made a comment about 3D printing a version :)

    Do you have the CNC code available that i can use?

    I can supply it if you want but it may be fairly useless to you as it's generated with the tool dimensions and type, work-piece dimensions and material, and work area restrictions specific to my machine. It would be better to generate your own CNC code (gcode) from the SVG files provided above. You can generate gcode in a number of ways but you can do it for free if you go to Makercam.com and upload the SVG file there. Once uploaded you can select the paths and choose the parameters for the cut (tool dimensions, cut depth, speeds and feeds etc), then simply export the gcode. :) I hope this helps, but if you still want the original CNC code files, just let me know.

    "The Nano micro-controller works exactly the same as an Arduino Nano." Are you sure this is what you meant to say? :)

    In the context of that paragraph, the term "nano micro-controller" refers to the Cylewet CH340G board; which, for the purposes of this project, functions in the same way as a genuine Arduino nano. So yes, I meant to say exactly that. :)

    34 Comments

    Nice clock :D very ingenious !

    Great clock and great instructions! Love it!

    You spotted the postcard in the background eh :)

    I would like to build one of these using a battery clock movement anyone know how?

    2 replies

    A battery clock mechanism would be most unlikely to have enough torque to drive the gears and the timing wouldn't allow for the different gearing.

    how about a weight driven wooden clock I saw one of those before

    I'm definitely making one of these. When I read through this, I knew immediately the changes I would make, then I read that you're open to suggestions...

    I would replace the Nano with an ESP8266 (ESP-12E). They cost about $7 each, so slightly more than a Nano, but they have Wifi built-in, so you can have it connect to an NTP server to get the time. I have code for that if you want it, but I think it's in the Arduino IDE samples when you add the ESP8266 libraries.

    Then the issue would be getting the clock to know where it's zero point is so it could go to the right time. Magnet and reed switch sounds like the right idea.

    Unfortunately, I'll be away from my shop that has my CNC router until July, so I won't be able to build it until then. :-(

    This is really nice, and I'm looking forward to making one!

    4 replies

    I was thinking about the ESP8266 as well and checking with NTP. I am not a programmer, so not sure how the program would flow, but my thoughts were to check the time at a certain interval, then when a minute advances, it will trigger the stepper to move a minute increment, and trigger the hour stepper to move 1/60.

    Also would be nice to be able to add a couple manual adjust buttons to use for setting the time.

    Checking with an NTP would be similar to checking a built in RTC, only you wouldn't need the physical space inside the base to house it. Frequent time checks coupled with stepper advancements to correspond with those checks would certainly deliver the correct number of steps at the right rate. However, there is the additional problem of missed steps; if the steppers were to stall for example and only move, say 97 steps instead of the requested 112, the displayed time would slowly drift despite the continuous checking. These are not the highest quality stepper motors after all. A physical mechanism for "homing" would allow the program to make adjustments to make up the lost steps and essentially auto-correct every 12 hours. Also, to set the time, it's easier to just lift the rings off and place them at the correct time ;)

    Cool, I never even thought of an ESP8266 and the price isn't that much more than the Nano+RTC combo. I've just bought some reed switches and tiny magnets to experiment with this idea. My fear is that the reed switches could be triggered in a range of positions so I'll have to find the best TA rating to get the best spacial resolution. I'll post an update after my experiments :D and good luck with your build.

    Yeah, I was thinking about the reed switch after I posted, and remembered that it's difficult to control the precise trigger point with those. Ranges typically vary by about an inch, depending on various properties of the magnet and the approach angle, which wouldn't work well for "homing" a clock. I'm going to play around with an optical sensor and a hall-effect sensor. Given the small gap between the base of the clock and the moving parts, I believe that an optical sensor will be the easiest and will provide the highest level of precision.

    But then again... Back on the reed switch idea. With some simple tricks in software, the trigger and release positions could be calculated each time the trigger (magnet) passes the switch, and the mid-point should be acceptably close to the middle of the switch. So, the calibration points could be known on each revolution, and a calibration could conceivably take place after each instance in which the trigger has left the area of affect and the reed switch re-opens.

    The main advantage of magnetic triggering is that the parts that perform the nerdery can remain hidden. It would be a shame to dork up this design by punching holes through it for sensors. You've done an unusually great job of hiding all of that in your design, so I'd be willing to bet that you're sensitive to that.

    Now if only I could be back at my shop.

    Outstanding Instructable! I am definitely going to make this when I retire (about 3.5 years!).

    For the timing: I like this project: http://hackersbench.com/Projects/1Hz/

    I have built and used this in many projects. It works and doesn't take up too much space.

    Thanks for building and posting this Instructable!

    user

    Amazing! Definately add this to my list of up coming projects.

    Wondeful work. Nursing homes I am visiting could use a third wheel indicating day and night or, better said, a 24 hour gear rotating outside the other two. Patients often mix up day and night.

    Things have changed! One chip....
    I made one like this using 7400 TTL chips back in college.
    I guess that disqulifies me as "Made IT" LOL

    Does one need to be a competent programmer to get this working? Is there much stopping me from getting the file to a CNC shop, buying the audrino and downloading the program?
    I can wire PLCs and electronics and have a very basic understanding of programming, would this be out of my league?

    Epic build dude.

    1 reply

    Thanks :) there's no need to be a skilled programmer to get this working. There's plenty of resources online to help you with getting a program running on an Arduino and the code supplied here should work fine as long as you use the same steppers as I have. With regards to the CNC files, I didn't include g-code files as these can vary depending on the endmills used, wood type, and a few other factors. CNC operators will have their own way of generating g-code from vector formats such as the SVG files provided here. I personally use makercam.com, its basic but also free and completely browser based. If you can get the files to a CNC shop, then I'd say this project is well within your league :)

    Great looking clock. One suggestion. Go ahead and glue the steppers in place, then use magnets instead of glue to hold the insert in place. That would let you get back into it if you needed to replace a bad stepper motor down the line.

    I love this Ible well done! This is a great idea, a great craftsmanship and sth. complete awesome. As I do not have a CNC, but i am in posession of a 3D printer, i think i will scale this down and print a minature version of this in different colors the next i time i do have a little spare time. I think of a blue red combination of colors or a more conservative black and white one.

    Thanks for sharing this!