Optical rotary encoder basics

DN Staff

April 22, 2002

9 Min Read
Optical rotary encoder basics

Optical rotary encoders, sensors used everyday in industrial applications, provide instantaneous and continuous data on rotational motion. Designed to monitor speed, position, distance, and direction of rotational movement, encoders function effectively in a huge range of applications including motors, drives, automated process machines, robots, and elevators.

There are six main components of every encoder: (1) the shaft or hollow shaft, (2) the pulse disk, (3) the light source, (4) the grid diaphragm, (5) the photodiode/decoding circuitry, and (6) the connector.

For example, the feedback from an optical rotary encoder can be used to accurately determine the current position of each individual pivot joint of a robotic arm. Using this data, a controller can direct the movement of the arm in each of its planes of motion. The feedback from an encoder monitoring the position of an elevator drive-motor shaft can be used to determine the floor the elevator is currently on, as well as the car's exact position within the floor's range.

At their most basic level, encoders transform mechanical rotary motion into a sequence of electrical pulses that are monitored for display or control functions using a counter, display, PC, PLC, tachometer, or controller. Three basic configurations of optical rotary encoders are available: incremental, absolute, and absolute multi-turn.

While incremental and absolute encoders provide information for only one revolution, absolute multi-turn encoders track distance, speed, direction, and position over many revolutions.

Operation is similar for all three styles. A light source directs rays through a plane convex lens that focuses the light into a parallel beam. The light beam passes through the grid diaphragm, which splits it to produce a second beam of light 90 degrees out of phase. Light from the original (A) and the second (B) channel passes through a tempered glass, polycarbonate, or metal pulse disk onto the photodiode array. The pulse disk turns, creating a light/dark pattern through the clear and opaque segments of the disk.

The light/dark pattern is read and processed by the photodiode array and decoding circuitry. Light beams A and B are each received by a separate diode and converted into two squarewave signals, 90 degrees out of phase, commonly known as a quadrature output. The quadrature output is then fed into a controlling device that can process the signal to determine the number of pulses, direction, speed, and other information.

Incremental encoders. The simplest encoder technology available, the incremental encoder is designed to monitor distance, speed, and direction. It features a pulse disk that consists of a single track of evenly spaced clear and opaque segments. Defined as pulses per revolution or ppr, resolution is dictated by the number of clear and opaque lines on the disc. An incremental encoder with a resolution of 200 ppr would have 200 distinct lines on the disc.

With one pulse track on the encoder disk, incremental encoders deliver only on/off outputs that provide speed and directional data to a monitoring or control device through the quadrature output. Speed is measured simply by timing the pulses entering the controller. To measure direction, the controller's electronics monitor the A and B channels to determine which channel arrives first. The controller then verifies whether the encoder is turning clockwise or counter-clockwise. Distance is measured by assigning each pulse interval a distance value, which is done within the external control device.

In standard mode, an encoder counts the leading edge of one squarewave signal. By counting both the leading and trailing edge of the signal, resolution is doubled, a process called 2 times interpolation.

By counting both edges on the A and B channels simultaneously, output increases to four times the ppr, also known as 4 times interpolation. So, by interpolating a quadrature output by a factor of four, a 200-ppr encoder can offer 800 ppr.

With this technology, resolutions of 40,000 ppr are possible.

For even higher resolution, some en-coders replace square wave signals with sine wave outputs that allow for interpolation factors as high as 10 times. Through 10 times interpolation of a sinewave, a 200-ppr encoder is capable of 2,000 ppr.

To illustrate the benefits of particular resolutions, one could use an example of an incremental encoder in monitoring conveyor position. An encoder could be mounted to a conveyor drive wheel with a circumference of 6 inches at a 1:1 ratio such that each revolution of the encoder is equivalent to 6 inches of overall conveyor travel. By using an output of 40,000 ppr, the encoder is able to provide positional feedback accurate to 0.00015 inches.

This feedback allows the user to accurately position objects along the conveyor. The accuracy of the application is limited only by the size of the wheel or the degree of gearing used in coupling the encoder to the wheel. Beyond positional information, the same encoder will monitor the speed and direction of the conveyor, outputting data that can be compared against speed information from the drive motor to detect slippage.

Due to the accuracy of incremental encoders, in the event of a power failure they will lose positional information, and a reset or homing cycle must be performed to synchronize the encoder with the control device.

Absolute encoders. Capable of monitoring distance, speed, direction and absolute position, absolute encoders feature a special pulse disc that consists of a series of tracks. Each track, executed as a binary bit, has its own series of clear and opaque lines that creates an on/off signal. For example, a 12-bit encoder would have 12 individual tracks that act much like distinct incremental encoders. Read in conjunction with the other tracks on the disc, an absolute encoder gives a unique signal in the form of binary code for each angular position within 360 degrees of rotation, subject to the encoder's resolution.

Because each position has a unique signal, if power is interrupted, the absolute encoder will not lose positional information. Measured in ppr, absolute encoder resolution is dictated by the number of bits, ranging from 2 to 18.

A common application for absolute encoders is on a robotic arm, where accurate positional information is paramount to the operation's accuracy and safety. Located at the joints or pivot points of an articulated robot, the absolute encoder can monitor exact angular position, direction, and speed of arm travel. Another critical application for absolute encoders is in aircraft, where they can be mounted to the plane's rudder and aileron drive shafts to provide exact positional and absolute data during flight.

Absolute multi-turn. Absolute multi-turn encoders incorporate standard absolute technology, but rely upon an additional internal counting process to monitor and track the number of rotations. Some multi-turn encoders incorporate a gear driven system that can be quite accurate, but is complex and expensive to manufacture and prone to breakage and wear. Alternative non-contact multi-turns offer significantly increased encoder life by using a two-pole magnet and an array of reed switches to monitor revolutions and directional information.

In magnetic systems, the reed switch and magnet combination create a squarewave signal which is converted, through the encoder's internal ASIC, into an additional binary output. So, in essence, an absolute multi-turn encoder outputs two separate binary codes, one tracking position, the other tracking revolutions.

Like single-turn absolute encoders, multi-turns have a unique code for each position within 360 degrees of rotation, dependent on the encoder's resolution, but provide unique codes for each revolution. As a result of these unique codes, an absolute multi-turn encoder will not lose its revolution count or angular position if power fails.

The newest absolute multi-turn encoders are available with 36-bit resolution-18 bits over 360 degrees and another 18 bits for counting revolutions. With this resolution, multi-turns can offer 262,144 ppr over 262,144 revolutions, allowing the encoder to track 68,719,476,736 unique angular positions.

Absolute multi-turn encoders are commonly mounted to the drive shaft or main pulley of an elevator to ensure that the control system knows the exact speed and position of the car. In this application, the multi-turn's ability to monitor position is especially important in the event of power loss. Upon power-up, the safety of the occupants of the car depends upon the accurate assessment of the car's position.

Installation considerations. Specific environmental variables will determine the best encoder for an application. Available space, mounting considerations such as angular alignment with a drive shaft, ambient conditions (temperature, humidity, and gasses), and electrical specifications are critical to the encoder selection process. Shock and vibration ratings, and switching frequency or response time can also affect encoder selection. Most manufacturers offer detailed information on these variables in catalogs or specification sheets.

Although optical rotary encoders are available to withstand certain harsh environmental conditions such as high shock and vibration or elevated temperatures, in some cases, other technology may better suit the application. In extremely harsh industrial environments, where large amounts of cutting fluids, oil or caustic liquids are present, certain magnetic encoders with higher IP ratings may prove a better choice. Likewise, in applications with complex alignment issues or extreme vibration, photoelectric or inductive sensors may offer optimum performance. Overall, however, most rotational monitoring applications call for the optical encoder.

Encoders are electronic rulers that provide a position signal in a digital (square wave) or analogy (sine wave) form. These signals indicate position to the controller. Encoders work with a light source, a photodector viewing through a movable disk or scale, and a fixed mask.

Sign up for the Design News Daily newsletter.

You May Also Like