Encoder Output: How to Specify the Right Output Driver
An encoder output driver amplifies and processes raw encoder signal into square-wave signals that can be transmitted to the readout device or drive. For incremental encoders, there are 3 types of encoder output:
- Open-collector output
- Push-pull output
- Line drivers
Encoder output choice depends on the requirements of the readout electronics, the type of encoder, and application factors like transmission distance, etc.
Properly chosen encoder output can compensate for a noisy environment or long transmission distance to deliver optimum feedback performance even in a difficult situation.
While incremental encoders output a stream of voltage pulses, absolute encoders output a multi-bit digital word that is unique for each position measurement. To interpret this multi-bit word, both encoder and receiving device must speak a common language determined by the drive protocol. Learn more about absolute encoder output and protocols here
Open Collector Encoder Output
Open-collector output is a simple, low-cost solution suitable for low-end devices like counters. These drivers use output transistors with the collector input left floating (open), that essentially act as switches. Because the collector is left open, applying power would cause a short circuit condition and a fault. To prevent this, open collector output needs to be used in conjunction with a pull-up resistor that limits the current. This resistor “pulls” the signal down, switching the output on and off to generate the square-wave signal.
Open-collector encoder output provides good a solution for incremental encoders connected by single-ended wiring. On the downside, adding the pull-up resistor increases voltage loss at the encoder, independent of cabling losses. As a result, open-collector output is best used over a distance of a few meters or less.
Push-Pull Encoder Output
For environments with more interference, push-pull or totem-pole encoder outputs provides a better solution. With push-pull output, the current can go both directions—it can be synced or sourced from the output of the encoder. The output driver can convert the output from a 5V TTL to an open collector type output. Push-pull output is typically used with a DC-sourced signal and implemented with a single-ended incremental encoder to deliver A, B, and Z signals. When the output transistor is open, the driver produces a logical high; when it is closed, the driver produces a logical low. This approach makes the design far more noise-tolerant, and works well for distances of up to 10 m.
Line Driver Encoder Output
Line driver encoder output has become the go-to for a range of industrial applications, particularly in high-noise environments. A line driver is can jactively force the output high and low, which enables it to sink and source current from the load. As a result, it can generate higher current, supporting longer transmission distances.
Consider an encoder providing feedback to a counter with an internal resistance of 10 kΩ. The encoder is powered by a 12 VDC power source. With open-collector output used in conjunction with a 2 kΩ pull up resistor, the voltage at the point of termination would drop to 10 VDC because of the high ratio between pull up resistor and internal resistance of the counter. If we switch to line driver output, this is no longer a problem. As long as the current does not exceed the capabilities of the line driver, the output voltage will remain constant at 12 VDC.
It’s essential to choose an encoder line driver with sufficient current capability. All cables have a certain degree of capacitance that essentially increases the amount of current required to charge them. This looks like a current spike to the line driver. If the line driver is not rated to handle that type of current demand, it will respond by dropping the voltage. The effect on the output pulse stream will be a longer rise time on the leading edge of the square wave and a similar rounding effect on the falling edge of the square wave (see figure below).
Figure: A sudden spike in current draw caused by high cable capacitance can cause the line driver to reduce voltage in compensation. This increases the rise time for the pulse, converting it from a clean square wave (top) to a smeared pulse (bottom).
This can introduce errors, especially for readout devices triggering on the rising and falling edges of the pulses from quadrature encoders. The solution to this problem is to choose a line driver rated for a higher current. This will lead to output that more closely resembles a clean square wave.