Share this

Encoder principles and frequently asked questions

2026-04-06 05:32:18 · · #1

An encoder is a device that encodes signals (such as bitstreams) or data, converting them into a signal form that can be used for communication, transmission, and storage. Encoders convert angular or linear displacement into electrical signals; the former is called a code disk, and the latter a code scale. According to the readout method, encoders can be divided into contact and non-contact types. Contact encoders use brushes for output; a brush contacts a conductive or insulating area to indicate whether the code state is "1" or "0". Non-contact encoders use photosensitive or magnetic sensitive elements. When using photosensitive elements, the light-transmitting and opaque areas represent the code state as "1" or "0". The acquired physical signal is converted into a machine-readable electrical signal using binary encoding of "1" and "0" for communication, transmission, and storage.

Encoder working principle:

An inductive synchro is a measuring element that uses the principle of electromagnetic induction to convert the relative displacement between two planar windings into an electrical signal, and is used in length measuring tools. Inductive synchros (commonly known as encoders or grating rulers) are divided into two types: linear and rotary. The former consists of a fixed scale and a sliding scale, used for linear displacement measurement; the latter consists of a stator and a rotor, used for angular displacement measurement.

In 1957 , R.W. Tripp and others obtained a patent in the United States for an inductive synchro, originally named a position measuring transformer. Inductive synchro is its trade name. Initially used for radar antenna positioning and automatic tracking, and missile guidance, it is now commonly used in mechanical manufacturing, particularly in positioning feedback systems of CNC machine tools and machining centers, and in digital display systems of coordinate measuring machines and boring machines. It has low environmental requirements and can operate normally in environments with small amounts of dust and oil mist. The continuous winding on the fixed scale has a period of 2 mm. The sliding scale has two windings with the same period as the fixed scale, but offset by 1/4 of a period (90° electrical phase difference).

There are two types of inductive synchros: phase-detection and amplitude-detection. In the former, two AC voltages, U1 and U2, with a 90° phase difference and the same frequency and amplitude, are input to the two windings on the slider. According to the principle of electromagnetic induction, an induced electromotive force U is generated in the winding on the fixed scale. If the slider moves relative to the fixed scale, the phase of U changes accordingly. After amplification, this U is compared with U1 and U2, subdivided, and counted to determine the displacement of the slider. In the amplitude-detection type, AC voltages with the same frequency and phase but different amplitudes are input to the slider windings. The displacement of the slider can also be determined based on the changes in the amplitudes of the input and output voltages. A system consisting of an inductive synchro and electronic components for amplification, shaping, phase comparison, subdivision, counting, and display is called an inductive synchro measurement system. Its length measurement accuracy can reach 3 micrometers/1000 millimeters, and its angle measurement accuracy can reach 1″/360°.

With the rapid development of industrial automation, encoders are being used more widely in the field of industrial control.

Q: What are some things to consider when selecting an incremental rotary encoder?

Three parameters should be noted:

1. Mechanical installation dimensions, including positioning stops, shaft diameter, and mounting hole positions; cable exit method; installation space volume; and whether the working environment protection level meets the requirements.

2. Resolution, i.e., the number of pulses output per revolution of the encoder during operation, whether it meets the accuracy requirements of the design.

3. Electrical interface: Common encoder output methods include push-pull output (F-type HTL format), voltage output (E), open collector (C, commonly C is for NPN transistor output, C2 is for PNP transistor output), and long-line driver output. The output method should be compatible with the interface circuit of its control system.

2. Question: How do I use an incremental encoder?

1. Incremental rotary encoders vary in resolution, measured by the number of pulses generated per revolution, ranging from 6 to 5400 or higher. The more pulses, the higher the resolution; this is one of the important criteria for selection.

2. Incremental encoders typically have three signal outputs (differential encoders have six): A , B, and Z. They generally use TTL levels, with the A pulse preceding the B pulse, and the A and B pulses differing by 90 degrees. One Z pulse is emitted per revolution, which can be used as a reference mechanical zero position. Direction is generally determined by whether A leads B or B leads A. Our company's incremental encoders define clockwise rotation as forward rotation (A leading B by 90°) when viewed from the shaft end, and counterclockwise rotation as reverse rotation (B leading A by 90°). However, some designs may differ; please refer to the product manual.

3. When using a PLC to collect data, a high-speed counting module can be selected; when using an industrial computer to collect data, a high-speed counting board can be selected; when using a microcontroller to collect data, it is recommended to select an input port with an optocoupler.

4. It is recommended that pulse B be a forward pulse, pulse A be a reverse pulse, and pulse Z be a zero-position pulse at the origin.

5. Establish a counting stack in the electronic device.

III. Regarding outdoor use or use in harsh environments

The equipment is used in the field, where the environment is dirty, and there is a risk of damaging the encoder.

It features a sealed protective shell made of aluminum alloy (stainless steel is available upon special requirements), a heavy-duty encoder with dual bearings, and is suitable for outdoor use without fear of dirt. It can also be used in steel mills and heavy equipment.

However, if there is space in the encoder mounting area, it is recommended to add a protective shell to the outside of the encoder to enhance its protection. After all, encoders are precision components, and there is a certain difference in value between an encoder and a protective shell.

IV. From proximity switches and photoelectric switches to rotary encoders:

In industrial control, the application of proximity switches and photoelectric switches for positioning is quite mature and effective. However, with the continuous development of industrial control, new requirements have emerged, highlighting the advantages of using rotary encoders:

Information technology: In addition to positioning, the control room can also know its exact location;

Flexibility: Positioning can be flexibly adjusted in the control room;

Convenient and safe on-site installation, and long lifespan: A rotary encoder the size of a fist can measure intervals from a few μm to tens or hundreds of meters, supporting n workstations. Solving the safety installation problem of just one rotary encoder can avoid the cumbersome on-site mechanical installation of many proximity switches and photoelectric switches, as well as their susceptibility to damage from impacts and exposure to high temperatures and moisture. Because it uses a photoelectric code disk, there is no mechanical wear, and its service life is often very long if the installation position is correct.

Multifunctional: In addition to positioning, it can also transmit the current position and calculate the speed of movement, which is especially important for applications such as frequency converters and stepper motors.

Economic efficiency: For multiple control stations, only the cost of a single rotary encoder is required, and more importantly, the costs of installation, maintenance, and wear and tear are reduced, while the service life is extended, making its economic efficiency increasingly apparent.

As mentioned above, due to its advantages, rotary encoders are increasingly being used in various industrial control applications.

V. Regarding power supply and encoder/PLC connection:

Encoders generally operate on three types of power supplies: 5Vdc, 5-13Vdc, or 11-26Vdc. If your encoder uses 11-26Vdc, you can use the PLC's 24V power supply. Please note the following:

1. The encoder's current consumption is within the PLC's power supply range.

2. If the encoder has parallel output, when connecting it to the PLC's I/O point, it's necessary to determine whether the encoder's signal level is push-pull (or push-pull type) or open-collector output. If it's open-collector output, there are two types: N-type and P-type, which must match the polarity of the PLC's I/O. If it's push-pull output, there are no connection issues.

3. If the encoder uses a driver output, the signal level is generally 5V. Handle with care during connection to prevent 24V power supply levels from entering the 5V signal wiring, which could damage the encoder's signal terminals. (Our company can also manufacture wide-voltage driver outputs (5-30Vdc); please specify this when ordering.)

6. In many cases, the encoder itself is not faulty, but rather interference is causing a poor waveform, leading to inaccurate counting. How can this be determined? Thank you!

Encoders are precision components, mainly due to significant interference around them. For example, interference may be caused by the frequent starting of large motors or welding machines, or by transmission through the same conduit as the power line.

Choosing the right output type to combat interference is also important. Generally, outputs with reverse signals offer better interference immunity, i.e., A+~A- , B+~B- , Z+~Z-. A key characteristic is that it uses 8 wires (including the power supply) instead of 5 (which are all zeros). Transmission with reverse signals in the cable is symmetrical and less susceptible to interference. Furthermore, the receiving device can add further discrimination (e.g., using the 90° phase difference between A and B signals, the receiving device counts the four states (10, 11, 01, 00) as a valid pulse, effectively improving the system's interference immunity (correct counting)).

Encoders also vary in quality, with significant differences in their code disks, electronic chips, internal circuitry, and signal output. Otherwise, how could a 1000-line incremental encoder range in price from just over 300 yuan to over 3000 yuan ?

① Eliminate (remove, enclose, isolate) the source of interference; ② Determine if it is due to accumulated mechanical clearance error; ③ Determine if it is due to a mismatch between the circuit interface of the control system and the encoder (incorrect encoder selection); If the fault is eliminated after trying methods ①②③, a preliminary judgment can be made. If it is not eliminated, further analysis is required.

A simple method to determine if the encoder itself is faulty is the process of elimination. Our company's encoders are now in mass production, and the technology is mature and in use, with a product failure rate controlled at a few per thousand. The specific method of elimination is as follows: replace the encoder with one of the same model. If the fault symptoms are the same, it can be basically ruled out that the encoder is faulty, because the probability of two encoders failing simultaneously is extremely small, and can be considered zero. If replacing the encoder with another of the same model immediately eliminates the fault, then it can be basically determined that the encoder is faulty.

7. What is long-distance drive? Can a regular encoder transmit data over long distances?

A: Long-line drive, also known as differential long-line drive, uses a 5V, TTL symmetrical positive and negative waveform. Because its positive and negative currents are in opposite directions, they cancel out external electromagnetic fields, resulting in strong anti-interference capabilities. The typical transmission distance for a standard encoder is 100 meters. For a 24V HTL type encoder with symmetrical negative signals, the transmission distance is 300-400 meters.

8. Question: Could you briefly introduce the method of detecting linear displacement using a rotary encoder?

A: 1. Use a "flexible coupling" to directly connect the rotary encoder to the main shaft of the power unit that drives linear displacement.

2. Use a small gearbox (spur gear, bevel gear, or worm gear) to connect with the power unit.

3. Use gears that rotate on a rack to transmit linear displacement information.

4. Obtain linear displacement information on the sprocket of the transmission chain.

5. Obtain linear displacement information on the synchronous belt of the synchronous pulley.

6. Use a rotary encoder with magnetic rollers to obtain displacement information on a flat steel surface with linear displacement (avoid slippage).

7. Use a retractable wire assembly, similar to a steel tape measure, to connect a rotary encoder to detect linear displacement information (the stacking and winding error must be overcome during data processing).

8. Similar to 7, a rotary encoder is connected to a "retractable wire assembly" with a small torque motor to detect linear displacement information (similar products are currently available in Germany, with complex structures and almost no stacking and winding errors).

9. Can the incremental grating Z signal be used as a zero point? How to select a circular grating encoder?

Both linear encoders and shaft encoders can achieve the same accuracy in their Z signal as their A and B signals. The difference is that a shaft encoder produces one signal per revolution, while a linear encoder produces one signal at regular intervals. This allows for very high repeatability. Initial positioning can be achieved using a standard proximity switch, then the closest Z signal can be found (always in the same direction). During installation, remember to adjust the Z signal's phase to match the grating phase; otherwise, it will be inaccurate.

Choose based on your required subdivision precision and resolution. For high precision, naturally choose one with a high line count per cycle; for lower precision, there's no need to choose a circular encoder with a high line count.

10. What are the differences between incremental encoders and absolute encoders? How should one choose when building a servo system?

Incremental encoders are commonly used, while absolute encoders are used when there are strict requirements for position and zero position. Servo systems require specific analysis based on the application context.

Incremental encoders are commonly used for speed measurement, which can accumulate measurements infinitely; absolute encoders are used for position measurement, which ensure position uniqueness (single or multiple turns). Ultimately, it depends on the application, the purpose, and the requirements.

XI. Selection considerations for absolute rotary encoders, and a comparison of the advantages of rotary encoders with proximity switches and photoelectric switches:

Absolute encoders range from economical 8-bit to high-precision 17-bit per revolution, with prices ranging from several hundred yuan to over 10,000 yuan.

Most multi-turn encoders use 25 bits, and the outputs include SSI, Profibus-DP , CANL2 , Interbus , and DeviceNet . The price can range from over 3,000 to over 10,000.

Rotary photoelectric encoders for measuring angles and lengths are a mature technology. The use of high-precision, large-range absolute encoders has significantly improved measurement accuracy and reliability, while also being economical and practical. Currently, it remains the most popular choice for measuring length.

12. From Incremental Encoders to Absolute Encoders

Rotary incremental encoders output pulses as they rotate, and their position is determined by a counting device. When the encoder is stationary or when power is off, the position is remembered by the internal memory of the counting device. Therefore, the encoder must not move at all after a power outage, and when power is restored, there must be no interference or loss of pulses during the encoder's pulse output process; otherwise, the zero point remembered by the counting device will shift, and the amount of this shift is unknown until an erroneous production result occurs.

The solution is to add reference points. Each time the encoder passes a reference point, it corrects the reference position into the counting device's memory. Before reaching the reference point, the position's accuracy cannot be guaranteed. Therefore, industrial control systems employ methods such as finding a reference point before each operation and zeroing upon startup.

For example, printers and scanners use incremental encoders for positioning. Every time you turn them on, you can hear a crackling sound as they search for the reference zero point before they start working.

This method is quite troublesome for some industrial control projects, and some projects do not allow zeroing after powering on (the correct position must be known after powering on). Therefore, absolute encoders have emerged.

An absolute encoder has many etched lines on its code disk, arranged sequentially with 2, 4, 8, 16 lines, and so on. Thus, at each position of the encoder, by reading the on/off state of each etched line, a unique binary code (Gray code) from 2^0 to 2^(n-1) is obtained. This is called an n-bit absolute encoder. Such an encoder is determined by the mechanical position of the code disk and is unaffected by power outages or interference.

Because the encoder ensures the uniqueness of each position determined by its mechanical location, it requires no memory, no reference point, and no constant counting. It reads the position only when needed. This significantly improves the encoder's anti-interference capabilities and data reliability.

Because absolute encoders are significantly superior to incremental encoders in position positioning, they are increasingly being used in industrial control positioning.

Speed ​​measurement requires the ability to accumulate measurements infinitely, and incremental encoders still hold an irreplaceable mainstream position in speed measurement applications.

13. Could you tell me what I should pay attention to when selecting an absolute encoder?

(I ) Mechanical Part :

1. Is the measurement of length or angle? How is the conversion between length measurement and angle measurement done mechanically? (Some information is provided above; please contact us if you have any questions.) Is the angle measurement within 360 degrees (single rotation) or potentially beyond 360 degrees (multiple rotations)? Is the production process a one-way rotating cycle or a reciprocating cycle?

2. Shaft connection installation method: There are shaft-type connections via flexible couplings and shaft-sleeve type connections.

3. Operating environment: Dust , moisture , vibration , impact ?

(II) Electrical Components

1. What is the output receiving section of the connection ?

2. Signal form ?

3. Resolution requirements ?

4. Control requirements ?

14. From Single-Turn Absolute Encoders to Multi-Turn Absolute Encoders

A single-turn absolute encoder measures each line on the optical code disk during rotation to obtain a unique code. When the rotation exceeds 360 degrees, the code returns to the origin, which does not conform to the principle of absolute uniqueness. Such an encoder can only be used for measurement within a rotation range of 360 degrees and is called a single-turn absolute encoder.

If you need to measure a rotation range of more than 360 degrees, you will need to use a multi-turn absolute encoder.

Encoder manufacturers utilize the mechanical principle of clock gears. When the central code disk rotates, it drives another set of code disks (or multiple sets of gears and multiple sets of code disks) through gear transmission. This adds more turns of encoding on top of the single-turn encoding, thereby expanding the encoder's measurement range. Such an absolute encoder is called a multi-turn absolute encoder. It also determines the encoding by mechanical position, and each position encoding is unique and non-repeating, so there is no need to memorize it.

Another advantage of multi-turn encoders is that due to their large measurement range, there is often more margin in actual use. This means that there is no need to painstakingly find the zero point during installation. You can simply use a certain intermediate position as the starting point, which greatly simplifies the installation and debugging process.

Multi-turn absolute encoders have a clear advantage in length positioning and are increasingly being used in industrial control positioning.

15. More specific information about the serial and parallel outputs of an absolute encoder, thank you!

Parallel output:

Absolute encoders output multi-bit digital codes (Gray code or pure binary code). Parallel output involves multiple high and low level outputs on the interface to represent 1 or 0 of the digital code. For absolute encoders with a low number of bits, this format is generally used to directly output the digital code, which can be directly connected to the I/O interface of a PLC or host computer. The output is instantaneous and the connection is simple. However, parallel output has the following problems:

1. It must be Gray code. If it is pure binary code, multiple bits may change during data refresh, which will cause errors in the reading in a short time.

2. All interfaces must be properly connected. If there is even one poorly connected point, the potential at that point will always be 0, causing an error code that cannot be determined.

3. The transmission interval should not be too long, generally one or two meters. For complex environments, isolation is best.

4. For encoders with a large number of bits, many cores of cable are required, and good connections must be ensured, which increases the engineering difficulty. Similarly, for encoders, there are many output nodes at the same time, which increases the failure rate of the encoder.

Parallelism: In terms of time, data is sent simultaneously; in terms of space, each bit of data occupies a separate cable.

Incremental encoders typically output in parallel.

Serial output:

Serial output is the output of data in a sequential manner according to an agreement. This agreement is called a communication protocol, and the physical forms of connection include RS232, RS422 (TTL), RS485, etc.

Serial output has fewer connection lines and longer transmission intervals, which greatly improves the protection and reliability of the encoder. Generally, high-bit absolute encoders use serial output.

Since some well-known manufacturers of absolute encoders are in Germany, most serial outputs are compatible with Siemens products from Germany, such as SSI synchronous serial outputs and PROFIBUS-DP outputs for bus-type encoders.

Connecting serial output encoders to Siemens devices from Germany is relatively easy, but connecting them to non-German devices presents an interface challenge. Our company provides instruments with various interface outputs to solve this problem.

Serial transmission: In terms of time, data is transmitted sequentially according to an agreement; in terms of space, all bits of data are transmitted (sequentially) over a single cable.

16. Should all serial encoders be absolute ?

Serial encoders refer to encoders that output digitally encoded signals sequentially according to a time agreement. This is essentially absolute. However, some incremental encoders use a built-in battery to memorize the origin, allowing them to output position values ​​serially. Even if the battery is disconnected, it remains an incremental encoder, also known as a pseudo-absolute encoder. This is commonly seen in some Japanese servo systems. Essentially, it is still an incremental encoder.

17. Question: Why is it called an "absolute encoder"?

"Absolute encoder" is the term used in contrast to "incremental encoder".

An absolute encoder represents and memorizes the absolute position, angle, and number of revolutions of an object. That is, once the position, angle, and number of revolutions are fixed, the encoder's reading remains uniquely fixed, even after a power outage. An incremental encoder cannot do this. Generally, an incremental encoder outputs two A and B pulse signals and a Z(L) zero-position signal, with the A and B pulses differing by a 90-degree phase angle. The position, angle, and revolution increment can be determined by counting the pulses, and the direction can be determined by whether the A and B pulse signals are leading or lagging. After a power outage, counting must restart from a pre-defined reference point. Incremental encoders require post-processing to represent position, angle, and revolutions, and a "zeroing" operation is required upon power restoration. Therefore, incremental encoders are significantly cheaper than absolute encoders.

18. Question: What are the advantages and disadvantages of photoelectric encoders, optical electronic scales, and static magnetic grating absolute encoders?

Photoelectric encoder:

1. Advantages: Small size, high precision, and inherently high resolution (currently, our company can achieve 54,000 CPR on a φ66 diameter encoder through subdivision technology); contactless and wear-free; the same type can detect both angular displacement and linear displacement with the assistance of a mechanical conversion device; multi-turn photoelectric absolute encoders can detect linear displacement over a considerable range (e.g., 25-bit multi-turn). Long lifespan, flexible installation, diverse interface options, and reasonable price. Mature technology, widely used both domestically and internationally for many years.

2. Disadvantages: It is precise but requires high protection when used outdoors and in harsh environments; measuring linear displacement requires mechanical conversion and the error caused by mechanical clearance needs to be eliminated; it is difficult to overcome slip when detecting objects moving on the track.

Optical electronic ruler:

1. Advantages: Precision, with high resolution (up to 0.005mm ); moderate size, direct measurement of linear displacement; non-contact and wear-free, with a wide measurement gap; moderate price, and a variety of interface types. It has been widely used in the metal cutting machinery industry at home and abroad (such as wire cutting, EDM, etc.).

2. Disadvantages: Different types of equipment are required for measuring straight lines and angles; the measuring range is limited (the measuring range exceeds 4m, which is difficult to manufacture and expensive), and it is not suitable for displacement detection in harsh environments with large measuring ranges.

Static magnetic grid absolute encoder:

1. Advantages: Moderate size, direct measurement of linear displacement, absolutely digital encoding, and no theoretical range limit; non-contact and wear-free, resistant to harsh environments, and can be used underwater at a depth of 1000 meters; rich interface options and diverse measurement methods; and an acceptable price.

2. Disadvantages: The resolution of 1mm is not high; different types of materials are required to measure straight lines and angles; it is not suitable for displacement detection in small areas (greater than 260 mm).

19. Example: A disc is divided into 50 points. To achieve positioning control, the rotation speed is very slow. Is an absolute encoder required? How do you find the origin? Are the 50 positioning positions evenly divided into 360 degrees?

Absolute encoder codes are always powers of 2; there are no 360-degree codes that are evenly divided into 50 equal parts. To approximate the result, the required precision level depends on the specific requirements. If the precision requirement isn't too high, an 8-bit, 256-line encoder is sufficient. Each position on the encoder has a unique code. A code of zero can be used as the zero point, or any position can be defined as zero, with other positions compared to it for calculation.

If reference points can be used, incremental methods can also be used. However, due to the slow speed, 3000 lines or more should be selected, with one zero point per revolution.

20. Brief introduction: RS-232, RS-422 and RS-485 standards and their applications?

RS-232, RS-422, and RS-485 are all serial data interface standards, originally developed and released by the Electronic Industries Association (EIA).

RS-232 is currently the most widely used serial interface in the PC and communications industries. RS-232 is defined as a single-ended standard that increases the communication interval in low-speed serial communication. RS-232 uses an unbalanced transmission method, also known as single-ended communication.

RS-422 and RS-485 are different from RS-232. They use differential transmission, also known as balanced transmission, which uses a pair of twisted pairs, with one wire defined as A and the other as B.

Normally, the positive voltage level between transmitter drivers A and B is +2 to +6V, representing one logic state, while the negative voltage level is -2 to 6V, representing another logic state. There is also a signal ground C. In RS-485, there is an "enable" pin, while in RS-422, this is optional. The "enable" pin is used to control the disconnection and connection of the transmitter driver to the transmission line. When the "enable" pin is active, the transmitter driver is in a high-impedance state, called the "third state," which is distinct from logic "1" and "0."

Since RS-485 was developed from RS-422, many of its electrical specifications are similar to RS-422. For example, both use balanced transmission and require terminating resistors on the transmission lines. RS-485 can use two-wire or four-wire configurations; the two-wire system enables true multi-point bidirectional communication.

The difference between RS-485 and RS-422 also lies in their common-mode output voltage. RS-485 is between -7V and +12V, while RS-422 is between -7V and +7V. The minimum input impedance of the RS-485 receiver is 12kΩ, while that of RS-422 is 4kΩ. Since RS-485 meets all the specifications of RS-422, RS-485 drivers can be used in RS-422 networks.

Read next

CATDOLL 132CM Wendy(TPE Body with Hard Silicone Head)

Height: 132cm Weight: 28kg Shoulder Width: 36cm Bust/Waist/Hip: 60/58/76cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22