Last modified: 2024-04-29 16:57:48
< 2024-04-28 2024-04-30 >I've put the Y axis ballscrew and rails in, seems to work:
I've discovered that the screws I'm using to attach to the carriages are just slightly too long, need to either cut the ends off or buy some shorter ones.
Inserts after gluing:
And then after chiseling off the epoxy and filing down the inserts:
One of the inserts in the X carriage is only half as long because of the cut-out underneath it, this one pulled out when I tried to chase the thread in it, because I guess the tap bottomed out on the epoxy that had squeezed out on the underside, and the joint wasn't strong enough so it drove the insert upwards. Need to redo that one.
Also need to mix some epoxy & Minerva powder to fill the gaps around these inserts:
So plan is:
I'll do the gluing now. The screws only want to be about 2mm shorter, maybe 27mm long? 26mm long? 25mm would probably do.
I mixed the filler with 1 part resin, 1 part filler, 2 parts powder, by weight. So 50% powder.
I was driving a screw in and out of the threads to make sure there was no resin stuck in the threads, but it was pushing air up into the filler on the left-hand insert, so every time I drove the screw in it bubbled up and every time I took the screw out it sucked the filler back down. So I'm settling for leaving it high and filing it down after it has set. Hopefully it doesn't all drain into the thread and block up the hole.
So there are a few things I need:
And I don't think I want to use the testbed renderer, too much is hidden from me (for example, how do I make it not take up the whole screen so that I can add inputs/outputs? how do I zoom it?). So first I'll write a renderer for canvas.
There is an example renderer in https://piqnt.com/planck.js/docs/rendering
But, par for the course with planck.js docs, it doesn't work. Console errors about "TypeError: this is undefined" in
this.loop()
. I asked ChatGPT, it said:
If you pass a method of a class as a callback, for example to an event handler or a setTimeout, it loses its connection to the class instance
Great. So the example literally cannot work. I need to change this.loop
to this.loop.bind(this)
according to ChatGPT,
which does appear to work. I can't find the docs in git, else I'd make a PR. It has a bunch of other bugs (like binding remove-fixture
to removeBody()
and vice versa, and not binding remove-joint
at all).
OK, got the renderer working:
So far it can only draw circles and straight lines. Next up is probably polygons, because that's what I'll need for the escape wheel and the anchor.
Planck.js polygons need to be convex, so I think I'll need to make my parts out of a bunch of polygons stacked together, but maybe I would want to draw only the outline? Don't worry about it for now, but I could always make it draw just a single polygon but use multiple convex polygons for the physics.
Drawing polygons is easy enough. So now I need to make myself an escape wheel. Quite straightforward for a deadbeat escapement. Each too is just a triangle that leans "forwards", I don't think the actual angles matter as long as they provide clearance.
Parameters:
I got ChatGPT to figure out the trigonometry, it got it right first time. Here's an escape wheel attached to the pendulum pivot:
So now I need to attach the escape wheel to its own separate pivot, and give it some torque.
OK, that took a while but eventually figured it. So now I have a rotating escape wheel.
Let's try and make an anchor?
In the interest of efficiency we can turn off collisions for everything except the anchor and the escape wheel teeth.
And in the interest of quality we might want to turn "bullet mode" on for both the anchor and the escape wheel teeth?
Well it's pretty crude but here's my anchor:
I want it to run for a year on a single winding. To reduce the amount of gearing required inside the clock, we want a heavy weight on a narrow barrel. Let's say we have 2.2m of height to play with. The height of the weight and attachment, and clearance to the ceiling, give us maybe 2m of actual vertical motion.
The circumference of the barrel is pi times its diameter. For n coils, the length is n * pi * diameter
.
Let's say if the cord is 3mm thick and the barrel is allowed to be 30cm long, then we have 100 coils.
100 * pi * diameter = 2 metres
, diameter = 2000 mm / (100 * pi) = 6.4 mm
. Sounds fine.
And 100 coils, if running for a year, means we get less than a third of a turn of the barrel per day, to provide all the energy input to the clock. We could use a chain drive off the end of the barrel (which would be mounted at the very top, so no clearance for a large gear) to transmit the power to another shaft with a large gear on it.
Let's say we have 1/4 of a turn per day at the barrel, and 1 turn per hour at the minute hand, we need to speed up by a factor of 96 between the barrel and the minute hand. That actually doesn't sound too unreasonable? And then if the escape wheel goes around once in 4 minutes, like Hefetrueb's (and we could maybe even make that once every 5 or 6 minutes, but for now let's say 4), then there is only a further factor of 15 between the minute hand and the escape wheel.
If the pendulum is 1.8m tall it will tick once every ~1.35 seconds.
So I'm imagining a long and heavy pendulum, with a deadbeat escapement, and then with dials arranged like in Hefetrueb's clock to minimise energy losses.
But it might be worth making the pendulum beat seconds so that the seconds hand is more useful.
< 2024-04-28 2024-04-30 >