Cleaned up code from clockathon 2, coming soon.

4 views
Skip to first unread message

Mathieu Glachant

unread,
Feb 6, 2012, 4:24:06 PM2/6/12
to makerbot-c...@googlegroups.com
So I cleaned up the code from clockathon 2, and implemented the changes discussed.
1. Changed the gearing to add another factor of two to account for the fifteen tooth escapement wheel. Still six gears total.
2. Deprecated the old drumgear routine that could only be used on the front of the clock and replaced it with the core pinion wheel routine, which can now include a non ratcheting drum on any gear, and can now produce a gear with no pinion if you set the number of teeth on the pinion to zero.
3. Implemented some logic to use one shaft radius (bearingRadius) if the gear has no concentric shaft, and another (pinRadius) if it does. This way, the design automatically assumes you place bearings on all the gears that do not include a concentric shaft.
4. Changed the parameters to include concentric shafts and hands for the hour gear and the minute gear.

With these changes, it is now possible to generate the same clock we had at the end of clockathon 2, without touching the code or the parameters incessantly. What it currently does NOT do is include a ratcheting drum solution for any other gear than the front one, or a way to turn the fixed drum on for only one gear (right now, you just turn it on while rendering the gear(s) you want with drums, and turn it off for the rest).

The standard config right now is bearings on all gears except hours and minutes, concentric printed shafts resting directly on M5 threaded rod (had to guess at a good radius value there) for the two exceptions, and a 5mm wide non-ratcheting drum on the gear between hours and minutes.

Today's respite from business travel does not extend to tomorrow, unfortunately, so I will post this code base later today, with some STLs and some screen grabs... And you guys can give it a spin. Ha! See what I did there? ;-)

Mathieu Glachant

unread,
Feb 6, 2012, 5:41:42 PM2/6/12
to makerbot-c...@googlegroups.com

Benjamin Fraser

unread,
Feb 6, 2012, 7:55:58 PM2/6/12
to makerbot-c...@googlegroups.com
That's fantastic. Looking a the setup recently I noticed that the minute gear still has quite a bit of force on it, being applied by the drum mounted below. This causes the minute gear to skew a bit and ride up as well. Since power is transmitted through this gear I think we should keep bearings in it. In previous builds I had done so and actually put bearings inside the minute's concentric shaft as well. This would also mean that we don't have to worry about wear issues related to the shaft/threaded rod interaction.

Question: is it possible to increase the spacer on an individual gear? I ask because I'm hoping to add an arm to support the upper threaded rod in the middle. After doing so I will eliminate all support from the frace of the upper rod and allow the concentric shafts to be cantilevered out towards the front. This arm would reach into the drive train just before the minute hand. So, gear #4 will need a 5mm increase applied to the spacer which already exists between the large gear and the pinion. Does that make sense?

I will take a look and see if I can find a way, but any thoughts would be appreciated. :)


Mathieu Glachant

unread,
Feb 6, 2012, 8:04:58 PM2/6/12
to makerbot-c...@googlegroups.com
Sure, easily done by hand. You just change the value of the spacer parameter and re-render that one gear. The assembled view in OpenSCAD won't look right but for the ready-to-print view it will be fine.

Note that if you increase the spacer for a gear that is forward of one or more gears with printed shaft sleeves, the sleeve length(s) will need adjustment by the same amount. If you increase the spacer for a gear aft of the printed sleeves, as you are suggesting, this is not necessary.

I have done precisely this in the current config to allow for the intermediate gear's drum.

Mathieu Glachant

unread,
Feb 6, 2012, 8:08:48 PM2/6/12
to makerbot-c...@googlegroups.com
You will note that I have moved several parameters out of the clockbuilder script and into the parameter file. Makes it easier to tweak things like pinRadius=bearingRadius if you want the first concentric shaft to sit on a bearing as well.
Reply all
Reply to author
Forward
0 new messages