Rack & Pinion Calculator¶
A clean, reusable way to convert rack travel into pinion tooth count.
Pay Attention
All the calcuations here assume that we are using a module of 1. Sometimes you will see the module omitted from the practical applications of the equations because it's simply one.
The Idea¶
Calculating the distance a rack will move is actually a lot easier than you think (haha just kidding :). We can think of the rack as a regular gear. After doing the calculations on it, we can "unroll" that gear, using the circumference of the gear as the rack length.
The Formulas¶
Variables:
- \(R_L\) = rack length (mm)
- \(m\) = module
- \(T_C\) = tooth count
- \(\theta\) = available rotation (degrees)
- \(G\) = rack movement multiplier from the gear ratio
- \(P_D\) = pitch diameter
- \(\tau\) = torque
- \(r\) = pitch radius
- \(F\) = linear force at the pitch diameter
Formula 1: Pitch Diameter¶
Formula 2: Linear Force at the Pitch Diameter¶
Formula 3: Tooth Count from Rack Length¶
Formula 4: Rack Length from Tooth Count¶
Formula 5: Limited Pinion Rotation¶
When the pinion does not rotate a full \(360^\circ\):
Formula 6: Limited Rotation with Gear Ratio¶
When the pinion does not rotate a full \(360^\circ\), and the rack movement is multiplied by gear ratio \(G\):
Formula 7: Rack Travel from Pinion Rotation¶
When setting up a motion link, the rack travel is the same as the fraction of the pinion pitch circumference that has rolled along the rack:
This is Formula 4 scaled by the fraction of a full turn. A full \(360^\circ\) rotation moves the rack by one full pinion pitch circumference. A partial rotation moves the rack by that same fraction of the circumference.
Example: ASA's Re-arming Mechanism¶
Pre-requisites¶
- Servo travel: \(100^\circ\)
- Servo force: \(45kg \cdot cm\)
- Force required: \(>5kg\)
- Travel of rack required: \(~20mm\)
- Module: \(1\)
- Pressure angle: \(20^\circ\)
- Backlash: \(0.15mm\)
Working¶
20mm of travel is required for the rack. Therefore, we can use Formula 3 to find the needed rack tooth count:
Round up to 7 rack teeth. Backstop teeth can be added later.
Since the rack tooth count was rounded up to 7, find the new corresponding rack length using Formula 4:
We want the rack to receive the equivalent of one full pinion rotation, which is \(360^\circ\). That corresponds to the new rack movement of \(21.99mm\). A 1:1 drive would need the servo pinion to rotate \(360^\circ\), but the servo can only rotate \(100^\circ\).
This gives a motion ratio, not a tooth ratio, of:
So the mechanism needs a \(3.6:1\) motion increase from the servo to the rack. The rack moves 3.6 times farther than it would with a direct 1:1 drive, but with 3.6 times less available force.
Because the servo-driven pinion must create that motion increase, the physical tooth relationship is written the other way around:
Therefore:
Round the pinion up from 25.2 teeth to 26 teeth.
Note
After rounding, the actual tooth ratio is no longer exactly \(3.6:1\). It is: $$ \frac{26 \text{ pinion teeth}}{7 \text{ rack teeth}} = 3.71:1 $$
Now calculate the force at the pitch diameter:
- Servo torque: \(45kg \cdot cm\)
- Pinion pitch diameter, using Formula 1:
Calculate the available linear force at the pitch diameter using Formula 2:
Since \(P_D = 26mm = 2.6cm\), \(r = 1.3cm\). Therefore:
Now apply the motion increase. Since the rack moves farther, the available rack force is reduced by the same ratio.
Note
The actual ratio changed when the gears were rounded from 6.37 to 7 rack teeth and from 25.2 to 26 pinion teeth. The actual tooth ratio is: $$ \frac{26 \text{ pinion teeth}}{7 \text{ rack teeth}} = 3.71:1 $$
That reduces the available rack force to:
There will be more losses than the math shows, but that is still comfortably above the required \(3.6kg_{(max)}\).
Any additional teeth on the rack do not affect the ratios; they are just added as backstops. Do not add any teeth on the pinion, because that changes the diameter and therefore the ratio.
Understanding Rack Movement¶
The confusing part is the rack tooth count. Once the rack is modeled as a straight rack, the rack tooth count does not determine the motion ratio. The rack tooth count was only used earlier to decide how much linear travel we needed.
The thing that determines how far the rack moves is the pinion pitch diameter, which comes from the pinion tooth count and module. The rack moves by the amount of pinion pitch circumference that rolls along it.
You can think of this just like a tire rolling on the ground. It's literally the exact same concept!
So do not think of the rack as getting "$3.71x more revolutions" than the pinion. The rack does not revolve at all. It just slides. The final rack travel is literally determined by how much the pinion rotates.
The \(21.99mm\) value came from the rounded 7-tooth rack equivalent over a full \(360^\circ\) turn:
But after rounding the pinion to 26 teeth, the actual motion ratio is \(3.71:1\), not \(3.6:1\). For the final rack movement, use the actual 26-tooth pinion, because that is the gear physically rolling against the rack.
Use Formula 7:
This works because a 26-tooth module 1 pinion has a full pitch circumference of:
The servo only turns \(100^\circ\), which is:
So the rack moves \(27.78\%\) of the pinion's full pitch circumference:
Warning
The \(3.71:1\) ratio explains why the pinion became 26 teeth, but the rack travel itself is still calculated from the pinion's actual rotation and pitch circumference.
Fusion Motion Link Setup¶
The Fusion question is simply:
How much rack travel happens when the 26-tooth pinion rotates by \(100^\circ\)?
In Fusion, set the motion link to approximately 22.69mm of rack travel per 100 degrees of pinion rotation, not 21.99mm per 100 degrees.
Tooth Rotation and Rack Tooth Pitch¶
For Fusion parameters, tooth indexing comes from splitting one full pinion rotation by the number of teeth on the pinion. One complete tooth-to-tooth step is one tooth pitch around the pinion, so the angular step is:
Half a tooth is half of that angular step:
The rack distance for one tooth is the circular pitch. For metric module gears, circular pitch is:
So with module 1, each rack tooth is:
Half a rack tooth is:
With module 1:
For the 26-tooth pinion:
That means rotating the pinion by about 6.9 degrees shifts the rack by half a tooth, or 1.571mm. Rotating the pinion by about 13.85 degrees shifts the rack by one full tooth, or 3.142mm for.
Fusion Parameter Formula List¶
Use these as user parameters when setting up the rack and pinion in Fusion:
| Parameter | Unit | Fusion expression | Result with 26 teeth, module 1 |
|---|---|---|---|
Pinion_Tooth_Count |
none | 26 |
26 |
module |
mm | 1 mm |
1.00 mm |
one_tooth_rotation |
deg | (360 / Pinion_Tooth_Count) * 1 deg |
13.846 deg |
half_tooth_rotation |
deg | (360 / Pinion_Tooth_Count / 2) * 1 deg |
6.923 deg |
one_tooth_distance |
mm | PI * module |
3.142 mm |
half_tooth_distance |
mm | PI * module / 2 |
1.571 mm |
If you want to calculate rack travel from any pinion rotation in Fusion, use the same rolling-circumference relationship as Formula 7:
For a parameterized Fusion expression, that is:
For a half-tooth check using half_tooth_rotation, this becomes:
With the 26-tooth module 1 pinion, that returns 1.571mm, which is the half-tooth distance. For a true one-tooth distance, use one_tooth_rotation or the simpler PI * module.
References¶
- Formula 1 gives the pitch diameter relationship: \(P_D = T_C \cdot m\).
- Formula 4 gives full pitch circumference / rack length from tooth count: \(R_L = T_C \cdot \pi \cdot m\).
- Formula 7 gives rack travel from partial pinion rotation: \(R_L = T_C \cdot \pi \cdot m \cdot \frac{\theta}{360}\).
- Metric gear circular pitch is the tooth-to-tooth distance along the pitch circle: \(p = \pi \cdot m\). On a matching rack, that same pitch becomes the linear distance from one rack tooth to the next.
Summary¶
- Servo travel available: \(100^\circ\)
- Required rack movement: \(20mm\)
- Rounded rack design length: \(21.99mm\)
- Final rack travel from 26-tooth pinion over \(100^\circ\): \(22.69mm\)
- Rack tooth count used: \(7\) teeth, plus any backstop teeth needed
- Pinion tooth count used: \(26\) teeth
- Motion ratio needed: \(\frac{360^\circ}{100^\circ} = 3.6:1\)
- Actual tooth ratio after rounding: \(\frac{26}{7} = 3.71:1\)
- Pinion pitch diameter: \(26mm\)
- Force at pinion pitch diameter before ratio loss: \(34.6kg\)
- Final estimated rack force after ratio loss: \(9.33kg\)
- Required force: \(3.6kg\)
- Estimated safety margin: \(\frac{9.33kg}{3.6kg} = 2.59x\)