Report of Square Gear
Report of Square Gear
Report of Square Gear
The Problem
The first industrial application of gears appeared in the horizontal-shaft water mill, described by
the Roman engineer Vitruvius in 27BC. After the advent of Christianity, this mill type became
very popular throughout the Roman Empire, as slaves that had powered the mills were freed.
With the industrial revolution, the importance of gears rose significantly, as did the number of
materials from which they could be made.
Because standard circular gears have a long history and broad usage, their production is a very
well understood practice. Non-circular gears, on the other hand, are more exotic in their uses,
and mysterious in their production. While there is a sizeable amount of theory surrounding
gearing, it mainly concerns itself with the actual manufacture and design of circular gears.
My goal in this project was to design a piece of software for producing various square gears, to
then use that to generate computer descriptions of 3 distinct pairs for manufacture on the
Stratsys, and mount these gears in an interactive installation. As an additional goal, I wanted to
understand better how the theory of circular gears can be applied to non-circular gears.
Accomplishments
I used my software to produce three distinct pairs of gears:
two identical elliptical gears with eccentricity 0.65, major axis 1.0, 21 teeth
four identical oval gears with eccentricity 0.15, major axis 1.0, 30 teeth
an oval gear with eccentricity 0.15, major axis 1.0, 40 teeth, and its complementary gear
with 80 teeth
In order to write the software, I applied a good deal of circular gear theory to non-circular gears.
Only one flaw (besides the bugginess of the software on shapes beyond what I've shown here)
remains: something is wrong with the ellipses. The shape is slightly off. The teeth don't quite
mesh properly. In some places, they barely keep together and in others they are jamming
together. The flaw is quite minor, as I only learned of it once I nailed the gears down to the
board. In cardboard (or even nailed loosely to the board) they worked fine. My first hunch was
that the tooth design was flawed, but after look further into that, I'm still not convinced that's the
problem. They do rotate, but the imperfections are detectable. It may also be a phasing issue
(even though the number of teeth used was odd).
Rapid Development. I only had a few weeks to do the project, so there was no reason to
spend time pouring over fickle C code for unnecessary performance increases.
Extensibility. Foremost, I did not want to have to write seperate code for each of the three
pairs of gears. Additionally, I wanted the software to be able to produce any reasonable
gear, that could be described according to certain mathematical constraints.
Keep mandatory proprietary software to minimum. The software would produce SLIDE
files, but could be reworked to produce other formats (STL or SIF) relatively easily.
Furthemore, no tools (except perhaps SLIDE) that aren't widely available would be
necessary.
Stay as far away as humanly possible from TCL. I've had dealings with frustrating
languages, but this one certainly takes first prize for the worst.
** Some consideration for the dedendum size of the gear must be taken into account here. I
subtracted the dedendum from the radius at each point and used that to compute the cartesian
distances. This slightly distorts the shape, but has the effect that all the teeth are equally far on
the base line from their neighbors. Another approach could be taken to subtract the dedendum
value from the gears at a later point (during tooth placement), but the above property will no
longer hold. I have the hunch that certain shapes react to one method better than others. For
example, because ellipses have an off-center axis of rotation, pulling the teeth towards the axis
(by reducing r by the dedendum distance) results in teeth which are not equidistant from their
neighbors.
This algorithm seems to work fairly well for the shapes I dealt with. It is by no means perfect in
that in has difficulty with certain shapes, probably due to precision not being high enough.
For the generation of the pair of offset gears and the two conjugate gears from the description of
just one, the algorithm was slightly modified. Instead of dropping down a tooth when the circular
pitch distance is reached, a tooth is dropped down when half of that distance is reached. The
alternating points are then stored in seperate tooth location lists: one for actual teeth, one for the
gaps between them. The gap locations can be used to generate the offset gear or the conjugate
gear (depeding on the desired gear pair).
Algorithm: Geometry Generation
After the teeth locations are computed, they are sent to another function that creates the actual
points, faces, and SLIDE object for the teeth and the entire gear. Care has to be taken to orient
the teeth properly according to the tangent of the surface. The values of dx/dt and dy/dt can be
stored during computation of the teeth locations or computed on the fly during generation.
Similar care needs to be taken to create teeth with a proper involute. For circular gears, a fixed
involute equal to the radius of the circle is used. In ideal non-circular gears, a non-circular
involute would have to be generated from the entire shape. This is a seriously complicated
undertaking. I avoided it by approximating the involute curve with a circular involute, created
from a circle with a radius of the radius of curvature at that given point. Litvin recommends this
as a reasonable approximation. In physical gear construction, tools don't exist for generating noncircular involutes, so this is a necessity in the industrial world.
Algorithm: Conjugate Gear Generation
It is highly desireable for the user to be able to specify a gear shape, have the software produce
that known gear, and then produce a conjugate gear that will mesh with it, even if the actual
mathematical description of it is not explicitly known. This algorithm is similar in nature to the
one, I showed in my initial presentation. It has, however, been modified to work properly.
As mentioned above, the algorithm for teeth locations can be modified to run in a mode that
produces a list of teeth locations and gap locations. The teeth locations (from the known gear) are
turned into a gear using the same methods as if this gear were not part of a conjugate pair. The
gap locations are used to produce the actual teeth locations for the conjugate gear. When a tooth
on the known gear meshes with a tooth on the conjugate gear, the tooth from the conjugate gear
will occupy the same position as the gap neighboring the known gear tooth.
The general equation for describing the relation between a known gear (defined by r() and its
conjugate (r'() is,
r() + r'(') = E (1)
where E is the distance between the two axes of rotation. ' is equal to - , because if there are
two meshing gears, a tooth on the known gear at = 0 will be meshing with a tooth on conjugate
gear at = .
Because these two gears will be meshing, we know that the distance between the teeth on both
gears must be equal (d in the diagram below).
We also know from (1) that,
r1+r1' = E (2)
and that
r2+r2'= E (3)
We also know the values for r1, r2, from the polar description ofthe gear shape, r1' from (2)
r2' from (3).
Therefore, the only unknown value is ', which we can solve for by using the law of cosines,
(r1')2 + (r2')2-2(r1')(r2')cos(') = d2 = (r1)2 + (r2)2-2(r1)(r2)cos()
which becomes,
' = acos( ((r1)2 + (r2)2 - 2(r1)(r2)cos() - (r1')2 - (r2')2) / (-2(r1')(r2')))
Only one quantity remains unknown: E. It cannot readily be solved for, so a progressive
refinement procedure (as was done in the tooth location computation) was employed here to
solve for it.
I Learned ...
that even something as seemingly simple as a gear can take up many lines of code to
generate, and even more polygons when actually generated.
that the FDM machine does really strange things sometimes. I still don't know what
happened to the first run of the black two-period oval. It looks like they burned and
warped! See the log for more information. The red oval gears in the final mounting were
never fully completed because the FDM machine ran out of filament, but did not realize
it. I ended up adding them because they are colorful and still mesh properly with the
complete green oval gears.
as an axiom of the previous line, to budget lots of time for production and re-production
of FDM parts due to machine or design faults. The first set of elliptical gears could not
mesh because they contained an even number of teeth. With an even number of teeth, the
symmetry is not quite right. To resolve this problem, the number of teeth must be odd, or
the second gear must have a different phasing of teeth than the other. This was
implemented in the generator for the elliptical gears (el-gear.py).
that approximations can be fussy to work with, but when they do work, they can be
perfectly good at achieving a goal.
as mentioned in my last presentation, that I don't know as much about math as I would
like to. While doing a lot of the background research for the project, I was intrigued by so
many of the various mathematical topics. It still amazes me how everything seems to
connect somehow to everything else.
that I'm much better at working with computers than power tools. That big hole in one
gear was the result of drilling to deep with the 1/4 inch bit. But it was great to actually
produce a real object in a computer science class. That's certainly something I had never
done before.
Many of the algorithms need to be more generalized. For example, creating conjugate
gears with a large amount of concavity or a large eccentricity causes teeth to collide.
Some of the buys may not be able to be overcome: some shapes just are not good for
gearing. Others are errors of precision or too specific assumptions.
It would be nice if the software could generate STL files directly. It takes some time for
SLIDE to parse the large files that are being generated. For example, the 80-tooth gear
requires about 1700 points, which are generated using the standard SLIDE text syntax. I
still would like to stay away from TCL, but it would still be useful if a small amount of
TCL could be generated to create the points. More compact code could result.
Of course, more gear shapes could be added to the system. This would probably require
some debugging of the existing code for certain shapes. Others would no doubt work fine
as is.
Software
The relevant source code is available here.
And here's the documentation.
Log
Throughout this report, I kept a log of all the developments and happenings of this project.
There's some more detail (and photos) of problems that were overcome on that page.
Bibliography
Encyclopaedia Britannica, topic heading: "History of energy-conversion technology,
Waterwheels"
Mathworld, topic headings: ellipse, involute, curvature, radius of curvature, law of cosines
Gear Geometry and Applied Theory by Faydor L. Litvin, 1994, published by Prentice Hall.