A Brief Introduction to Anti-Electromagnetic Interference Technology in Embedded System Design

Anti-interference design of embedded system

Junan Wang

[Institute of Computer External Devices, Xi'an University of Electronic Science and Technology)

Abstract: In view of the requirements of embedded system's design for electromagnetic interference, we discussed

the electromagnetic compatibility design technology of hardware system from the aspects of circuit and printed board design, chassis and cable connection; and discussed the anti-interference design technology of software system from the aspects of software reliability design, program runaway prevention, remedial and complete measures.

The EMC design of the hardware system is discussed in terms of circuit and board design, chassis and cable connection; the EMC design of the software system is discussed in terms of reliability design of the software, and the prevention, remediation, and safety measures of program flying

.

Keywords: embedded systems, anti-interference, EMI reliability

Introduction

Embedded systems often have a large number of sources of electromagnetic interference at the work site, which can be divided into: (1) from the power supply of the

Conducted interference: (2) from the transmission channel of the conducted interference; (3) from the space of the radiated interference. Embedded systems in the design

If effective anti-interference measures are not taken, the CPU and other weak signal processing modules are easily affected by these sources of interference

and can not work properly. Therefore, anti-interference performance has been the main factor affecting the reliability of embedded system operation.

How to improve the anti-interference performance has been the concern of embedded system developers.

In order to improve the reliability of embedded systems, at the beginning of the system design, we should make a reasonable estimate of the electromagnetic interference (EMI) in the environment and propose appropriate EMI indicators. In hardware design, implementation, system interconnections

, need to take relevant measures to ensure that the EMI indicators; in software design and programming, for embedded computers are most likely to appear

"program flying" problem, need to take preventive and remedial measures. This paper will combine the author's practical experience to discuss the above issues

.

First, the anti-interference design of the hardware system

The anti-interference design of the hardware system mainly refers to the design of electromagnetic compatibility, electromagnetic compatibility contains two aspects: (1) on the environment

in the electromagnetic interference has a certain degree of tolerance; (2) can not be to the space environment to emit too strong electromagnetic energy.

The EMI problem stems primarily from the distribution parameters of the circuit. Many circuits from the principle (centralized parameters), it seems that there is no problem,

while the actual system due to the non-ideal nature of the device, as well as the structure, wiring and other issues, resulting in EMI emission or sensitivity. The basic principles of anti-interference

design include:

(I) suppress the source of interference: reduce the rate of change of voltage/current, such as parallel resistive-capacitive absorption circuits, series damping inductors, and parallel continuity

current diodes.

(2) Cut off the propagation path of conducted and radiated interference: such as the use of filters or isolation circuits, the use of shielding technology.

(3) Improve the anti-thousand disturbances performance of sensitive devices: shorten the connecting line, reduce the loop area, widen the power supply and ground

The following is mainly from the electrical principle and printed circuit board design, chassis shielding and cable connection technology, etc., to discuss the anti-disruptive

interference design techniques for hardware systems.

1.1 Circuit design and wiring

At the early stage of development, the reliability of the system should be expected and analyzed to determine the key components and

components that affect reliability. After confirming the reasonableness of the program, the key components affecting the reliability of the reduced use.

卜是作者在实践中的儿点体会:

(1) Simplify and optimize the architecture as much as possible. Such as the use of a more full-featured Soc, embedded computers.

(2) pay attention to the reliable reset of the embedded system. When the power supply has a spike interference or voltage rise is too slow, the ordinary resistive-capacitive

reset circuit is difficult to reset correctly, you can consider special devices.

(3) The loop area of the circuit has a great impact on EMI performance, and the use of large-scale integrated circuits can effectively reduce the loop surface

area, thus improving interference immunity and reducing space electromagnetic emissions.

(4) Logic devices try to use CMOs circuits, because the noise tolerance is large, low power consumption. CMOs devices output impedance

is very small, while the input impedance is very large, the connection line is too long, you should use the impedance matching resistor on the input side: the unused input should be connected to

high level.

(5) The conversion rate of digital signals should be adapted to the required speed (using damping circuits, if necessary), only when needed to use

use high-speed devices.

(6) pay attention to the EMI performance of the signal cable. It is best to use shielded cables and isolation circuits if necessary. If you must use

flat cables, you can stagger the signal lines with the ground line.

A few suggestions for printed circuit board design:

(1) When cost allows, try to use more than 4 layers of circuit boards to improve EMI performance.

(2) Carefully consider the location and orientation of devices.

(3) Use shielding for sensitive circuits and strongly radiating circuits.

(4) Minimize the circuit area of high-frequency signals and highly sensitive signals (e.g., clock signals), do not arrange other signal

lines next to them, and surround them with ground lines.

(5) In the device's power supply, ground end of the nearby arrangement of the decoupling capacitor.

(6) Regardless of the device location, wiring, signal cable, ground, as far as possible in accordance with the different electrical characteristics (analog signals,

digital signals, discrete signals, etc.) for grouping.

(7) Different parts of the circuit use different ground, and form a tree connection to avoid ground loops; PCB blank position

can be filled with ground: If you want to connect the system ground and chassis ground, the signal cable connector position for low impedance connectivity

connection.

(8) Use advanced manufacturing processes. Such as PCB design, fabrication, welding, device aging.

1.2 Chassis and over the line of EMI design

Chassis and through the power line, signal cable is usually the key issue of EMI design. The role of the chassis is a two-way electromagnetic screen

Shielding and grounding, and through the wire is easy to destroy the electromagnetic shielding effect of the chassis.

In order to prevent the electromagnetic interference generated by the device itself from entering the power line, as well as preventing the interference on the power line from entering the device,

it is generally necessary to use a power line filter to suppress bi-directional ****-mode and differential-mode conducted interference, and transient voltage protectors and voltage

sensitivity resistors to suppress surge voltages.

It is important to note that ***mode interference from the power cord is routed to the chassis via ***mode suppression capacitors. The chassis must be properly grounded

to ensure ****-mode immunity. Larger ****-mode suppression capacitors can improve ****-mode chirp suppression, but will

generate larger leakage currents, which is detrimental to safety.

When the equipment is more complex, the shielding and grounding scheme needs to be carefully designed. As shown in Figure 1, some of the author's experience:

(1) from the chassis power input port to the power line filter input connection should be as short as possible, in order to prevent bidirectional spatial electromagnetic bogey

combined. It is best to use a power cord filter with a socket.

The power line filter shell should be formed with the chassis of good conductive contact, and close to the arrangement of grounding stakes.

The input and output leads of the power cord filter should not be close to each other to prevent electromagnetic interference. It is recommended to place the power line filter close to the chassis

wall.

(2) Through the chassis of the signal cable is easy to introduce *** mode interference, it is best to use the feed-through filter or optoelectronic isolator, must be

shielded mesh sleeve should be used. Signal cables should be kept away from power cables.

(3) In order to shield electromagnetic interference, inhibit electrostatic discharge interference, the chassis should be approximated as a complete, continuous conductor: strict

control chassis aperture size, if necessary, the use of multiple slits or honeycomb shielding ventilation window.

(4) Keyboards and display devices often require larger windows, which is not conducive to electromagnetic shielding, you can consider using isolation bin technology

to isolate the display circuits from the rest of the circuitry, or use transparent shielding materials.

Figure 1 proposed chassis and shielding program

Second, the anti-interference design of the software system

The soul of the embedded system is the software system, the anti-interference design of the embedded system, the anti-interference of the software system must be resolved

problems. Unfortunately, the current von Neumann computer system can not guarantee the absolute reliability of software operation, therefore, the reliability of the software system must be enhanced using

engineering methods. The following combines the author's practical experience to give some reliable

reliability design techniques for software systems.

2.1 Reliability design of software

(1) Power-on self-test. That is, after reset, the software first conducts a system check to ensure that the ROM content is correct, the RAM can be read and written correctly

, and the peripherals work properly....... The power-on self-test is essential for the reliable operation of the system.

(2) software correctness and functional compliance. Meet the requirements of the functional specifications, and can run correctly, is the basic requirements of the software reliability design

Planning. Compared with the pure software on the microcomputer, embedded software is not only closely related to the specific hardware, and often has

obvious, the need for programmers to maintain the multi-tasking characteristics: embedded systems also require simple, intuitive human-computer interaction,

and therefore need to carefully design the software.

(3) Resilience to erroneous data. In addition to the basic functional compliance, the software design should improve the resilience to error data

such as input data should be checked as necessary, and the checksum mechanism for data communication. Examples on data communication:

Receiving data from the serial port, the datagram format is: [header][-thi] {data}[message checksum], after receiving the [length l, should check the legitimacy of the length value of the

:When receiving, should also check the time interval between adjacent bytes of the datagram, and give up the reception after the timeout.

(') Object-oriented programming. The programming language for embedded systems is generally C, or even assembly language, which

are procedural languages. Compared to object-oriented programming languages (C++, java), procedural languages lack data abstraction, encapsulation

and hiding, and programmers often use a bunch of fragmented variables to represent an object, which is not easy to ensure the reliability of the software, and is not

conducive to software maintenance.

Based on the authors' practical experience, even with procedural languages, as long as object-oriented programming

ideas are used in program design, it is possible to design programs that are portable and easy to maintain. Of course, embodying object-oriented

programming ideas in a traditional procedural language requires a certain amount of programming experience and skill.

2.2 Transient design

In the device reset, startup or shutdown, often require the output port to have a certain state, or enter a safe state, can be analyzed, tested and processed from

to 卜儿方面:

(1) Assuming that the power supply is stable, when the CPU is in a state of reset, the state of the outputs of the state is set?

Can be analyzed to get. If the state of the outputs at the time of reset is opposite to the required state, you can use a non-gate conversion; if the reset port

line presents a high resistance state, then you can add a pull or a "pull" resistor.

(2) What is the state of the device outputs at the moment the power is turned on and off?

Because of the complexity of the actual system, power on and off instantly, it is difficult to accurately analyze the state of the output of the device, generally

tests, adjustments to solve the problem.

(3) Many programmable chips have reset time requirements, can the reset time of these chips be guaranteed when the device starts? The main

to rely on analysis and test methods to solve.

2.3 Outputs remain in a safe state when the program is running on the fly

Safe state refers to a non-action state (e.g., a motor stops running). In embedded systems, the program may fly due to internal program design flaws or external

incoming electromagnetic interference. In the system program design should take measures, when the program runs

Outputs as far as possible to maintain a safe state.

When the program flies, the CPU can no longer execute the normal program flow. In order to keep the output in a safe state, hardware

logic must be used to determine whether the instructions issued by the CPU are correct. The basic idea is: the output port line of the CPU does not directly control the actuator, but in

between the two to increase the hardware judgment logic: when the CPU port line outputs a specific sequence of signals, the hardware judgment logic to output the action

instruction, or do not output the action instruction.

As in Figure 2, a monostable flip-flop is used to determine the action signal: only when the CPU port line continuously outputs a square wave higher than a certain frequency

rate, the action instruction is output. In the figure, the and non-gate is used to realize the "and" operation of the two signals to improve reliability.

Complicated action signal judgment can be achieved using devices such as CPLDs.

Figure 2 monostable flip-flop to achieve the command judgment

2.4 program can automatically recover after running

That is, the watchdog (WatcliDog) technology, has been widely used. The basic principle is: set a timer (i.e., "watchdog,

'),

The timer overflow will cause a system reset. The program needs to be carefully designed: during normal execution, the watchdog timer can be cleared in time (called "feeding the dog,"), and the watchdog timer will not overflow: when the program runs away, due to the failure to "feed the dog"

in time, the watchdog

timer overflows, and the system resets. overflows and the system resets.

The key to watchdog program design is: (1) "feed the dog" instruction should be more special, in order to prevent the program to fly after the CPU will be other data

data interpreted as "feed the dog" instruction: (2) only in a few key program locations "Feed the dog"

to ensure that the program flew after the watchdog overflow.

It can be seen that the role of the watchdog is to reset as soon as possible after the program runs away, and does not fundamentally improve the reliability of the system. Therefore,

Reliability design should still be carefully designed from the system, hardware, software implementation'

In addition to the watchdog, there are other similar technologies. Such as: (1) in the unused program memory to store "soft reset"

instruction, when the program run dagger, cause software reset; (2) in the assembly instructions between the insertion of a number of nop instructions, to reduce the probability of the CPU to

L instruction error read.

2.5 Partial Data Error - Casual Reset

Software runtime errors are also sometimes manifested in the form of a partial data error, while the main process [or dirt loop] is still running.

E.g.:The system sets the operating state of a peripheral at the beginning of the run and does not refresh it during the run. During operation, if the peripheral's one{work

state is destroyed by interference, it will not be recovered. Such an error is difficult to detect completely with watchdog technology. Embedded systems are usually designed

for as simple a user interface as possible, with as little user intervention as possible, and should automatically recover

to normal operation as much as possible when the system has an operation error.

In order to solve the above problems, one of the available processing methods is: the program periodically refreshes the working state of the peripheral The disadvantages are;

system performance degradation, the effect is unsatisfactory, the implementation of the specific more complex. For this reason, the authors use the "idle reset" technique in practice to solve the problem:

When the system is idle for a certain period of time, it will be restarted automatically. In order to maintain the previous state information, a few critical data can be stored in

non-volatile memory. After the system restarts, these data need to be checked, and if the data values are not

abnormal, they are loaded: otherwise, the default data are loaded, and prompts are given as needed.

III. Conclusion

The anti-jamming design of embedded system is a very complex and practical problem, the above mainly discusses some of the author's understanding of the anti-thousand jamming design techniques for embedded system from the aspects of hardware EMI

design and software anti-jamming design.

From the current application status, the hardware EMI design technology has been very mature, the application is also more successful; but as the core of the embedded system

and the soul of the software system, the reliability of the system still need to continue to improve.

References

Zhang Songchun et al, Electronic Control Equipment Anti-jamming Technology and Its Application, Beijing: Machinery Industry Press, 1995

Zhong Yuning et al, Electromechanical Product Reliability Application, China Metrology Press, 1999

Li Haiquan. Study of electromagnetic interference in computers Computer Engineering and Design, 2002.12, p30

Ho Li-Min, Selected Monolithic Application Technologies I VII, Beijing University of Aeronautics and Astronautics Press. 1999

[1]

Yin

[3]

[4]