USD

Understanding Encoder Output Signals to Aid Optimum Device Selection

By Jason Kelly, Electromechanical Design Engineer, CUI Inc.

Electronic motor controllers usually have a requirement for an encoder to detect rotor position and/or speed. To choose a suitable device, an engineer must evaluate several aspects beginning with whether the application requires an incremental, absolute or commutation encoder. After making this decision, they must consider additional parameters including resolution, mounting pattern, motor shaft size, and others.

Choosing the most suitable output signal type is not always obvious and is often overlooked. The three types most commonly found are open-collector, push-pull, and differential line driver. This article explains each type to help engineers choose a suitable device based on the needs of their application.

First principles

Each type of encoder output signal is digital, whether it is the quadrature output of an incremental encoder, the motor-pole output of a commutation encoder, or a serial output conforming to a specific protocol. As such, the signals always switch between close-to 0 V and close-to 5 V, for a 5 V encoder, corresponding to logic zero or 1. Thus an incremental encoder’s output is a basic square wave, as shown in Figure 1.

Diagram of generic square-wave output of digital encoderFigure 1: Generic square-wave output of digital encoder. (Image source: CUI Inc.)

Open-collector output

An open-collector output (Figure 2) is the most common among rotary encoders. This means that the collector pin on the transistor is left open, or disconnected, when the input signal is high. When the output is required to be low, it is driven to ground.

Diagram of open-collector output schematicFigure 2: Open-collector output schematic. (Image source: CUI Inc.)

Because the output is disconnected when the signal is high, an external "pull-up" resistor is needed to ensure the voltage at the collector reaches the desired level to indicate a logic 1. This gives engineers the flexibility to interconnect systems that are operating at different voltages. The collector can be pulled up to a higher or lower voltage than the encoder’s operating voltage (Figure 3).

Diagram of collector output can be pulled up to a suitable voltageFigure 3: The collector output can be pulled up to a suitable voltage to interface to an external system. (Image source: CUI Inc.)

On the other hand, this interface has some disadvantages. Pull-up resistors, which are already built- in to many off-the-shelf controllers, draw a finite current and hence dissipate power. In addition, acting in combination with parasitic circuit capacitance, the resistance can slow the transition of the output between the high and low voltages. The slope of the transition (Figure 4) is referred to as the slew rate.

Diagram of pull-up resistor effectively slows the transition of the output voltageFigure 4: The pull-up resistor effectively slows the transition of the output voltage as the output switches between states. (Image source: CUI Inc.)

By lowering the slew rate, the pull-up resistor effectively limits the encoder’s operating speed, which can result in reduced resolution of an incremental encoder. Reducing the resistance value can increase the switching speed but also increases power dissipation by drawing more current when the signal is low.

Push-pull outputs

A push-pull output containing two transistors instead of one (Figure 5) can overcome the disadvantage of an open-collector interface discussed above. The upper transistor replaces the pull-up resistor and, when turned on, pulls the voltage up to the rail with effectively minimal resistance, which ensures a faster slew rate. Because the transistor is turned off when the output signal is low, this active pull-up also dissipates less power than the open-collector circuit. This can result in much better run-time for battery-powered devices.

Diagram of push-pull outputFigure 5: Push-pull output (Image source: CUI Inc.)

CUI’s AMT family of single-ended encoders all contain push-pull outputs and hence require no pull-up resistors to interface with external circuits. In addition to enhancing speed and reducing power dissipation, these push-pull outputs also simplify testing and prototyping. The AMT encoders also have CMOS outputs. Because the high and low voltage values vary between devices, you should consult the datasheet to determine how the voltages at the output should be interpreted.

Differential line driver outputs

Although encoders with push-pull outputs overcome some disadvantages of the open-collector type, both are single-ended outputs that face limitations when used with long cabling distances or in an environment containing large quantities of electrical noise and interference.

Over long cabling distances, the signal amplitude is reduced and capacitive effects slow the switching transitions. With a single-ended signal, where the transmitted signal is referenced to ground, this degradation can cause errors leading to poor system performance.

Moreover, in electrically noisy environments, unwanted voltages of varying magnitudes can be coupled onto the cables causing the receiver in a single-ended system to decode the signal voltages incorrectly.

CUI recommends differential signaling if the cable length is to exceed one meter. An encoder that contains a differential line driver generates two output signals; one matches the original signal, while the other is an exact opposite, or complementary signal. The magnitude of the difference between the two is double that of the original single-ended signal, which helps overcome the degradation caused by voltage drop and capacitance (Figure 6).

Diagram of differential line driver overcomes signal degradationFigure 6: The differential line driver overcomes signal degradation. (Image source: CUI Inc.)

In addition, common-mode noise present in both signals can be removed by subtraction, and thus ignored by the receiving system (Figure 7). Differential line-driver interfaces are widely used in industrial and automotive applications due to their excellent noise-rejection capabilities. Many CUI encoder models are offered with the option of a differential line-driver output for use in demanding applications.

Diagram of differential receiver ignores noise that appears on both signalsFigure 7: The differential receiver ignores noise that appears on both signals. (Image source: CUI Inc.)

Overall, this brief explanation of encoder output types and their relative strengths should help engineers choose the best device for their application by combining optimum power consumption with reliable communication over the applicable connection distance and adequate noise immunity.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Jason Kelly, Electromechanical Design Engineer, CUI Inc.