AutomateDirectUSAMotion LibraryShop the parts catalog

How-to

Calculating Pulses per Inch for a Rack and Pinion Axis

Servo and stepper motion Published 7 min read

Short answer

Pulses per inch on a rack-and-pinion axis is (pulses per motor revolution × reduction) ÷ (π × pinion pitch diameter). With 2,000 pulses per motor revolution, a 2:1 gearhead and a 24-tooth pinion on a 24-diametral-pitch rack (1.000 in pitch diameter), enter 1,273.24 pulses per inch. A 16 in command that travels 41 in needs the setting multiplied by 16 ÷ 41 = 0.39024, applied only to the pulses-per-unit value.

On this page
  1. How do I calculate pulses per inch for a rack and pinion axis?
  2. How do I find the pinion pitch diameter from the tooth count?
  3. How does the gearhead reduction change the number?
  4. What do I enter when the controller asks for a screw lead?
  5. Why did a 16 inch command move the axis 41 inches?
  6. How do I verify the new setting with a measured move?
  7. Will fixing the scaling stop the motor stalling at speed?
  8. Questions asked

Set pulses per inch from three numbers you can verify on the machine: the drive's pulses per motor revolution, the reduction between motor and pinion, and the pinion's pitch diameter. The formula is pulses per inch = (pulses per motor revolution × reduction) ÷ (π × pitch diameter). For a 1.8° stepper microstepped to 2,000 pulses per revolution, a 2:1 gearhead, and a 24-tooth pinion on a 24-diametral-pitch rack, that gives 1,273.24 pulses per inch, or 1.5708 in of rack travel per motor revolution. When a commanded 16 in move travels 41 in, the entered scale is 41 ÷ 16 = 2.5625 times too large: multiply the pulses-per-unit setting by 16 ÷ 41 = 0.39024 and change nothing else.

How do I calculate pulses per inch for a rack and pinion axis? #

Multiply the pulses per motor revolution by the reduction, then divide by π times the pinion pitch diameter — (2,000 × 2) ÷ (π × 1.000 in) = 1,273.24 pulses per inch for the example configuration walked through below.

Work it in units that cancel. The numerator is pulses per pinion revolution; the denominator is inches per pinion revolution:

  • pulses per pinion revolution = 2,000 pulses/motor-rev × 2 motor-rev/pinion-rev = 4,000 pulses/pinion-rev
  • inches per pinion revolution = π × 1.000 in = 3.1416 in/pinion-rev
  • pulses per inch = 4,000 ÷ 3.1416 = 1,273.24

The 2,000 comes from the drive: a 1.8° stepper has 200 full steps per revolution (360 ÷ 1.8), and 1/10 microstepping resolves each into ten, giving 2,000 pulses per revolution. Read the microstep setting actually configured on the drive, not the one you intended, before using any number here.

How do I find the pinion pitch diameter from the tooth count? #

Pitch diameter is tooth count divided by diametral pitch: a 24-tooth pinion cut for a 24-diametral-pitch rack has D = 24 ÷ 24 = 1.000 in, and the rack advances π × 1.000 = 3.1416 in per pinion revolution.

Diametral pitch is teeth per inch of pitch diameter, and the rack advances exactly one pitch circumference per revolution — the geometry behind how rack travel per pinion revolution is calculated. Travel is set by the pitch circle, not the tooth tips, so never put the outside diameter into the formula. You can still use the outside diameter as a check: a standard external spur pinion measures (N + 2) ÷ Pd at the tips, and (24 + 2) ÷ 24 = 1.0833 in, which is why a pinion measuring 1.083 in belongs to this pitch. Confirm the pressure angle matches the rack as well — a 14.5°, 24-pitch rack needs a 14.5°, 24-pitch pinion.

A 30-tooth pinion on the same rack changes the answer: D = 30 ÷ 24 = 1.250 in, travel is 3.9270 in per revolution (outside diameter (30 + 2) ÷ 24 = 1.3333 in), and pulses per inch fall to 4,000 ÷ 3.9270 = 1,018.59. The larger pinion buys speed per revolution and fewer pulses per inch, but at a fixed pinion torque its tangential force drops because the torque acts on a longer radius — it is not a free improvement.

How does the gearhead reduction change the number? #

A 2:1 gearhead — two motor revolutions per pinion revolution — halves the rack travel per motor revolution to 3.1416 ÷ 2 = 1.5708 in and doubles the scale from the 636.62 pulses per inch you would enter with the pinion direct on the motor shaft.

Define reduction as motor revolutions per pinion revolution and stay with that convention. If the marking is ambiguous, verify it mechanically: mark the motor shaft and the pinion, turn the motor by hand, and count — a 2:1 unit needs two motor turns for one pinion turn. The reduction must be counted exactly once in the whole configuration; entering 2:1 in a ratio field and again inside a lead value doubles its effect and the axis moves twice as far as commanded. On a gantry with one motor each side, the two drives sit mirrored, so one side needs the opposite rotation direction to push its rack the same way — that is a direction setting, not a scale change.

What do I enter when the controller asks for a screw lead? #

Enter values that compose back to 1,273.24 pulses per inch: a lead of 3.1416 in if that field means travel per output revolution (pair it with the 2:1 ratio field), or 1.5708 in if it means travel per motor revolution (and leave the ratio at 1:1).

A rack drive has no screw; the lead field is being borrowed to express linear travel per revolution, and which revolution that is — motor or output — depends on where the controller applies the ratio field. The check is always the same product: pulses per revolution × ratio ÷ travel per output revolution must equal the pulses per inch computed from the mechanics. On a rotary axis the same convention question appears as degrees per pulse, which is covered in setting gear ratio for degree moves on a rotary servo axis.

Why did a 16 inch command move the axis 41 inches? #

Because the entered pulses per inch was 2.5625 times too large: the pulse count meant for 16 in carried the carriage 41 in, so the correct setting is the entered one multiplied by the dimensionless ratio 16 ÷ 41 = 0.3902439.

Compute the correction as commanded travel ÷ measured travel and apply it only to a pulses-per-unit setting:

  • existing setting × 0.3902439 = corrected pulses per inch
  • if the controller instead holds units per pulse, multiply that value by 41 ÷ 16 = 2.5625

Multiplying the dimensionless 0.3902439 by the 1.5708 in of travel per motor revolution gives about 0.613 — a result in inches that is neither a lead nor a scale, and no controller field accepts it. The travel per motor revolution comes from the pinion and the gearhead; the calibration multiplier comes from the tape measure, and they never combine.

How do I verify the new setting with a measured move? #

Command one slow move after confirming the mechanics, measure what actually traveled, and multiply the setting by commanded ÷ measured — the same 0.39024 that corrects the 16-versus-41-inch example on the first pass.

  1. Count the pinion teeth and read the rack's pitch and pressure angle; 24 teeth on 24 diametral pitch fixes the 1.000 in pitch diameter.
  2. Record the drive's microstep configuration as set; 1/10 microstepping on a 1.8° motor is the 2,000 pulses per revolution used above.
  3. Confirm the reduction by turning the motor shaft and watching the pinion; two motor turns per pinion turn is 2:1.
  4. Enter the computed value — 1,273.24 pulses per inch in a single scale field, or component values that compose to it.
  5. With the process off and everyone clear of the rack, an exposed pinch point along the full travel, command a short move at low speed and low acceleration within available travel, approaching the measure point from the same direction each time.
  6. Divide commanded by measured travel; anything not within about one percent of 1.000 means multiplying the setting by that ratio and reloading.
  7. Repeat at a much longer command. The same ratio at every length is a scale error; a ratio that changes with length or speed points to a slipping coupling, a loose pinion clamp or lost steps.
  8. Jog both gantry motors and confirm both sides travel the same direction before running them together.

Will fixing the scaling stop the motor stalling at speed? #

No — scaling changes how far each pulse moves the load, not how much torque the motor makes; at 350 in/min this axis turns 350 ÷ 1.5708 = 222.8 motor rpm, and stalling there is a torque-at-speed question.

Get the scale right first so the machine commands honest distances, then treat speed and torque as its own problem: gantry mass, acceleration, drive current and supply voltage within the drive's ratings decide whether 222.8 rpm is sustainable. Work through servo speed margin for a rack and pinion axis for that check. For a two-motor gantry retrofit, the same speed and torque arithmetic is walked through in rack and pinion speed and torque correction for a gantry retrofit.

Questions asked

What linear resolution does 1,273.24 pulses per inch give?

One commanded pulse moves the rack 1 ÷ 1,273.24 = 0.000785 in, about 0.02 mm, at the motor shaft. That is the commanded resolution before backlash, rack quality and microstep linearity; measure repeatability on the machine rather than assuming the full count is usable.

How do I calculate pulses per millimeter on a metric module rack?

Metric racks use module instead of diametral pitch, and pitch diameter is module times tooth count: a module 1 pinion with 12 teeth has a 12.000 mm pitch diameter and 12 × π = 37.70 mm of travel per revolution. With 2,000 pulses per revolution and a 2:1 reduction, pulses per mm = (2,000 × 2) ÷ 37.70 = 106.10.

What if the drive is actually set to half stepping instead of 1/10 microstepping?

The pulses-per-revolution input changes with it. A 1.8° motor half-stepped issues 400 pulses per revolution, so the same mechanics take (400 × 2) ÷ (π × 1.000) = 254.65 pulses per inch. Read the resolution off the drive's own switch or parameter table before trusting any scaling number.

Does the correction multiplier change when I re-test at a different distance?

No. Commanded ÷ measured is 16 ÷ 41 = 0.39024 at that test, and a pure scale error gives the same ratio at 4 in, 16 in or 40 in of travel. If the ratio changes with distance or with speed, the fault is lost motion, such as a slipping coupling, a loose pinion or missed steps, not the scale.

Do both motors on a gantry need the same pulses per inch?

Yes. Both sides drive the same rack pitch with the same pinion and reduction, so both get 1,273.24 in this configuration. One side usually needs the opposite rotation direction because the drives sit mirrored; if the gantry racks or binds, check that direction setting and each coupling before touching the scale.

Keep reading

  • How-to

    Following a Master Axis With a Stepper Traverse

    Gear the traverse stepper to measured spool rotation, not to a fixed speed ratio: commanded traverse speed is v_t = p × n_s, so pitch stays constant as the spool fills. The follower ratio comes from pitch, screw lead and drive resolution — 25 step pulses per 64 master counts in the worked example — and master acceleration must be limited so the amplified slave ramp cannot stall the open-loop stepper.

    Servo and stepper motion

  • How-to

    Driving Step and Direction Inputs From a Controller Velocity Output

    A step drive counts edges, so the velocity number must become a timed train: pulses per second equal steps per degree times degrees per second, the demand's sign drives the direction pin, and the drive's documented minimum pulse width and maximum input frequency decide whether the generator can deliver it. Command travel as target minus start position, never by integrating velocity.

    Servo and stepper motion

  • How-to

    How to Run a Stepper Conveyor From a PLC Pulse Output

    A PLC runs a stepper conveyor by sending a hardware pulse-train output to a step-and-direction driver, never by switching the windings itself. Compute the rate from f = v × S × M × G / C — for 0.30 m/s of belt on a 50 mm roller, a 200-step motor at 8 microsteps and 2:1 reduction, that is 6.1 kHz — then confirm the PTO and the driver both accept it and commission with acceleration ramps.

    Servo and stepper motion