This article will focus in on the signals coming out of different types of encoders. Understanding the various output types available, and how to put them to use in your application, should add to your overall knowledge of encoders.
Encoders can be organized into two broad categories:
1. There are incremental type that output a set number of electrical square wave cycles per revolution, or a set number of square wave cycles per inch or millimeter of linear travel.
2. Then there are absolute type that output their current position in the form of digital binary bits of data on either a serial or parallel bus or interface. Some absolute encoders have an analog voltage output. The voltage level of the analog output is proportional to the current position of the encoder. When needed, this analog voltage output can be converted to 4-to-20 mA outputs by using an adapter.
Incremental Encoders With Single-Ended Outputs
The first type of output that will be looked at is single-ended outputs coming from an incremental encoder.
This diagram shows single-ended square wave outputs from an incremental encoder. Shown are quadrature signals A and B, and an INDEX or Z channel signal is shown for encoders that have that option. The A and B square wave cycles are shifted out of phase with each other by 1/4-cycle, as can be seen in the diagram. One square wave cycle is shown as lasting from one rising edge of the signal to the next rising edge.
At the bottom of the diagram are arrows to show direction of rotation or movement. The A channel cycles lead the B channel cycles in phase when motion is in the left to right direction in the diagram. The A channel cycles lag the B channel cycles in phase when the motion is in the right to left direction in the diagram.
In the case of a rotary encoder, A leads B in phase might be the case when the encoder rotates in a clockwise direction, and A lags B in phase would then happen when the encoder rotates in a counter-clockwise direction. The same A leads B in one direction, and A lags B in the other direction would hold true for an incremental linear encoder as well.
The number of square wave cycles that are generated out of the channel A and B outputs is determined by the resolution of the encoder. The resolution is determined by the number of lines or slots on the encoder’s disk or linear strip. If a disk has 360 lines on it, then there will be 360 square wave cycles generated for each revolution of the disk on channel A and 360 on channel B.
For a rotary encoder, the resolution is usually stated in CPR (cycles per revolution). A wide range of encoder resolutions are available, from just a few cycles per revolution on up to many thousands of cycles per revolution.
If the third channel index “Z” signal is present, then it will pulse high once per revolution of the disk. In the chart, the index is shown going high when both A and B are low, and it lasts for 1/4 of an A and B cycle length. This is fairly typical, but other index characteristics can also be found depending on the manufacturer and model of the encoder. There are encoders that have index outputs that last 1/2-cycle or even a full cycle.
It is probably safe to say that the majority of encoders with single-ended A, B, and Z outputs are 5-volt TTL compatible. This means that the voltage levels, current sourcing and sinking capabilities, square wave rise and fall times, etc., of the outputs are compatible with a logic family of I.C. chips known as Transistor-Transistor Logic or TTL for short.
TTL compatible outputs work fine as long as the cable length from the encoder to the interface electronics is generally 6 feet or fewer. For cable lengths greater than 6 feet, it is recommended that a single-ended line driver device be used. The driver increases the current sinking and sourcing capabilities of the outputs which helps to overcome increased cable capacitance as the length of the cable increases.
Incremental Encoders With RS422 Differential Outputs
For really long cable lengths, and/or when operating in noisy electrical environments, it is recommended that encoders with line driver RS422 differential outputs be used. Below is a diagram showing this type of encoder output.
As can be seen in the diagram above, not only are there the A, B, and Z outputs that single-ended encoders have, but now there are three additional outputs designated at /A, /B, and /Z. These extra three outputs are simply the complements of the original A, B, and Z signals. In other words, when A is high, /A is low, and when A is low, /A is high.
These RS422 differential outputs are line driver type meaning that they can source and sink greater (20 mA or more) current than single-ended outputs. Again this helps to keep the square wave cycle rise and fall times shorter by overcoming cable capacitance.
The beauty of RS422 is that it is great at ignoring common mode noise on the signals. This is because the differential receiver is looking at the difference in voltage between the complementary signal pair A and /A instead of just the voltage level of a single-ended signal A with reference to GROUND.
The theory is that the noise in the environment will be equally induced on both the A and /A signals and especially when twisted pair cables are used. The differential receiver circuitry will reject the common mode noise by looking at the difference in voltage between A and /A. This noise rejection feature combined with the increased current sourcing and sinking of the RS422 outputs results in greater signal integrity over long lengths of cable. Cable lengths up to 1000 feet can be used.
A differential receiver at the interface end of the cable converts the RS422 signals back to 5-volt TTL single-ended signals.
Other Types Of Outputs For Incremental Encoders
When the encoder is going to be used with systems or devices that are not 5-volt TTL compatible, there are other encoder output configurations available. For example, encoders are often used with PLC’s (Programmable Logic Controllers) in industrial environments. The inputs on the PLC’s are usually of the 24-volt type and the input to the PLC will be looking for an encoder output that switches to GROUND through an NPN Open Collector output. The following diagram shows an NPN transistor with open collector.
NPN Open Collector outputs are handy to use when needing to convert the 5-volt outputs of an encoder to some higher voltage range such as 12, 24 or even 48 volts. The open collector output just needs to get pulled up through a resistor to the higher supply voltage. This is shown in the drawing above where there is a pull-up resistor connecting the collector output of the transistor to 24 volts.
Absolute Encoder Output Types
Absolute encoders are available with serial outputs where the position of the encoder is sent out as a stream of binary bits each time the encoder receives a send position command. This is an especially good type of output to use when the encoder is fairly distant from the interface. These absolute encoders with serial output are available in both single-turn and multi-turn versions.
Click here to get the specifications and pricing on an excellent single-turn absolute encoder with Modbus RTU RS485 serial outputs.
Click here to get the specifications and pricing on the multi-turn version with Modbus RTU RS485 or SSI outputs. The SSI version is available with or without a digital display.
Absolute encoders are also available with parallel outputs. The position data bits are presented to the interface all at once on individual output bits. For example, if the absolute encoder has a resolution of 4096 positions per revolution, that would require 12-bits of output. With a parallel interface there would be a pin or wire for each bit. This would require a cable with many more wires in it than would be the case with a serial interface. Cable length would need to be kept at around 6 feet or fewer if the outputs are 5-volt TTL type.
Some absolute encoders output an analog voltage that is proportional to the position reading. For example, the encoder might have an analog voltage output that has a range of 0 to +10 volts. At a position of zero degrees it would output zero volts, +5 volts at 180 degrees, and +10 volts at 359.9 degrees as one example.
There are converters on the market that can take in that zero to +10 volts analog output and convert it to 4-to-20 mA current loop compatible output. 4-to-20 mA current loop is commonly used in industrial applications.
Here To Help With Your Encoder Applications
In this article we have discussed various types of outputs available with encoders. Your application will play a major role in your choice of which type of output is needed.
I would be glad to discuss with you the particulars of your application, and help you make the right choices.
It is hoped that this article has been helpful. Please leave your questions and comments in the comments section below.