Skip to main content

Quadrature Encoder Basics Part 1: Theory

While some motion applications require little precision and no feedback. Others, mostly industrial, require a robust way to keep track of reliable and precise data for speed, position and direction.

Stepper, Brushed or brushless DC motors do not provide any kind of feedback except when they are equipped with an encoder or hall-sensor.

On industrial stepper motors like the one that igus Delta Robot and robolink D joint is powered from, we can see that the stepper motor is equipped with an incremental quadrature encoder (8-pin).

motor123_e6d2c675a116ea2d80dca9e2faaf2f45ad671aa8.png

What is an encoder?

An encoder is an electro-mechanical device that is used to measure displacement.

Why is it used?

Encoders are used to convert the angular position of a motor or rotating equipment, into an analogue or digital signal.

Types of encoders:

When considering the types of encoders, we should distinguish the technologies that are being used for signal generation and the type of output they produce.

Technologies:

  • Resistive (using hall-sensor or magneto-resistive sensor),
  • Optical ( using a LED and a photo-sensor),
  • Electromechanical (converting the analogue position of a shaft to analogue or digital signal, also known as shaft encoder)

Resolution:

  • Encoder resolution measured in pules per revolution (PPR), is the number of counts being generated by the encoder in each turn. In the case of igus motors, the quadrature incremental encoders give out 2000 pulses out of 2 channels ( A,B) thus 500 counts/ full steps. (the inverted copies A/,B/, are discussed later).
  • On absolute encoders, bits are used to describe the resolution as their output are binary words. For example, an 8bit encoder equal 2^8 counts, thus 256 counts and a 16-bit encoder 2^16= 65536 counts/ revolution.

275_0e626d1326deb63f580c8e92b17504a423e7d035.jpg

Types of output:

  • Incremental: A sequence of on and off signals that are generated by an optical disc, indicating movement from one position to another. This position is lost if power is cut.
  • Absolute: Each position of the encoder produces a unique code/pattern/word that can be regained even after a power cut.

2.1_1_421253e229a88559eb6ed9e7fd98851a1755cdb2.jpg

Image 2: Absolute encoder disc pattern


In our case, this measurement is achieved via optical means. Inside the encoder, there is a disc which has a specific pattern of opaque and transparent parts.

357_f6d19abfd5ff4acc5f49f8f07be136d7f1986b98.jpg

Image 3: Quadrature incremental encoder disc pattern (without index)


The light detector that is used to receive the signals through the disc, receives the light intermittently according to the pattern creating a square wave pulse output.

444_70f4a183d843e49ef519c1faa79758f2288edb41.jpg

When having one code track on the encoder, thus one channel, we can measure position and velocity of a stepper motor in a relatively high resolution. This is also known as a tachometer/ speedometer, as this type of encoder is mainly capable of velocity feedback.

On the other hand, a quadrature encoder has a second code track with a 90degree displacement that allows us to determine direction on top of velocity and position. E.g. If channel A pulse output leads channel B then the motor is rotating clockwise and if channel B leads channel A the motor is rotating anti-clockwise. In other words, there is a leading/lagging phase relationship between the channels.

Having a high-resolution industrial-proof encoder means that, there is a double ended signal transmission + an index channel on top of channels A and B.

A/ and B/ are simply inverted copies of A and B, and they are there to provide better noise immunity in industrial environment applications.
In more detail, the differential signalling technology is being used, where each channel has its inverted copy. The receiver, (e.g. closed loop controller) detects the potential difference between the channel and its copy and balances them, to have an equal amplitude, always compared to a common voltage.
The advantages of this procedure are there is very low current flowing to the ground conductor and less supply voltage needed due to increased resistance to electromagnetic interference (EMI).

differential1_ac92c678768dfd928c7abebd09af8d81c4d4479a.jpg

The N channel output is the reference/ zero /index channel, it is mainly used for homing the system by providing precise feedback of a reference position.
This channel provides one pulse per rotation of the encoder.
The N/ channel is simply the inverted copy used for filtering purposes.

536_c8eab679f3baf5abe968d3d0de4461f2c23bf90d.jpg

In the next chapter, we will see how we can measure the steps produced by an encoder using an Arduino microcontroller.
Thank you for reading, please comment your thoughts/ questions at the comment section!

A.B.

Electro-mechanical background with interest in motion control and automation, DC, EC, Steppers! Low Cost Automation Engineer at igus, UK.
DesignSpark Electrical Logolinkedin