(1) In terms of component layout, related components should be placed as close as possible. For example, clock generators, crystal oscillators, and CPU clock input terminals are prone to noise, so they should be placed closer together. For those devices that are prone to noise, small current circuits, large current circuits, switching circuits, etc., they should be kept as far away from the logic control circuits and storage circuits (ROM, RAM) of the microcontroller as possible. If possible, these circuits can be made into circuit boards separately, which is conducive to anti-interference and improves the reliability of circuit operation.
(2) Try to install decoupling capacitors next to key components such as ROM, RAM and other chips. In fact, printed circuit board traces, pin connections and wiring may contain large inductance effects. Large inductance may cause severe switching noise spikes on the Vcc trace. The only way to prevent switching noise spikes on the Vcc trace is to place a 0.1uF electronic decoupling capacitor between VCC and the power ground. If surface mount components are used on the circuit board, chip capacitors can be directly placed close to the components and fixed on the Vcc pin. It is best to use ceramic capacitors because this type of capacitor has lower electrostatic loss (ESL) and high-frequency impedance. In addition, the dielectric stability of this capacitor over temperature and time is also very good. Try not to use tantalum capacitors because their impedance is higher at high frequencies.
The following points should be noted when placing decoupling capacitors:
(3) In the single-chip microcomputer control system, there are many types of ground wires, including system ground, shield ground, logic ground, analog ground, etc. Whether the ground wire layout is reasonable will determine the anti-interference ability of the circuit board. When designing the ground wire and grounding point, the following issues should be considered:
The expansion and configuration of the system should follow the following principles:
The main factors that affect the reliable and safe operation of the MCU system mainly come from various electrical interferences inside and outside the system, and are affected by the system structure design, component selection, installation, and manufacturing process. These constitute the interference factors of the MCU system, which often cause the MCU system to malfunction, affecting product quality and output at the least, and causing accidents and major economic losses at the worst.
There are three basic elements that cause interference:
1. Classification of interference There are many types of interference, which can usually be classified according to the cause of the noise, the conduction method, the waveform characteristics, etc.
According to the cause of the noise, it can be divided into discharge noise, high-frequency oscillation noise, and surge noise. According to the conduction method, it can be divided into common mode noise and series mode noise. According to the waveform, it can be divided into continuous sine wave, pulse voltage, pulse sequence, etc.
2. Interference coupling mode The interference signal generated by the interference source has an effect on the measurement and control system through a certain coupling channel. Therefore, it is necessary to look at the transmission mode between the interference source and the interfered object. The interference coupling mode is nothing more than through wires, space, common lines, etc., which can be broken down into the following types:
Commonly used hardware anti-interference technology targets the three factors that cause interference, and the main anti-interference measures taken are the following.
1. Suppressing interference sources Suppressing interference sources means reducing du/dt and di/dt of interference sources as much as possible. This is the most important and most important principle in anti-interference design, and it often achieves twice the result with half the effort. Reducing du/dt of interference sources is mainly achieved by connecting capacitors in parallel at both ends of the interference source. Reducing di/dt of interference sources is achieved by connecting inductors or resistors in series with the interference source loop and adding freewheeling diodes.
2. Cut off the interference propagation path. According to the propagation path of interference, it can be divided into two categories: conducted interference and radiated interference. The so-called conducted interference refers to the interference transmitted to sensitive devices through wires. The frequency bands of high-frequency interference noise and useful signals are different. The propagation of high-frequency interference noise can be cut off by adding filters to the wires, and sometimes it can be solved by adding isolation optocouplers. Power supply noise is the most harmful and special attention should be paid to its treatment. The so-called radiated interference refers to the interference transmitted to sensitive devices through space radiation. The general solution is to increase the distance between the interference source and the sensitive device, isolate them with ground wires, and add shielding covers to the sensitive devices.
3. Improving the anti-interference performance of sensitive devices Improving the anti-interference performance of sensitive devices means minimizing the pickup of interference noise from the perspective of sensitive devices, and recovering from abnormal conditions as quickly as possible.
4. Other common anti-interference measures
Keywords:MCU
Reference address:Experience summary of single chip microcomputer hardware design (anti-interference)
(2) Try to install decoupling capacitors next to key components such as ROM, RAM and other chips. In fact, printed circuit board traces, pin connections and wiring may contain large inductance effects. Large inductance may cause severe switching noise spikes on the Vcc trace. The only way to prevent switching noise spikes on the Vcc trace is to place a 0.1uF electronic decoupling capacitor between VCC and the power ground. If surface mount components are used on the circuit board, chip capacitors can be directly placed close to the components and fixed on the Vcc pin. It is best to use ceramic capacitors because this type of capacitor has lower electrostatic loss (ESL) and high-frequency impedance. In addition, the dielectric stability of this capacitor over temperature and time is also very good. Try not to use tantalum capacitors because their impedance is higher at high frequencies.
The following points should be noted when placing decoupling capacitors:
- Connect an electrolytic capacitor of about 100uF across the power input terminal of the printed circuit board. If the volume allows, a larger capacitance will be better.
- In principle, a 0.01uF ceramic capacitor needs to be placed next to each integrated circuit chip. If the gap in the circuit board is too small to accommodate it, a 1~10uF tantalum capacitor can be placed for every 10 chips.
- For components with weak anti-interference ability, large current changes when turned off, and storage components such as RAM and ROM, a decoupling capacitor should be connected between the power line (Vcc) and the ground line.
- The leads of the capacitor should not be too long, especially high-frequency bypass capacitors should not have leads.
- The logic ground and analog ground should be wired separately and cannot be used together. Their respective ground wires should be connected to the corresponding power ground wire. When designing, the analog ground wire should be as thick as possible, and the grounding area of the lead-out end should be as large as possible. Generally speaking, for the input and output analog signals, it is best to isolate them from the microcontroller circuit through an optical coupler.
- When designing a printed circuit board for a logic circuit, its ground wire should form a closed loop to improve the circuit's anti-interference ability.
- The ground wire should be as thick as possible. If the ground wire is very thin, the ground wire resistance will be large, causing the ground potential to change with the current, resulting in unstable signal level and reduced anti-interference ability of the circuit. If the wiring space allows, ensure that the width of the main ground wire is at least 2 to 3 mm, and the ground wire on the component pin should be around 1.5 mm.
- Pay attention to the selection of grounding points. When the signal frequency on the circuit board is lower than 1MHz, the electromagnetic induction effect between the wiring and the components is small, while the loop current formed by the grounding circuit has a greater impact on interference, so one-point grounding should be used to prevent it from forming a loop. When the signal frequency on the circuit board is higher than 10MHz, the inductance effect of the wiring is obvious, and the ground impedance becomes very large. At this time, the loop current formed by the grounding circuit is no longer a major problem. Therefore, multi-point grounding should be used to minimize the ground impedance.
- In addition to increasing the width of the power line as much as possible according to the current size, the routing direction of the power line and the ground line should be consistent with the routing direction of the data line. At the end of the wiring work, the ground line is used to fill the bottom layer of the circuit board where there is no routing. These methods are helpful to enhance the circuit's anti-interference ability.
- The width of the data line should be as wide as possible to reduce impedance. The width of the data line should be at least 0.3mm (12mil), and it is more ideal if it is 0.46-0.5mm (18mil-20mil).
- Since a via in a circuit board will bring about a 10pF capacitance effect, which will introduce too much interference to high-frequency circuits, the number of vias should be reduced as much as possible during wiring. In addition, too many vias will also reduce the mechanical strength of the circuit board.
The expansion and configuration of the system should follow the following principles:
- Try to choose typical circuits that conform to the conventional usage of single-chip microcomputers, laying a good foundation for the standardization and modularization of hardware systems.
- The configuration level of system expansion and peripheral equipment should fully meet the functional requirements of the application system and leave appropriate room for secondary development.
- The hardware structure should be considered together with the application software solution. The hardware structure and software solution will have mutual influence. The principle of consideration is: functions that can be realized by software should be realized by software as much as possible to simplify the hardware structure. However, it must be noted that the hardware functions realized by software generally have a longer response time than hardware implementation and occupy CPU time.
- The performance of related devices in the system should be matched as much as possible. For example, when a CMOS chip is used to form a low-power system, all chips in the system should be low-power products as much as possible.
- Reliability and anti-interference design are an essential part of hardware design, which includes chip, device selection, decoupling filtering, printed circuit board wiring, channel isolation, etc.
- When there are many peripheral circuits in a single-chip microcomputer, its driving capability must be considered. When the driving capability is insufficient, the system will not work reliably. The bus load can be reduced by adding line drivers to enhance the driving capability or reducing the chip power consumption.
- Try to design the hardware system in the direction of "single chip". The more components in the system, the stronger the mutual interference between components, the greater the power consumption, and the inevitable reduction of system stability. As the functions integrated in the microcontroller become more and more powerful, the real system-on-chip SoC has become possible. For example, the μPSD32×× series products recently launched by ST integrate the 80C32 core, large-capacity FLASH memory, SRAM, A/D, I/O, two serial ports, watchdog, power-on reset circuit, etc. on a single chip.
Practice of Common Methods for Hardware Anti-interference in Single-Chip Microcomputer Systems
The main factors that affect the reliable and safe operation of the MCU system mainly come from various electrical interferences inside and outside the system, and are affected by the system structure design, component selection, installation, and manufacturing process. These constitute the interference factors of the MCU system, which often cause the MCU system to malfunction, affecting product quality and output at the least, and causing accidents and major economic losses at the worst.
There are three basic elements that cause interference:
- Interference source. Refers to the components, equipment or signals that generate interference. It is described in mathematical language as follows: du/dt. The place where di/dt is large is the interference source. For example, lightning, relays, thyristors, motors, high-frequency clocks, etc. may become interference sources.
- Propagation path. Refers to the path or medium through which interference propagates from the interference source to the sensitive device. Typical interference propagation paths are conduction through wires and radiation through space.
- Sensitive devices. Refers to objects that are easily interfered with, such as A/D, D/A converters, single-chip microcomputers, digital ICs, weak signal amplifiers, etc.
Classification of interference
1. Classification of interference There are many types of interference, which can usually be classified according to the cause of the noise, the conduction method, the waveform characteristics, etc.
According to the cause of the noise, it can be divided into discharge noise, high-frequency oscillation noise, and surge noise. According to the conduction method, it can be divided into common mode noise and series mode noise. According to the waveform, it can be divided into continuous sine wave, pulse voltage, pulse sequence, etc.
2. Interference coupling mode The interference signal generated by the interference source has an effect on the measurement and control system through a certain coupling channel. Therefore, it is necessary to look at the transmission mode between the interference source and the interfered object. The interference coupling mode is nothing more than through wires, space, common lines, etc., which can be broken down into the following types:
- Direct coupling: This is the most direct way and the most common way in the system. For example, interference signals invade the system through power lines.
- Common impedance coupling: This is also a common coupling method, which often occurs when the currents of two circuits have a common path. In order to prevent this coupling, it is usually necessary to consider it in circuit design. There should be no common impedance between the interference source and the interfered object.
- Capacitive coupling: also known as electric field coupling or electrostatic coupling. It is the coupling caused by the existence of distributed capacitance.
- Electromagnetic induction coupling: also known as magnetic field coupling. It is the coupling caused by distributed electromagnetic induction.
- Leakage coupling: This coupling is purely resistive and occurs when the insulation is poor.
Commonly used hardware anti-interference technology targets the three factors that cause interference, and the main anti-interference measures taken are the following.
1. Suppressing interference sources Suppressing interference sources means reducing du/dt and di/dt of interference sources as much as possible. This is the most important and most important principle in anti-interference design, and it often achieves twice the result with half the effort. Reducing du/dt of interference sources is mainly achieved by connecting capacitors in parallel at both ends of the interference source. Reducing di/dt of interference sources is achieved by connecting inductors or resistors in series with the interference source loop and adding freewheeling diodes.
Common measures to suppress interference sources are as follows:
- A freewheeling diode is added to the relay coil to eliminate the back electromotive force interference generated when the coil is disconnected. Adding only a freewheeling diode will delay the disconnection time of the relay. After adding a voltage regulator diode, the relay can operate more times per unit time.
- Connect a spark suppression circuit (usually an RC series circuit, with a resistor ranging from a few K to tens of K and a capacitor of 0.01uF) in parallel at both ends of the relay contacts to reduce the impact of electric sparks.
- Add a filter circuit to the motor, and make sure the capacitor and inductor leads are as short as possible.
- Each IC on the circuit board should be connected in parallel with a 0.01μF~0.1μF high-frequency capacitor to reduce the impact of the IC on the power supply. Pay attention to the wiring of the high-frequency capacitor. The connection should be close to the power supply end and as thick and short as possible, otherwise, it will increase the equivalent series resistance of the capacitor, which will affect the filtering effect.
- Avoid 90-degree bends when wiring to reduce high-frequency noise emissions.
- An RC suppression circuit is connected in parallel at both ends of the thyristor to reduce the noise generated by the thyristor (this noise may cause the thyristor to break down if it is severe).
2. Cut off the interference propagation path. According to the propagation path of interference, it can be divided into two categories: conducted interference and radiated interference. The so-called conducted interference refers to the interference transmitted to sensitive devices through wires. The frequency bands of high-frequency interference noise and useful signals are different. The propagation of high-frequency interference noise can be cut off by adding filters to the wires, and sometimes it can be solved by adding isolation optocouplers. Power supply noise is the most harmful and special attention should be paid to its treatment. The so-called radiated interference refers to the interference transmitted to sensitive devices through space radiation. The general solution is to increase the distance between the interference source and the sensitive device, isolate them with ground wires, and add shielding covers to the sensitive devices.
Common measures to cut off interference propagation paths are as follows:
- Fully consider the impact of power supply on the MCU. If the power supply is well made, the anti-interference of the entire circuit is mostly solved. Many MCUs are very sensitive to power supply noise. It is necessary to add a filter circuit or voltage stabilizer to the MCU power supply to reduce the interference of power supply noise on the MCU. For example, a π-shaped filter circuit can be formed by using magnetic beads and capacitors. Of course, when the conditions are not high, a 100Ω resistor can be used instead of a magnetic bead.
- If the I/O port of the microcontroller is used to control noisy devices such as motors, isolation should be added between the I/O port and the noise source (add a π-shaped filter circuit).
- Pay attention to the crystal oscillator wiring. Keep the crystal oscillator and the microcontroller pins as close as possible, isolate the clock area with a ground wire, and ground and fix the crystal oscillator shell.
- Reasonable partitioning of circuit boards, such as strong and weak signals, digital and analog signals. Keep interference sources (such as motors and relays) and sensitive components (such as microcontrollers) as far away as possible.
- Use ground wire to isolate the digital area from the analog area. The digital ground and analog ground should be separated and finally connected to the power ground at one point. The same principle applies to the wiring of A/D and D/A chips.
- The ground wires of the microcontroller and high-power devices should be grounded separately to reduce mutual interference. High-power devices should be placed at the edge of the circuit board as much as possible.
- 在单片机I/O口、电源线、电路板连接线等关键地方使用抗干扰元件如磁珠、磁环、电源滤波器、屏蔽罩,可显著提高电路的抗干扰性能。
3. Improving the anti-interference performance of sensitive devices Improving the anti-interference performance of sensitive devices means minimizing the pickup of interference noise from the perspective of sensitive devices, and recovering from abnormal conditions as quickly as possible.
Common measures to improve the anti-interference performance of sensitive devices are as follows:
- When wiring, try to minimize the area of the loop to reduce inductive noise.
- When wiring, the power line and ground line should be as thick as possible. In addition to reducing the voltage drop, it is more important to reduce the coupling noise.
- For the idle I/O ports of the microcontroller, do not leave them floating, but connect them to ground or power. The idle terminals of other ICs should be connected to ground or power without changing the system logic.
- Using power monitoring and watchdog circuits on microcontrollers, such as IMP809, IMP706, IMP813, X5043, X5045, etc., can greatly improve the anti-interference performance of the entire circuit.
- On the premise that the speed can meet the requirements, try to reduce the crystal oscillator of the microcontroller and use low-speed digital circuits.
- Try to solder IC devices directly on the circuit board and use IC sockets less often.
4. Other common anti-interference measures
- Use inductor and capacitor filtering at the AC end to remove high-frequency and low-frequency interference pulses.
- Transformer double isolation measures: A capacitor is connected in series to the primary input end of the transformer, the shielding layer between the primary and secondary coils and the center point of the primary capacitor are connected to the ground, and the secondary outer shielding layer is connected to the printed circuit board ground. This is a key means of hardware anti-interference.
- Add low-pass filter on the secondary side: absorb the surge voltage generated by the transformer.
- Adopt integrated DC regulated power supply: because it has over-current, over-voltage, over-heating and other protections.
- The I/O ports are isolated by photoelectric, magnetic and relay, and the common ground is removed.
- Use twisted pair cables for communication lines: eliminate parallel mutual inductance.
- Optical fiber isolation is the most effective way to protect against lightning.
- Use isolation amplifiers or on-site conversion for A/D conversion: reduce errors.
- The outer shell is connected to the ground to ensure personal safety and prevent external electromagnetic field interference.
- Add a reset voltage detection circuit to prevent the CPU from working due to insufficient reset, especially for devices with EEPROM, as insufficient reset will change the contents of the EEPROM.
Printed circuit board process anti-interference:
- The power cord is thickened, routed and grounded properly, and the three buses are separated to reduce mutual inductance oscillation.
- For main chips such as CPU, RAM, ROM, etc., electrolytic capacitors and ceramic capacitors are connected between VCC and GND to remove high and low frequency interference signals.
- Independent system structure reduces connectors and wiring, improves reliability and reduces failure rate.
- The integrated block should be in reliable contact with the socket, and a double-spring socket should be used. It is best to solder the integrated block directly to the printed circuit board to prevent poor contact failure of the device.
- If conditions permit, use a printed circuit board with more than four layers, with the middle two layers being the power supply and ground.
Previous article:How to add STC device list in KEIL and make it coexist with the built-in device list
Next article:MCU power management register PCON
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- 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)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- 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
Guess you like
- 【NXP Rapid IoT Review】 NO2. Experience Sharing of Mobile App BLE Control Development Kit
- What is the role of Zigbee wireless data transmission module in wireless personal area network?
- Problems with STM32CubeMX generating serial port 1 interrupt initialization code
- What is unity gain frequency?
- TI 2803x DSP chip LIN communication baud rate adaptation
- Are UWB devices the future trend?
- Please tell me what's going on.
- I'm a novice and I need help on how to install Grace on CCS10. Thanks in advance.
- DCA1000EVM User Guide
- When designing Cadence PCB, after setting the large cross cursor, the cursor cannot be seen. When setting it to a small cursor, it is normal. What is the reason?