Introduction to encoder principle and application

Introduction to encoder principle and application

As an important part of the transmission control, the position detection device is used to detect the displacement and send a feedback signal to compare with the command signal sent by the control device. If there is a deviation, the actuator will be amplified and controlled to move in the direction of eliminating the deviation. , Until the deviation is equal to zero. In order to improve the processing accuracy of mechanical devices, the accuracy of detection elements and detection systems must be improved. Among them, rotary encoders, linear encoders (grating scales, magnetic scales), rotary transformers, tachogenerators, etc. are more common. The encoder is one of the most commonly used detection devices for various types of machinery, and the encoder is used as a signal detection device. The method has been widely used in industrial automation fields such as CNC machine tools, textile machinery, metallurgical machinery, petroleum machinery, mining machinery, printing and packaging machinery, plastic machinery, testing machines, elevators, servo motors, aviation, and instrumentation. There are many types of encoders, and users in different industries have different requirements for encoder parameters and specifications.

Encoders are divided into two types: contact type and non-contact type. The contact type uses a brush to output. The brush touches the conductive area or the insulating area to indicate whether the code status is "1" or "0"; the non-contact type receiving sensitive element is a photosensitive element or a magnetic sensitive element. The light area and the opaque area indicate whether the state of the code is "1" or "0".

Encoders are classified according to the detection principle, including optical, magnetic, inductive and capacitive.

Encoders are divided into measurement methods, linear encoders (grating scales, magnetic scales), rotary encoders.

Encoders are classified according to signal principle (scale method and signal output form). There are three types: incremental encoder, absolute encoder and hybrid.

1. Incremental encoder (rotary type)

1. Working principle:

The optical encoder consists of a photoelectric code disc with a shaft in the center, on which there are circular and dark engraved lines. When the disc rotates by a pitch, the photosensitive element gets A and B signals with 90 degrees under the illumination of the light-emitting element. The phase difference sine wave, this group of signals is amplified and shaped by the amplifier, and the output square wave is obtained. Compared with the phase B, the voltage amplitude is generally 5V. Assuming that the phase A leads the phase B before the phase B is the positive direction rotation, then the phase B leads the phase A before the phase A is the negative direction rotation. The phase relationship between the A phase and the B phase can be used to distinguish the forward and reverse rotation of the encoder, and the C phase The generated pulse is the reference pulse, also known as the zero point pulse. It is a pulse generated at a fixed position in one revolution of the shaft, and the zero reference position of the encoder can be obtained. After the AB phase pulse signal undergoes frequency-voltage conversion, a voltage signal proportional to the rotating shaft speed is obtained, and the speed value and displacement can be measured.

Magnetic encoder is a new type of electromagnetic sensitive element developed in recent years, it is developed with the development of optical encoder. The main advantage of optical encoders is that they are sensitive to humid gas and pollution, but have poor reliability. Magnetic encoders are not easily affected by dust and condensation. At the same time, their structure is simple and compact, can run at high speeds, and respond quickly (up to 500-700kHz). The volume is smaller than the optical encoder, and the cost is lower, and it is easy to accurately arrange and combine multiple components, and it is easier to form new functional devices and multi-function devices than using optical components and semiconductor magnetic sensitive components. Under the requirements of high speed, high precision, miniaturization, and long life, in the fierce market competition, magnetic encoders have unique advantages due to their outstanding characteristics and become one of the keys to the development of high-tech products.

The principle of the magnetic encoder is to form a pulse train by magnetic force to generate a signal. It is characterized by mixing rare earth magnetic powder in the unvulcanized rubber to form a magnetic rubber blank, which is vulcanized and adhered to the reinforcing ring (1) to form a magnetic rubber ring (2). ), the magnetic rubber ring is alternately magnetized in a circular shape, generating S poles and N poles. At the same time, a new type of SMR (magnetic resistance) or Hall effect sensor is used as the sensitive element, and the signal is stable and reliable. In addition, the use of double-layer wiring technology can make the magnetic encoder not only have the only incremental signal, incremental signal and exponential signal output of general encoders, but also have an absolute signal output function. Therefore, although about 90% of the encoders currently accounted for are optical encoders, there is no doubt that in the future motion control systems, the amount of magnetic encoders will gradually increase.

2. Resolution, frequency multiplication and subdivision technology of incremental encoder

Incremental encoder code disc is composed of many grating lines, there are two (or 4, 4 optical eyes discussed later) optical eyes to read A, B signals, the density of the lines determines this increment The resolution of the type encoder is the smallest change angle value that can be read. The parameter representing the resolution of the incremental encoder is PPR, which is the number of pulses per revolution.

The A/B output waveforms of incremental encoders generally have two types, one is a square wave signal with a steep rising edge and a steep falling edge, and the other is a Sin/Cos with a slow rise and fall, and the waveform is similar to a sine curve. Curved waveform signal output, A and B have a phase difference of 1/4T period of 90 degrees. If A is a sine-like Sin curve, then B is a cosine-like Cos curve.

For a square wave signal, the phases A and B differ by 90 degrees (1/4T). Thus, at the phase angles of 0 degrees, 90 degrees, 180 degrees, and 270 degrees, these four positions have rising and falling edges. In this way, in fact, the angle change can be judged in the period of 1/4T square wave, so that the 1/4 T period is the minimum measurement step. Through the circuit's judgment on these rising and falling edges, it can be read by 4 times the PPR Taking the change of angle, this is the quadruple frequency of the square wave. This kind of judgment can also be made with logic. 0 represents low, 1 represents high, and the A/B phase changes in one cycle to 0 0, 0 1, 1 1, 1 0. This judgment can not only 4 times the frequency, but also the direction of rotation.

Strictly speaking, the square wave can only be multiplied by 4 times. Although some people can use the time difference method to divide more finely, it is basically not recommended by the incremental encoder. For higher frequency divisions, the incremental pulse signal is SIN/ COS-like sine and cosine signals, the subsequent circuit can read the phase change of the waveform, and use the analog-to-digital conversion circuit to subdivide, 5 times, 10 times, 20 times, or even more than 100 times, and then use the square wave after dividing. Waveform output (PPR). The multiplier of the frequency division is actually limited. First of all, the analog-to-digital conversion has time response problems. The speed of the analog-to-digital conversion and the accuracy of resolution are a contradiction. It is impossible to subdivide infinitely. If the division is too fine, the response and accuracy There is a problem; secondly, the reticle accuracy of the original encoder, the consistency of the output sine-cosine signal itself, and the perfection of the waveform are limited. If the division is too fine, it will only expose the error of the original code disc more obviously, and bring error. The subdivision is easy to do, but it is difficult to do it well. On the one hand, it depends on the accuracy of the original code disc and the perfection of the output waveform, and on the other hand it depends on the response speed and resolution accuracy of the subdivision circuit. For example, for the German industrial encoder, the recommended best subdivision is 20 times, and the higher subdivision is its recommended angle encoder with higher precision, but the rotation speed is very low.

An incremental encoder that outputs A/B/Z square wave after subdivision can also be 4 times the frequency again, but please note that subdivision has requirements for the encoder's rotation speed, which is generally lower. In addition, if the marking accuracy of the original code disc is not high, the waveform is not perfect, or the limitation of the subdivision circuit itself, the subdivision may cause serious waveform distortion, large and small steps, lost steps, etc. Please pay attention when selecting and using.

For some incremental encoders, the original reticle can be 2048 lines (2 to the 11th power, 11 bits). Through 16 times (4 bits) subdivision, 15 bits PPR is obtained, and 4 times frequency (2 bits) is obtained again. The resolution of 17-bit (Bit) is derived from the 17-bit high-digit encoder of some Japanese encoders. It generally uses "bit, Bit" to express the resolution. When this kind of Japanese encoder is faster, it still uses the unsubdivided low-level signal to process the output, otherwise the response will not keep up, so don't be confused by its "17-bit".

3. Features of incremental encoder:

The characteristics of the incremental encoder are: non-contact, no friction and wear, small size, light weight, compact structure, convenient installation, simple maintenance, small driving torque, high precision, large range measurement, fast response, Digital output characteristics;

Incremental encoders are very suitable for measuring speed and can be accumulated infinitely. However, there are problems such as zero cumulative error, poor anti-interference, power-off memory for receiving equipment when shutting down, and change or reference position when starting up. These problems can be solved by using an absolute encoder.

Built-in battery technology:

Some encoders use a built-in battery to avoid signal loss due to power failure, and some encoders use a single-turn signal as an absolute signal, while the multi-turn signal is obtained by the built-in battery and circuit by incremental counting. This is pseudo-absolute. Type encoders are affected by factors such as battery life, low-temperature battery failure, and poor battery contacts due to vibration, which greatly reduces reliability.

4. General application of incremental encoder:

Speed ​​measurement, measurement of rotation direction, measurement of movement angle, distance (relative).

2. Absolute encoder (rotary type)

Incremental encoders output pulses when they rotate, and their position is known by the counting device. When the encoder does not move or the power is cut off, it relies on the internal memory of the counting device to remember the position. In this way, when the power is off, the encoder cannot move. When the power is on, the encoder cannot lose the pulse due to interference during the pulse output. Otherwise, the zero point of the counting device will shift, and this deviation There is no way to know the amount of shift, only after the wrong production results appear.

The solution is to increase the reference point. Every time the encoder passes the reference point, the reference position is corrected into the memory position of the counting device. Before the reference point, the accuracy of the position cannot be guaranteed. For this reason, in industrial control, there are methods such as first finding the reference point for each operation, turning on the machine, and so on.

For example, the positioning of the printer scanner uses the principle of an incremental encoder. Every time we turn it on, we can hear a crackling noise. It is looking for the reference zero point before it works.

This method is more troublesome for some industrial control projects, and it is not even allowed to switch on the machine (you must know the exact position after the machine is turned on), so the absolute encoder appears.

1. Working principle:

There are many engraved lines on the optical code disc of absolute encoder, and each engraved line is arranged in 2 lines, 4 lines, 8 lines, 16 lines...in order, in this way, at each position of the encoder, by reading each engraved line The opening and darkening of the line obtains a unique binary code (Gray code) from the zero power of 2 to the n-1 power of 2, which is called an n-bit absolute encoder. Such an encoder is determined by the mechanical position of the encoder, and it is not affected by power failure or interference.

The absolute encoder is determined by the uniqueness of each position by the mechanical position. It does not need power-down memory, no need to find a reference point, and no need to keep counting. When it needs to know the position, when to read its position. In this way, the anti-interference characteristics of the encoder and the reliability of the data are greatly improved.

Since absolute encoders are significantly better than incremental encoders in positioning, they have been increasingly used in angle and length measurement and positioning control in various industrial systems. However, due to its high precision and many output bits, if parallel output is still used, each output signal must ensure a good connection. For more complex working conditions, it must be isolated. The number of connecting cables is large. Inconvenience and reduced reliability, therefore, the absolute encoder in the multi-digit output type, generally use serial output or bus type output.

2. From single-turn absolute encoder to multi-turn absolute encoder:

The single-turn absolute encoder measures each engraved line of the photoelectric code disk during rotation to obtain the unique code. When the rotation exceeds 360 degrees, the code returns to the origin, which does not comply with the absolute code unique principle. Encoding can only be used for measurement within 360 degrees of rotation, and is called a single-turn absolute encoder.

If you want to measure rotation beyond 360 degrees, you must use a multi-turn absolute encoder.

The encoder manufacturer uses the principle of clock gear mechanism. When the center code wheel rotates, another set of code discs (or multiple sets of gears, multiple sets of code discs) are driven by gears, and the number of turns is added to the single-turn encoding. Encoding, in order to expand the measuring range of the encoder, such an absolute encoder is called a multi-turn absolute encoder, it is also determined by the mechanical position code, each position code is unique and does not repeat, without the need to remember.

Another advantage of the multi-turn absolute encoder is that due to the large measurement range, the actual use is often richer, so there is no need to find the change point during installation. It is enough to use a certain intermediate position as the starting point, which greatly simplifies the installation and debugging. Difficulty.

Multi-turn absolute encoders have obvious advantages in length positioning, and they have been increasingly used in industrial control positioning.