Quadrature Encoder Fundamentals

The most common type of incremental encoder uses two output channels (A and B) to sense position. Using two code tracks with sectors positioned 90 degrees out of phase, the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, for example, the disk is rotating in a clockwise direction. If B leads A, then the disk is rotating in a counter-clockwise direction.
By monitoring both the number of pulses and the relative phase of signals A and B, you can track both the position and direction of rotation.
Some quadrature encoders also include a third output channel, called a zero or index or reference signal, which supplies a single pulse per revolution. This single pulse is used for precise determination of a reference position.
Visit the how-to guide for in-depth guidance on making quadrature encoder measurements.
Reader Comments | Submit a comment »
Each increment (marked by detents on
some shaft encoders, unmarked on
others) is indicated by a single bit
transition, whether you're talking about a
2-bit encoder like the one shown here, or
a 3- or 4-bit. Gray code (http://
www.nist.gov/dads/HTML/graycode.html)
is generally used to ensure that only one
bit changes for each increment, so you
never have to worry about tracking
simultaneous or near-simultaneous
transitions.
The "not A" channel simply inverts the A
channel. You only need to use one of A
or not A. Losing a channel makes a 2-bit
encoder useless. Missing a transition
also makes it impossible to tell which
way the shaft is turning. If your program
reads both on: 11, followed by both off:
00, did the shaft turn clockwise or
counter-clockwise? This may be an
issue for software-based decoding.
- Jan 12, 2007
This was brief, but helpful. But, a link to
an example problem would be perfect.
- Abdul Rahman, Northern Illinois University. shoaib_ar@hotmail.com - Nov 10, 2006
This explanation is too limited. For
example, is one increment determined
by two bit transitions, or 4? I have seen
one system that used 3 bit transitions.
Is there a standard?
- Oct 10, 2006
Quadrature Encoder
The information is great on the A and B
signal but it doesn't explain the (A not)
or (B not) that are with some encoders. Do
you need to use all four signals (A, B, A
not and B not)? What happens to the output
signal if you lose one channel?
- Aug 16, 2005
Links needed
A link to applications would be useful.
I.e. how do I set-up a FieldPoint counter
and a Q-encoder to keep track of angular
position.
- andres mencke, VI Research. amencke@panix.com - Dec 28, 2004
General/specific comment
Great description, however, it would be
great to integrate this document with
other
articles that talk about integration.
In general your "Developer Zone"
would be
more helpful if it had more detail, or
linked to other pages. Its a
bit difficult
to filter through ~100 hits for a search on
encoders.
Great
site though.
- Feras Habbal, UT austin. habbalf@mail.utexas.edu - Jul 18, 2002
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
