A Comparison of Common Encoder Output Signals

July 31, 2018 by Jason Kelly

A Comparison of Common Encoder Output Signals

When it comes to choosing an encoder for a motion control application there are a number of choices that need to be made. An engineer specifying a sensor must decide if their application requires an incremental, absolute, or commutation encoder. Once they know what type they need there are a laundry list of other parameters to consider such as: resolution, mounting pattern, motor shaft size, and more. Additionally, and sometimes overlooked, is the encoder output signal type needed. The answer is not always clear, so in this post we will review the three main types of outputs seen on just about any encoder: open-collector, push-pull, and differential line driver. These three output types describe the physical layer of digital communication.

Whether it is an incremental encoder's quadrature output, a commutation encoder's motor pole output, or a serial interface that uses a specific protocol, all of these signals are digital and have high and low states. This means that for a 5 V encoder, signals will always switch between 0 V (ground) which is low or a binary 0, and 5 V which is high or a binary 1. For this post we will focus on incremental encoder outputs which deliver a basic square wave.

Drawing of a typical 5 V digital square wave
Typical 5 V digital square wave

Open-Collector Outputs

Most rotary encoders on the market are going to have an open-collector output. This means that the output of a digital signal can be driven low to ground, and when the signal is supposed to be high, the output is merely disconnected. The output is named open-collector because the collector pin on the transistor is left open, or disconnected, when the input signal is high.

Drawing of a bipolar junction transistor as used in open-collector encoders
Bipolar junction transistor as used in open-collector encoders

To interface with this device, an external resistor is required to "pull-up" the collector to the desired high voltage level. This is a useful output type if the engineer is trying to interface with a system that has different voltage levels. The collector could be pulled up to meet lower or higher voltage levels than the encoder operates at.

Drawing of a pull-up resistor added externally to an open-collector encoder
Pull-up resistor added externally to an open-collector encoder

However, the disadvantages of this interface often outweigh the ability to change encoder voltage levels. Adding external resistors to open-collector encoders is not overwhelmingly difficult to do, and many off-the-shelf controllers have them built in already, but these external resistors consume current to operate and they influence the output signal, changing its characteristics with frequency. Consider again the square wave of an incremental encoder, only this time zoomed in extremely close to one of its state changes. We like to think of our digital signals as transitioning from low to high immediately, but we of course know that everything takes time. We refer to this time delay as the slew rate.

Closeup view of a square wave with lower slew rate
Closeup view of a square wave with lower slew rate

In the case of open-collector outputs the slew rate is affected by the resistance of the pull-up resistor since the resistor acts as the R in an RC timing circuit. Lower slew rates mean a reduced operating speed of the encoder (and/or reduced resolution in the case of incremental encoders). Slew rates can be improved with lower value resistors (stronger pullups), but that tradeoff means the system is drawing more power, as that pull-up resistor must draw more current through it when the signal is low.

Push-Pull Outputs

The best answer to the drawbacks of an open-collector interface is a push-pull configuration. In push-pull, two transistors are used instead of just one. The upper transistor functions as an active pull-up, while the lower transistor works the same as the transistor in an open-collector configuration. Push-pull configurations allow for fast digital transitions with faster slew rates than are achievable with resistors conditioning the signal lines. Without resistors acting to dissipate power, this output type is also lower in power usage. This makes the push-pull output a much better option for battery-powered applications where available power is at a premium.

Drawing of a push-pull transistor configuration
Push-pull transistor configuration

All of CUI's single-ended AMT encoders use the push-pull output type. No external pull-ups are required for interfacing to the outputs of AMT encoder models. This makes testing and prototyping much easier, requiring less supplies to get up and running. It is important to note that the AMT encoder's output is referenced as CMOS on the datasheet. This simply indicates how the interfacing device should interpret the high and low voltage levels it sees from the push-pull output. These high and low values vary between devices, so the datasheet for the desired product should be consulted.

Differential Line Driver Outputs

While push-pull encoders offer a step-up in performance over their open-collector predecessors, they are not necessarily the right option for every project due to their single-ended outputs. If an application requires long cabling distance, or if the cables used will be subject to large amounts of electrical noise and interference, an encoder with a differential line driver output is going to be the best choice. Differential outputs are generated with the same transistor configuration as push-pull outputs, but rather than one signal being generated there are two signals generated. These signals are referred to as a differential pair; one of the signals matches the original signal, while the other is the exact opposite of the original signal, which is why it is sometimes referred to as a complementary signal.

In a single-ended output, the receiver is always referencing the transmitted signal to a common ground. However, over long cabling distances where voltages tend to drop and slew rates decrease, signal errors often occur. In a differential application, the host generates the original single-ended signal, which then goes to a differential transmitter. This transmitter creates the differential pair to be sent out over the cabling. With two signals generated, the receiver no longer references the voltage level to ground, but instead references the signals to each other. This means that rather than looking for specific voltage levels, the receiver is always looking at the difference between the two signals. The differential receiver then reconstructs the pair of signals back into one single-ended signal that can be interpreted by the host device using the proper logic levels required by the host. This type of interface also allows devices of differing voltage levels to operate together by way of communication between the differential transceivers. All this works together to overcome the signal degradation that would have occurred with a single-ended application over long cabling distances.

Drawing showing the waveform process of a differential line driver
Encoder output driven by differential driver and reconstructed by receiver

However, signal degradation is not the only issue that arises over long cabling distances. The longer the cabling is within a system, the higher the chances that electrical noise and interference will make its way onto the cables and ultimately into the electrical system. When noise couples onto cabling it shows up as voltages of varying magnitudes. In systems with single-ended output encoders, this can cause the receiving side of the system to read false high and low logic values, leading to erroneous position data. This is a massive problem! Luckily differential line-driver interfaces are well equipped to deal with this noise. CUI typically recommends using a differential line driver for cable lengths exceeding 1 meter.

When using differential line drivers, twisted pair cabling is required. Twisted pair cabling is comprised of A and A- signals intertwined together with a specified number of turns over a given distance. With this type of cable, noise that is generated on one signal wire is applied equally on the paired wire. If a voltage spike occurs on signal A, it is equally applied on signal A-. Because the differential receiver subtracts the signals from each other to get the reconstructed signal, it would ignore the noise shown equally on both wires. The ability of the differential receiver to ignore voltages that are the same on both signal lines is referred to as common mode rejection. Because of their noise rejection capabilities, differential line driver interfaces are commonplace in industrial and automotive applications.

Example drawing showing a differential receiver ignoring noise common to both signals
Differential receiver ignores anything common to both signals

By understanding the different encoder output types and their advantages and disadvantages, an engineer can better select the optimal output type for their application. CUI's AMT encoders are all offered with push-pull outputs for low power consumption and ease of installation. Differential line driver options are also available in many models for more demanding applications.

Helpful Resources

View CUI's entire line of AMT modular encoders
Interested in more encoder related topics? Click here for additional blog posts

Have comments regarding this post or topics that you would like to see us cover in the future? Send us an email at cuiinsights@cui.com


TODO: tags & categories
Jason Kelly

Jason Kelly

Motion Control Design and Applications Engineer

As a design engineer for CUI’s AMT encoders and motion control products, Jason Kelly works extensively on new encoder designs, including the creation of supporting accessories, software interfaces, and customer tools. His emphasis on leading engineering design and practices is clearly shown in CUI’s innovative AMT encoders as well as in his support of customers in the field. When he's not designing in the lab, Jason is busy remodeling his home, working on his truck, and exploring hidden outdoor gems of the Pacific Northwest with his wife and family.