The ability to easily and accurately measure position, velocity and acceleration from an encoder requires more than simply an encoder interface and counters. The discussion below addresses the hardware functionality required to facilitate easy and accurate encoder measurements. The topics are broken down into the following:
|Hardware/Software components available for making encoder measurements.|
Although a few applications are served by a simple encoder interface and digital pulse counter, a good encoder interface card that serves any application well must include the following features:
The table below provides a comparison between the motion capture card and other encoder/counter cards.
|Why Time measurement is important when measuring position, velocity and acceleration?|
Time Measurement and Position
Standard encoder/counter cards measure the position of an object by capturing the value of the position counter at user specified times. Because counter cards only provide counter values as a means of measuring position, the position measured using counter cards will always be quantized to +/- 1/2 count.
In contrast to the measurement of position strictly using counters, the Motion Capture card measures the time of pulse transitions from encoders to more accurately measure the position of an object. These time/position value pairs represent the actual position of the encoder at the measured time because it is at these transition times that the position counter increments/decrements. As illustrated below, the actual time/position values can be used to interpolate to sample times to more accurately convey the motion measured by the encoder. Of course the Motion Capture card also supports the direct measurement of the position counters without time measurement to accommodate applications that only need strobed position measurements.
Time Measurement and Velocity Computations
|Why counters can't be used to measure direction from quadrature signals?|
One might be tempted to consider the counter/timer cards based on the 9513 and/or 8253/8254 counter chips to measure position, velocity and acceleration. These cards are suitable if you simply want to measure unidirectional position and you don't mind providing external logic to translate the RS-422 signal levels of optical encoders to TTL/CMOS levels. The use of counter cards becomes questionable when you attempt to measure bi-directional motion or attempt to accurately measure/compute velocity or acceleration.
The use of counters to track the direction of an encoder is precluded by the counter's inability to differentiate between stationary vibration and real rotation. Without the appropriate state machine to track the quadrature signal states of an encoder, there are conditions when a counter will indicate motion when in fact the object is simply moving back and forth ever so slightly.
For example, it is often suggested that an encoder can be connected to a bi-directional counter by connecting the A signal of the encoder to the clock input of the counter, and the B encoder signal to the up/down input. As illustrated to the left, it is possible for the encoder to be stopped and vibrating (or rotating and vibrating for that matter) so that one of the quadrature signals repeatedly generates an edge while the other quadrature signal remains low (or high). In such a condition, the counter will continue to count up (or down) as if the object is actually rotating in one direction. The motion capture hardware from Euclid Research does not have this problem.
Euclid Research · 2 North 1st Street, 6th Floor · San Jose, CA 95113-1201
Tel: (408) 283-9020 · Fax: (408) 283-9029