Current status and significance of research on electronic subdivision of magnetic encoder output signals
Among digital sensors, magnetic encoders are a new type of electromagnetic sensitive element developed in recent years. Magnetic encoders have the advantages of being not easily affected by dust and condensation, simple and compact structure, fast response speed (up to 500~700kHz), and small size. At the same time, magnetic encoders can accurately arrange and combine multiple components to form new functional devices and multifunctional devices. Due to the above advantages of magnetic encoders, their application in the field of high-precision measurement and control has been increasing in recent years. As an important tool, magnetic encoders have become an indispensable component, and their market demand has increased at a rate of 20% to 30% per year. Under the requirements of high speed, high precision, miniaturization, and long life, in the fierce market competition, magnetic encoders have unique advantages with their outstanding characteristics and have become one of the keys to the development of high-tech products. In the research and production of magnetic encoders, improving the resolution and miniaturization of magnetic encoders has become the focus of research and development in various countries.
To improve the resolution of the encoder, the number of magnetic poles must be increased, which will increase the cost of the sensor and affect its application due to the increase in the size of the encoder. Therefore, it is necessary to perform secondary subdivision on the output signal of the magnetic encoder.
The solutions for encoder signal segmentation are mainly divided into two categories: hardware segmentation and software segmentation. Although hardware segmentation can obtain faster response speed and real-time output segmentation signal, it requires higher cost to achieve higher resolution. Although software segmentation has certain defects in real-time performance, it can obtain higher resolution at a lower cost and can flexibly set the resolution as needed.
This article will explore the algorithm for realizing magnetic encoder signal subdivision and the scheme for realizing real-time signal output using a low-cost single-chip microcomputer system. The design idea of this system is to calculate the number of pulses to be output between two sampling points according to the mechanical angle between the two sampling points and the subdivision accuracy, and output them under the control of the system, so as to achieve the purpose of signal subdivision. Therefore, the signal subdivision scheme is actually composed of two parts: the calculation of the rotating mechanical angle and the output control of the subdivided pulses.
Rotation angle measurement scheme and hardware circuit implementation
The magnetic encoder disk used in the system can output two orthogonal sinusoidal signals. The encoder can output 8 continuous sine waves for each rotation. Since each rotation of the motor corresponds to a mechanical angle of 360 degrees, each sine wave corresponds to a mechanical angle of 45 degrees, and each sine wave corresponds to an electrical angle of 360 degrees. Therefore, a change of 90 degrees in the electrical angle of the sine wave corresponds to a change of 11.25 degrees in the mechanical angle of the magnetic encoder.
The encoder disk outputs two orthogonal sinusoidal signals. In a monotonic interval of the sinusoidal signal, the signal amplitude and the mechanical position of the encoder are one-to-one corresponding. Therefore, the amplitude of the measured signal can be converted into a corresponding angle signal, thereby realizing the subdivision of the magnetic encoding signal.
Construct an approximate trigonometric function. The waveform of the constructor is shown in Figure 1.
Figure 1 Constructor waveform
As can be seen from the waveform, the newly constructed function has an electrical angle of 90 degrees as a period (corresponding to a mechanical angle of 11.25 degrees). If two adjacent sampling points are within one period, the mechanical position of the encoder can be calculated according to the formula; if two adjacent sampling points are not within one period, just add N×11.25 to the calculation result of formula 1 (N is the number of periods between two sampling points). Using such a constructor can greatly simplify program design, thereby improving the real-time performance of the system.
Circuit diagram
The system circuit structure block diagram is shown in Figure 2. The two sinusoidal signals are encoded by the encoding circuit to generate a coded signal corresponding to the sine wave, and the CPU can count the integer cycles of the signal according to the coded signal.
The coded signal generated by the encoder controls the multiplexer to switch between the two input signals, so as to realize the function of exchanging the two input signals when = N × 90o (N = 1, 3, 5, ...). Under the control of the CPU, the sample-and-hold and A/D converter simultaneously sample the two sinusoidal signals at the same time, and perform A/D conversion on the signal held by the sample-and-hold. The converted data is transmitted to the CPU via 8255.
Figure 3 Signal subdivision hardware circuit diagram
Design of software part of segmentation scheme
The software flow chart of the electronic segmentation solution is shown in Figure 2.
The following two problems need to be solved in the output control of pulses: how to output subdivided pulses and how to control the output rate of subdivided pulses.
The speed change of the encoder disk is continuous and will not occur suddenly. Therefore, it can be approximately considered that the speed of the motor is constant in a very short period of time, and pulses can be output at equal time intervals during this period of time. Assuming that the speed response time of the motor is 100 milliseconds, it reaches a speed of 1000 rpm under constant acceleration, and the execution cycle of the program is 3000 microseconds. In one program cycle, the maximum angle error caused by uniform speed processing does not exceed 0.27 degrees, which will not cause erroneous output of pulses, and the accuracy requirements can be fully guaranteed. Outputting subdivided pulses at a constant rate in a very short time can greatly simplify program design and greatly improve the practical response performance of the system.
Since the number of subdivided pulses can only be determined after the next sampling is completed, the output of the pulse will inevitably lag behind one program cycle in time. If the program execution cycle is set to 3 milliseconds, and the encoder rotates 1000 times per minute and outputs 1000 subdivided pulses per rotation, the output signal will have a maximum lag of 50 pulses, which is equivalent to a mechanical angle error of 18 degrees. If the speed of the encoder increases, the error will become larger. At the same time, since the execution cycle of the program is not a fixed value, the signal lag generated by it will also be a variable value. If the pulse is output after the next sampling is completed, the subdivision error will be relatively large and cannot be controlled. Therefore, the subdivision pulse cannot be performed until the calculation of the number of pulses to be output is completed.
In order to solve the above two problems, the output of pulses can be controlled by timing interruption. First, the time interval of the output pulses is calculated according to the number of pulses to be output, and this time interval is used as the timing time constant to control the output of the subdivided pulses. In this way, on the one hand, the pulse output and the output pulse calculation can be synchronized; on the other hand, the pulse output rate can be controlled by the timer, so that the subdivided pulses can be output in real time to the greatest extent.
In order to further simplify the program design, the program execution cycle can be set to a fixed value, and the timing program can be used to monitor the execution of the program to ensure that the execution cycle of each program is the set value. In this way, a query table can be established to directly determine the corresponding timing time constant according to the number of subdivided pulses to be output. In this way, the complex floating-point operation program is simplified to a simple table lookup program, which shortens the program execution cycle and ensures the real-time performance of the subdivided pulse output.
Figure 3 Electronic subdivision software flow chart
in conclusion:
The above design ideas have been applied in the design of encoder signal subdivision system, and successfully achieved 1000 subdivisions of the encoder output sine wave signal. It has been proved in practice that a high resolution can be obtained based on a low-resolution encoder by using a low-cost single-chip microcomputer system.
References:
1. Gu Yunbiao et al. Research on position subdivision method to improve the resolution of photoelectric encoder.
2. Electromagnetic Components and Special Devices, Journal of Chinese Inertial Technology, Vol. 4, No. 2, 1996
3. Zheng Yuankai et al. High-resolution magnetic encoder. Sensor Technology, No. 5, 1996
4. Li Huaiqiong et al. A digital subdivision technology of moiré fringe implemented by software. Metrology Technology
5. Liu Wenwen. High-precision grating signal subdivision algorithm. Journal of Applied Sciences, Vol. 17, No. 1, 1999
Previous article:Development of Single Chip Microcomputer Control System for Beverage Filling Machine
Next article:Single-chip microcomputer C8051F020 and its application in cabinet-type electric energy meter
Recommended ReadingLatest update time:2024-11-17 01:52
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- EEWORLD University ---- Digi-Key: Accelerated Application of Graph Algorithms in Deep Learning
- Echo Cancellation - How to solve the serious problem of sound swallowing during dual talk in WebRTC AEC algorithm
- [TI millimeter wave radar evaluation]_2_1243Problems encountered in BOOST debugging
- A constant and adjustable output power electronic cigarette power supply solution based on TPS61022
- Sales of new energy vehicles have skyrocketed, how should we deal with used batteries?
- E-ON China Online Cloud Sharing Laboratory——"Microcomputer Principles and Applications"
- Improving Power Supply Network Efficiency Using Fixed Ratio Converters
- Large amplitude sine wave signal frequency acquisition circuit
- 【Share】Output adjustable
- [N32L43x Review] 6. Software and Hardware I2C Driver for 0.96-inch OLED