Finding the Index Pulse of an Incremental Encoder

The index pulse, often also called “Z” or “Marker pulse”, of an optical incremental encoder is a once per revolution digital pulse that is used for homing or count verification of incremental signals.

In the QD145 and QD200 series of encoders the index pulse fires when the mark on the top cover of the optical incremental encoder and the mark on the encoders shaft are aligned.

This mark also indicates the rising edge of the U channel for commutated optical incremental encoders.  Knowing the location of this edge is useful for the initial rough timing of Brushless DC motors.

Quantum Devices is a leading manufacturer of Optical Incremental Encoders.

Jim can be reached at 608.924.3000 or by e-mail at


Brushless Motors vs Brush Motors, what’s the difference?

What’s the difference between a Brushless Motor and a Brush Motor?

Well, the brushes of course.

Yeah, but what does that mean?

The principle behind the internal working of both a brushless DC motor and a brushed DC motor are essentially the same.  When the motor windings become energized, a temporary magnetic field is created that repels(and/or attracts) against permanent magnets.  This force is converted into shaft rotation, which allows the motor to do work.  As the shaft rotates, electric current is routed to different sets of windings, maintaining electromotive repulsion/attraction,  forcing the rotor to continually turn.

Construction differences

Brushes inside  electric motors are used to deliver current to the motor windings through commutator contacts.  Brushless motors have none of these current carrying commutators.  The field inside a brushless  motor is switched via an amplifier triggered by a commutating device, such as an optical encoder.

Windings are on the rotor (Rotating part of motor) for brush motors and on the stator (stationary part of motor) for brushless motors.

Brush Motor: windings on rotor, magnets on stator

Read more of this post

Understanding Incremental Encoder signals

Which incremental encoder wires should I use?

Channels A & B (Incremental Channels)

Use only A (or only B) for an RPM or counting applications where the rotation is either unidirectional, or where you don’t need to know direction.

Use A and B together to know direction. After two low pulses the next high pulse indicates direction.  This is due to the phasing offset between A and B of 90 electrical degrees, placing the signals in what is known as quadrature.

These signals can also be used to set up an up/down counter

Index pulse, also known as Z, marker, or I

Index pulse is a pulse that occurs once per rotation. It’s duration is nominally one A (or B) electrical cycle, but can be gated to reduce the pulse width.

The Index (Z) pulse can be used to verify correct pulse count

The Incremental Encoder Index pulse is commonly used for precision homing.  As an example, a lead screw may bring a carriage back to a limit switch.  It is the nature of limit switches to close at relatively imprecise points. This only gives a coarse homing point. The machine can then rotate the lead screw until the Z pulse goes high.

For a 5000 line count encoder this would mean locating position to within 1/5000 of a rotation or a precision of .072 Mechanical Degrees.  This number would then be multiplied against lead screw travel.

Commutation (UVW) signals are used to commutate a brushless DC motor. I always like to compare these signals to that of a distributor in a car. The commutation (sometimes called “Hall”) signals tell the motor windings when to fire

You would need to have encoder commutation signals if the motor you are mounting the encoder to has a pole count and there is no other device doing the work of commutation.  It is important to note that commutation signals need to be aligned or “timed” to the motor.

Single ended VS differential

These terms refer not to the waveforms of signals, but instead to the way the signals are wired.

Single ended wiring uses one signal wire per channel and all signals are referenced to a common ground.

TTL and Open Collector are types of single ended wiring.

Differential wiring uses two wires per channel that are referenced to each other.  The signals on these wires are always 180 electrical degrees out of phase, or exact opposites.  This wiring is useful for higher noise immunity, at the cost of having more electrical connections.

Differential wiring is often employed in longer wire runs as any noise picked up on the wiring is common mode rejected.

RS-422 is an example of differential wiring.


How to time Optical Encoder commutation channels to a BLDC motor

Optical Encoder Brushless DC Motor timing using Back EMF

The optical encoders we work with have a set of three Commutation tracks (U,V,W) which correspond to the three phases of the motor (R,S,T).

Alignment of the Optical encoder commutation signals to a BLDC motor could be thought of as being comparable to timing the distributor of an auto engine. Just as the distributor tells the spark plugs when to fire, the optical encoder tells the amplifier/drive when to fire the windings in the BLDC motor.

And just like a car engine, if the timing alignment is off,  the motor will not run correctly, will run inefficiently, or will not run not at all.

If two phases are accidentally reversed, the motor may even run backwards.
Keep in mind that you will need to have the information that describes which motor winding corresponds to which encoder commutation signal before trying to align an optical encoder to a BLDC motor.

Basic Steps:

1) One phase of the motor is energized locking the motor into position.

2) The encoder is rotated to a given position, which is usually the start of one of the commutation signals (I.E. leading edge of U). Often times this corresponds with the encoders index pulse.

3) The encoder is assembled to the motor and the shaft is locked in place. (via encoder set screws) The encoder flex mount is not yet secured.

4) The motor winding is de-energized.

5) The Optical Encoder is powered.

6) The motor/encoder is back driven by another motor and the two waveforms are displayed on an oscilloscope. One waveform is back EMF from the motor phase, and the other is the encoder commutation channel.

Back driven motor set up

Below the Motor back EMF and Encoder Commutation (Hall) signals are shown. They have been separated for clarity, when timing a motor you will want them to overlap.

7) While the motor is rotating, the assembly is fine tuned by rotating the encoder body to align the encoder signal to the Motor waveform.

Video of BLDC motor Back EMF to Optical Encoder Hall Phasing

Proper timing typically calls for aligning the zero volt level of the back EMF Sin wave with the edges of the commutation signals.  That level is shown below by the red line.

8 ) Once alignment is achieved, the encoder flex mount is secured, locking in the phase relationship between the motor and encoder.