
Incremental encoder is another technique to track a rotary shaft other than Absolute Encoder, a typical applications that include incremental encoders are computer mouse, CNC machines and robot arm. Incremental encoder produces a series of pulses according to the shaft rotation, and by tracking these pulses; we can know the speed, direction and position of the motor drive. You can enhance your project by adding an incremental optical encoder, this tutorial will give you the basic principles.
As shown in Fig.1, Incremental encoder consists of disk with two tracks of slotted windows, and a couple of infrared LED and phototransistors are mounted across each track to produce pulses in response to the movement. To make it easy to illustrate, consider the disk in Fig.1, which has one window in each track, the angle between each window is 180o and the degree between the two tracks is 90o. Having two tracks help know the rotation direction, as you will see later.

To describe the process of determining the speed, direction and position, we will take the encoder disk, straighten it, and draw the waveforms produced by phototransistors upon disk rotation; we will get the something similar to Fig.2. Note that waveforms in this figure are inverted.
How to determine the shaft rotation speed, direction and position by using Incremental Encoder.
By counting the number of pulses produced by one the two detectors in a fixed period, you can find the speed of rotation.
The rotation direction can be found by using either hardware or software method, in hardware method you need to connect A signal to the input of D Flip Flop and the B signal to the CLK input, B signal rising edge will clock the level of A signal at any given point via the D Flip Flop Q output. If you combine the concept of D flip flop operation with the A and B signals in Fig.2, you can notice that Q will be high when the shaft rotate in one direction and low when its rotate in opposite direction.
In software method, the rotation direction of the shaft can be determined by detecting the rising edge of the B signal and then read the A signal. When A signal being high while B signal go
| Tip: |
| For better accuracy in determining the direction, speed and position, it is recommended that you include more windows in each track ("6 windows per track"), and the distance between each track should be very small. |
high represents rotation in one direction, and when A signal being low while B signal goes high represents the rotation in opposite direction.
In order to obtain the position of the rotating shaft, you should identify a home position and keep counting the pulses.
Rotary Incremental Optical Encoder By adminstrator Rev1.0 Copyright© 2007. |