AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Spindle encoder resolution changes with each gear: what decides it

Sensors, encoders and machine vision on the machine Published 8 min read By AutomateDirectUSA engineering team

Short answer

A motor-mounted spindle encoder needs a new resolution entry in every gear because counts per tool-spindle revolution equal ppr times the quadrature multiplier times the gear ratio. Compute that number, check pulse frequency at top motor speed, and if per-gear retuning keeps failing, mount a spindle-side encoder at a fixed 1:1 ratio so one calibration serves all gears.

On this page
  1. Why does the resolution setting change with every gear?
  2. How do I calculate counts per spindle revolution through a gearbox?
  3. Example: how many counts per revolution does a 1024 ppr motor encoder give in a 4:1 gear?
  4. Why does the input stop seeing pulses at high spindle speed?
  5. Where must the index sensor sit?
  6. Will a spindle-side encoder end the per-gear retuning?
  7. What does rigid tapping need from spindle feedback?
  8. Questions asked

The resolution you type into a spindle feedback setup is not a property of the encoder. It is the number of accepted counts per tool-spindle revolution, and on a geared head the gearbox sets that number: motor-encoder ppr times the quadrature multiplier times the gear ratio. Change the gear and the required entry changes with it, which is why one calibration cannot survive a shift and why retuning after every gear change treats the symptom rather than the cause. Two numbers decide the setup: counts per spindle revolution, which fixes the scaling and whether rigid tapping has enough feedback to work with, and pulse frequency at the fastest motor speed, which decides whether the input can see the signal at all. Compute both, and if the per-gear entries keep hitting their limit, move the feedback to the spindle itself, where the ratio is fixed.

Why does the resolution setting change with every gear? #

Because the entry represents accepted counts per tool-spindle revolution, not the encoder nameplate: with the encoder on the motor, that number is ppr x quadrature multiplier x gear ratio, and the ratio is something you change every time you shift.

A nameplate figure describes one revolution of the motor shaft, and the motor turns faster than the tool spindle in every reducing gear, so the spindle sees that figure multiplied by the gear ratio. Select low range and the required entry multiplies; shift to high range and it divides again. Retuning the entry per gear works only in the gear you tuned it in, and it fails three ways: you shift once more, the entry reaches the field's maximum (9,999 in one reported geared retrofit), or the value you need is larger than the field accepts. Slowing the spindle changes motor speed and pulse frequency, but it never changes counts per revolution, so it cannot repair a scaling error. Each of those failures has its own check below.

How do I calculate counts per spindle revolution through a gearbox? #

Multiply three numbers — encoder ppr, 4 for quadrature decoding, and r, the motor revolutions per spindle revolution — and check the result against what the resolution field can hold before you type it.

In symbols: counts per spindle revolution = ppr x D x r, where D is the decoder multiplier (1 for single-edge counting, 4 for standard quadrature) and r is motor revolutions per one spindle revolution. Keep r the right way round: a reducing gear gives r greater than 1, an overdriven belt or a high-range overdrive gives r less than 1, and the counts then fall below the direct-drive value. The other trap is the parameter definition: some setup fields want pulse cycles per revolution and others want the counts the decoder accepts after quadrature multiplication, and those differ by a factor of 4. Read the control's definition of its spindle resolution parameter before entering anything, because typing a nameplate ppr into a field that expects decoded counts leaves the speed readout wrong by four to one.

Example: how many counts per revolution does a 1024 ppr motor encoder give in a 4:1 gear? #

Sixteen thousand three hundred eighty-four counts per spindle revolution, which works out to 0.022° of spindle angle per count — fine enough for any thread, but four times the entry the same encoder needs in a 1:1 gear.

This is a calculated example for the inputs below, not a measured result. The inputs: P = 1024 pulses per motor revolution on one channel, standard 4x quadrature decoding, and r = 4, meaning the motor turns four revolutions per spindle revolution.

  • Counts per motor revolution: 1024 x 4 = 4,096 counts
  • Counts per spindle revolution: 4,096 x 4 = 16,384 counts
  • Spindle angle per count: 360° / 16,384 = 0.022°
Gear ratio r Counts per spindle revolution Spindle angle per count
1:1 4,096 0.088°
2:1 8,192 0.044°
4:1 16,384 0.022°

For thread accuracy the counts are not the problem: a 1.0 mm pitch tap moved by one count of spindle angle errs by 1.0 mm x 0.022 / 360 = 0.000061 mm, about 0.06 micron, tighter than any thread tolerance in any row of the table. The binding limit is the entry field. If its maximum is 9,999 — the reported cap in one geared retrofit — the 4:1 row cannot be entered at all, even though the hardware is producing fine counts. Entering pulse cycles instead of decoded counts can fit under such a cap, but only if the control's parameter is defined that way; otherwise the feedback has to move to a fixed-ratio position.

Why does the input stop seeing pulses at high spindle speed? #

The gearbox multiplies encoder frequency exactly as it multiplies speed: 500 rpm at the spindle in a 4:1 gear runs the motor encoder at 2,000 rpm, which is 34.1 kHz per channel and about 136.5 kHz of quadrature edges — check the input's documented maximum before blaming the encoder.

The channel frequency is f = P x n / 60, with P in pulses per revolution and n the encoder-shaft speed in rpm. At 500 rpm on the encoder shaft itself, 1024 x 500 / 60 = 8,533 Hz, about 8.53 kHz — the region where one reported retrofit began losing counts, which points at the input's count-rate limit or digital filter rather than a faulty encoder. Every cycle also has to satisfy the input's minimum pulse width, and width shrinks as speed rises, so a filter sized at low speed can swallow high-speed pulses completely.

Measure the A and B signals at the receiving input, at low speed and just below the speed where detection fails, and compare them against the documented maximum count rate of the high-speed input actually assigned. The decision rule: compute the channel frequency at the fastest motor speed in the deepest gear; if it exceeds that documented maximum, no resolution value recovers the pulses — reduce the pulse count or move the encoder to the spindle. The same input-budget arithmetic is worked through in sizing a spindle encoder input for servo feed control.

Where must the index sensor sit? #

On the tool spindle itself, one event per revolution in every gear: an index that sits on any shaft whose ratio to the spindle changes with the gear selector moves the thread-start reference every time you shift.

The index does a different job from the A/B counts: it marks one angular position so the control can locate thread start, and many controls rotate the spindle slightly before a rigid-tap cycle to find the mark before synchronizing. Give it four properties:

  • One target feature per revolution — a second keyway or a row of bolts produces false references.
  • Fixed phase to the spindle — a shaft coupled through change gears or a clutch can shift under backlash, and the reference moves with it.
  • Signal wiring that matches the input — an NPN proximity sensor needs its supply, common reference and pull-up arranged per the interface documentation, with input polarity checked.
  • Enough pulse width at top spindle speed — size the slot so its high time at maximum rpm still exceeds the input's minimum pulse width, because once-per-revolution pulses are the first to disappear at speed.

A proximity switch on the spindle nose reading a single key or hole meets all four properties in every gear; the mounting options are laid out in where to mount a proximity switch for motor speed feedback. Verify by hand-turning the spindle through one full revolution in each gear: exactly one event, always at the same spindle angle.

Will a spindle-side encoder end the per-gear retuning? #

Yes — an encoder coupled 1:1 to the tool spindle sees one fixed ratio, so a single counts-per-revolution entry serves every gear; size it from the control's documented counts requirement and top spindle speed, not from the motor encoder's nameplate.

Pick the resolution from two constraints: enough counts per spindle revolution to clear the control's rigid-tapping minimum, and a channel frequency at top spindle speed that stays inside the input's documented maximum. Mount it with a fixed mechanical ratio: a short drive taken from the spindle nose through a flexible shaft coupling sized for both shaft diameters holds the ratio at exactly 1:1. A belt drive adds its own ratio and its own backlash unless the control is told about them, and the belt-versus-direct tradeoff is compared in timing belt vs direct mount for a rotary encoder. Some motion controllers require a 1:1 spindle-to-encoder ratio by design, which makes the spindle mount the only arrangement they accept. Leave the motor encoder serving the drive's own feedback loop and bring the new encoder to the motion controller as a separate input. Guard the coupling and bracket you add to the rotating spindle, and make the first counts check by hand or at low jog before trusting the readout.

What does rigid tapping need from spindle feedback? #

Rigid tapping needs continuous spindle-angle counts to synchronize the Z feed plus one repeatable index event to anchor thread start; documented minimums exist, with at least 1,000 counts per spindle revolution required by the LinuxCNC documentation and about 4,000 recommended in Centroid's rigid-tapping guidance.

In the G84 cycle the tap's Z feed is slaved to the measured spindle angle at the thread pitch, so the control must see spindle angle continuously and know where the thread starts. A spindle-side encoder in the example's resolution class clears both documented thresholds in every gear, which is why moving the feedback downstream fixes the tapping margin along with the scaling. The failure mode to design against is not count resolution; it is reversal. When the tap reverses at the bottom of the hole, backlash between motor and spindle appears as angle error at the tool, and a motor-side encoder cannot see it because the error lives downstream of the sensor. A spindle-side encoder measures the angle where it is mounted, and everything upstream of that point drops out of the feedback. Correct speed scaling alone therefore proves nothing about tool angle during the reversing part of the cycle.

The final check for your machine is three numbers: counts per spindle revolution against your control's documented minimum, one index event per revolution on the spindle, and channel frequency at top spindle speed inside the input's budget. If all three pass with a fixed-ratio spindle-side encoder and a spindle-mounted index, the per-gear retuning stops for good.

Questions asked

Does the control ever handle the gear change by itself?

Yes, on controls that provide a spindle gear table: you enter each gear's ratio or its counts-per-spindle-revolution value, wire a gear-selection input, and the control scales the feedback internally as gears change. Per-gear retyping of one resolution field is unnecessary on such a control, so look for a spindle gear table or multiple ratio entries in the spindle setup documentation before adding hardware.

Can I feed the motor encoder to the VFD and the motion controller at the same time?

Not by simply paralleling the wires onto a second input. The extra receiver loads the encoder output, which can round the signal edges enough to disturb the drive's own feedback loop. If the drive documentation allows tapping the signal, use a buffer or isolated distributor matched to the output type; otherwise give the motion controller its own spindle-side encoder and leave the motor encoder to the drive.

Why does my once-per-revolution index pulse vanish at high spindle speed?

Its high time shrinks with speed. At 3,000 rpm one revolution takes 20 ms, so a slot spanning 5 degrees of the spindle is high for only about 0.28 ms; if that is shorter than the input's minimum pulse width or filter setting, the edge is discarded. Widen the slot or reduce the input filtering, then recheck the pulse width at top spindle speed.

Should the resolution entry hold pulses per revolution or quadrature counts?

Whichever the control's parameter definition specifies, because the two conventions differ by a factor of 4. Confirm the entry empirically: mark the spindle, rotate it exactly one full revolution by hand, and compare the counts the control reports against the value you entered. A mismatch equal to the gear ratio points to the mechanical path; a mismatch of four points to the decoding convention.

Keep reading

  • Selection guide

    Choosing Encoder Resolution to Match a Stepper Step Response

    A 50 ppr encoder read in x4 gives 200 counts/rev — one count per 1.8° full step, so the loop sees only before and after each step and ±1 count is ±1.8°. Size the encoder by counts per full step: 10 counts per step, which is 500 ppr in x4 at 2000 counts/rev and 0.18° per count, is the working minimum to reproduce a stepper's damped step response.

    Sensors, encoders and machine vision on the machine

  • Troubleshooting

    Fix Servo Travel Error After Swapping Resolver and Encoder

    Travel that does not match the position display after a resolver-to-encoder swap is a scaling fault: the drive or the technology axis is still converting counts with the other feedback's increments per revolution. Measure one commanded move and divide actual by displayed travel; a constant ratio equal to the resolution ratio names the encoder data. Fix both layers, re-home, then re-tune.

    Servo and stepper motion

  • Explainer

    Servo Positioning Resolution Versus Stepper Step Angle Explained

    A 0.018° move needs 360 ÷ 0.018 = 20,000 usable feedback counts per revolution, which come from the encoder and the drive's decoding and scaling, not from the servo label. Matching 3,000 command pulses per revolution on a stepper and a servo only matches command scaling; short-time overload capacity and high-speed performance still differ.

    Servo and stepper motion