Friday, March 11, 2011

Types of Encoder

Absolute rotary encoder

Mechanical absolute encoders
A metal disc containing a set of concentric rings of openings is fixed to an insulating disc, which is rigidly fixed to the shaft. A row of sliding contacts is fixed to a stationary object so that each contact wipes against the metal disc at a different distance from the shaft. As the disc rotates with the shaft, some of the contacts touch metal, while others fall in the gaps where the metal has been cut out. The metal sheet is connected to a source of electric current, and each contact is connected to a separate electrical sensor. The metal pattern is designed so that each possible position of the axle creates a unique binary code in which some of the contacts

Optical absolute encoders
The optical encoder's disc is made of glass or plastic with transparent and opaque areas. A light source and photo detector array reads the optical pattern that results from the disc's position at any one time.
This code can be read by a controlling device, such as a microprocessor or microcontroller to determine the angle of the shaft.
The absolute analog type produces a unique dual analog code that can be translated into an absolute angle of the shaft (by using a special algorithm).

Standard binary encoding
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
SectorContact 1Contact 2Contact 3Angle
1offoffoff0° to 45°
2offoffON45° to 90°
3offONoff90° to 135°
4offONON135° to 180°
5ONoffoff180° to 225°
6ONoffON225° to 270°
7ONONoff270° to 315°
8ONONON315° 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.


Gray encoding
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 Gray-coded version would be as follows.
Gray Coding
SectorContact 1Contact 2Contact 3Angle
1offoffoff0° to 45°
2offoffON45° to 90°
3offONON90° to 135°
4offONoff135° to 180°
5ONONoff180° to 225°
6ONONON225° to 270°
7ONoffON270° to 315°
8ONoffoff315° 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.


Single-track Gray encoding
If the designer moves a contact to a different angular position (but at the same distance from the center shaft), then the corresponding "ring pattern" needs to be rotated the same angle to give the 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 

No comments:

Post a Comment