Industrial Control Summary: Rotary encoders are devices used to measure rotational speed. Photoelectric rotary encoders, through photoelectric conversion, can convert mechanical quantities such as angular displacement and angular velocity of the output shaft into corresponding electrical pulses for digital output (REP). They are available in single-channel and dual-channel output types.
The main technical parameters include the number of pulses per revolution (ranging from tens to thousands) and the power supply voltage. Single-channel output means that the rotary encoder outputs one set of pulses, while dual-channel output rotary encoders output two sets of A/B pulses with a 90-degree phase difference. These two sets of pulses can not only measure the rotational speed but also determine the direction of rotation.
It is essentially a dual-brush orthogonal unbounded potentiometer. It has a fully circular resistive ring with energized ends, on which two electrically independent brushes move. The two brushes are mechanically connected to each other at a 90° angle.
Rotary encoders are commonly used in positioning systems with servo feedback, where cost is generally not a major concern. However, encoders are also used to encode the positions of knobs on certain user interfaces, such as volume knobs in audio systems. For these knobs, potentiometers can be chosen for their low cost, high accuracy, and absolute readings, but they have limited travel, typically less than 340°. Alternatively, optomechanical rotary encoders can be selected, which have unlimited travel but are more expensive and less accurate, providing only relative readings. This design example attempts to combine the advantages of potentiometers with the boundaryless operation of optomechanical rotary encoders.
The encoder employs the structural technology of a standard potentiometer, thus facilitating production. It is essentially a dual-brush, quadrature, boundless potentiometer. It has a fully circular resistive ring with energized ends, upon which two electrically independent brushes move. The two brushes are mechanically connected at a 90° angle to each other.
The microcontroller's ADC reads two signals, which the firmware uses to determine the quadrant of the axis. Knowing the quadrant, the axis position can be calculated using the signals from the two brushes. When the brushes reach the power connection, this signal should be ignored due to non-linear response (Figure 2). There is a 90° angle between the two brushes, so they cannot both be in non-linear positions simultaneously. Today, even the most basic microcontrollers have a 10-bit ADC , so the two signals combined have 11 bits of resolution, or better than 0.2 °. If the application does not require absolute readings, or if a software reset is used, the microcontroller can ignore this signal.
This orthogonal, endpoint-less potentiometer offers an experience similar to the old-fashioned tuning knob on a classic analog radio. It opens up new possibilities for human-computer interface design, enabling consumer products to achieve a sense of luxury at a low cost.