Absolute Rotary Encoder
Absolute Rotary Encoder
[edit] Construction
Digital absolute encoders produce a unique digital code for each distinct angle of the shaft. They come in two basic types: optical and mechanical.
Rotary encoder for angle-measuring devices marked in 3-bit binary. The inner ring corresponds to Contact 1 in the table. Black sectors are "on". Zero degrees is on the right-hand side, with angle increasing counterclockwise. An example of a binary code, in an extremely simplified encoder with only three contacts, is shown below. Standard Binary Encoding Sector Contact 1 Contact 2 Contact 3 Angle 1 off off off 0 to 45 2 off off ON 45 to 90 3 off ON off 90 to 135 4 off ON ON 135 to 180 5 ON off off 180 to 225 6 ON off ON 225 to 270 7 ON ON off 270 to 315 8 ON ON ON 315 to 360 In general, where there are n contacts, the number of distinct positions of the shaft is 2n. In this example, n is 3, so there are 2 or 8 positions. In the above example, the contacts produce a standard binary count as the disc rotates. However, this has the drawback that if the disc stops between two adjacent sectors, or the contacts are not perfectly aligned, it can be impossible to determine the angle of the shaft. To illustrate this problem, consider what happens when the shaft angle changes from 179.9 to 180.1 (from sector 4 to sector 5). At some instant, according to the above table, the contact pattern changes from off-on-on to on-off-off. However, this is not what happens in reality. In a practical device, the contacts are never perfectly aligned, so each switches at a different moment. If contact 1 switches first, followed by contact 3 and then contact 2, for example, the actual sequence of codes is: off-on-on (starting position) on-on-on (first, contact 1 switches on) on-on-off (next, contact 3 switches off) on-off-off (finally, contact 2 switches off)
Now look at the sectors corresponding to these codes in the table. In order, they are 4, 8, 7 and then 5. So, from the sequence of codes produced, the shaft appears to have jumped from sector 4 to sector 8, then gone backwards to sector 7, then backwards again to sector 5, which is where we expected to find it. In many situations, this behaviour is undesirable and could cause the system to fail. For example, if the encoder were used in a robot arm, the controller would think that the arm was in the wrong position, and try to correct the error by turning it through 180, perhaps causing damage to the arm.
Rotary encoder for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRGC). The inner ring corresponds to Contact 1 in the table. Black sectors are "on". Zero degrees is on the right-hand side, with angle increasing anticlockwise. To avoid the above problem, Gray encoding is used. This is a system of binary counting in which adjacent codes differ in only one position. For the three-contact example given above, the Graycoded version would be as follows. Gray Coding Sector Contact 1 Contact 2 Contact 3 Angle 1 off off off 0 to 45 2 off off ON 45 to 90 3 off ON ON 90 to 135 4 off ON off 135 to 180 5 ON ON off 180 to 225 6 ON ON ON 225 to 270 7 ON off ON 270 to 315 8 ON off off 315 to 360 In this example, the transition from sector 4 to sector 5, like all other transitions, involves only one of the contacts changing its state from on to off or vice versa. This means that the sequence of incorrect codes shown in the previous illustration cannot happen.
same output. If the most significant bit (the inner ring in Figure 1) is rotated enough, it exactly matches the next ring out. Since both rings are then identical, the inner ring can be omitted, and the sensor for that ring moved to the remaining, identical ring (but offset at that angle from the other sensor on that ring). Those two sensors on a single ring make a quadrature encoder. For many years, Torsten Sillke and other mathematicians believed that it was impossible to encode position on a single track so that consecutive positions differed at only a single sensor, except for the two-sensor, one-track quadrature encoder. However, in 1994 N. B. Spedding registered a patent (NZ Patent 264738) showing it was possible with several examples. See Single-track Gray code for details.
Encoder ROD 420 An incremental rotary encoder provides cyclical outputs (only) when the encoder is rotated. They can be either mechanical or optical. The mechanical type requires debouncing and is typically used as digital potentiometers on equipment including consumer devices. Most modern home and car stereos use mechanical rotary encoders for volume control. Due to the fact the mechanical switches require debouncing, the mechanical type are limited in the rotational speeds they can handle. The incremental rotary encoder is the most widely used of all rotary encoders due to its low cost and ability to provide signals that can be easily interpreted to provide motion related information such as velocity and RPM. The fact that incremental encoders use only two sensors does not compromise their accuracy. One can find in the market incremental encoders with up to 10,000 counts per revolution, or more. There can be an optional third output: reference, which happens once every turn. This is used when there is the need of an absolute reference, such as positioning systems. The optical type is used when higher RPMs are encountered or a higher degree of precision is required.
Incremental encoders are used to track motion and can be used to determine position and velocity. This can be either linear or rotary motion. Because the direction can be determined, very accurate measurements can be made. They employ two outputs called A & B, which are called quadrature outputs, as they are 90 degrees out of phase. The state diagram: Coding for clockwise rotation Phase A B 0 0 0 1 1 1 1 0 Coding for counter-clockwise rotation Phase A B 1 1 0 2 1 1 3 0 1 4 0 0
1 2 3 4
Two square waves in quadrature (clockwise rotation). The two output wave forms are 90 degrees out of phase, which is all that the quadrature term means. These signals are decoded to produce a count up pulse or a count down pulse. For decoding in software, the A & B outputs are read by software, either via an interrupt on any edge or polling, and the above table is used to decode the direction. For example, if the last value was 00 and the current value is 01, the device has moved one half step in the clockwise direction. The mechanical types would be debounced first by requiring that the same (valid) value be read a certain number of times before recognizing a state change. On encoders with detents there are different ways to switch states. In some, both A and B are always open circuit at the detents, and an entire 00 00 switching cycle occurs while transitioning from one detent to the next. Others have detents of alternating 00 and 11 value, with staggered switching times during the transition between detents. If the encoder is turning too fast, an invalid transition may occur, such as 00 11. There is no way to know which way the encoder turned; if it was 00 01 11, or 00 10 11. If the encoder is turning even faster, a backward count may occur. Example: consider the 00 01 11 10 transition (3 steps forward). If the encoder is turning too fast, the system might read only the 00 and then the 10, which yields a 00 10 transition (1 step backward). This same principle is used in ball mice to track whether the mouse is moving to the right/left or forward/backward. Rotary encoders with a single output cannot be used to sense direction of motion. They are wellsuited for systems that measure rate-of-movement variables such as velocity and RPM. In certain applications they may be used to measure distance of motion (e.g. feet of movement).
Hall-effect quadrature encoder, sensing gear teeth on the driveshaft of a robot vehicle. Encoders may be implemented using a variety of technologies: Conductive tracks. A series of copper pads etched onto a PCB is used to encode the information. Contact brushes sense the conductive areas. This form of encoder is now rarely seen. Optical. This uses a light shining onto a photodiode through slits in a metal or glass disc. Reflective versions also exist. This is one of the most common technologies. Magnetic. Strips of magnetised material are placed on the rotating disc and are sensed by a Hall-effect sensor or magnetoresistive sensor. Hall effect sensors are also used to sense gear teeth directly, without the need for a separate encoder disc.
[edit] References
1. ^ [1] Canon video camera lens, used for zoom and aperture control 2. ^ a b c TI-5000EX Serial/Incremental Encoder Test System User Manual, Mitchell
Electronics, Inc.
3. ^ PM Brushless Servo Motor Feedback Commutation Series Part 1, Mitchell
Electronics, Inc.