In the single-chip design process, to get rid of the software and hardware processing method EMC

For an electronic engineer, in circuit design MCU electromagnetic interference not only in the ability and accuracy in the control of the microcontroller, but also related to business competition in the industry. Electromagnetic interference design process herein primarily from the design of hardware and software, the following is from the microcontroller to the PCB design software processing of the processing to introduce electromagnetic compatibility.

First, the impact EMC factor
1. Voltage

The higher the supply voltage, it means that the voltage amplitude larger, even more emission, and low power supply voltage affect the sensitivity.

2. frequency

More transmit high-frequency generator, more generated periodic signal transmission. In the SCM system frequency to generate a current spike when the switching device; in an analog system, generates a current spike when the load current changes.

3. Ground

EMC topic in all, the main problem is caused by improper grounding. Signal ground three methods: a single point, multi-point and mixed. At frequencies below 1MHz, single-point ground method may be employed, but not suitable for a high frequency; in high frequency applications, preferably multi-point grounding. Mixing ground single point ground is low, the high frequency method using multi-point grounding. Key layout is ground, the ground circuit and a low-frequency digital circuits to analog circuits do not mix.

4. PCB Design

A suitable printed circuit board (PCB) for routing is essential to prevent EMI.

5. Coupled to the power supply

When the switching device, the power line will produce transient current must be attenuated and filtered these transient currents. Transient current from the high di / dt results in the source and trace "shot" voltage, high di / dt to generate a wide range of high-frequency current, the excitation radiation member and the cable. And the inductor current variation flowing through the wire will result in a pressure drop, reducing the inductance or current changes with time of the pressure drop can be minimized.

Second, the hardware processing method of interference measures

1. Printed circuit board (PCB) design EMC

PCB support system microcontroller circuit elements and devices, which provide electrical connection between the circuit elements and devices are connected. With the rapid development of electronic technology, PCB density is increasing. PCB design quality great influence on the compatibility electromagnetic SCM system, practice confirmed, even if the circuit schematic design correctly, incorrectly printed circuit board design, also adversely affect the reliability of the SCM system. For example, if two thin parallel lines of the printed circuit board in close proximity, the signal waveform will be a delay, reflection noise formed in the terminal of the transmission line. Thus, in the design of printed circuit boards, we should pay attention to the correct approach, comply with the general principles of PCB design, and shall meet the design requirements immunity. To get the best performance electronic circuit, and the layout of conductor laid components is very important.

2. Input / output EMC design

In the SCM system input / output transmission line is a source of interference, and receiving radio frequency interference source signal pickup subject, we design generally take effective measures:

① using the necessary common mode / differential mode rejection circuit, but also take certain filtering and electromagnetic shielding to reduce interference to enter.

② taken at various possible conditions permit isolation (e.g., magnetic or optical isolation isolation), thereby blocking the propagation of interference.

3. Microcontroller reset circuit design

In the SCM system, the watchdog system plays a particularly important role in the operation of the whole chip, since all sources of interference can not all be isolated or in addition to, once enter into the normal operation of the CPU rejection program, then the system is reset binding software has become an effective treatment measures of the error correction defensive barrier. Commonly used to reset the system has the following two:

① external reset system. External "watchdog" circuit can also be used to design your own special "watchdog" to build chips. However, they have advantages and disadvantages, most special "watchdog" low chip "DOG" signal is not the response, the high frequency "DOG" signal can be in response, to produce at low frequencies "DOG" signal reset operation at high frequencies without generating the "DOG" signal reset operation, so that if the system program stuck in an infinite loop, and the loop has happened "DOG" signal, then the reset circuit can not be achieved it the proper function of. However, we ourselves can design a bandpass of "feed the dog" system reset circuit and the other circuit is a very effective external monitoring system has a.

② more and more microcontrollers with on-chip reset their system, so users can easily use its internal reset timer, but there are some models of its single-chip reset command is too simple, so also there will be an infinite loop as described above as "feed the dog" instruction, making it lose monitoring role. Some on-chip microcontroller reset instruction to do better, they generally "DOG" signal of a fixed format to make a plurality of instructions to execute in sequence, if there is some error the "DOG" invalid manipulation, thus greatly progress of the reliability of the reset circuit.

4. Oscillator

Most microcontrollers have an oscillator circuit coupled to an external crystal or ceramic resonator. In the PCB, the shorter the required external lead capacitance, crystal or ceramic resonator, the better. RC oscillator has sensitivity to interfering signals latent, it can produce a short clock cycle, and thus preferably selected from a crystal or ceramic resonator. Further, the housing of the quartz crystal to ground.

5. Lightning protection measures

SCM system used in outdoor or indoor introduced from the outdoor power line displacement, the signal line, to be considered subject lightning system. Commonly used anti-lightning device has: gas discharge tube, TVS (Transient Voltage Suppression) and the like. The gas discharge tube when the supply voltage is greater than a certain value, typically through discharge order of tens or hundreds V V, the gas, the stronger the power cord into the earth impulse conduction. TVS can be seen as two parallel and opposite to the Zener diode when the voltage across the conductive above a certain value. It features may be transient is the current through hundreds of thousands of A.

Third, the software processing method of interference measures

Interference signal sources of electromagnetic interference generated in certain circumstances (such as in some electromagnetic environment is a bad situation) can not be completely eliminated, will enter the final processing of the CPU core unit, which in some large-scale integration circuits are often subject to interference, leading to not work or work in an error state. Especially as RAM for storing such bistable devices, often in strong interference occurs inverted, so that the "0" stored in the original becomes "1" or "1" to "0"; Serial number the timing and data transmission can occur due to interference change; more serious will destroy some important data parameters; the consequences are often very serious. In this case the software design will have a direct impact on the level of anti-jamming capability of the system.

1. The program will be due to electromagnetic interference roughly about several situations:

① program running.

This situation is most commonly the result of interference, in general, there is a good system or software reset frame measurement system can be, will not have much impact on the overall operation of the system.

② infinite loop or abnormal code runs.

Of course, this endless loop and abnormal program code written intentionally not designed staff, we know that a program of instructions bytes, some single-byte instructions and some multi-byte instruction, so that when the interference occurs pointer PC changes, so that the original program code reorganization had taken place executable code can not guess, then, this error is fatal, it could have important data to modify parameters, it is possible to generate the control of the unpredictable and a series of output error status.

2. To measure important parameters stored

Under normal circumstances, we can use error detection and correction to effectively reduce or avoid this situation. According to error detection, error correction principles, the main idea is written in the data, according to the data written into certain innate digit check code, saved together with the corresponding data; when read, will also check code reader, a judgment. If an error is corrected automatically, the correct data is sent, and at the same time after the correction data is written back to overwrite the original error data; if the two error interrupt is generated reports to inform the CPU exception handling. All this action is done automatically by the software design, with real-time and automatically. By this design, can greatly improve the system's anti-jamming capability, and thus improve system reliability.

Error checking and correcting it works: First, let's look at the basic principles of error detection and error correction. The basic idea is to perform error control information code group to certain rules added to the redundant code in different ways, in order to rely on the extra monitor or code code code to find the school or automatically correct errors when the information read.

The characteristics of the occurrence of errors, that is random and small errors that occur almost capricious, it is almost always affect a random byte in a bit (bit), and therefore, if the design can automatically correct single-bit errors, check the two error encoding. It can greatly improve system reliability.

3. Detection of RAM and FLASH (ROM) of

When programming is written into some of our best testing procedures to test the RAM and FLASH (ROM) of the data codes to see whether an error occurs, the event to be corrected immediately, not should be promptly corrected error indication is given to the user to deal with.

In addition, the added redundancy program in the preparation of the program is indispensable. In some places add three or three or more NOP instructions reorganization proceedings has a very effective role in preventing. Meanwhile, in the operating state of the program to mark the introduction of data and detect state to promptly identify and correct errors produced.

Guess you like

Origin blog.csdn.net/weixin_45187647/article/details/91390171