Motion Control and Actuators

Encoders and Position Feedback

How encoders report position and speed to a controller: incremental versus absolute types, optical and magnetic sensing, resolution, and common wiring and noise issues.

On this page
  1. Why feedback matters
  2. Rotary and linear encoders
  3. Incremental encoders
  4. Absolute encoders
  5. How they sense
  6. Getting speed from position
  7. Wiring, noise and common problems
  8. Good practice

Why feedback matters

A controller can only correct what it can see. Without feedback it sends commands and hopes the motor followed them. With a feedback device it learns the real result and can adjust. Position encoders are the most common feedback devices in motion control, and they are built into most servo motors and many other machines, from conveyors that must track product to rotating tables that must index accurately.

An encoder converts mechanical movement into electrical signals. Those signals can be counted to find position, timed to find speed, or compared to a command to find error. In a closed-loop system this information is used many times a second.

Rotary and linear encoders

A rotary encoder is mounted on a shaft and measures angle. It may sit on the back of a motor, on a gearbox output or on a roller. A linear encoder, often called a scale, is mounted along an axis and measures straight-line distance directly.

The choice affects what the system really knows. A rotary encoder on a motor tells the controller how the motor shaft turned, and the position of the load is then inferred through the screw, belt or gearbox. If the mechanics have play, wear or thermal growth, the inferred position can differ from the real one. A linear scale on the axis measures the load directly, which is why it is common where accuracy matters most. Some systems use both: the motor encoder for fast control and a scale for the final position check.

Incremental encoders

An incremental encoder produces a train of pulses as the shaft turns. Inside, a disc with fine marks (or magnetic poles) passes a sensor, usually giving two square-wave signals, called A and B, offset from each other by a quarter of a cycle. This offset is called quadrature. By checking which signal rises first, the controller knows the direction of rotation. By counting edges, it knows how far the shaft moved.

Counting every edge of both signals gives four times the number of lines on the disc. For a hypothetical encoder with 1,000 lines per revolution, that means 4,000 counts per revolution, or 0.09 degrees per count (360 divided by 4,000). If that shaft drives a ball screw with a 5 mm lead, one count corresponds to 5 divided by 4,000, or 0.00125 mm of nut travel, ignoring backlash and other errors. Numbers like these are only illustrations; actual resolution depends on the encoder and how it is read.

Many incremental encoders also give a once-per-revolution index (or Z) pulse that can serve as a reference. The main limitation is that an incremental encoder only knows how far it has moved since power-up. If power is lost and the shaft moves, the position is gone, so these systems normally run a homing routine at start-up: they move to a known reference, such as a home sensor or the index pulse, and set zero there.

Absolute encoders

An absolute encoder reports a unique code for each shaft angle. Turn it on and the position is available immediately, with no homing. That is useful for machines that cannot easily return to a reference, or where unexpected movement during power-off is possible.

A single-turn absolute encoder identifies position within one revolution. A multi-turn version also tracks the number of revolutions, using extra gearing or electronic storage with battery or energy-harvesting backup. Absolute encoders often send data over a digital serial link instead of raw pulses, which lets them carry diagnostics and other information; the specific protocols depend on the drive and the equipment maker.

How they sense

  • Optical encoders shine light through or reflect it from a patterned disc or scale. They can be very precise but are sensitive to dust, oil and condensation unless sealed.
  • Magnetic encoders read changes in a magnetic pattern. They tolerate dirt, shock and moisture better and are often used in rougher settings, though resolution is typically lower than the best optical types.
  • Resolvers are rotating transformer-like devices that produce analog signals. They are rugged and tolerate heat and vibration, and the drive electronics convert their signals to position.
  • Inductive and capacitive types are used in some compact, high-reliability designs.

Resolution, accuracy and repeatability are not the same thing. Resolution is the smallest step the device can report. Accuracy is how closely the reported position matches the true one. Repeatability is how consistently it returns the same reading to the same position. A high-resolution encoder is not automatically an accurate one, and the mounting matters as much as the sensor.

Getting speed from position

Speed is calculated from position change over time. Count pulses over a fixed interval and the controller can work out speed, or time the gap between pulses, which works better at low speed. At very low speeds, low-resolution encoders give coarse, jumpy speed readings, which can make a motor run roughly. This is one reason servo drives often use high-resolution feedback even if the machine does not need such fine positioning.

Wiring, noise and common problems

Encoder signals are small and fast, so they are easily disturbed. Typical problems include:

  • Electrical noise. Motor cables and drives generate interference. Shielded twisted-pair cable, correct shield termination and separating encoder cables from power cables help. Good grounding systems and routing practice matter here, and industrial cables made for encoder signals are designed to cope with this.
  • Mechanical coupling issues. A loose or slipping coupling between encoder and shaft produces wrong readings. Encoder couplings are chosen to allow small misalignment without transmitting force to the encoder bearings.
  • Contamination and damage. Dirt, oil or a cracked disc can cause missed counts. Shaft bearings in encoders can also wear.
  • Wrong configuration. The controller must be set for the right pulses per revolution and signal type, otherwise positions come out scaled wrongly.

Signs include position drift that grows through the day, faults that appear only when large motors start, and positions that are off by an amount proportional to travel.

Good practice

Fit encoders as the maker specifies, avoid hammering them onto shafts, and handle cables carefully. Fault finding on live machines, or around moving parts, should only be carried out by trained personnel using the plant’s isolation procedures and the manufacturer’s manuals. This article is general information, not engineering advice.

The complete guide to motion control and actuators

An Introduction to Motion Control
Read the guide

Keep exploring

Guides from other topics

All topics →