Anti-interference technology in single chip microcomputer system

Publisher:Yuexin888Latest update time:2012-02-11 Source: 现代电子技术 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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(开始)
References
[1] He Limin. Anti-interference technology for single-chip computer application system[M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2000.
[2] Yang Huashu, Chu Futao. Software approach to anti-interference of single-chip computer system[J]. Application of Electronic Technology, 2001(3):20-22.
Keywords:MCU Reference address:Anti-interference technology in single chip microcomputer system

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

How to play with STM8 microcontroller
It is a very normal step-by-step learning method to learn the entire computer system from the microcontroller. Because until today, the computer system has not escaped this most basic architecture. Unfortunately, I skipped this process and started directly from Intel 486. At that time, I was struggling forward with co
[Microcontroller]
51 MCU Learning Road (I) - LED Flowing Light
A word of warning: The following procedures and circuit diagrams are not guaranteed to be the optimal solutions and there will be many shortcomings. Please understand. text Learning objectives: Use 51 single-chip microcomputer to realize the LED flowing light function. Learning Content: LED Lighting LED light flic
[Microcontroller]
51 MCU Learning Road (I) - LED Flowing Light
Exchange instruction (5) example - mcs51 microcontroller assembly language
Exchange instructions (5) The function of these five instructions is to exchange the contents of the accumulator A with the data pointed to by the source operand. XCH A,Rn; (A) ←→ (Rn) The contents of the accumulator and the working register Rn are exchanged . XCH A,@Ri; (A) ←→ ((Ri)) The contents of the accumulator
[Microcontroller]
Handheld inspection equipment for temporary train speed limit based on AVR microcontroller
Introduction: In recent years, in order to improve the safe operation of trains, temporary train speed limit technology has been applied to the railway system, and handheld inspection equipment is an important part of the temporary speed limit system. Temporary train speed limit refers to a time-limited speed limit ou
[Microcontroller]
Handheld inspection equipment for temporary train speed limit based on AVR microcontroller
51 MCU IIC bus programming
#include #define uchar unsigned char sbit sda=P2^0; sbit scl=P2^1; //Use the two I/O ports of the microcontroller to simulate the I2C interface flying a; * void delay()//Simple delay function { ;; } * void start() //Start signal SCL is at high level, and a falling edge of SDA indicates the start signal { sda=1; //R
[Microcontroller]
51 single chip microcomputer controls the servo
Here we use PCF8591 ADDA chip, 51 single-chip microcomputer, and a potentiometer. By controlling the potentiometer, PWM wave is generated to control the rotation of the servo. And the angle is displayed on the digital tube. Circuit Diagram       This is the program. /*---------------------------------------------
[Microcontroller]
51 single chip microcomputer controls the servo
AVR microcontroller read and write CPLD program example (ATmega128 program case)
In the project, CPLD is needed to complete part of the algorithm design. The parameters are given by AVR, so the communication between AVR and CPLD needs to be completed. Therefore, a test program is written. CPLD is hung on the data and address bus of AVR. AVR uses ATmega128. Several registers are set in CPLD. Commun
[Microcontroller]
Serial Communication Between PC and Multiple MCUs Based on RS-485 Bus
0 Introduction Single-chip microcomputers are widely used in the field of measurement and control due to their superior cost-effectiveness and flexible functional configuration. PCs are widely used in network monitoring systems due to their rich software and hardware resources. This is a master-slave networ
[Microcontroller]
Serial Communication Between PC and Multiple MCUs Based on RS-485 Bus
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号