|
A rotary encoder, also called a shaft encoder, is an electro-mechanical device used to convert the angular position of a shaft or axle to an analog or digital code, making it a sort of transducer. 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. In engineering, electromechanics combines the sciences of electromagnetism of electrical engineering and mechanics. ...
This article is about angles in geometry. ...
A transducer is a device, usually electrical or electronic, that converts one type of energy to another. ...
Robotics is the science and technology of robots, their design, manufacture, and application. ...
Photographic lens One of Canons most popular wide angle lenses - 17-40 f/4 L The zoom lens of the Canon Elph A photographic lens (or more correctly, objective) is an optical lens or assembly of lenses used in conjunction with a camera body and mechanism to make images...
Operating a mechanical 1: Pulling the mouse turns the ball. ...
Logitech TrackMan A trackball is a pointing device consisting of a ball housed in a socket containing sensors to detect rotation of the ball about two axesâlike an upside-down mouse with an exposed protruding ball. ...
For other uses, see Radar (disambiguation). ...
There are two main types: absolute and incremental (relative). Absolute rotary encoder
Image File history File links Download high resolution version (2580x1932, 406 KB) Rotatory_EnDat_Encoder Picture made on my own File links The following pages link to this file: Rotary encoder ...
Image File history File links Download high resolution version (2580x1932, 406 KB) Rotatory_EnDat_Encoder Picture made on my own File links The following pages link to this file: Rotary encoder ...
Construction The absolute digital 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). Electric current is the flow (movement) of electric charge. ...
The term binary code can mean several different things: There are a variety of different methods of coding numbers or symbols into strings of, including fixed-length binary numbers, prefix codes such as Huffman code, and other arithmetic coding. ...
This code can be read by a controlling device, such as a microprocessor, to determine the angle of the shaft. A microprocessor is a programmable digital electronic component that incorporates the functions of a central processing unit (CPU) on a single semiconducting integrated circuit (IC). ...
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 anticlockwise. An example of a binary code, in an extremely simplified encoder with only three contacts, is shown below. Image File history File links Encoder_disc_(3-Bit_binary). ...
Image File history File links Encoder_disc_(3-Bit_binary). ...
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 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.
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 two adjacent codes differ in only one position. For the three-contact example given above, the Gray-coded version would be as follows. Image File history File links No higher resolution available. ...
Image File history File links No higher resolution available. ...
The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one digit. ...
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 here.
Incremental rotary encoder An incremental rotary encoder, also known as a quadrature encoder or a relative rotary encoder, has two outputs called quadrature outputs. They can be either mechanical or optical. In the optical type there are two gray coded tracks, while the mechanical type has two contacts that are actuated by cams on the rotating shaft. The mechanical types requires debouncing and are typically used as digital potentiometers on equipment including consumer devices. Most modern home and car stereos use mechanical rotary encoders for volume. 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: only two sensors are required. 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 RPM's 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: Gray Coding for Clockwise Rotation | Phase | A | B | | 1 | 0 | 0 | | 2 | 0 | 1 | | 3 | 1 | 1 | | 4 | 1 | 0 | Gray Coding for Counter Clockwise Rotation | Phase | A | B | | 1 | 1 | 0 | | 2 | 1 | 1 | | 3 | 0 | 1 | | 4 | 0 | 0 |
Two square waves in quadrature. If you were to draw this as a wave form, you would see that they 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. Image File history File links Quadrature_Diagram. ...
Image File history File links Quadrature_Diagram. ...
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). Rotary sensors that have a single output are not encoders and can not determine direction, but can sense RPM. This same principle is used in old ball mouse to track whether mouse is moving to the right/left or forward/backwards.
Single-track rotary encoder If the manufacturer 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 1996 Hiltgen, Paterson and Brandestini published a paper showing it was possible, with several examples. See Gray code for details. The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one digit. ...
Encoder technologies Encoders may be implemented using a variety of technologies: Image File history File links No higher resolution available. ...
Image File history File links No higher resolution available. ...
- Conductive tracks. A series of copper pads etched onto a PCB is used to encode the information. 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.
Photodiode closeup A photodiode A photodiode is a semiconductor diode that functions as a photodetector. ...
Hall effect diagram, showing electron flow (rather than conventional current). ...
Magnetoresistance is the property of some materials to change the value of their electrical resistance when an external magnetic field is applied to them. ...
Industrial use | | This article or section may contain original research or unverified claims. Please improve the article by adding references. See the talk page for details. (September 2007) | Note: This is based on field observation. Image File history File links Emblem-important. ...
The quadrature variant is most prevalent in industrial use even though more sophisticated and tougher absolute transducers have been on the market for some time. Most applications are satisfied with an initial homing function on power up to achieve the desired absolute positioning. The simple wiring associated with quadrature encoders along with its relative ruggedness are likely the primary reasons for its success. And as such, it has become notably cheaper than all other precision options. The only serious contender I've noticed is the resolver and its linear variants. This will be due to the resolver being capable of withstanding very hash environments like operating in liquids. Another trend that may be happening is modern transducers are designed to output quadrature signalling while internally they are not actually quadrature encoders at all - The power of mass production and digitally reconfigurable encoding. During the 1980's and 1990's an assembly known as the mouse with two rotary quadrature encoders inside was massively popular as a partner to the rising desktop phenomenon. Starting out targeted as a workstation but saw much bigger acceptance as a home computing and gaming device then later absorbed by the clone PC market. The rotary encoder saw a rapid decline in this role as the far more sophisticated "optical" mouse arrived on the scene in the early 2000's(?). As a side note, these "opticals" also produces the quadrature signalling, even though the massive PC market has always used the serial command port for gathering the deltas. A contemporary computer mouse, with the most common standard features: two buttons and a scroll wheel. ...
GUI redirects here. ...
Sun SPARCstation 1+, 25 MHz RISC processor from early 1990s A workstation, such as a Unix workstation, RISC workstation or engineering workstation, is a high-end desktop or deskside microcomputer designed for technical applications. ...
Children playing on a Amstrad CPC 464 in the 1980s. ...
A personal computer (PC) is a computer whose price, size, and capabilities make it useful for individuals. ...
With the rise of digital in control systems a final popular use of the quadrature variant as a replacement for the humble potentiometer on the control panel has flourished. Throw out the absolute markings and have a display showing the level and there is no need for knowing the absolute position. At low resolution, it's super cheap, as rugged as desired and completely immune to adding noise.
See also Analogue devices that perform a similar function include the synchro, the resolver, the rotary variable differential transformer (RVDT) and the rotary potentiometer. A synchro is a type of rotary electrical transformer that is used for measuring the angle of a rotating machine such as an antenna platform. ...
The resolver is a type of rotary electrical transformer that is used for measuring the angle of a rotating machine such as an antenna platform. ...
A rotary variable differential transformer (RVDT) is a type of electrical transformer used for measuring angular displacement. ...
It has been suggested that Determining emf of primary cells using potentiometer be merged into this article or section. ...
External links - "Encoders provide a sense of place" article by Jack Ganssle 2005-07-19 describes "nonlinear encoders".
|