I heard that you don’t understand the principle, classification, single-turn and multi-turn encoders
I heard that you don’t understand the principle, classification, single-turn and multi-turn encoders
[Rare dry goods] I heard that you don’t understand the principle, classification, single-turn and multi-turn encoders The old engineer tells you!
Recently, there are many friends, let me introduce what is the high circle and single circle of the encoder. We have introduced the servo and encoder before. Today, the editor of okplazas.com will give you a general introduction to the principle and classification of the encoder. Wait for some knowledge that you don't understand, and hope to study it carefully and digest it!
The application of the encoder, we have introduced its concept in the previous article, so today I will give you a detailed introduction to his classification and the principle of single-turn and multi-turn. I always want to carefully analyze and understand single-turn and multi-turn. Combining the previous article and today's article, I hope that from now on, you will not only understand the application of various encoders, but also know why.
The so-called single-turn and multi-turn encoders refer to absolute encoders. Absolute encoders can sense the current absolute angular position at any moment, especially at the moment of power-on. A single lap can only sense the absolute angular position within one lap. Multi-turns can not only sense the absolute angular position within one turn, but also sense how many turns the encoder has turned since the date of use.
The mainstream servo motor position feedback components include incremental encoders, single-turn absolute encoders, multi-turn absolute encoders, resolvers and so on. The following are introduced separately:
1. Incremental encoder
The incremental encoder converts the displacement into a periodic electric signal, and then converts this electric signal into a counting pulse, and the number of pulses is used to indicate the magnitude of the displacement.
The encoder is a device that converts angular displacement into electrical signals. Encoders can be divided into contact type and non-contact type according to the read mode. The contact type uses an electric brush to output. A brush touches the conductive area or the insulating area to indicate whether the status of the code is "1" or "0"; the non-contact type receiving sensitive element is a photosensitive element or a magnetic sensitive element. The light-transmitting area and the opaque area indicate whether the state of the code is "1" or "0".
1. Features
When the rotary shaft of the incremental encoder rotates, there is a corresponding pulse output. The discrimination of the rotation direction and the increase or decrease of the number of pulses are realized by the direction discriminating circuit and counter at the rear. The starting point of counting can be set arbitrarily, which can realize unlimited accumulation and measurement of multiple circles. It is also possible to use the Z signal for each pulse transmitted as a reference mechanical zero position. One rotation of the encoder shaft will output a fixed pulse, and the number of pulses is determined by the number of encoder grating lines. When you need to improve the resolution, you can use the A and B signals with a 90-degree phase difference to multiply the original pulse number, or replace the high-resolution encoder.
2. Working principle
(Picture and text in order: light source, code disc, photosensitive element, magnification and shaping, pulse output)

There are equal-angle slits (divided into transparent and opaque parts) on the edge of a code disc, and light sources and photosensitive elements are installed on both sides of the slit code disc. When the code disc rotates with the working shaft, every time it rotates through a gap, it produces a light and dark change. After reshaping and amplifying, an electrical pulse output signal with a certain amplitude and power can be obtained, and the number of pulses is equal to the number of gaps rotated. . The pulse signal is sent to the counter to count, and the angle of the code wheel can be known from the measured number of digits.

In order to determine the direction of rotation, two sets of photoelectric conversion devices can be used. Let their relative positions in space have a certain relationship, so as to ensure that the signals they generate are 1/4 cycle apart in phase.
3. The problem of incremental encoder
(1) Power-off movement problem: As for the first question, everyone seems to understand that the absolute value of a single lap can be counted by subsequent equipment. Then after a power failure, the maximum lap count can be smoothed if the lap counting part does not work. The clockwise or counterclockwise movement can be up to half a turn. For the absolute value of multi-turns, if the maximum number of counted turns is 4096 turns, then the power can move 2048 turns clockwise or counterclockwise, which can meet most applications.
(2) The signal anti-interference problem, the incremental encoder is easily disturbed because of the pulse. I have a terrible headache from the anti-interference problem, and I did not expect to change the absolute value encoder-in fact, it is enough to change the absolute value single-turn, as long as the continuous interference time does not exceed the half-turn time, the absolute value signal is still there.
(3) There are not many people who know about the CPU resources of the follow-up equipment. When using incremental encoders, especially high-resolution encoders, the follow-up equipment must "can't blink the eyes". Shaft, what else can you do if you are not exhausted? The actual result is that the chance of error has increased. For absolute encoders, as long as the sampling time is within half a rotation for a single revolution and 2048 revolutions for multiple revolutions, you can collect data whenever you want, saving a lot of CPU time to do other things. This is the real advantage of using absolute values for high-end servos.
2. Single-turn absolute encoder
1. The principle of single-turn absolute encoder (each position on the code disc has a unique code). Each position of the absolute incremental encoder corresponds to a certain digital code, so its indication is only related to the measured value. The start and end positions are related, but have nothing to do with the middle process of measurement.
2. Single-turn absolute encoder and multi-turn absolute encoder. The so-called single-turn and multi-turn encoders refer to absolute encoders. Absolute encoders can be used at any time, especially at the moment of power-on. Can perceive the current absolute angular position. The single-turn can only sense the absolute angular position within one turn; the multi-turn can not only sense the absolute angular position within one turn, but also how many angles the encoder has turned since the date of use. The absolute encoder determines the uniqueness of each position by the mechanical position (of course this angle is the cumulative sum of the encoder's forward and reverse rotation).
Absolute type rotary photoelectric encoder, because each position is absolutely unique, anti-interference, no need for power-down memory. There are many engraved lines on the optical code disc of absolute encoder, and each engraved line is divided into 2 lines, 4 lines, 8 lines and 16 lines in sequence. . . . . . Choreography. In this way, at each position of the encoder, by reading the open and dark of each engraved line, a set of unique binary codes (Gray codes) from the zero power of 2 to the n-1 power of 2 are obtained. .
When it comes to absolute encoders, you have to mention Gray codes
In the encoding of a group of numbers, if any two adjacent codes only have one binary number different, then this kind of encoding is called Gray Code. In addition, there is only one digit between the largest number and the smallest number. Different, that is, "connected end to end", so it is also called cyclic code or reflection code.
Gray code belongs to reliability coding, which is a coding method that minimizes errors. Because, although the natural binary code can be directly converted into an analog signal by a digital-to-analog converter, in some cases, for example, when converting from decimal 3 to 4, every bit of the binary code has to change, which can make the digital circuit produce very Large spike current pulse. The Gray code does not have this shortcoming. When it switches between adjacent bits, only one bit changes. It greatly reduces the logic confusion from one state to the next. Since there is only one bit difference between the two adjacent code groups of this kind of code, in the conversion between the angular displacement of the direction and the digital value, when the angular displacement of the direction changes slightly (which may cause the digital When changing, the Gray code only changes one bit, which is more reliable than other codes where two or more bits are changed at the same time, and the possibility of errors can be reduced.

Such an encoder is determined by the mechanical position of the photoelectric code disc and is not affected by power outages and interference. Each position determined by the mechanical position of the absolute encoder is unique. It does not need to be memorized, does not need to find a reference point, and does not need to be counted all the time. When it needs to know the position, when to read its position.
3. Multi-turn absolute encoder
1. The principle of multi-turn absolute encoder
The multi-turn absolute encoder is made on the basis of the single-turn encoder through the principle of mechanical transmission and the mechanism of clock gears. When the central grating code disc rotates, another group of code discs (or multiple sets of gears, multiple groups of code discs) are driven by gears, and the number of turns is added to the single-turn encoding to expand the measuring range of the encoder. It is also determined by the mechanical position code, each position code is unique and does not repeat, and does not need to be memorized. Another advantage of the multi-turn encoder is that due to the large measurement range, the actual use is often richer, so it is unnecessary to find the change point during installation. It is enough to use a certain intermediate position as the starting point, which greatly simplifies the difficulty of installation and debugging.
The signal output of multi-turn absolute encoder has parallel output, serial output, bus type output, and transmission integrated output.

2. Multi-turn absolute encoder output
( 1 ). Parallel output:
The output of the multi-turn absolute encoder is multi-digit digital (Gray code or pure binary code). Parallel output means that there are multiple high and low level outputs on the interface to represent digital 1 or 0. For absolute numbers that are not high Encoders generally output digital directly in this form, and can directly enter the I/O interface of the PLC or upper computer, the output is instant, and the connection is simple.
But parallel output has the following problems:
1) It must be a Gray code, because if it is a pure binary code, there may be multiple bit changes when the data is refreshed, and the reading will cause a code error in a short time.
2) All interfaces must be connected properly, because if there is a bad connection point, the potential of this point is always 0, which causes an error code and cannot be judged.
3) The transmission distance cannot be far, generally one or two meters. For complex environments, isolation is best. 4) For a large number of digits, many core cables are required, and good connections must be ensured, which brings engineering difficulties. Similarly, for encoders, there must be many node outputs at the same time, which increases the failure rate of the encoder.
(2 ). Serial SSI output:
Serial output is through an agreement, there is a sequential data output in time, this agreement is called a communication protocol, the physical form of its connection is RS232, RS422 (TTL), RS485, etc. Since the good manufacturers of multi-turn absolute encoders are all in Germany, most of the serial output is matched with Siemens in Germany, such as SSI synchronous serial output.
SSI interface (RS422 mode), connected by two data lines and two clock lines, the receiving device sends interrupted clock pulses to the encoder, and the absolute position value is synchronously output to the receiving device by the encoder and the clock pulse. Triggered by the clock signal sent by the receiving device, the encoder starts outputting the serial signal synchronized with the clock signal from the high bit (MSB).
The serial output connection line is few, the transmission distance is long, the protection and reliability of the encoder are greatly improved.
Generally, high-bit absolute encoders use serial output.
(3). Fieldbus type output
Fieldbus type encoders are multiple encoders connected together by a pair of signal wires. By setting the address, the signal is transmitted by communication. The signal receiving device only needs one interface to read multiple encoder signals. The bus-type encoder can save connection cables and receiving device interfaces, and has a long transmission distance. In the case of centralized control of multiple encoders, it can also greatly save costs.
The above description is detailed enough, study it slowly, it will definitely help you in your current and future work!