Saturday, November 27, 2021

The Epicyclic Gear Clock Completed

Last time, I wrote about the design considerations for a clock adapted from William Strutt's epicyclic gear clock. Now it is time to complete the design by adding the frame and the driving/timing mechanism. There is one small change I made to the design documented in the previous post. The planet gear is mounted on a carrier pivoted on the minute arbor. This works better if you add a counterweight opposite the planet gear. A US quarter seems to be about right.

A few pictures and video of the completed design first, and then I'll fill in a few details.







The Frame

The frame for Strutt's original design (illustrated here) is rather ornate and a little too fancy for my tastes. I like the frame seen on a GrabCAD version and used this as the starting point for my own. The overall frame has to be taller than will fit on the print bed. In previous designs, I've looked for a point where I can split the frame and then joined the pieces with glue and pins. For my design, I decided to print it so that the very top part attaches with a couple of screws. This also allowed me to defer the decision about the drive and timing mechanism. Depending on what I decided, I could print the top pieces with different dimensions.

Drive and Timing

Most of the remaining design decisions concerned the drive and timing mechanism, that is how to get power into the clock and how to make it run at the right rate. The original clock used a spring, but I was not sure the plastic design would hold up to the stresses from it. Another option was to drive it with a weight attached to the minute arbor. The works OK for a wall mounted clock, but is not suitable for a desk clock. I toyed with using a stepper motor, but again did not like this. In the end I settled on the same drive as my two previous clocks: an electromagnetic pendulum. As before, the pendulum rotates a cam, causing pawls to engage with a toothed wheel. I'll call it an escape wheel, though this might not be an accurate use of terminology. The escape wheel then drives the ring gear via a pinion.

There are several design considerations. The number of teeth on the pinion and escape wheel must be chosen to drive the ring gear at the right rate; details of the calculations are in the previous post. The period of the escape wheel then determines the length of the pendulum, which must be less than the height of the frame at the pivot point of the cam. Finally, the teeth on the escape wheel must be large enough for the pawl to engage with it reliably. I considered reusing the exact escape wheel dimensions from one of the previous designs, but the escape wheel looks large and out of proportion. A smaller escape wheel is possible, but it must then have fewer teeth so that they are a reasonable size. After some playing around I decided on an escape wheel about 80mm in diameter with 40 teeth, with an 8 tooth pinion. This is about the smallest size of pinion that I was willing to trust. I used a trick I learned from Steve Peterson for the pinion. As only one face comes into contact with the ring gear, you can fatten up the teeth and make them stronger by displacing the trailing face.

With the gears I chose before, the ring must rotate once every 754.49 seconds, and the escape wheel then rotates each 8/168*754.49  = 35.928 seconds. Each complete swing on the pendulum advances it by one tooth, so the time per swing of the pendulum is 35.928/40 = 0.8982 seconds. An ideal pendulum for this period would then be almost exactly 200mm long, which fits well with the size of the frame.

Cam and pawl dimensions

I'll come back to the pendulum design in a moment, but first there is the question of how to design the cam and pawls given the escape wheel. A reason for wanting to reuse the previous designs is that I knew they worked. Unlike designs for standard escapements (such as the Graham escapement), I couldn't find any guidelines for working out the geometry. To solve this, I set up a sketch in Fusion 360 to try to make sure it would all work. Here is an annotated version:

Circle A represents the circle at the base of the teeth, B is the pivot point of the cam, and C and D are the pivot points of the driving pawl at the limits of the pendulum's motion. p and q are the points where the end of the pawl would contact the teeth. The angles of lines BC and BD are set by how far the pendulum swings. Experiments with the previous clocks suggest it is about 20 degrees. We can freely choose most of the other dimensions: the escape wheel diameter, the position of the cam pivot, the length of the cam, and the length of the pawl (Cp and Dq). I could then measure the angle between the pawl position at the extreme ends of the pendulum swing: the angle between the radii to p and q. This must be more than the angle between two teeth, 9 degrees for a 40 tooth wheel, but less than the angle between two teeth, as we don't want to advance the wheel too far. Based on this, I was able to choose dimensions which appeared to work, and validated them with a quick and incomplete print.

The pendulum

I mentioned that an ideal pendulum would be 200mm long. The actual pendulum for this clock deviates from ideal in multiple ways. The period calculation for a pendulum assumes the angle through which is swings is small (a few degrees), while the electromagnetic pendulum in this clock swings by something like 30 degrees. Secondly, in the ideal case, there is a mass just at the end of the pendulum. We have to have the magnet at the end, and the position of this is fixed so that it is close to the drive coil. To make it possible to adjust the timing, there is also a moveable weight bob. In the last two design, I made the pendulum shaft from a brass rod. The weight bob was held in place with a set screw, making fine adjustment tricky. This time round, I printed the pendulum shaft with a thread cut in it, and made both the weight bob and magnet holder similarly threaded. Adjustment is then much easier, and a lock nut can be used to hold the weight bob in position once the timing has been set. The weight bob is just a small printed part with a couple of M5 bolts attached to it. There are two 12mm x 3mm neodymium magnets.

The electronic circuit is the one I described a while back. It is controlled by an Arduino Nano, and this has the nice property that the code can measure the pendulum period and report it over the Nanon's serial connection. The electronics enclosure is a bodge, with various things held in place with blue tape and an opening for the USB port which is far too large. It's held to the frame with a rather flimsy bracket. One day I will come back and do this properly. Maybe.

The pendulum moved very vigorously - so much so that the frame rocks slightly. If I did a redesign, I would make it a bit heavier. The clock is very quiet compared to the two other electromagnetic clocks.

Wrap up

This is my eighth clock and the first one I have designed entirely, other than drawing the initial inspiration and (initially) the gear ratios from Strutt's original. I went though multiple iterations both in silico with Fusion 360 and in the printed parts. It's a cliche to post a picture of your box of rejected parts, so I won't. I'm happy with the end result.


Monday, November 01, 2021

William Strutt's epicyclic gear clock: design and prototype

In the early 1800s, William Strutt designed a clock based on an epicyclic gear train. There is a good description of it in an edition of the Horological Times. The key elements of the gear train are shown in the following illustration. The frame, escape wheel and driving force are omitted.


To understand how this works, start from the minute arbor. It is attached rigidly to the planet carrier (white). As the carrier revolves, it moves the planet gear (green). The blue gear is one of two sun gears and is fixed to the frame (not shown). The movement of the planet gear has two effects. Firstly, it turns the ring gear (red). At the top, you can just see a small pinion (also green), which would be attached to the escape wheel. This therefore regulates the time. The period of the escapement and the gear ratios are chosen so that the planet carrier rotates once per hour, as required for the minute arbor. The final element is the hour gear (yellow). It is also a sun gear, and is free to rotate on the minute arbor. It has the same diameter but a different number of teeth is different to the fixed sun gear. This is an implementation of Ferguson's mechanical paradox. The rotation of the planet gear causes the free sun to rotate at 1/12th of the rate of planet around the fixed sun, providing the rotation for the hour hand.

There are some existing designs based on Strutt's original, for example one by Clayton Boyer, one by Brian Law (without the paradox), and at two on GrabCad (1, 2).

The gear ratios work as follows. Let:

  • A = teeth on fixed sun gear
  • B = teeth on planet pinion
  • C = teeth on planet gear
  • D = teeth on inner side of ring gear
  • E = teeth on outer side of ring gear
  • F = teeth on escape pinion
  • G = teeth on escape wheel (not shown)
  • H = teeth on free (hour) sun gear
The period of the planet carrier (and hence the minute arbor) divided by the period of the ring gear is 1+AC/BD. The period of the escape wheel divided by the period of the ring gear is F/E. We'll come back to the hour gear in a moment.

In Strutt's design, A=66, B=8, C=68, D=144, E=168, F=6, G=34 and H=72. Thus, if the period of the planet carrier is 3600 seconds, the period of the ring gear is 3600/(1+(66*68)/(8*144)) = 735.3 seconds, and the period of the escape wheel is 735.3*6/168 = 26.26 seconds. As there are 34 teeth on the escape wheel, the period of the pendulum must be 26.26/34 = 0.772 seconds, implying the pendulum is about 14.8 cm (5.8 inches) long. This makes the mechanism suitable for a desk clock, as in the example shown in the Horological Times article.

I don't fully understand how the Ferguson's paradox works, but I can give some hand-waving reasoning about why it gives the right timing. Essentially, each turn of the planet about the fixed sun (66 teeth) advances the free sun by its number of teeth, 72. This turn takes one hour, so in that time, the free sun has advanced by 72-66=6 teeth relative to the fixed sun. This is 1/12th of its total number of teeth, hence making it rotate once every 12 hours. Note that in order for the free sun to have the same diameter as the fixed sun, it must have a different module (ratio of diameter to number of teeth), thus breaking the normal rule for gears to engage correctly.

Design decisions for a 3D printed version
I wanted to take this design and adapt it for 3D printing. The hardest part of this is finding a size which will work, by picking a suitable module for the gears. This then constrains almost everything else. We need to be able to print both a very small gear (escape pinion, 6 teeth) and to fit a very large one (ring gear, 168 outer teeth) on the print bed.

There is one other constraint. The tips of the planet gear teeth must not come too close to the minute arbor:

The distance from the center of the minute arbor to the tip of the planet gear teeth is (A+B-C-2)m/2, where m is the gear module. This follows from the center of the planet and planet pinion being (A+B)m/2 from the center, and the outer radius of the planet gear being (C+2)m/2.

At a module of 1.2, the ring gear is 204mm in diameter, and will just fit on the bed of a Prusa MK3S. The escape pinion is tiny at this modulus, with an outer diameter of just 9.6mm and teeth only about 1mm across. We actually do have some freedom to use a larger planet pinion, which in turn changes the size of the pendulum. For example, with 10 teeth (and hence 12 mm diameter), the pendulum needs to be 41cm long. You can somewhat compensate by adding more teeth to the escapement wheel: if we change it from 34 to 40 teeth, the pendulum needs to be about 30cm for a 10-tooth pinion.

The spacing between the axis and the tip of the planet gear teeth is 2.4mm, meaning the minute arbor diameter must be under 4.8mm in a world where everything is perfectly sized. In practice, you have slightly more leeway as the printer will round off the very tips of the teeth, but you also need to allow for slight misalignments and wobble as the mechanism moves. There is one further issue associated with this. The free sun (shown in yellow) is loose on the minute arbor, so seen from the side it looks like this:

In this illustration, the minute arbor diameter is 2mm, about as small as possible. How do we keep the free sun in its position along the shaft? One option is to add a shaft collar just underneath it, rigidly attached to the shaft. Another would be to add a spacer, but its hard to find a diameter which can both be printed reliably and won't interfere with the planet gear. We could also use a piece of thin tube as a bushing; for example, a 2.5mm tube with a wall thickness of 0.225mm.

Another possibility is to reduce the number of teeth in the planet gear. At 66 teeth, we have 3.6mm radial space instead of 2.4. At 64 teeth, we have 4.8mm space. The number of teeth on the inner side of the ring gear must decrease to compensate, and the pendulum needs to be slightly longer. Making this change in no way alters the Ferguson's paradox, as it is only the fixed and free suns and the planet pinion which participate in this. With 64 teeth, there is no need for a shaft collar and instead the planet carrier can be modified:

It is possible to use a 3mm minute arbor in this configuration. The inner ring gear now has 140 teeth and a slightly longer rotational period. With the 6/34 escapement, the pendulum would need to be about 1 cm longer than before.

Tooth profiles
Most gears use an involute tooth profile: the classic shape with a narrowed "waist". Cycloidal gears are an alternative that has been used in clocks, and it works well for 3D printing as the teeth have straight sides with no waist. Once the teeth are above a certain size, the sides are parallel and so fewer small gap fill movements are required from the printer. For small teeth, the sides are not parallel, though it is possible to adjust a bit from the strict profile to avoid them becoming too fragile. Fusion 360 and Blender both have add-in gear generators, but they only work for involute teeth. I was able to find a cycloidal gear generator as downloadable software. There is an online version as well, but I prefer the downloadable version as it can generate SVG files, which are more convenient for converting into sketched in Fusion 360. The SVGs need to be scaled to the correct size after loading them up. One thing the software lacks is a way of generating the inner teeth for the ring gear. Some people suggest creating an outer gear and then using it to cut away the inner part. It is approximately correct for involute teeth, but does not work for cycloidal ones. My approach was to load the SVG file, then flip the lines making up one tooth about a chord drawn on the pitch circle:

Another problem with the output of the gear generator is that the arcs at the base of the teeth do no quite line up with the edges of the teeth. I solved this by adding a base circle to the teeth. To generate the gear in Fusion 360, I extruded one tooth, copied it with a circular pattern and then added the body of the gear using the base circle.

Drive and timing
Strutt's design used a pinion plus escape wheel for the timing and was driven by a spring coupled to the minute arbor. You could also drive the minute arbor with a weight, if the clock is configured as a wall clock. The gears move quite freely and so could also be driven by a stepper motor in a similar way to Steve Peterson's desk clock. Another option is to use an electromagnetic pendulum. I can't find any examples of exactly this, though there is a somewhat related design by Nigel Climpson.

Prototype
I wanted to validate that the basic mechanism works before going further. It's a bit hard to video it (not enough hands!), but this clip shows that it moves quite smoothly.



If you look carefully, you can see the hour wheel advancing. For the next stage, I need to settle on the drive mechanism. The planet carrier also needs a slight redesign so that the circular piece counterbalances the planet gear.

Tuesday, October 26, 2021

Cycloidal gears in Fusion 360

Fusion 360 has tools for creating involute gears, including its own spur gear add-in and GfGearGenerator, and they work well. However, if you want cycloidal gears, it's not so easy to find something that works. Here's one approach, in case this turns out to be helpful to anyone else.

Start by generating the gear in DXF form using Rainer Hessmer's Cycloidal Gear Builder. Make sure to use the highest quality level. It's useful to include a hole in the middle so you can identify the center. Download the DXF file. If you load this DXF into Fusion 360 (Design > Insert > Insert DXF) you will get an unhelpful error message. The DXF file isn't in a form that Fusion 360 can handle and we need to fix it.

You can fix the DXF by importing into FreeCad and then exporting it again. Another option is to import it to Inkscape and save it with "Save As". The DXF should then import into Fusion 360. However, if the gear is large, Fusion 360 may sit for hours processing it. It might never finish. Selecting "One sketch per layer" when inserting it sometimes helps, but generally does not. So another option is save it as a SVG from Inkscape and insert that instead. It's still slow, but does work. If you are lucky, you might be able to extrude the result and create the gear from it. Or sometime Fusion 360 will just abruptly exit.

The Cycloidal Gear Generator is supposed to have an option to output to SVG but it was missing when I looked for it. However, instead you can download a desktop version of the app from here. This will give you a SVG with much better segments. Note that you have to specify that you want a pinion. In the web version you can omit it. The desktop version raises an exception if you try. The result will load into Fusion 360, but it won't work as the segments don't join into a closed curve. However, we can use the sketch as a starting point.

First note that the imported SVG won't have the right size. We need to scale it. To find the scale factor measure an element of known size. For example, if you created a 6mm hole in the middle of the gear, measure its actual diameter and scale by 6 divided by this. Measuring the radius is usually easiest, and so then you would scale by 3 divided by the measurement. To scale the whole sketch, exit sketch mode, go to Modify>Scale, select the sketch from the browse list, and enter this factor.

Now we want to go into edit sketch and delete everything except for the center hole and one tooth. The tooth will consist of two lines and two arcs. You ought to be able to create a circular pattern with these and the arc joining them to the base of the next tooth, but you don't get a closed path if you do. The problem is that the exact end points of the lines aren't right. So change everything to a construction line (with x), then change the two lines and two arcs back. Create a center circle with circumference on the ends of the lines. Now create a circular pattern with the two lines and the two arcs about the center of the gear, with a number of elements equal to the number of teeth you want. You should now be able to exit sketch mode, select all the teeth and the circle you just created, and extrude your gear.

Sunday, October 24, 2021

The Daisy Clock

One of the designs in the book Making Wooden Gear Clocks is for an electromagnetic gear clock driven by a simple and baffling mechanism. I took the design and adapted it for 3D printing; as with some of the other clocks, I won't publish my design as the copyright status is unclear. Here is the clock:





The clock works as follows. The pendulum is driven electromagnetically by means of a magnet in the end of the pendulum and a coil in the base. The coil detects when the magnet comes close and then sends a pulse to drive it on its way. The pendulum drives a cam with two pawls on it. This in turn engages with a toothed wheel and advances it once per second. The principles thus far are similar to the Thriecan clock described in a previous post.

The minute wheel is also a toothed wheel, with the opposite orientation to the seconds wheel. A small metal rod near the middle of the seconds wheel engages with the teeth of the minute wheel and advances it once per minute.


There is also a pawl for the minute wheel to prevent it falling back. The minute wheel is tightly attached to an arbor which also carries the minute hand.

Now we get to how the motion of the minute wheel is divided down 12:1 to the hours motion. This is done by means of the daisy wheel. The daisy (or daisy wheel) motion was invented around 1830 by Aaron Dodd Crane. The wooden clocks book does credit the invention or explain how it works. There is a little more information in Philip Woodward's book My Own Right Time.

The daisy wheel has 11 petals and 11 notches between the petals. A device ("tri") with 3 arms interacts with the daisy wheel by means of pins mounted on the ends of the arms. A rod attached to the daisy holds it loosely in place in the frame, allowing this movement while preventing it from just rotating with the tri. Woodward mentions that the number of arms and pins is not critical. The hour hand is mounted on the tri. The key to this is that some parts of the mechanism are mounted eccentrically to the minute arbor and so the whole system operates in a manner similar to epicyclic gears. I will have more to say about that eccentric mounting in a moment, but first I want to say that I simply do not understand this in any detail. Every time I try to reason it through, my brain breaks. The explanation in Woodward and in another work as well as several YouTube videos do not make it any clearer to be and mostly they end up with a statement along the lines of "you have to see it to believe it". It clearly does work. I just can't understand how, and why having 11 notches on the daisy leads to a 12:1 reduction.

I've been a little evasive about exactly what is eccentric, and the reason for this is that I think the design in Making Wooden Gear Clocks is incorrect. In the design as shown in exploded form in the book, on the accompanying plans, and in the photos showing it being assembled, the daisy is mounted co-axially on the minute arbor. A part called the tri excentric in the book is also mounted on the arbor, such that its axis of rotation is offset from the axis of the minute arbor. The tri rotates about this offset axis. Thus the parts look like this:


The daisy therefore stays stationary while the tri and hence the hour hand rotate around an axis which is not coincident with the minute axis. As a consequence the hour hand moves off-center to the minute hand. You can see this in the following video, in which I turn the minute wheel by hand.

I have not been able to find any video of other builds of this clock which show it running for more than a few seconds, which is not long enough to see the problem. Consulting Woodward, Shelley's book on Crane, and several YouTube videos (example 1, example 2, example 3) show that this design is simply wrong. The tri and hour hand should rotate on the same axis as the minute arbor. To quote from Woodward:
the daisy wheel is mounted loosely on an eccentric collar rigidly fixed on the central arbor of the clock.
It is the daisy that should be eccentric to this axis, and although the daisy does not rotate, it does move a little to accommodate this motion. It's hard to believe that the author of the design and the editors of the book failed to notice this. As far as I can tell, they have not acknowledged the error or published any errata for the book.

After initially building the clock according to the published design, I reworked the daisy and tri to the correct configuration. Here is how the hour hand motion looks now:


The reworked parts look like this:


As with some of the earlier clocks, I view this as a clock demonstrator rather than a practical timepiece. I wanted to see how the mechanism worked. For this reason, I didn't spend a lot of time on the frame and base. I quite like the minimalistic "candlestick" design. I thought it might be too unstable, but it seems OK.

I used my own electronics in this clock, detailed in an earlier post. One unexpected issue I had was this: the clock was working fine when I had it attached to a piece of plywood for testing. Then when I mounted it on its base, the pendulum became very unstable. It would jump all over the place. This turned out to be because the magnet was attracted to the screws in the corner of the case and to the USB connector. I solved this by using weaker magnets and moving them a little lower to compensate.



Wednesday, October 13, 2021

Driver for an electromagnetic pendulum

In a previous post, I described some experiments with circuits for driving an electromagnetic pendulum. The results were not very satisfactory, and for the Thriecan clock, I ended up using a commercial module. I have since revisited this, and now have something I am happier with. To recap: the pendulum contains a magnet. As it approaches the center of its swing, a sensor detects its presence, and then energizes a driver coil to impart some momentum to the pendulum. Ideally, you use one coil as both the sensor and driver. The circuit I present here uses an Arduino and a small number of discrete components.

Some initial experiments

In the first attempt, I was unable to get a strong signal from a coil: only a few millivolts. This is probably because of the geometry of the coil, which had a narrow diameter but was quite long (about 25mm), based on the one in the instructions for the Toucan clock. It is better to have a shorter, fatter coil, so that more of the winding is close to the magnet as it passes by. I rewound the coil on a bobbin with a 6mm inner diameter and a length of 10mm. I did not count the number of turns or measure the length of wire. Based on its resistance (35 ohms) and the resistance per unit length for 32 AWG magnet wire, it is around 60m. The winding is about 30mm in diameter.

I wanted to know how much difference the specific magnet made, so I constructed a pendulum with the magnet on the end of a 300mm brass rod and measured the voltage when the pendulum was dropped from a known position. The magnets I had lying around were:

  • 20mm x 4mm N38
  • 12mm x 3mm N35 (I think)
  • 12mm x 3mm N42
  • 10mm x 3mm N52
All but the first gave about 0.3V. If you add a second or third one, this goes up by 0.1V per additional magnet. The 20mm one gave 0.5V or around 0.65V with two. I was a bit surprised that the grade of magnet didn't make a difference, as each unit of N rating is supposed to correspond to an extra 1% in magnetic field strength (or something like this).

The distance between the magnet and the coil also makes a difference. My test setup didn't allow me to change it much, but an increase of distance between the coil and the magnet from about 3mm to about 6mm dropped the voltage by half.

The circuit

Here is the circuit. I'll explain the ideas behind it in a moment.

(Diode: 1N4001. Transistor: PN2907.)

The voltages I measured aren't enough to register as a digital signal when connected to an Arduino and are maybe too low to switch a transistor which could be attached to a digital input. An alternative is to use an analog input of the Arduino and then set a threshold in code based on the analog reading. With a resolution of about 5mv per step, we should be able to do this. A reading of even 0.1V would be detected as a value change of 20 on the analog input.

If you search the web for advice on connecting a coil as a sensor to an Arduino, there is a lot of unclear (and possibly misleading) information. The main concern is that transients from the coil could exceed the input voltage range of the Arduino and so damage it. Various solutions involving voltage dividers or Zener diodes can be found. I don't think this is necessary. The Arduino inputs have protection diodes which limit the voltage to just above 5V and just below 0V. The issue with the protection diodes is that they can only handle a limited amount of current. 1mA might be OK, 100uA definitely is. More than that would likely burn them out. In the circuit above, the flyback diode on the coil should eliminate most of the risks, but to be sure, I designed the circuit to allow for a 10V swing. In this case, with a 100k resistor on the analog input, the current would be 100uA and we are OK. Relying on the protection diodes is something that people argue about on various forums, leading to some of the other solutions. An application note from Atmel has an example in which an analog pin is connected safely to mains at 110-240V AC. Also take a look at this.

There is one further issue with using the analog input. The Arduino datasheet recommends that the input impedance to analog pins should be 10k or less, and we want to use 100k. Looking into this in more detail, the reason appears to be that the analog to digital converter works by charging a capacitor internally and them sampling its voltage. The internal capacitor is 14pF and it should be charged in 6us or less at standard sampling rates. With a 100k external resistor, we have a time constant of 1.4us, so we should be OK.

The remaining input element is the 10uF capacitor. It largely gets rid of noise and ringing on the input without slowing down the signal too much. Looking at the signal on an oscilloscope, there is still a small and short duration spike at an acceptable level. With no capacitor at all, there are spikes for about ten milliseconds before the circuit settles down.

On the output side, we simply drive a transistor from a digital pin. When the pin is low, the transistor turns on and the coil is energized. The sensor can't be read at the same time, and that's OK as we don't need to. The flyback diode helps to protect the transistor when it turns off and the field in the coil collapses.

In previous experiments, I found that I needed external power to get enough drive in the coil, mainly due to use a coil with less good geometry. For this version, the 5V output of the Arduino worked fine. Its Vin can also be used if a higher voltage or current is needed. I experimented with an Arduino Uno, but will move to using a Nano soon.

The code is similar to the version I gave before, namely:
  • read the sensor
  • when it exceeds a threshold (20), wait (10ms)
  • turn on the coil (200ms)
  • turn off the coil, and wait a little longer (10ms)
  • keep going
I still have to tune the exact timings and the threshold. These values give a very strong swing to the pendulum. Currently I am not using a weight bob or tuning to 1s per cycle, and this may affect the timing and possibly the voltage needed to drive the coil.

I've not fitted this to the Thriecan clock. My intention is to use it for a possible future design.

Sunday, October 10, 2021

The Thriecan Clock

 The Thriecan Clock is a modified version of Clayton Boyer's Toucan clock, adapted for 3D printing. The key feature of this clock is a electromagnetic pendulum. There is a magnet attached to the end of the pendulum and a coil hidden in the base. As well as providing the timing, the pendulum also provides the energy to drive the clock. As the pendulum approaches the vertical position, the electronics attached to the coil senses the magnet and applies a pulse to the coil. This pushes the magnet and hence the pendulum away and the process continues. The top of the pendulum is attached to an arbor and this turns a cam with two pawls. One pawl, called the pick-up pawl, pushes on the escape wheel. The other pawl then holds the escape in place while the pick-up pawl moves back for the next cycle. The remainder of the clock is a standard gear train to divide the rotation of the escape wheel down to minutes and hours.



The version you see here is not quite final. I am going to replace the battery pack with power connector so I can connect it or a different power source. There is enough room to locate the battery pack in the base, but it disrupts the operation by attracting the pendulum. There's also a few screws sticking out while I make final adjustments and I will then replace them with shorter ones.

Adapting the design

The original design was intended to be made out of wood. You can see many examples on the Toucan clocks YouTube channel. I bought a copy of the plans in DXF format and loaded them up into Fusion 360 to provide a starting point for the sketches. For parts where the dimensions were critical, I used these sketches directly, and for others I either adapted them (for example, the cam) or replaced them entirely (for example the weight bob). The original design used 3/8 inch arbors, and I replaced these with 3mm ones. Instead of printing separate gears, connectors and pinions and then gluing them together, I merged them into a single part. This is something which works nicely for 3D printing, but it difficult or impossible in woodwork. I undersized many of the holes for the arbors and for the pendulum shaft and drilled them out to either a tight fit or a loose one. I've not always been successful in getting good tight fits and so where possible I also provided holes for set screws.

One of the hardest parts to adapt was the frame. It is much too big to fit on the printer bed. It's possible to split up large pieces like this and then glue or otherwise connect them. However, I didn't like where the splits ended up so I changed the shape of the frame. It still needs to be split into three pieces: the main part of it, the left foot, and the curve reaching down to the right foot. You lose the nice curve on the left hand side of the original design by doing this. The joins are hidden behind the dial on the left and where the arc on the right joins the vertical part. In each case, as well as gluing the parts, there are some metal pins joining them. These help keep the parts aligned while the glue sets and provide a little extra strength. The dial is also slightly smaller, and has a central bar to help support one arbor and the hour wheel. It's held on to the frame with two M3 screws. I didn't really think ahead here, so I ended up having to use 45mm screws with a bit of padding behind the frame to get the length just right.

One reason for wanting to try this specific design was to see how easy it is to start with a plan designed for woodworking and adapt it for 3D printing. It worked out somewhat well. The process was a bit hindered by the ways the plans are supplied: the DXF is a single gigantic file some parts of which are actual plans, and some parts of which are descriptive text, assembly diagrams and other auxiliary information. It seems an odd way of doing things. Fusion 360 gets a bit heated when you load all this in, and so a fair amount of initial pruning was needed. I'm also a novice with Fusion 360, so the way I did some things might not be best.

The pendulum

The pendulum is a 2mm brass rod with the magnet holder as the bottom and the weight bob around the 25cm mark. Adjusting the position of the weight is a bit fiddly as it involves loosening the screw underneath it, and sliding it up or down. The bob holds quite tightly to the shaft so adjustment can be down without tightening the screw until it is in its final position. The weight itself is a few M3 screws in the shiny little bucket.

The pendulum is connected to the cam with a 3mm brass shaft. This is a problematic part of the design, as the weight of the pendulum is greater than that of the cam and pawls, causing the shaft to tilt to the back. There are a few ways this could be fixed; perhaps a counterweight on the front, or a longer support glued to the back of the frame. Another option would be to move everything in front of the from forward and lengthen the shaft. For now, it works OK as it is.

One tooth or two?

Looking at the examples of the Toucan clock on YouTube, there are two different philosophies about the position of the pick-up pawl and the stop pawl at the point where the pick-up pawl starts to push on the escape wheel. They can either be on adjacent teeth like this, or separated by one tooth like this. The clock runs either way, and you can set the way it works by adjusting the angle between the pendulum and the cam. It may make some difference to the required swing of the pendulum. Looking at the first 10 videos on the YouTube list, I saw 8 were adjacent (the Toucan closes its beak) and 2 were separated (the Toucan eats with its mouth open). I went for adjacent, which sets the cam a bit anticlockwise from the pendulum.

Driving circuit

I experimented with various driving circuits. As mentioned in a previous post, I had no success with getting a 1 or 2 transistor circuit to work, and after fiddling around for a long time, I wasn't happy with any of the other options I tried. In the end, I decided to buy a ready made module from carveshop. It works well, but is a little pricy. I plan to spend some more time looking into this, in part because I have a second electromagnetic pendulum clock I would like to try.


Sunday, October 03, 2021

An electromagnetic pendulum

 For a future clock project, I would like to construct an electromagnetic pendulum. The pendulum has a magnet at its tip, and base contains a coil of thin wire. We aim to detect when the pendulum is approaching, and then turn on the coil for a short time to add extra energy. This can be done by turning on the coil to attract the magnet before the pendulum reaches the center (vertical), or waiting until it has passed the center and turning on the coil to repel it.

There are many different ways of doing this, and it was used in commercial clocks before electronic movements took over. The German-made Kundo clocks are one example. If you look on the web, you will find many articles about electronic pendulums, whether for clocks or just as toys, with a variety of different circuits. One of the best descriptions is Kundo battery clocks by Rod Elliot, with several possible circuits and a lucid explanation of how they each work. There is a 2 coil, 1 transistor design, used in Clayton Boyer's Toucan clock, and two variants of a 1 coil, 2 transistor design from the Kundo clocks themselves. In another article on the same site, Rod Elliot notes that there is some trial and error in getting these circuits going. After playing around for a few days without getting to anything reliable, I agree. I also found a site with a very similar circuit and a comment thread full on people saying how they never managed to get it to work. I'm not sure why I had so much difficulty. I know that for a few components (capacitors mainly), I didn't have the exact values and had to come up with a substitute. I tried out several different coils that I had around. Some didn't produce enough voltage to turn on the transistors. They would need more turns or more cross-sectional area, both of which affect the induce voltage. Others could clearly turn on the transistors but didn't impart enough energy the the pendulum.

There are other solutions, both analog or digital. One analog option is to replace the transistors with two or more stages of op-amps. You can then tune the sensitivity of the triggering better, and also add some delay before the pulse to the coil happens. Other solutions use a simple microprocessor like a PIC, or a TI chip.

I decided to go with a simple and highly controllable solution. I had some KY003 Hall effect sensor boards in my stock of parts, and so I just connected one to an input pin on an Arduino. The Arduino can't drive the coil directly, so I hooked up an output pin to a transistor, like this:

The transistor is a PN2222, and the Arduino output pin connects to the 22k resistor.

The code is quite simple:
  • wait until the Hall effect sensor turns on.
  • wait a while to allow the pendulum to reach the center.
  • energize the coil for a while.
  • check the Hall effect sensor has turned off (in case we are still within range).
The pendulum itself if a 30cm brass rod. I want a period of about 1 second, so there is a weight around 25cm from the pivot. The magnet is at the end. The delay after detecting the sensor should be long enough for the pendulum to reach or just pass the center. If the angle of the pendulum at its extreme is P, and the angle at which we detect the sensor is S, then the delay should be arccos(S/P)/6.28, to a first approximation. The 6.28 comes from the angular frequency being 6.28 radians/second for a 1 second pendulum. See here. None of this is exactly right, as it assumes a small angle for P, whereas I actually see around 20 degrees in each direction. It also does not allow for extra energy being added to the system. But it will do to get roughly the right values.

This is the prototype working. It needs a small nudge to get going:

Here's the code. Note this is a prototype and might change before the final version.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Electromagnetic pendulum controller.
//
// Detect the magnet with hall effect sensor on this pin...
constexpr int hall_sensor = 3;

// ... then wait this many milliseconds ...
constexpr int detect_to_activate_delay = 23;

// ... then energise this output pin ...
constexpr int output = 7;

// ... for this many milliseconds ...
constexpr int activation_duration = 200;

// ... with this much slop in milliseconds when checking the sensor is out of range.
constexpr int sensor_cooldown = 10;

// Use this pin for LED.
constexpr int led = 13;

void setup()
{
  pinMode(led, OUTPUT);
  pinMode(output, OUTPUT);
  pinMode(hall_sensor, INPUT);
  digitalWrite(led, LOW);
  digitalWrite(output, LOW);
}

void loop()
{
  // Sensor reports LOW on detecting a magnetic field.
  if (digitalRead(hall_sensor) == LOW) {
    delay(detect_to_activate_delay);
    digitalWrite(output, HIGH);
    digitalWrite(led, HIGH);
    delay(activation_duration);
    digitalWrite(output, LOW);
    digitalWrite(led, LOW);

    // Wait until the magnet is out of range of the hall effect sensor, and then allow a little longer.
    while (digitalRead(hall_sensor) == LOW) {}
    delay(sensor_cooldown);
  }
}


Additional notes

After some experimenting with this form of drive, I think there are some good and bad points.

Good points: it is very easy to build as the circuit is so simple. It's convenient for tuning the timing. You can add a few extra lines to report the time between ticks. Note that the activation delay and duration make very little difference to the timing, so this is about adjusting the position of the bob on the pendulum.

Not so good: getting both the Hall effect sensor and the coil close enough to the magnet is a challenge. I mounted the sensor on top of the coil, but this then requires a large coil to supply enough impulse. The force on the magnet goes down (if I remember correctly) as the square of the distance from the coil. To make life easy, my coil was whatever was left on a 4oz could of 30AWG magnet wire, probably about 300 metres. Anything much less than this didn't work. This could be solved by more careful design, such as mounting the probe embedded in the top of the coil or in the hole in the middle.