Encoders are used to measure distance. Rotary encoders measure the angular distance around the circumference of a circle, often in degrees. Linear encoders measure the distance an object moves in a straight line. Measuring the number of pulses over a set period produces the property of speed. Encoders are further classified as incremental or absolute.
Most Incremental encoders generate an electrical pulse for each division of travel. The division of distance depends on the design of the encoder. If a rotary encoder is designed to produce 100 pulses per revolution (ppr), each pulse is equal to 3.6 degrees of rotation. For a linear encoder designed to produce 100 pulses per meter, each pulse would equal 10 mm of travel. The number of ppr can be as low as 10 or as high as several thousand.
Each pulse an incremental encoder produces is identical to every other pulse. The result of this characteristic is that the mechanism needs to be moved to a known position before being used to measure distance or if the encoder loses power for any reason. Moving the mechanism to a known position is typically referred to as homing. Manufacturers may refer to this procedure by different names.
The simplest type of incremental encoder has one output pulse signal. This style of encoder is sometimes referred to as a unidirectional encoder because the counting device can determine movement, but it cannot determine direction. In Figure 1, the time period t1 represents one full pulse. As the speed of the device being measured increases, t1 will decrease. A decrease in t1 will also occur with an increase in the number of PPR the encoder provides. To be reliable, the counting device the encoder is connected to must be fast enough to process the incoming signals.
Determining direction with an encoder requires at least two pulsed outputs, this style is typically referred to as a quadrature encoder. When the pulse from the A phase leads the pulse from B phase, the encoder is either rotating in a clockwise position or, for linear encoders, traveling away from the home position. If the B phase leads the A phase, the encoder is rotating counterclockwise or toward the home position. Figure 2 shows a 90° offset between phases and a 50% duty cycle for high to low states of the encoder output pulses. There is no official standard for the lead-lag relationship, the offset or duty cycle. Refer to the manufacturer's technical literature to verify the relationship of the pulse trains for the encoder used.
Many encoders offer a third output pulse called the Z phase. For rotary encoders, the Z phase is designed to output a pulse once every revolution or, for linear encoders, once during the full travel of the encoder. If a rotary application does not require rotation of more than 360°, such as in a robot joint, the Z phase can be used as a home position. If the application requires rotation of more than 360°, the Z phase can be used as a check to make sure that no pulses have been lost due to signal noise or defective wiring (Figure 3).
Other types of pulse outputs include a complementary output for each pulse. The complementary outputs mirror the signals in the opposite polarity. When one phase signal is positive, the complementary output is negative.
Encoders offer several types of electrical interface styles that connect to the counting device. An open-collector interface has a transistor in the encoder electronics for each phase. The transistor pulls the voltage supplied by the counting device to ground. This allows current flow in the circuit. When the transistor turns off, the current flow is interrupted, and the counting device interprets the change in current as a pulse. Open-collector outputs can be susceptible to electrical noise if not correctly shielded. Open collector outputs are also affected by the resistive voltage drop of the connecting wires. The wires should be as short as possible.
Line-driver outputs supply differential signals and meet RS-422 communication specifications. This output style provides electrical noise suppression. If the environment is electrically noisy or the distance is such that an open collector output may lose too much signal strength due to the voltage drop across the connecting wires, line-driver output should be considered. There are other types of output signals available from different manufacturers. Always consult the manufacturer’s technical information when designing a system.
Absolute encoders are similar to incremental encoders because they provide a method to measure rotational and linear distance. The difference is that absolute encoders provide an output that is directly relatable to the position of the encoder. If an incremental encoder loses power, when power is restored the counting device cannot determine the position of the encoder unless it happens to be at the home position—the home position being determined with the encoder’s Z phase or an external sensor. An absolute encoder supplies its position even if it has been moved during the power outage.
One style of absolute encoder supplies a unique digital output for each position. The resolution of the encoder determines the number of separate wires required to provide its position to the counting device. An encoder with a resolution of 256 requires eight signal wires plus one signal ground. An encoder with a resolution of 4,096 requires 12 signal wires plus one signal ground. Absolute encoders use one of two digital codes to supply the position information. One code is straight binary. Most controls engineers are familiar with this. A second method called grey code is also available. Grey code only changes the state of one bit for each count (Table 1). Changing only one bit at a time allows for error checking by the counting device.
Absolute encoders are also built with analog outputs. All of the standard industrial signal ranges are available, 0-5, 1-5, 0-10, 1-10, 0-20 mA and 4-20 mA. The resolution for an analog encoder is dependent on the maximum count the encoder can produce or the maximum count the input device can decode. Connecting a 10-bit encoder (1,024 counts) to an 8-bit input card (256 counts) will provide a maximum resolution of 256 counts per revolution.
Synchronous serial interface (SSI) is a communication system that has been widely adopted by the motion control industry.