Automating my Clock Mechanism

Hello, In order to fully automate my clock mechanism, I need the following facility:

An empty that rotates a full 360 degrees from -180 to 180 and repeats this motion - this I can do, along with an appropriate driver. Between say 170 and 180 degrees of rotation, a second empty advances 1 unit in one axis, but stays still during the rest of the rotational cycle. As the first empty passes the end of it’s rotation (180 to -180) the second empty retains it’s position in the movement axis. The cycle is then repeated with the second empty advancing a further unit each time the first one completes one rotation. If I use an extrapolated transform, the second empty advances all the time the first is rotating - this is not what I need. If I use a non-extrapolated transform, the second empty snaps back to it’s original position as the first empty crosses from 180 to -180 - this again is not what I need to happen. In summary I need a mod to the transform constraint - I think I need an “incremental” type of transform constraint where the second empty, on which the constraint is acting, does not “snap back” at the end of each rotation of the first empty. I hope this all makes sense! Is it possible to achieve this movement in Blender as is, or do I need a Python script, something I am not able to do!

This requirement is necessary to unwind the driver cords as the chimes operate. I can do this with hundreds of individual transforms but this would be very tedious indeed! At the moment the winding of all three drums is done by moving one empty in the X axis, the operation of the quarter-hour and hour chimes is also driven by one empty each, moving in the X axis, but these do not automatically unwind the cords carrying the weights. This would be the final stage in the automation so that just moving the “going” gear train would operate the chimes at the correct times. I have achieved what I need with the date ring clicking over one number as the hour hand passes midnight, but this took 31 separate constraints, and would be totally impractical for the quarter hour chimes over a 7 day cycle for example!

The blend file is about 17Mb - I can upload if required, but this seems excessive use of your storage space at this stage!

Thanks in advance. Clockmender :slight_smile:

OK update time - I managed to achieve NEARLY what I wanted using a Driver (see attached .blend file) When I rotate the driving empty (1-rot-Empty in the file) the next one (1-slide-Empty) jumps in X as the first rotates and stays there. However it jumps 2 X pi units (6.28 etc ad infinitum) and I cannot control this amount - so I tried another empty (1-slide1-Empty) with a driver in it (I cannot use a transform as the inputs fields do not take pi and errors will stack up after a number of revolutions) and having read the relevant Blender help section it says I can use a Python Expression - so I tried - ob(“1-slide-Empty”).LocX / ( math.pi * 2) - just as it says in the help files and I get “ERROR - Invalid Python Expression” as it does with ANY expression other than a number. :mad: Can someone please tell me what I am dong wrong?

Attachments



driver.blend (466 KB)

Here is the screen dump of the driver and it’s error if this help.


Attachments

driver.blend (466 KB)

OK everyone thanks for all the help…

I solved it by chance - attached is the blend file with the solution in it, if anyone is interested.

Basically ignored the help files and used ‘var /(pi * 2)’ as my expression to get my movement as described earlier, having first tried to create a maths function for driver expressions - barked up the wrong tree for hours! But happy now I have a solution and an even better way of driving the hands through Driver Expressions based upon timeline frames as detailed in the blend file. This also allows me to 'jump" the second hand as would be the case on a real clock. You will also note a driver empty for the date and moon functions, these work but with the restriction of timeline length, you have to push the timeline bar way off the scale to see these operate! If you get the blend file just press play and the clock works in real time, including a pendulum, for around 6 hours. Oh yes I forgot - I have taken all the gears out so it will upload, you can always make your own case, face and mechanism!

driver.blend (995 KB)

I’m not surprised your question stumped most people. But geez, that is an impressive looking mechanism and rig you’ve got going there :slight_smile:

Thanks for that - I was a little surprised nobody had wanted the same function, but now I have a working rig to play with and have shared it here. All the mechanisms works properly on the full model, with cords winding on drums for the weights, quarter and hour chimes, etc. What I am going to do next is get rid of all the original automation and use my new found method, 'cause it’s better, and re-automate the lot. I have worked out how to trigger the chimes at the proper time using frame positions, rather than use object locations locked in the timeline. Reckon this will take a while, so will report later on progress. Right now, because of the second hand accuracy I am running at 8 frames per second meaning something like 28,800 frames for 1 hour of time on the clock, so it will only run until I get to the max of 300,000 frames, unless YOU know different… I reckon through this project, I have cracked a fool-proof way of driving gear trains, including bevel gears (the problems with the gears function not making proper beveled gears is for another post perhaps - I have worked out a method of getting correct gears, if your bevel gears also include a reduction in speed between the two shafts or shafts NOT at 90 degrees) so feel free to pinch this rig for your own models everyone. :slight_smile:

Explanation of Gear Issues: If you make a bevel gear of 2 units radius and drive a second of 8 units, the angles of the bevels must meet at the confluence of the two shafts or “it don’t work” see https://en.wikipedia.org/wiki/Bevel_gear. If you use the bevel gear function, it will make the smaller gear with maybe a 70 odd degree angle, but when you make the second with a 20 odd angle (I forget the exact numbers), the tooth length of the second gear is way off and the Addendum and Dedendum of the bigger gear are incorrect for the smaller gear, so they don’t engage properly. Just thought I would share this with you - Also there is NO facility for making epicyclic gears (the big one with the teeth on the inside of the ring)- I had to work out my own technique for that bit as well - see below:


Update: Conical angles for a 1:4 bevel gear train are 75.97 degrees for the smaller gear and 14.03 degrees for the larger one :slight_smile:

I rigged an epicyclic gear once, attached below.
To control, rotate the center gears or the rings.

They are odd to setup, I find its best to use drivers.

Attachments

GIGA.blend (819 KB)

Thanks I am getting my head around Drivers - so your technique has helped me - it’s a sad day when you learn nothing!

this is soooo mind blowing!!! A great work, clockmender! :wink:

Once it is finished i may post the final blend file on this site, assuming I can do this some where some how …

There’s always blendswap too :slight_smile: keep up the great work.

I now have a simple case and have altered all the going mechanism to run on Drivers instead of Transform Constraints. It now looks like this:


Once I have modded the chime mechanisms, I will upload it to the WIP section on this site, if you think it is good enough.