Monday, May 25, 2009

Optical Encoder Tutorial

Understanding incremental optical encoders


Optical encoders are feedback sensors that report real time positional information back to a controller, computer, PLC or display. These devices are most commonly used in motion control systems to "close the loop" on positioning or velocity control of a motor. They are found in many common everyday machines: elevators, treadmills, vending machines and even in more exotic machines like MRI equipment and robotic arms. While there are many types of optical encoders, this tutorial will show you mount a bearing style incremental optical encoder to an electric motor and wire it based on the application needs.


Instructions


1. Slide the encoder onto the motor mounting shaft by holding the encoder with two fingers, one on each side of the encoder body. The female receiving shaft of the encoder should slide smoothly onto the male shaft of the motor. If there is resistance to the fit, remove the encoder and use light grade Emory cloth to lightly polish the inside of the encoder shaft.


2. Align the motor mounting holes with the holes on the encoders spring mount by rotating the body of the encoder.


3. Tihgten machine screws








Tighten the machine screws into the motor mounting holes using the appropriately sized hex wrench. You may use thread-locking compound on the machine screws if so desired.


4. Tighten the two set screws located on the encoder shaft. This will secure the encoder shaft to the motor shaft. You may use thread-locking compound on the threads of the set screws if so desired.


5. Connect the optical encoder power wires, typically red and black wires, to positive and negative on the power supply.


6. Connect the channel A wires to the controller. For a single ended applications this will be the brown wire for most encoders. For differential wired applications this will be the brown and white wires.


A single channel (Channel A or channel B) may be used to provide rotational speed feedback to the controller. The faster the motor rotates, the higher the frequency of pulses coming from the optical encoder.


7. Connect the channel B wires to the controller. For a single ended applications this will be the blue wire for most encoders. For differential wired applications this will be the blue and green wires.


Two channels (Channel A and channel B) are used for directional feedback to the controller, or up down/counting as the motor rotates, and changes direction.


Direction determination is possible as the two channels are electrically out of phase by one quarter cycle. In one direction of rotation Channel A will transition from low to high before Channel B. In the other direction of rotation, channel B will transition from low to high before channel A.








8. Connect the Index or Z wires to the controller. For a single ended applications this will be the orange wire for most encoders. For differential wired applications this will be the orange and yellow wires.


The index channel occurs once per revolution and allows for a verification of pulse count (number of pulses per rotation of the encoder) The index channel also allows for an application to precisely find a home position as the index pulse of an encoder will be much more accurate of a home signal than rotating the motor until it hits a limit switch.

Tags: applications this, applications this will, this will, controller single, controller single ended, differential wired