Clock Gear Train Calculator
Mon 11 November 2024Tagged: software, clocks
I made a Clock Gear Train Calculator this evening.
This is something I've done with ad-hoc perl scripts in the past, but I wanted to use it again and couldn't find my previous scripts, so I thought this time it would be better to have a proper user interface on it.
If you're designing a clock, you might find it useful.
It lets you specify a range for the pinion sizes and wheel sizes, a number of shafts, and the target gear ratio, and then it runs the calculation in a web worker, with a progress bar, because it can take slightly too long to justify blocking the user interface.
The search is a brute-force depth-first search, obviously there is a lot of overlapping subproblems so a dynamic programming solution would be better, but this is adequate for now.
It allows you to specify a tolerance on the gear ratio. Usually you will want an exact ratio, but that's not always possible. For example, the sidereal time complication on Breguet's No. 2894 approximates 1.0027379 as 51/82 * 79/49 = 1.00273768 (source: "The Art of Breguet" by George Daniels). This is the best you can do with 3 shafts with gears between 20 and 120 teeth, possibly much more.
It also lets you export the calculated ratios as a CSV file, which I imagine will mostly be useful for integrating with other custom scripts.
And, obviously, I got Cursor to write most of the code.
If you like my blog, please consider subscribing to the RSS feed or the mailing list: