"Application Principles and Industry Definitions of Photoelectric Encoders" is provided by Changchun Sanfeng Sensor Technology Co., Ltd. This book covers basic knowledge and industry trends related to encoders and other photoelectric instruments. It offers a wealth of information to help you gain more knowledge and hopefully will be of assistance!
Application Principles and Industry Definitions of Photoelectric Encoders
An optical encoder is a rotary position sensor widely used in modern servo systems for measuring angular displacement or angular rate. Its shaft is typically connected to the rotating shaft being measured and rotates with it. It converts the angular displacement of the measured shaft into binary code or a series of pulses.
Photoelectric encoders are divided into two types: absolute and incremental. Incremental photoelectric encoders have advantages such as simple structure, small size, low price, high accuracy, fast response speed, and stable performance, and are more widely used. In high-resolution and large-range angular rate/displacement measurement systems, incremental photoelectric encoders are superior. Absolute encoders can directly provide digital information corresponding to each rotation angle, which is convenient for computer processing. However, when the feed rate is greater than one revolution, special processing is required, and two or more encoders must be connected with reduction gears to form a multi-stage detection device, making its structure complex and costly.
1 Incremental encoder
1.1 Structure of Incremental Photoelectric Encoder
An incremental encoder is a type of encoder where a code disk that rotates with the shaft outputs a series of pulses. A counter then adds or subtracts these pulses according to the direction of rotation to represent the angular displacement. A schematic diagram of an incremental photoelectric encoder is shown in Figure 1.
Figure 1 Schematic diagram of incremental photoelectric encoder structure
The photoelectric code disk is connected to the rotating shaft. The code disk can be made of glass with an opaque chromium coating, and then translucent slits are formed along its edge, pointing inwards. These slits are evenly divided around the circumference of the code disk, ranging from hundreds to thousands. This divides the entire circumference of the code disk into n equally spaced translucent slots. Incremental photoelectric code disks can also be made of thin stainless steel sheet, with evenly distributed translucent slots cut along the circumference.
1.2 Working principle of incremental encoder
The working principle of an incremental encoder is shown in Figure 2. It consists of a main code disk, a direction detector disk, an optical system, and a photoelectric converter. The main code disk (photoelectric disk) has radially spaced narrow slits with equal pitch around its perimeter, forming uniformly distributed transparent and opaque areas. The direction detector disk is parallel to the main code disk and has two sets of transparent detection slits, a and b, offset by 1/4 pitch, so that the output signals of the two photoelectric converters A and B are 90° out of phase. During operation, the direction detector disk remains stationary, while the main code disk rotates with the shaft. Light emitted from the light source is projected onto the main code disk and the direction detector disk. When the opaque area on the main code disk aligns perfectly with the transparent slit on the direction detector disk, the light is completely blocked, and the photoelectric converter output voltage is at its minimum. When the transparent area on the main code disk aligns perfectly with the transparent slit on the direction detector disk, all light passes through, and the photoelectric converter output voltage is at its maximum. Each time the master code disk completes one etch cycle, the photoelectric converter will output an approximate sine wave voltage, and the output voltages of photoelectric converters A and B have a phase difference of 90°.
Figure 2 shows the working principle diagram of the incremental encoder. Figure 3 shows the output waveform of the photoelectric encoder.
The most common light source used in photoelectric encoders is a light-emitting diode (LED), which has its own focusing effect. When the photoelectric code disk rotates with the working shaft, light passes through the photoelectric code disk and the narrow slit of the light barrier, forming a light signal that flickers. The photosensitive element converts this light signal into an electrical pulse signal, which, after passing through the signal processing circuit, is output to the CNC system. Alternatively, the displacement can be directly displayed on a digital display.
The measurement accuracy of the photoelectric encoder is related to the number of slits n on the circumference of the code disk, and the resolvable angle α is:
α = 360°/n (1) Resolution = 1/n (2)
For example, if the number of light-transmitting grooves on the edge of the code disk is 1024, then the smallest resolvable angle α = 360°/1024 = 0.352 °.
To determine the direction of the code disk's rotation, two slits must be set on the aperture plate, with a distance between them being (m + 1/4) times the distance between the two slits on the code disk, where m is a positive integer. Two sets of corresponding photosensitive elements are also set, as shown in Figure 1 (A and B photosensitive elements, sometimes also called cosine and sinine elements). When the object being detected rotates, the coaxially or associatedly mounted photoelectric encoder will output two digital pulse signals, A and B, with a 90° phase difference. The output waveform of the photoelectric encoder is shown in Figure 3. To obtain the absolute position of the code disk's rotation, a reference point must also be set, as shown in Figure 1 ("zero position mark slot"). Each time the code disk rotates one revolution, the photosensitive element corresponding to the zero position mark slot generates a pulse, called the "one-revolution pulse," as shown in Figure 3 (C0 pulse).
Figure 4 shows the waveforms and timing relationship of signals A and B when the encoder rotates forward and backward. When the encoder rotates forward, the phase of signal A leads signal B by 90°, as shown in Figure 4(a); when rotating backward, the phase of signal B leads signal A by 90°, as shown in Figure 4(b). The number of pulses output by A and B is linearly related to the change in the measured angular displacement. Therefore, the corresponding angular displacement can be calculated by counting the number of pulses. Correctly demodulating the rotation direction and angular displacement/rate of the measured machine based on this relationship between A and B is called pulse direction discrimination and counting. Pulse direction discrimination and counting can be implemented in software or hardware.
Figure 4 shows the forward and reverse waveforms of the photoelectric encoder.
2. Absolute encoder
An absolute encoder is a detection element that directly converts the measured angle into a corresponding code by reading the pattern information on the code disk. There are three types of code disks: photoelectric, contact, and electromagnetic.
Photoelectric code disks are currently widely used. They precisely print binary codes on a transparent disc. Figure 5 shows a four-bit binary code disk. Each ring on the disk represents one binary digit. Black and white equally spaced patterns are printed on the same track to form a code. The black opaque area and the white translucent area represent binary "0" and "1" respectively. A four-bit photoelectric code disk has four rings of digit tracks, each representing one binary digit. The innermost track is the high-order bit, and the outermost track is the low-order bit. Within a 360° range, 2⁴ = 16 digits can be encoded.
During operation, a power supply is placed on one side of the code disk, and a photoelectric receiving device is placed on the other side. Each code track corresponds to a phototube and amplification and shaping circuits. As the code disk rotates to different positions, the photoelectric element receives the light signal and converts it into a corresponding electrical signal. After amplification and shaping, it becomes the corresponding digital electrical signal. However, due to the influence of manufacturing and installation precision, reading errors will occur when the code disk rotates between two code segments. For example, when the code disk rotates clockwise from position "0111" to "1000", these four digits must change simultaneously. This may result in the digital being misread as any of the 16 possible codes, such as 1111, 1011, 1101, ... 0001, producing a large and unpredictable numerical error. This type of error is called non-single-valued error.
To eliminate non-single-valued errors, the following methods can be used.
2.1 Cyclic code disk (or Gray code disk)
Cyclic code, also known as Gray code, is a binary encoding that uses only two digits, "0" and "1". Figure 6 shows a four-bit binary cyclic code. The characteristic of this encoding is that only one bit changes between any two adjacent codes; that is, "0" changes to "1" or "1" changes to "0". Therefore, during the transformation between two numbers, the reading error will not exceed "1", and it can only be read as one of the two adjacent numbers. Therefore, it is an effective method for eliminating non-single-value errors.
2.2 Binary cyclic code disk with position-determining photoelectric device
This type of code disk adds an extra ring of signal bits to the outermost ring of a four-bit binary cyclic code disk. Figure 7 shows a binary cyclic code disk with a position-determining photoelectric device. The positions of the signal bits on the outermost ring of this code disk are exactly offset from the state intersection line. The reading is only taken when the photoelectric element at the signal bit has a signal, thus avoiding non-single-valued errors.