Rotary encoder

de:Inkrementalgeber A rotary encoder, also called a shaft encoder, is a digital electronic device used to convert the angular position of a shaft or axle to a digital code. These devices are used in robotics, in top-of-the-line photographic lenses, in computer input devices (such as optomechanical mice and trackballs), and in rotating radar platforms.

There are two main types: absolute, and relative.

Absolute rotary encoder

Missing image
Rotatory_EnDat_Encoder.jpg
Absolute rotary encoder

The absolute type produces a unique digital code for each distinct angle of the shaft. A metal sheet cut into a complex pattern is affixed 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 sheet 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 are connected to the current source (i.e. switched on) and others are not (i.e. switched off). This code can be read by a controlling device, such as a microprocessor, to determine the angle of the shaft.

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 23 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 will change 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, and so each one will switch at a different moment. If contact 1 switches first, followed by contact 3 and then contact 2, for example, the actual sequence of codes will be

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.

To avoid this problem, Gray encoding is used. This is a system of binary counting in which two adjacent codes differ in only one position. For the three-contact example given above, the Gray-coded version would be as follows.

Missing image
Encoder_disc.png
rotary encoder for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRCG)
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, as for 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 here.

Relative rotary encoder

The relative rotary encoder is used when absolute encoding methods would be too cumbersome (because of the size of the patterned disc). This method also uses a disc attached to the shaft, but this is a much smaller disc marked with a large number of radial lines like the spokes of a wheel. An optical switch, such as a photodiode, generates an electrical pulse whenever one of the lines passes through its field of view. An electronic control circuit counts the pulses to determine the angle through which the shaft has turned.

This system, in its simplest form, cannot measure the absolute angle of the shaft. It can only measure the change in angle relative to some arbitrary datum, such as shaft's position at the time when the power was switched on. This uncertainty is not a problem for computer input devices such as mice and trackballs. When the absolute position must be known, a second sensor can be added that detects when the shaft passes its zero position.

The second problem with this system is that it cannot tell which direction the shaft is rotating in. To overcome this problem, the single optical sensor must be upgraded to two sensors placed at slightly different angles around the shaft. The direction of rotation can then be inferred from the order in which the two sensors detect each radial line.

See also

Analogue devices that perform a similar function include the synchro, the resolver, the rotary differential variable transformer (RVDT) and the rotary potentiometer.

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools