Skip to content

Quadrature Encoders (A, B, Index) Explained

Knowledge & Insights

Introduction

A single pulse train tells you how fast a shaft turns, but it cannot tell you which way. A quadrature encoder solves that with two square-wave channels, A and B, shifted by 90 electrical degrees. From those two waves a controller reads both position and direction, and that is the whole point of quadrature.

This article covers the signals themselves: what the A and B channels do, why the Index pulse matters, and how a drive turns the edges into counts. For an overview of the different encoder families, see motor encoders.

What “Quadrature” Means

“Quadrature” means two signals 90 degrees out of phase. Channel A and channel B are both square waves at the same frequency, but B is shifted by a quarter of one cycle relative to A. That quarter-cycle offset is the key.

Why 90 degrees and not some other value? Because a quarter-cycle shift gives the cleanest way to tell the two signals apart in time. At any edge of A, channel B is sitting at a stable high or low level, never changing at the same instant. The controller can sample one channel exactly when the other is steady, which removes ambiguity. Both signals carry the same pulse count, so they agree on speed. The phase between them is what adds direction.

Takeaway: quadrature is just two matched square waves, offset by 90 degrees, so one tells you “how much” and the pair tells you “which way”.

quadrature encoder disc with CHA, CHB and Index channel waveforms

The A and B Channels: Direction and Counting

The two channels do two jobs at once. The edges give you resolution, and the order of those edges gives you direction. Read together, A and B are enough to track a shaft as it moves forward, stops, and reverses.

How Phase Shift Encodes Direction

Direction comes from which channel leads. When the shaft turns one way, A rises before B. When it turns the other way, B rises before A. The controller watches one channel at the edge of the other and decides the sign from that order.

A small example. If A goes high while B is still low, the motor is running in the forward direction. If A goes high while B is already high, it is running in reverse. The decoder checks this on every transition, so it catches a direction change within a single edge. That is why a quadrature encoder can follow a shaft that jitters back and forth near a stop, where a single-channel sensor would just keep counting up.

x1, x2 and x4 Decoding

Each channel produces a fixed number of pulses per revolution, set by the lines etched on the disc, often called PPR. How many counts you get from those lines depends on which edges you count.

Decoding modeEdges countedCounts per lineExample at 1000 lines
x1One edge of A11000 counts/rev
x2Both edges of A22000 counts/rev
**x4**Both edges of A and B44000 counts/rev

In x4 decoding, the controller counts the rising and falling edge of both A and B. Because the two channels are offset by 90 degrees, those four edges fall at four evenly spaced points in each line. So you get four counts for every line on the disc, which is four times the mechanical resolution for free. Most modern drives default to x4 for this reason.

Takeaway: A and B give you direction from their order and up to four counts per line from their edges.

Diagram of position counter sawtooth cases for forward and reverse direction

The Index (Z) Channel

The A and B channels are relative. They count up and down, but they do not know where the shaft actually is. The Index channel, also called Z, fixes that. It emits one pulse per revolution at a fixed mechanical position.

That single pulse acts as a reference, or home, once per turn. When the controller sees the Index, it knows the absolute angle of the shaft at that instant and can zero or correct its count. This matters for two reasons. First, it lets a system find a repeatable home position after power-up. Second, it catches any counts lost to noise: if the running count does not match the expected value at the Index, the drive can resync once per revolution. A quadrature encoder without an Index still gives speed and relative position, but you lose that per-revolution anchor.

Takeaway: the Index pulse turns a relative counter into something you can reference to a known angle, once per revolution.

Quadrature vs Other Encoder Types

A quadrature encoder is one kind of incremental encoder, the kind that reports change rather than an absolute number. It is cheap, robust, and accurate, but it only knows position relative to where it started or to the last Index pulse. Power it off and the absolute angle is gone until the next homing.

An absolute encoder is different. It reports the true shaft angle directly, even right after power-up, using a coded disc instead of simple pulse counting. That removes the homing step, at higher cost and complexity. Single-channel tachometer-style sensors sit at the other end: they give speed only, with no direction and no fine position.

This article stays on the quadrature signals themselves. For the full map of encoder families, incremental, absolute, optical, magnetic, and how to pick between them, see motor encoders.

Diagram comparing incremental versus absolute encoder discs and sensors

From Signals to Counts on a Controller

Inside the drive, a hardware quadrature decoder does the counting. It samples A and B, detects every edge, checks the lead/lag order to set the direction, and adds or subtracts from a position counter. All of this runs in hardware, so it keeps up even at high speed where software polling would miss edges.

From that counter the controller derives two things you actually use. Position is the count itself, scaled by the lines per revolution and the decoding factor. Speed is how fast the count changes over time. The Index pulse, when present, resets or validates the counter once per turn. To get accurate numbers you have to tell the drive the correct lines per revolution and run a one-time calibration so it knows the encoder offset. For the wiring and the step-by-step calibration on a SOLO drive, see how to connect and calibrate an incremental encoder with SOLO.

Takeaway: the decoder turns A, B, and Index edges into a live count, and from that count you read position and speed.

How SOLO Supports Quadrature Encoders

SOLO controllers read incremental quadrature encoders with full x4 decoding and Index support, and they handle the counting and calibration for you on supported motor controllers. You set the encoder lines and run the guided calibration from the SOLO Motion Terminal.

Conclusion

A quadrature encoder reports both how far a shaft has turned and which way, using two square waves shifted by 90 degrees. The order of the A and B edges gives direction, and counting all four edges per line gives x4 resolution. The Index channel adds one reference pulse per revolution, so a relative counter gains a known home angle and can catch lost counts. Together these signals let a controller track position and speed in real time. The fastest way to put one to work is to wire it to a drive that decodes quadrature natively, like a SOLO motor controller.

FAQ

What is a quadrature encoder?

A quadrature encoder is an incremental position sensor with two output channels, A and B, that are 90 degrees out of phase. The pulses give position and speed, and the phase between the two channels gives the direction of rotation. Many also add an Index channel for a once-per-revolution reference.

How do A and B channels show rotation direction?

Direction comes from which channel leads the other. In one direction, channel A changes before channel B. In the other direction, B changes before A. The decoder checks this order at every edge, so it detects a direction change within a single transition.

What is the index pulse used for?

The Index, or Z, channel sends one pulse per revolution at a fixed mechanical position. It gives a known home angle for the shaft, so the controller can reference its count to an absolute point once per turn and resync if any counts were lost to noise.

Why does quadrature give four counts per line?

Because the A and B channels are offset by 90 degrees, their rising and falling edges fall at four evenly spaced points within each line on the disc. Counting all four edges, called x4 decoding, gives four counts for every line, which is four times the encoder’s mechanical resolution.

Tags:EncodersFeedbackFundamentals

Browse all categories

Drive your next innovation today

Discover our High-Performance Motor Controllers, Test Benches, and Services trusted worldwide.