October 7, 2024 By Bill Schweber

Collected at: https://www.eeworldonline.com/what-are-rotary-optical-rotary-encoders/

Accurate measurement of rotary shaft motion, including position, velocity, and acceleration, is crucial in numerous applications. This is typically achieved by incorporating a rotary encoder into the motor or shaft assembly. While “rotary encoder” is often abbreviated to “encoder,” it should not be confused with other electromechanical or electronic encoding devices used for data format conversion.

While it’s theoretically possible to use a brush-contact system similar to a DC motor commutator to detect shaft position, this approach lacks precision and long-term reliability. As a result, non-contact encoder technologies have become the preferred solution for modern applications, offering superior performance and durability.

Q: How are encoders implemented?
A:
 Optical and magnetic techniques are the two most common approaches to implementing the rotary encoder. Each approach has characteristics that make it a good fit (or not so good) in some situations. Both are “digital” in the sense that they generate pulses corresponding to the rotary motion rather than an analog signal, which is in some way related to the shaft angle.

Q: What are the functional elements of the optical encoder?
A:
 The optical encoder has an LED light source, a light detector, a “code” disc/wheel mounted on the shaft, and an output signal processor (Figure 1). The disc has alternating opaque and transparent segments and is placed between the LED and detector, intermittently interrupting the LED’s beam as it rotates. The detector responds to the series of light pulses it receives and sends that information to the processor, which extracts the motion information (both amount of rotation and direction).

optical encoders

Fig 1: The principle of the optical encoder is simple: generate an electrical pulse each time light passes through one of the many slots in a rotating code wheel. (Image: Encoder Products Company)

Q: How is shaft direction determined?
A:
 The encoder uses the “quadrature” principle where the single light beam is split into two parallel beams called A and B. The beams are aligned, so their outputs differ by 90° as they pass through the encoding disk and are detected separately. The relative phase between the A and B outputs indicates which direction the encoder, and thus the shaft, is rotating (Figure 2). These two output signals determine the direction of rotation by detecting the leading or lagging signal in their phase relationship.

Figure 2: By using quadrature signals (two signals 90° out of phase) – and looking at their relative lead/lag difference as they appear, the direction of rotation can be quickly and easily determined. (Image: Anaheim Automation)

Q: What are the roles of the signal processor?
A:
 The two roles of the signal processor are to amplify and “square up” the quadrature outputs from the A and B photodetectors to produce digital output pules and to indicate their relative phase by controlling a direction output signal. The system can use these two signals – one for the rotation pulses on the code wheel and one for the direction determined by the quadrature phase — to determine both rotation speed and direction.

Q: What are the two most commonly used basic encoder classes?
A:
 Encoders come in two broad classes: incremental (relative) and absolute. In the incremental encoder, the output indicates only changes from one position to another; in the absolute encoder, the output indicates the actual shaft angle with respect to a “zero-degree” point. Some applications need absolute indication, but there are many where incremental indication is all that is required.

Q: What about the power-up situation?
A:
 An absolute encoder can indicate the shaft angle once power is applied. An incremental encoder can only report it after the “zeroing” operation is applied after power-up. You have likely seen and heard this sequence in action when powering up a device such as an inkjet printer: on power-up, the carriage slides all the way to one end to establish a zero reading and then uses incremental readings from that point forward.

Q: What resolution is achievable via the code wheel?
A:
 The code wheel determines the resolution of the encoder. In theory, the light/dark slots can be made thinner and spaced more tightly to increase the resolution, but light feeds through adjacent slots (crosstalk) and causes sensing errors. In practice, resolutions of 12 bits – one part on 4096 – are practical. Some very high-end, larger-diameter optical encoders can reach five times that resolution.

Q: Why are some other code wheel issues?
A:
 Glass can be used for the “cleanest” lines and highest stability, but it is fragile and costly (Figure 3). Some encoders use much lower-cost Mylar instead, but this material may not be able to hold the lines as well. Others use chemically etched metal, which is between Mylar and glass in cost but more rugged. Each code-wheel material has performance and cost tradeoffs.

optical encoders
Fig 3: The code wheel is at the heart of the optical encoder; glass versions, such as this one, have some advantages in resolution and stability but also have downsides in cost and ruggedness. (Image: Thin Metal Parts)

The code wheel’s mechanical parameters are critical to encoder performance., Not only must it be dimensionally stable, but its inner diameter opening (which accepts the rotor shaft) and outer diameter (where the lines are sensed) must also be perfectly aligned and concentric. If not, the code wheel will not be balanced and thus will vibrate at higher rotational speeds, leading to early encoder failure. Also, the code wheel must fit without “slop” on that shaft for the same reasons.

Q: What are some other issues with the optical encoder?
A:
 Optical encoders are generally reliable (if used appropriately) but suffer some potential weaknesses. First, there is the well-known dimming of LEDs over time. Second, they are not sealed so dirt, grit, oil, and other contaminates can get between the layers of the LED/code wheel/photodetector assembly and affect reliability. Third, they are unsuitable for high-temperature operation due to the LED and photodetector. Finally, the code wheel is an issue if it changes dimensions with temperature.

Q: Can an optical encoder be used for absolute position information?

optical encoders

Figure 4: Using conventional binary coding, more than one bit can change between adjacent counts (upper disk), while in Gray-scale encoding, only one bit can change from one count to the next lower or higher. (Image: K. Craig, NYU Engineering)

A: Yes, but it is complicated. Instead of a simple series of slots of the code wheel, the wheel has a set of binary patterns, usually using Gray code (a code where adjacent positions differ by only one bit), Figure 4, which avoids ambiguities in bit switching. Multiple sensors are then used to simultaneously read the pattern in a line radiating from the shaft outward.

Another approach is to use a separate track (called the Z track) on the code wheel, which only has one slot for indexing. This is sensed separately and used to generate a single pulse each time the index slot passes a separate photodetector. To use this scheme, the system must combine the knowledge of the index pulse and the incremental pulses. Note that with an absolute encoder, system design can be simplified because there is no need to perform a reference cycle or return to home function to determine the true machine position.

Q: What is the cost of an optical encoder? What power does it need?
A:
 Prices vary by resolution and ruggedness, but an approximate range is $1 to $5 each, including the fully conditioned quadrature outputs. Most optical encoders need a single DC supply, typically 5 V at about 50 mA.

Part 2 of the FAQ will look at the magnetic encoder, an alternative to the optical encoder.

Leave a Reply

Your email address will not be published. Required fields are marked *

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments