Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

An optical incremental encoder is a sensor that turns motor shaft rotation into electrical pulses. In robotics, these pulses help a controller measure how far a wheel, joint, or gear has moved. This matters because robots need accurate feedback to drive straight, stop at target angles, and control speed.

The encoder does not directly report an absolute angle after power-up, but it tracks changes in angle very precisely once motion begins.

Inside the encoder, a slotted or striped disk rotates with the motor shaft between a light source and photodetectors. As slots pass the sensor, light alternates between blocked and unblocked, producing a square-wave pulse train. Two output channels, usually called A and B, are spaced one quarter cycle apart so the controller can determine direction from which signal leads.

Many encoders also include an index channel, Z, which produces one pulse per revolution and helps establish a repeatable reference position.

Key Facts

  • Counts per revolution, CPR, is the number of electrical cycles or counts produced for one full turn of the encoder disk.
  • Angle per count = 360 degrees / counts per revolution.
  • Angular displacement = number of counts × angle per count.
  • Rotational speed = counts per second / counts per revolution in revolutions per second.
  • Quadrature signals A and B are 90 electrical degrees out of phase, allowing direction detection.
  • With 4x quadrature decoding, effective counts per revolution = 4 × cycles per revolution.

Vocabulary

Optical incremental encoder
A sensor that measures changes in shaft rotation by converting light interruptions from a rotating disk into electrical pulses.
Slotted disk
A wheel attached to the shaft with evenly spaced openings or markings that alternately pass and block light.
Photodetector
An electronic sensor that produces a signal when light from the encoder LED reaches it.
Quadrature
A two-channel signal arrangement in which channel A and channel B are offset so direction can be determined.
Index pulse
A once-per-revolution pulse used as a reference mark for locating a known shaft position.

Common Mistakes to Avoid

  • Confusing incremental position with absolute position, because an incremental encoder only reports changes in position unless it is referenced to a known starting point.
  • Ignoring quadrature direction, because counting pulses without checking whether A leads B or B leads A can make forward and reverse motion look the same.
  • Using CPR without checking the decoding mode, because 1x, 2x, and 4x decoding can give different effective counts per revolution.
  • Calculating speed from too short a time interval, because a small sample may contain too few pulses and produce a noisy or jumpy speed estimate.

Practice Questions

  1. 1 An encoder has 500 counts per revolution using the selected decoding mode. What angle in degrees does each count represent?
  2. 2 A motor shaft produces 2400 counts in 3.0 seconds with an encoder set to 800 counts per revolution. What is the rotational speed in revolutions per second and revolutions per minute?
  3. 3 A robot wheel encoder has channels A and B. During motion, channel A consistently changes before channel B. Explain how this information can be used by the controller, and why counting pulses alone is not enough.