The number of teeth is not a physical dimension in the same way as the diameter, but it is important in determining some design dimensions and in meshing issues. We first make some observations about the number of teeth before dealing with the measured dimensions.
We will consider here meshing gear wheels that are placed on axles turning in a normal Technics bearing beam.
Consider the diagram below, with two 24-tooth gears and two 8-tooth gears, and where the axle holes have their centres of course exactly 8mm apart:
The two 24-tooth gears are designed to mesh if their axles are three holes apart. If we had a material that does not allow slipping, we could replace the gears with smooth discs (the pale yellow circles) and those discs would touch in a point exactly halfway between the axle holes.
The rolling diameter of a gear is the diameter of an idealised disc that allows it to roll on the equivalent idealised disc of another gear that is normally meshing with it.
The yellow discs would have identical diameters which would be exactly 24mm because that is 3 times the distance between axle holes. These discs follow from design, they are not measured.
The same reasoning applied to the two 8-tooth gears gives smooth discs of exactly 8mm diameter.
Because the discs touch on the vertical tangential (dashed) lines that in the diagram lie exactly between axle holes, a disc representing a 24-tooth wheel will also roll on one representing an 8-tooth gear wheel, as indeed a 24-tooth gear meshes with an 8-tooth one.
Both 8-tooth and 24-tooth wheels also engage with 40-tooth gears, because the disc replacing a 40-tooth gear has a diameter of exactly 40mm.
It turns out that
The rolling diameter in mm of any Lego gear is the same as its number of teeth
The drawing below shows some more examples. The number of teeth is given at the top left inside each wheel and the distances at the bottom are in mm.
Gears with a number of teeth that is an odd multiple of 8 (8, 24, 40) will mesh when placed on axles that are an odd number of holes apart.
However, gears with even multiples (e.g. 16) will need half a space when meshing with odd multiple ones.
Rack and Pinion
Given that the circumference of a rolling disc is πd where d is the diameter and d is the same as the number of teeth, a tooth takes up πd/d = πmm along the circumference.
Lego gear teeth are 3.14159…mm long.
For a wheel of infinite diameter, the width of a tooth should still be 3.14159…mm, and the teeth then form a rack.
First note that a rack is, like a normal brick, physically 31.8mm long, but while that gives the usual 0.2mm play between two consecutive racks, they should still act as if the play were not there, and so the teeth are made as if the rack occupied exactly 32.0mm.
A Lego rack has 10 teeth over a span of 32mm (four studs of 8mm) and the pitch of the rack teeth is therefore 32/10=3.2mm. The difference is 3.20 - 3.14159 or less than 0.06 in 3.2, less than 2%.
It is possible that the design of the gears was conditioned by the necessity to find a whole number of teeth for a rack of 32mm.
Where it might come from
We want gears to mesh nicely when their axles are a multiple of 8mm apart. Using mm as the unit, their rolling diameters must then also be multiples of 8 and therefore the circumference of their rolling disc is a whole multiple of 8π, say p8π.
We need a whole number of teeth along the circumference of even the smallest gear, say it has n teeth. Then larger gears will have pn teeth and the width of a tooth on any gear is p8π/pn or just 8π/n.
Let the smallest gear have n teeth and rolling diameter 8mm.
If the rack's teeth correspond to the wheel's teeth, they are also 8π/n wide.
The number q of teeth of this width that can be laid out over the rack is
And q is a transcendental number. To get to the end of the rack we need m whole teeth but because 8π/n is not a rational number (given the presence of π) m teeth do not fit the rack exactly if it is 32mm long, the length of a brick. If m teeth fall a bit short then we could imagine stretching them each a little, or alternatively, if m teeth go a bit too far, squashing them a little:
If the stretching or squashing effect is small, the teeth will still function well enough since there is a little play anyway.
With exactly m stretched or squashed teeth on a rack brick the width of a rack tooth is 32/m.
Because π is not a rational number, but m and n must be whole numbers, there is no way to make 8π/n equal to 32/m.
It would not be so bad if, for a certain value of n, the corresponding value of q came close enough to a whole number m: the stretching or squashing will then be small enough that wheels will roll over the rack well enough.
Let’s make a graph of the percent difference between q and its nearest integerm, as a function of n. We note that the integer nearest to q can be less than q or greater than q. The percent difference is always a positive number:
Obviously, for a gear with only one tooth the situation would be rather pathetic, but we also expect that as the number of teeth becomes very large it matters less and less and the error between the teeth of the wheel, rolled out over the length of the rack, and the rack with a whole number of teeth becomes insignificant as the teeth get smaller and the stretching/squashing is never more than half a tooth.
But we don’t want to opt for a large number of teeth, we want a small value of n, which has a good m.
That n should also have other properties such as being even, possibly a multiple of 3 as well. Looking at the graph we see that the first value where the difference is really small is 11, but that is not a good number for use in toy gear wheels. Anything further along is too large (remember that n is the number of teeth of the smallest gear, the one with rolling diameter 8mm). The next smaller number is 7, also a prime number and not good for toys. Eight has a difference of 1.86…%, not bad. It is not a multiple of 3, but it is even and a multiple of 4. That is the choice made by Lego, though perhaps as the result of a very different reasoning.
Note that 12 has the same percent difference, and although it is a multiple of 3, it is quite a lot larger than 8: the teeth would be much smaller, perhaps too thin (see discussion). I suspect that there also is or was a cult of powers of two inside Lego: the original Duplo train had circles divided into 8 and the number 8 turns up in many places.
(*) For a spreadsheet this formula (or something similar) may work: =100*ABS((4*n/PI()-ROUND(4*n/PI(),0))/ROUND(4*n/PI(),0))
where n has to be replaced by a reference to the cell holding the value of n.
The rack's rolling radius
The rolling disc of a rack has an infinite radius, and may be represented by a line that lies somewhat above the bottom of the rack’s teeth and should touch the rolling disc of the wheel that rolls over the rack.
I could not find a simple construction in which a gear meshes with a rack, whereby the gear’s axle is in a Technics bearing and the rack at some distance that is a multiple of plate thickness (3.2mm) except for the gear of 8 teeth:
Since the rolling radius of the pinion is 4mm, and as the axle hole is 5.8mm above the bottom of the Technics bearing, the “rolling circle” of the rack touches the rolling circle of the pinion if it is 5.8-4.0=1.8mm above the bottom of the Technics bearing and 3.2+1.8=5mm above the bottom of the rack brick. That gives us the rolling radius of the infinite-diameter rack gear: ∞+5mm. ☺
Known rolling diameters
(This does not include the conical wheels of differentials.)
To my knowledge there are gear wheels of 8, 12, 16, 20, 24, 28, 36, 40, 56 and 168 teeth.
Here are all rolling diameters I know of:
Of these the one with 28 teeth is found on one side of a differential box; the 56 one is the outer ring of a turntable, and the 168 one is the inner ring of a large wheel that comes with the Hailfire Droid (Technics part x784, apparently only in the Star Wars series set 4481 of 2003). There is also a 24-tooth inner ring in a turntable.
Dimensions of common Gears
For reference here is a drawing of the outlines of the common gears discussed:
Below is a table of measurements I made to the best of my abilities with the tools I have. It is unclear why there are several types of tooth and why the values of the inner and outer diameters are not coherent.
A gear wheel has an outer radius R which is measured over the tops of the teeth, an inner radius r which is measured at the base of the teeth (in between teeth), and the rolling radius t, which is somewhere in between.
Measuring of course is done on diameters, which are given in the columns labelled d measured, d effective and D. The t column gives exact numbers since they are derived directly from the number of teeth.
Double conical wheels mesh with normal gears in situations with parallel axles. However, they are considerably thicker and also prevent the tips of the teeth of normal wheels to reach the bottom between two of their teeth, i.e. the tips of normal wheels cannot touch their diameter d. For that reason I give an effective inner diameter which for double conical gears is somewhat larger than the measured diameter, as this touching is important for calculating meshing situations.
end of differential
end of differential
end of differential
Inside the Hailfire Wheel
Using the rolling diameters it is easy to prove that the following combination of gears will fit inside the large “Hailfire” ring:
That is because 24+40+16+8+16+40+24 = 168.
Note that all but the two 16-tooth wheels have axles that fit in the bearings of a normal beam; the 16-tooth wheels have their axles exactly in between holes. The beam outlined in red does not exist (it is much longer than the longest existing one).