An incremental encoder is a rotary or linear sensor that outputs two square waves, A and B, 90° apart (quadrature). The pulses show movement, the phase order shows direction, and an optional Z index pulse marks a reference position once per revolution. It does not know absolute position: a counter tracks the pulses after homing. Frequency = PPR × rpm / 60, and x4 decoding gives four counts per pulse. A 1,024 PPR encoder at 1,800 rpm outputs 30.72 kHz and 4,096 counts per revolution.
How an Incremental Encoder Works
Wikipedia describes the quadrature technique. At constant speed, A and B are square waves 90° apart, and the sign of the phase difference gives the direction. Pulse frequency is proportional to speed, and the signals stop changing when the shaft stops. The pattern comes from either an offset pattern read by aligned sensors, or a simple pattern read by offset sensors. Optical, magnetic and mechanical sensing are all used.
Because the encoder only reports changes, an incremental encoder interface, such as a PLC high-speed counter or drive input, counts up or down on each edge using the A-B phase. To know true position, the axis is homed: driven to a home switch (often with the Z pulse) and the counter preset to the known position. For servo feedback loops, see closed loop servo systems.
Encoder Calculator
Resolution: PPR, CPR and Counts
Resolution is specified as pulses (or cycles) per revolution, PPR or CPR, for rotary encoders, and pulses per unit length for linear ones. The measurement resolution is finer. Each cycle has four edges (rising A, rising B, falling A, falling B), so with x4 decoding the smallest detectable step is a quarter of a cycle. Wikipedia’s example is a 1,000 pulses/mm linear scale, which has a 1 μm cycle but 250 nm measurement resolution.
| Decoding | Counts per cycle | 1,024 PPR gives | 2,500 PPR gives |
|---|---|---|---|
| x1 | 1 | 1,024 counts/rev (0.352°) | 2,500 (0.144°) |
| x2 | 2 | 2,048 (0.176°) | 5,000 (0.072°) |
| x4 | 4 | 4,096 (0.088°) | 10,000 (0.036°) |
Real encoders have symmetry and phase errors. Pulses are not exactly 180° wide and A-B is not exactly 90°. Specifications such as 180° ±25° symmetry and 90° ±20° phase guarantee minimum edge spacing, which sets the maximum speed a counter can follow reliably.
Output Driver Types
| Driver | How it works | Best for |
|---|---|---|
| Open collector (NPN / open drain) | Sinks current; needs a pull-up resistor (internal or external) | Wide voltage range, opto-isolators; lower frequency |
| Push-pull (TTL / HTL) | Actively drives high and low | Short cable to logic on a common supply |
| Differential RS-422 (A, /A, B, /B) | Complementary pair per channel; line receiver at the input | Long cable, high frequency, noisy plants; detects broken wires |
| Mechanical (contact) | Sliding contacts to ground; needs pull-up and debounce | Hand knobs, low speed, low duty |
Common Industrial Uses
- Motor speed and position feedback for servo and VFD drives (see Hz and RPM)
- Conveyor and web length measurement with a measuring wheel (see RPM to FPM)
- Cut-to-length, registration and flying-shear control
- CNC machine axes, robotics and coordinate measuring machines
- Antenna, reel and turntable angle monitoring
For other sensors on the plant floor, see types of industrial sensors.
Frequently Asked Questions
What is an incremental encoder?
A rotary or linear sensor with two outputs, A and B, that pulse as it moves. Together they show that movement happened and in which direction; many add an index (Z) pulse at a reference position (Wikipedia).
What is the difference between incremental and absolute encoders?
An incremental encoder reports only changes in position, so the controller must count pulses and home the axis after power-up. An absolute encoder reports a unique position value directly.
What is quadrature?
A and B are square waves 90° apart. Which one leads tells the direction: +90° for one direction and −90° for the other, depending on the device.
What does PPR mean?
Pulses per revolution: the number of A (or B) cycles per turn, also called CPR (cycles per revolution). Linear encoders use pulses per unit length.
What is x4 decoding?
Counting every rising and falling edge of both A and B: four counts per cycle, so a 1,024 PPR encoder gives 4,096 counts per revolution. x2 counts A edges and x1 counts A rising edges only.
How do I calculate encoder frequency?
f = PPR × rpm / 60. A 1,024 PPR encoder at 1,800 rpm outputs 30,720 Hz (30.72 kHz) on each channel.
What is the Z or index pulse?
A once-per-revolution pulse at a fixed position, used with a home switch to establish an absolute reference when homing.
Which output type should I choose?
Differential RS-422 (A, /A, B, /B) for long cables, high frequency or noisy plants, such as CNC, robotics and factory automation. Push-pull (TTL) suits short runs. Open collector needs a pull-up resistor and is frequency-limited.
Why is my encoder count drifting?
Usually electrical noise, ground loops, a frequency above the input rating, or a mechanical slip of the coupling. Differential outputs, shielded cable and correct grounding cure most noise problems.
How do I convert encoder counts to distance?
position = counts × (distance per count). For a roller, distance per count = π × diameter ÷ counts per revolution.
Sources and Further Reading
- Wikipedia: Incremental encoder: quadrature, resolution, symmetry and phase, driver types, interfaces and homing.
- Wikipedia: Rotary encoder: incremental vs absolute encoders.
