A quadrature encoder is a sensor system that lets a robot measure how far and how fast a wheel or shaft has turned. It is essential for accurate motion control in drivetrains, robotic arms, conveyor systems, and motor feedback loops. By converting rotation into digital pulses, the controller can track position instead of guessing from motor voltage or time.
This makes robot movement more repeatable and precise.
Key Facts
- Quadrature encoders use two digital signals, A and B, shifted by 90 electrical degrees.
- If A leads B, the shaft is turning one direction; if B leads A, it is turning the opposite direction.
- Position change in counts is ΔN = Nforward - Nreverse.
- With 4x decoding, counts per revolution = 4 × lines per revolution.
- Angular resolution is θ per count = 360 degrees / counts per revolution.
- Rotational speed can be estimated by rpm = counts per second × 60 / counts per revolution.
Vocabulary
- Quadrature encoder
- A rotary sensor that uses two phase-shifted pulse signals to measure both rotation amount and direction.
- Channel A
- One of the two digital output signals from a quadrature encoder, used with Channel B to decode motion.
- Channel B
- The second digital output signal, shifted about 90 electrical degrees from Channel A.
- 4x decoding
- A counting method that records every rising and falling edge of both A and B to quadruple the basic line count.
- Counts per revolution
- The number of digital position counts produced during one full turn of the encoder shaft.
Common Mistakes to Avoid
- Counting only one channel and ignoring the other, because this loses direction information and may reduce usable resolution.
- Assuming pulses always mean forward motion, because the phase order of A and B must be checked to determine direction.
- Confusing lines per revolution with counts per revolution, because 4x decoding makes the count value four times the number of disk lines.
- Reading encoder signals without handling noisy edges, because switch bounce, vibration, or electrical noise can create false counts.
Practice Questions
- 1 An encoder disk has 500 lines per revolution. With 4x decoding, how many counts per revolution does the controller measure?
- 2 A robot wheel uses a 1024-count-per-revolution quadrature encoder. If the controller reads 256 counts, through what angle has the shaft turned in degrees?
- 3 A robot is moving forward when Channel A leads Channel B. Later, Channel B leads Channel A while the wheel is still spinning. What has changed about the wheel motion, and how should the controller interpret the counts?