March 9, 2012

Basic motion control - Incremental optic Encoders

Question: We have a programmable logic controller (Plc) application with a motor, we would like to know the motor's speed of rotation, and the distance traveled by the shaft. We need a uncomplicated solution. Any suggestions?

Answer: Have you determined installing an optic encoder?

Great, what is an optic Encoder?




An optic encoder is a device attached to a motor capable of telling us the distance traveled and the speed of rotation. It is commonly available in two flavors, absolute or incremental. Absolute encoders provide the shaft's actual position and speed. Less costly incremental encoders only inform the distance of movement relative to the motor's last position. In this article, I will briefly look at incremental encoders.

Incremental Encoders

A quadrature type incremental encoder is a circular glass or plastic disc with two (top and bottom) rows of equally spaced slits or etchings colse to the circumference. Each row is shifted the width of one slit, effectively placing the two rows 90 degrees out of phase. In operation, detach beams of light are focused straight through each row of slits. When light hits a slit it passes straight through to a photodetector (one on the top row an additional one on the bottom), every transition from light to dark can be inferred to mean 'y' degrees of rotation. The time it takes to go from light to dark and back to light can be used to infer the rate of rotation (speed), direction can be determined by examining the association in the middle of rising and falling edges resulting from the alternating periods of light and dark.

Establishing Position - zero point reference

Since incremental encoders only measure relative movement, a known position must be established to rule location. A uncomplicated way to achieve this is to move the motor until a limit switch is tripped. This fixed position becomes the zero point reference. However, since it is only a relative measurement, if we lose power the position is lost. On the next power up the zero point must be re-established.

How do I select the right incremental optic encoder?

1) characterize the required electrical specs (power supply, noise, yield signal).
2) rule how many pulses the encoder will generate per revolution (resolution).
3) Check the characteristics of the encoder module and rule if resolution versus speed trade offs are required.

For example:

We have been given a typical cheap 360 pulse per revolution encoder and a counter module with a 50 kHz upper limit. By using both the rising and falling edges we get 4 pulses per degree (rising and falling edges of top row + rising and falling edges of bottom row = 4 edges = 4 pulses) or one pulse every 1/4 degree. This gives 360 pulses x 4 edges = 1440 pulses per revolution.

Can the Plc process the counts or will a counter module be required? regular Plc counters can safely increment at a rate of 1/4 to 1/2 of the scan time. Reconsider a Plc with a 1ms (millisecond) scan time (2 scans = speed = (1ms X 2) = 0.002s = 500Hz or 500 pulses per second. With a 360 pulse/rev encoder in quadrature mode this Plc could only process one revolution every 3 seconds... Ouch!!!!.

To get colse to this we often use specialized encoder modules or a high-speed counters. The benefit - both are hardware devices independent of the Plc's scan time. Reconsider the above encoder on a shaft turning at 2,000 Rpm:

Since pulse frequency (in Hz) = (Rpm / 60) X pulses per revolution.

Pulse frequency (in Hz) = (2,000 /60) X 360 = approx 12,000 or 12 kHz.

In quadrature mode:

Pulse frequency (in Hz) = (Rpm / 60) X pulses per revolution X 4 = (2,000 /60) X 360 X 4 = approx 48,000 = 48 kHz

We are still within the module's upper limit so our encoder should work. However, we can see the speed versus resolution tradeoff. As described, a higher resolution encoder will only work with this counter at a slower speed.

Basic motion control - Incremental optic Encoders

Low Pressure Sensors Homemade Chocolate Cupcake Recipe Boxing Online Shopping