Rotary and linear optical encoders are common in position and motion sensing. Here, a disc or plate containing opaque and transparent segments passes between an LED and detector to interrupt a light beam. All rotary encoders consist of a light source, light detector, code wheel, and signal processor. There are two basic encoder styles: absolute and incremental. Absolute encoders contain multiple detectors and up to 20 tracks of segment patterns. For each encoder position, there is a different binary output -- shaft position is absolutely determined.

Tracks on absolute encoders often are arranged to produce a binary output called Gray code. The advantage of Gray code over straight binary is that only one bit changes at a time. Thus, the maximum error (if the encoder stops halfway between transitions) is only 0.5 bit. In absolute encoders, this information is available even if the encoder is turned off and on. This suits them for low-speed applications, as in telescopes, or where encoders may be temporarily shut down, as in highway bridges.

Absolute encoders are available in single and multiturn versions. Multiturn devices are primarily used with measuring screws.

Incremental encoders are preferred when low cost is important, or when only relative position is needed. Their output typically consists of two square waves, each corresponding to an increment of rotation. Incremental encoders often have a third channel with a single segment slot or reference which is used to zero or home the device.

Single-channel encoders, also called tachometers, are inherently less accurate than dual-channel versions and cannot register direction. Inaccurate readings often result when the code wheel stops on or near a slot's edge and vibrations move the code wheel back and forth. If the slot edge interrupts the light beam, the counter increments with each transition.

Other common encoder versions include standard, modular, and kit. Standard encoders are those that have their own shaft and bearing assembly. The encoder shaft couples to the motor shaft with a belt, coupling, or gear train. Hollow shaft encoders are similar, but the motor shaft fits into the encoder shaft bore.

Some manufacturers claim there is a difference between modular and kit encoders, but others say they are the same. Some say that a modular encoder is complete and ready to use, while kit encoders require user assembly. Regardless of the amount of assembly, both fit directly on the motor shaft. A setscrew usually secures the code wheel to the shaft, but some designs have press-tight fittings.

While standard and hollow shaft encoders are the most rugged, modular encoder makers say that users can easily make these devices more environmentally sound by simply mounting a bell or can over the encoder to keep out contaminants.

Examining a modular rotary encoder used on a servomotor reveals a code wheel attached directly to the motor shaft. This makes the encoder sensitive to motor shaft run-out and axial movement. A large amount of play can break the code wheel or push it into the stationary parts of the encoder, forcing the optics out of alignment. These problems beset even large, high-resolution encoders that sometimes cost as much as the motor they attach to.

Newer modular encoders are less likely to suffer from these problems. These devices, sold as kits that assembly piecewise onto a motor shaft, eliminate some of the components that cause run-out problems. The new encoder designs have a lower part count as well, reducing costs and making closed-loop control practical for many applications.

Using encoders with larger gaps between code wheels and housings may enable certain applications to use less-expensive motors with appreciable shaft play. If the encoder also can withstand high temperatures (above 70°C), motors may also be sized smaller and run hotter than would otherwise be acceptable.

Most improvements in modular encoders concern the encoder optics and electronics. For example, until recently, encoder light emitters (usually LEDs) and detectors were relatively large compared with the slots in the disk. As a result, a stationary mask is placed between the detector and code wheel to increase accuracy by sharpening the edges of light pulses falling on the detectors. But the mask presents problems. It increases component and assembly costs. It also increases the chance of interference with the spinning disk, and attenuates light reaching the detector.

To solve these problems, several manufacturers have designed encoders that need no mask. Eliminating the mask allows more space between the disk and detectors, increasing the tolerance for phase error and edge jitter between channels. The key developments that make maskless encoders feasible are miniaturized LEDs and detectors and the use of special lenses.

Eliminating the mask entails drawbacks as well. The biggest drawback is that detectors on maskless encoders work only with specific code-wheel resolutions. Encoders with masks, on the other hand, can be adjusted to fit wheels having different resolutions.

Code wheels also have improved. While many still consist of etched metal, Mylar, or emulsion on glass, these technologies are giving way to chrome on glass. Chrome on glass gives superior edge definition, greater immunity to condensation, and better durability. Superior edge definition also allows code wheels to be made smaller.