1. Factors affecting EMC
1. Voltage: A higher power supply voltage means a larger voltage swing and more emissions, while a low power supply voltage affects sensitivity.
2. Frequency: High frequencies produce more emissions, and periodic signals produce more emissions. In high-frequency microcontroller systems, current spikes are generated when devices switch; in analog systems, current spikes are generated when load current changes.
3. Grounding: Among all EMC problems, the main problem is caused by improper grounding. There are three signal grounding methods: single point, multi-point and mixed. When the frequency is lower than 1MHz, the single-point grounding method can be used, but it is not suitable for high frequency; in high-frequency applications, it is best to use multi-point grounding. Mixed grounding is a method of using single-point grounding for low frequency and multi-point grounding for high frequency. Ground layout is the key, and the grounding circuits of high-frequency digital circuits and low-level analog circuits must not be mixed.
4. PCB design: Proper printed circuit board (PCB) wiring is critical to preventing EMI.
5. Power supply decoupling: When the device switches, transient currents will be generated on the power line, which must be attenuated and filtered. Transient currents from high di/dt sources cause ground and trace "emission" voltages, and high di/dt produces a wide range of high-frequency currents, which excite components and cables to radiate. The current changes and inductance flowing through the wire will cause a voltage drop, which can be minimized by reducing the inductance or the change in current over time.
2. Hardware processing methods for interference measures
1. Electromagnetic compatibility design of printed circuit boards (PCBs)
PCB is the support for circuit elements and devices in the single-chip microcomputer system, and it provides electrical connections between circuit elements and devices. With the rapid development of electronic technology, the density of PCB is getting higher and higher. The quality of PCB design has a great influence on the electromagnetic compatibility of the single-chip microcomputer system. Practice has proved that even if the circuit schematic is designed correctly, improper design of the printed circuit board will also have an adverse effect on the reliability of the single-chip microcomputer system. For example, if two thin parallel lines of the printed circuit board are close to each other, it will cause a delay in the signal waveform and form reflected noise at the terminal of the transmission line. Therefore, when designing a printed circuit board, you should pay attention to using the correct method, abide by the general principles of PCB design, and meet the design requirements of anti-interference. In order to achieve the best performance of the electronic circuit, the layout of components and the layout of wires are very important.
2. Input/output electromagnetic compatibility design
In the single-chip microcomputer system, the input/output is also the transmission line of the interference source, and the pickup source of the receiving RF interference signal. We generally take effective measures when designing:
① Use necessary common-mode/differential-mode suppression circuits, and also take certain filtering and anti-electromagnetic shielding measures to reduce the entry of interference.
② When conditions permit, take various isolation measures (such as photoelectric isolation or magnetic isolation) as much as possible to block the spread of interference.
3. Design of MCU reset circuit
In the single-chip microcomputer system, the watchdog system plays a particularly important role in the operation of the entire single-chip microcomputer. Since all interference sources cannot be completely isolated or eliminated, once they enter the CPU and interfere with the normal operation of the program, the reset system combined with software processing measures becomes an effective error correction and defense barrier. There are two commonly used reset systems:
① External reset system. The external "watchdog" circuit can be designed by yourself or built with a dedicated "watchdog" chip. However, they each have their own advantages and disadvantages. Most dedicated "watchdog" chips cannot respond to low-frequency "feed the dog" signals, but can respond to high-frequency "feed the dog" signals, so that they will generate a reset action under low-frequency "feed the dog" signals but not under high-frequency "feed the dog" signals. In this way, if the program system falls into an infinite loop, and there happens to be a "feed the dog" signal in the loop, then the reset circuit will not be able to achieve its due function. However, we can design a system consisting of a passband "feed the dog" circuit and other reset circuits, which is a very effective external monitoring system.
②Nowadays, more and more MCUs have their own on-chip reset system, so that users can easily use their internal reset timer. However, the reset instructions of some MCUs are too simple, so there will be "feed the dog" instructions like the above-mentioned dead loop, which makes it lose its monitoring function. Some MCUs have better on-chip reset instructions. Generally, they make the "feed the dog" signal into multiple instructions in a fixed format to be executed in sequence. If there is a certain error, the "feed the dog" operation will be invalid, which greatly improves the reliability of the reset circuit.
4. Oscillator
Most microcontrollers have an oscillator circuit coupled to an external crystal or ceramic resonator. On the PCB, the leads of the external capacitor, crystal or ceramic resonator should be as short as possible. RC oscillators are latently sensitive to interference signals and can produce very short clock cycles, so it is best to choose a crystal or ceramic resonator. In addition, the shell of the quartz crystal should be grounded.
5. Lightning protection measures
For single-chip computer systems used outdoors or power lines and signal lines introduced from the outdoors into the indoors, lightning protection issues of the system must be considered. Common lightning protection devices include: gas discharge tubes, TVS, etc. When the voltage of the power supply is greater than a certain value, usually tens of V or hundreds of V, the gas in the gas discharge tube breaks down and discharges, directing the strong impulse pulse on the power line into the ground. TVS can be regarded as two parallel Zener diodes in opposite directions, which are turned on when the voltage at both ends is higher than a certain value. Its characteristic is that it can pass hundreds or even thousands of A of current in a transient state.
3. Software processing methods for interference measures
The interference signal generated by the electromagnetic interference source cannot be completely eliminated in some specific cases (such as in some cases where the electromagnetic environment is relatively bad), and will eventually enter the core unit of the CPU processing, so that some large-scale integrated circuits are often interfered, resulting in malfunction or working in an erroneous state. In particular, devices such as RAM that use bistable storage often flip under strong interference, causing the original stored "0" to become "1", or "1" to become "0"; the timing and data of some serial transmissions will change due to interference; more seriously, some important data parameters will be destroyed, etc.; the consequences are often very serious. In this case, the quality of software design directly affects the anti-interference ability of the entire system.
1. The program may experience the following situations due to electromagnetic interference:
① The program runs away. This is the most common interference result. Generally speaking, a good reset system or software frame test system is sufficient, and it will not have much impact on the entire running system.
② Dead loop or abnormal program code running. Of course, this kind of dead loop and abnormal program code are not intentionally written by the designers. We know that the instructions of the program are composed of bytes, some are single-byte instructions and some are multi-byte instructions. When interference occurs, the PC pointer changes, so that the original program code is reorganized to produce unpredictable executable program code. Then, this error is fatal. It may modify important data parameters and may produce a series of error states such as unpredictable control output.
2. Measures for storage of important parameters
In general, we can use error detection and correction to effectively reduce or avoid this situation. According to the principle of error detection and correction, the main idea is to generate a certain number of checksums based on the written data when the data is written, and save them together with the corresponding data; when reading, the checksum is also read out and judged. If there is a single error, it will be automatically corrected, the correct data will be sent out, and the corrected data will be written back to overwrite the original erroneous data; if there are two errors, an interrupt report will be generated to notify the CPU to handle the exception. All these actions are automatically completed by software design, with the characteristics of real-time and automatic completion. Through such a design, the anti-interference ability of the system can be greatly improved, thereby improving the reliability of the system.
Error detection and correction principle:
First, let's look at the basic principles of error detection and correction. The basic idea of error control is to add different types of redundant codes to the information code group according to certain rules, so that when the information is read out, the redundant monitoring code or code correction code can be used to detect or automatically correct the error. In view of the characteristics of bit error, that is, the randomness and small probability of error occurrence, it almost always randomly affects a certain bit in a byte. Therefore, if a coding method can be designed to automatically correct one bit error and check two bits of error, the reliability of the system can be greatly improved.
3. Detection of RAM and FLASH (ROM)
When compiling a program, it is best to write some detection programs to test the data codes of RAM and FLASH (ROM) to see if any errors occur. If any errors occur, they must be corrected immediately. If they cannot be corrected, an error indication must be given in time for the user to handle them.
Finally, it is essential to add program redundancy when compiling a program. Adding three or more NOP instructions in certain places can effectively prevent the reorganization of the program. At the same time, it is necessary to introduce flag data and detection status in the running state of the program to timely discover and correct errors.
Previous article:Analysis of SMS design based on TC35i GSM module
Next article:Application of asynchronous transceiver TL16C554 in inertial navigation system
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Importing an old MPLAB IDE V8.9 project into MPLAB X IDE shows 'other' has different root
- [Smartwatch for environmental experts] Part 8: Code migration for personnel going down the mine
- EEWORLD University Hall----Live Replay: Manufacturing Logistics Challenges of Microchip Key Security Configuration- Advantages of Discrete Security Elements
- [Nucleo G071 Review] Connect the serial port LoRa module to conduct experiments & remotely control relays
- Using ir2110 driver to make a buck circuit
- Methods for solving faults in FPGA design and development based on EDA simulation technology.pdf
- Tuya Sandwich Wi-Fi & BLE SoC NANO Main Control Board WBRU+ Simple Development (Zero Code Solution)
- Super brain-burning question, about electric fishing? !
- There are a lot of questions recently, please don't mind.
- [SC8905 EVM Review] Upgrading and troubleshooting the use of I2Ctool on Nanxin power board