1 Introduction
In recent years, the application of microcomputer measurement and control systems, especially single-chip microcomputers, in the fields of industrial automation production process control, intelligent instrumentation, etc. has become more and more in-depth and extensive, effectively improving production efficiency, greatly improving control quality and economic benefits. However, the working environment of the measurement and control system is often relatively harsh and complex, and the reliability and safety of its application have become a very prominent problem. Many application systems are successful during simulation debugging and online trial operation in the laboratory. However, once they are put into use on site, the system will produce unexpected malfunctions or erroneous displays, which may cause system failure in severe cases and even cause huge losses.
The main factors affecting the reliable and safe operation of the measurement and control system are various electrical interferences from inside and outside the system, as well as system structure design, component selection, installation, manufacturing process and external environmental conditions.
The various electromagnetic noises generated by the system itself and the application environment are still common interference factors. The main reasons are: discharge noise, high-frequency oscillation noise, surge noise. The interference generated by the interference source is electromagnetic interference to the microcomputer measurement and control system through the coupling channel. The transmission of noise is almost always through wires or through space and the earth.
2 Main coupling modes of interference
(1) Direct coupling method
The most common form of conductive coupling is that the interference signal is directly transmitted to the disturbed circuit through the wire, causing interference to the circuit. In microcomputer measurement and control systems, the most common direct coupling phenomenon is that the interference noise is coupled into the computer circuit through the power line.
(2) Common impedance coupling method
When a power supply circuit supplies power to several circuits, if the power supply is not an ideal voltage source with zero internal impedance, its internal impedance becomes the common impedance of the several circuits receiving power. As long as the current in one of the circuits changes, the supply voltage of other circuits will change, forming common impedance coupling.
(3) Capacitive coupling method
This refers to the electrostatic induction caused by potential changes between the interference source and the interference object, also known as electrostatic coupling or electric field coupling.
(4) Electromagnetic induction coupling method
A magnetic field is generated in the space around any current-carrying conductor. If the magnetic field is alternating, an induced potential is generated in the surrounding closed circuit. Inside the equipment, the leakage magnetic field of the coil or transformer is a great interference. Outside the equipment, when two wires are installed over a long distance, interference will also occur.
(5) Radiation coupling method
When high-frequency current flows through a conductor, electric and magnetic lines of force are generated around the conductor and undergo high-frequency changes, thus forming an electromagnetic wave that propagates in space. The conductor in the electromagnetic wave will induce an electromotive force of the corresponding frequency. Electromagnetic field radiation interference is an irregular interference that can easily be transmitted to the system through the power line. In addition, the wave is called the antenna effect.
(6) Leakage coupling method
Leakage coupling is a resistive coupling method. When the insulation resistance between adjacent components and wires decreases, some electrical signals are coupled to the input end of the logic element through the reduced insulation resistance to cause interference.
3 Main anti-interference measures in single-chip microcomputer systems
Interference suppression methods are generally divided into hardware anti-interference and software anti-interference. In the practice of developing automation instruments and intelligent measurement and control systems, the author has analyzed and studied the interference and suppression methods of single-chip microcomputer systems, and achieved good results in practical application.
3.1 Hardware anti-interference
For ease of understanding, the sources of interference can be generally summarized as: power supply interference, line interference and space interference. The corresponding anti-interference measures are:
(1) Power isolation
The power supply of the microcontroller working circuit should adopt an independent power supply circuit, and its power transformer should be used separately from the power transformer of other high-power circuits. The ground wire of the microcontroller power circuit is not connected to the ground wire of other high-power circuits. At the electrical connection between the two circuits, devices such as photocouplers and photo-thyristors can be used for isolation.
(2) Port line isolation
The input and output lines of the microcontroller, especially those involved in controlling high-power circuits, must be isolated by optocouplers at the electrical connection between them and the external circuit. [page]
The isolation circuit is shown in FIG1 , and the level conversion circuit is shown in FIG2 .
(3) Spatial isolation
If the single-chip microcomputer control circuit and other high-power circuits can be placed separately, try not to place them in the same space. If the two must be in the same space, try to increase the electrical distance between them, minimize the electromagnetic induction coupling and radiation coupling in the space, or place the single-chip microcomputer control circuit in a shielding body composed of a metal mesh or metal box. In addition, there are other auxiliary anti-interference measures, such as grounding the shell of the crystal oscillator, adding decoupling capacitors to the ground near the power supply end of the central processing unit and each port line, etc.
3.2 Software Anti-interference Method
In addition to hardware anti-interference methods, the use of corresponding software suppression and compensation measures can also play an effective anti-interference role.
(1) Response of each part of the microcontroller to interference signals
①Central Processing Unit (CPU)
The CPU is a high-speed digital device, and the parts that are susceptible to interference include the arithmetic unit, controller, and control register. When electromagnetic interference signals enter, the CPU will execute instructions incorrectly, causing malfunctions or wrong results; if the information in the control register is modified by noise, it will cause initialization errors, addressing failures, and even system paralysis. Tests have shown that most interference signals are introduced into the CPU by the bus; among them, the program pointer PC is the one that has the most frequent contact with the outside world and is therefore the most susceptible to interference. This interference often causes fatal errors and is the focus of prevention and correction.
② Special Function Register SFR
SFR includes registers of various I/O ports, working mode registers of various on-chip components, as well as stack pointers, data pointers, etc. Its characteristics are high data transmission speed and close coordination with the operation of the CPU. If an SFR is rewritten by an interference signal, it means that the result of the operation is abnormal. In the worst case, the operation control of various components in the microcontroller will be changed, and in the worst case, the output of the entire system will be disordered, causing failures or safety accidents. Therefore, timely and effective protection must be provided for program-related content.
(2) Software compensation measures
For the noise that has already invaded the microprocessor, corresponding measures must be taken to maintain the system function to avoid unexpected shutdown or unexpected startup, or even accidents. For the malfunction of the CPU and the erroneous modification of the contents of various memories, inserting the corresponding program module in the application software to actively compensate is a simple and reliable method.
① Active initialization
The "initialization" here generally refers to the permanent or temporary settings of various functions, ports, modes, and states of the microcontroller and external expansion devices in each section of the program. We must not only ensure that the software can correctly implement various levels of initialization after power-on or reset, but also set the action mode of the corresponding control register again before using a certain function in the program. Practice has proved that this measure can greatly improve the system's self-recovery performance against intrusion interference.
② Repeat execution
Program instructions may be modified by noise during execution or after they are maintained, which may lead to control failure or even accidents. Therefore, the number of executions of important instructions should be increased as much as possible to correct errors caused by interference. For sensor data with lower frequency, it is recommended to collect and compare multiple times within the effective time; for instructions to control external devices, it is necessary to repeat the execution multiple times to ensure the reliability of the relevant signals. To achieve this goal, important instructions can be designed as timed scanning modules so that they are repeatedly executed during the entire program loop. In this way, even if the interference signal rewrites the instruction content, it can automatically return to normal within the reaction time of the controlled device.
③Protection and recovery of important data
Writing a special data protection subroutine is an effective way to improve the reliability of industrial control microcomputer systems. In the process of writing programs, for data whose properties are changed by instructions, you can consider protecting them as much as possible after each change so that the correct value can be restored when needed. If the amount of data to be protected is large, it is recommended to expand non-volatile SRAM as an off-chip data storage. This new chip has high anti-interference performance, but its disadvantage is that the current price is relatively high.
(3) On-chip WDT control
"Watchdog" (WDT) has become one of the essential members of industrial microcomputers. It can prevent the program from "running away" or "ending in a dead loop". Some single-chip microcomputers, such as the PIC series single-chip microcomputers, have a WDT monitoring timer built in. Through software, the value of the WDT monitoring timer is regularly cleared. When a "dead loop" or program "running away" occurs, the value in the WDT monitoring timer overflows, thereby forcing the program to reset and start from the beginning. Single-chip microcomputers without a built-in WDT monitoring timer can also use the idle timer/counter inside the microprocessor, and with appropriate programs, they can easily form a WDT.
→参考文献CH(开始)[2] Yang Huashu, Chu Futao. Software approach to anti-interference of single-chip computer system[J]. Application of Electronic Technology, 2001(3):20-22.
Previous article:About the Interface Design between Single Chip Microcomputer and A/D Converter
Next article:Research on Magnetic Ruler Digitalization Technology Based on Single Chip Microcomputer and TDC
Recommended ReadingLatest update time:2024-11-16 22:25
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [National Technology N32 MCU Development Package] -- N32G455 Series
- Looking for second-hand six-axis force sensor
- 3. SPI pit diary (+GD32L233 USART, ADC, SPI usage) using hardware SPI driver max7219
- Guanzai’s Small Survey: Is your company too small to apply for a sample?
- What? The "enchantment" in the fairy tale drama has been made? Come and see, does anyone know anything about it?
- In your spare time, we can exercise together and supervise each other.
- Application of resettable fuse
- Summary: Advanced IO Operation Software SPI Performance
- Does anyone know how to write a DLL for a card reader/writer? Is there any relevant information?
- Still using the burning method to test fabric composition? Now there is a new method.