The anti-interference measures of the microcontroller itself
In order to improve the reliability of the MCU itself, in recent years, MCU manufacturers have taken a series of measures in MCU design to improve reliability. These technologies are mainly reflected in the following aspects.
1. Reduce the external clock frequency
The external clock is a high-frequency noise source. In addition to causing interference to the application system, it may also cause interference to the outside world, making the electromagnetic compatibility test fail to meet the standards. In application systems that require high system reliability, the selection of low-frequency microcontrollers is one of the principles for reducing system noise. Taking the 8051 microcontroller as an example, when the shortest instruction cycle is 1μs, the external clock is 12MHz. The system clock of the Motorola microcontroller with the same speed only needs 4MHz, which is more suitable for industrial control systems. In recent years, some manufacturers of 8051 compatible microcontrollers have also adopted some new technologies to reduce the demand for external clocks to 1/3 of the original without sacrificing computing speed. The Motorola microcontrollers generally use internal phase-locked loop technology in the newly launched 68HC08 series and its 16/32-bit microcontrollers, reducing the external clock frequency to 32KHz, while the internal bus speed is increased to 8MHz or even higher.
2. Low noise series microcontroller
In traditional integrated circuit design, the power supply and ground are usually arranged on two symmetrical sides. For example, the lower left corner is the ground, and the lower right corner is the power supply. This allows the power supply noise to pass through the entire silicon chip. The improved technology arranges the power supply and ground on two adjacent pins, which reduces the current passing through the entire silicon chip on the one hand, and makes it easier to arrange external decoupling capacitors on the PCB design to reduce system noise. Another example of reducing noise in integrated circuit design is the design of the drive circuit. Some microcontrollers provide several high-current output pins, ranging from tens of milliamperes to hundreds of milliamperes. These high-power drive circuits integrated into the microcontroller will undoubtedly increase the noise source. The softening technology of the jump edge can eliminate this effect. The method is to make a high-power tube into several small tubes in parallel, and then connect a resistor with different equivalent resistance values to the output end of each tube. To reduce di/dt.
3. Clock monitoring circuit, watchdog technology and low voltage reset
Monitoring the system clock and generating a system reset signal to restore the system clock when the system clock stops is one of the measures to improve the reliability of the microcontroller. However, the clock monitoring is effective and the power saving instruction STOP is a contradiction. Only one of them can be used.
Watchdog technology monitors the running status of a timer interrupt service program in the application program. When this program does not work, it is judged as a system failure, thereby generating a system reset.
The low voltage reset technology monitors the power supply voltage of the microcontroller and generates a reset signal when the voltage is lower than a certain value. With the development of microcontroller technology, the microcontroller itself has wider and wider requirements for the power supply voltage range. The power supply voltage has dropped from 5V to 3.3V and continued to drop to 2.7V, 2.2V, and 1.8V. Whether to use the low voltage reset function should be weighed according to the specific application situation.
4. EFT Technique
The recently launched Motorola M68HC08 series microcontroller uses EFT (Electrical Fast Transient) technology to further improve the anti-interference ability of the microcontroller. When the sine wave signal of the oscillation circuit is interfered by the outside world, some glitches will be superimposed on its waveform. When the Schmitt circuit is used to shape it, this glitches will become trigger signals to interfere with the normal clock signal. Alternating the Schmitt circuit and RC filtering can make this kind of glitches ineffective. This is the EFT technology. With the continuous development of VLSI technology, the anti-interference technology inside the circuit is also developing continuously.
5. Software measures
The microcontroller itself also has some anti-interference considerations in the instruction design. Illegal instruction reset or illegal instruction interrupt is when an illegal instruction or illegal addressing space is encountered during program execution, which can generate a reset or interrupt. The microcontroller application system program is written in advance, and there is no possibility of illegal instructions or addressing. It must be that the system is disturbed and the CPU makes an error when reading the instruction.
The above mentioned are the internal anti-interference measures that the currently widely used single-chip microcomputers should have. When selecting a single-chip microcomputer, it is necessary to check whether these performances are all present in order to design a highly reliable system.
In terms of application software design, designers have their own experience. Here we should remind you to deal with the unused ROM at the end. The principle is that if the program falls here, it can be self-recovered.
Interference suppression components for single-chip microcomputer systems
1. Decoupling capacitors
A decoupling capacitor should be configured between the power supply and ground of each integrated circuit, which can filter out the high-frequency noise from the power supply. As an energy storage element, it absorbs or provides the current change (di/dt) caused by the conduction and cutoff of the internal transistor of the integrated circuit, thereby reducing the system noise. Monolithic capacitors or ceramic capacitors with good high-frequency characteristics should be selected as decoupling capacitors. A large-capacity energy storage capacitor should be placed at the place where the power supply of each printed circuit board is introduced. Due to the winding structure of the electrolytic capacitor, its distributed inductance is large and it has almost no effect on filtering high-frequency interference signals. It should be used in pairs with decoupling capacitors. Tantalum capacitors are more effective than electrolytic capacitors.
2. Inductance that suppresses high frequencies
A high-frequency choke device is formed by inserting a thick enameled wire into a ferrite core with several holes in the axial direction. Inserting it in series with the power line or ground line can prevent high-frequency signals from being introduced from the power/ground line. This component is particularly suitable for separating the power supply of the analog circuit area, digital circuit area, and high-power drive area on a printed circuit board. It should be noted that it must be placed between the energy storage capacitor and the power supply in this area and cannot be placed between the energy storage capacitor and the electrical device.
3. Resettable fuse
This device is made of a new type of polymer material. When the current is lower than its rated value, its DC resistance is only a few tenths of an ohm. When the current reaches a certain level, its resistance rises rapidly, causing heat, and the higher the heat, the greater the resistance, thus blocking the power supply current. When the temperature drops, it can automatically return to normal. This device can prevent the CMOS device from causing the so-called "silicon controlled triggering" phenomenon when encountering strong impact interference. This phenomenon refers to the substrate of the integrated circuit silicon chip becoming conductive, causing the current to increase, causing the CMOS integrated circuit to heat up or even burn out. [page]
4. Lightning protection devices
For single-chip computer systems used outdoors or power lines and signal lines that are introduced from the outdoors to indoors, the lightning protection of the system must be considered. Common lightning protection devices include: gas discharge tubes, TVS (Transient Voltage Supervention), etc. When the power supply voltage of the gas discharge tube is greater than a certain value, usually tens of volts or hundreds of volts, the gas breaks down and discharges, and the strong impulse pulse on the power line is introduced 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 of the circuit is higher than a certain rated value. Its characteristic is that it can pass hundreds or even thousands of amperes of current in a transient state. This type of component should be used in conjunction with inductors that are resistant to common mode and differential mode interference to improve the anti-interference effect.
The main means to improve the anti-interference ability of single-chip microcomputer system
1. Grounding
The grounding here refers to the earth, also known as the protective ground. Providing a good ground wire for the microcontroller system is extremely beneficial to improving the system's anti-interference ability. Especially for systems with lightning protection requirements, good grounding is essential. The series of anti-interference components mentioned above are intended to remove lightning strikes, surge interference, and fast pulse group interference, and the method of removal is to introduce interference into the earth. If the system is not grounded, or there is a ground wire but the grounding resistance is too large, these components will not work. The ground of the power supply for the microcontroller is commonly known as the logic ground. Their relationship with the earth's ground can be connected, floating, or connected to a resistor, depending on the application. The ground wire cannot be connected to the heating pipe casually. The ground wire must never be confused with the live wire and the neutral wire of the power line.
2. Isolation and shielding
Typical signal isolation is photoelectric isolation. Photoelectric isolation devices are used to isolate the input and output of the microcontroller. On the one hand, interference signals cannot enter the microcontroller system, and on the other hand, the noise of the microcontroller system itself will not be transmitted in a conductive manner. Shielding is used to isolate space radiation. For components with particularly large noise, such as switching power supplies, metal boxes can be used to cover them to reduce the interference of noise sources on the microcontroller system. Analog circuits that are particularly afraid of interference, such as highly sensitive weak signal amplification circuits, can be shielded. What is important is that the metal shield itself must be connected to the real ground.
3. Filtering
Filtering refers to the classification of various signals according to their frequency characteristics and the control of their direction. Commonly used are various low-pass filters, high-pass filters, and band-pass filters. Low-pass filters are used on connected AC power lines to allow 50-cycle AC power to pass smoothly and conduct other high-frequency noise into the earth. The configuration indicator of the low-pass filter is the insertion loss. If the insertion loss of the selected low-pass filter is too low, it will not have the effect of suppressing noise, and too high insertion loss will cause "leakage" and affect the personal safety of the system. High-pass and band-pass filters should be selected according to the signal processing requirements in the system.
Wiring and process of printed circuit boards
The design of the printed circuit board is very important for the anti-interference of the single-chip microcomputer system. The three principles of controlling the noise source as much as possible, reducing the propagation and coupling of noise as much as possible, and reducing the absorption of noise as much as possible should be followed when designing the printed circuit board and wiring. When you design a printed circuit board for a single-chip microcomputer, you may wish to check the following items.
Printed circuit boards should be divided reasonably. Single-chip microcomputer systems can usually be divided into three areas, namely, analog circuit area (afraid of interference), digital circuit area (afraid of interference and also generates interference), and power drive area (interference source).
The printed circuit board is powered by a single point power supply and a single point grounding principle. The power lines and ground lines of the three areas are led out from this point in three ways. Noise components and non-noise components should be kept far away.
· Clock oscillation circuits and special high-speed logic circuits are partially coiled with a ground coil to make the surrounding electric field approach zero.
Place I/O driver components and power amplifier components as close to the edge of the printed circuit board as possible, close to the lead-out connectors.
Don’t use high-speed devices if low-speed devices can be used. High-speed devices are only used in critical places.
Use the lowest frequency clock that meets the system requirements, and place the clock generator as close as possible to the device that uses the clock.
The quartz crystal oscillator housing should be grounded, and the clock line should be as short as possible and not lead everywhere.
Use 450° zigzag wiring instead of 900° zigzag wiring to reduce the emission of high-frequency signals.
For single-sided and double-sided boards, the power and ground wires should be as thick as possible. The number of vias for signal lines should be as small as possible.
·4-layer boards have 20dB lower noise than double-layer boards. 6-layer boards have 10dB lower noise than 4-layer boards. Use multi-layer boards when economic conditions permit.
The key wires should be as short and thick as possible, and protective ground should be added on both sides. If sensitive signals and noise field band signals are led out through a flat ribbon cable, they should be led out in the form of ground wire-signal-ground wire...
The ground area should be increased under the quartz oscillator and noise-sensitive devices instead of other signal lines.
Do not form a loop for any signal line. If it is unavoidable, the loop should be as small as possible.
The clock line perpendicular to the I/O line will cause less interference than the clock line parallel to the I/O line. The clock line should be kept away from the I/O line.
For A/D devices, it is better to bypass the digital part and the analog part rather than cross them. Noise-sensitive lines should not be parallel to high-speed lines or high-current lines.
· For microcontrollers and other IC circuits, if there are multiple power supplies and ground terminals, a decoupling capacitor should be added to each terminal.
I/O ports not used by the microcontroller should be defined as outputs.
Each integrated circuit should add a decoupling capacitor, and a monolithic ceramic capacitor with good high-frequency signal should be selected as the decoupling capacitor. When the decoupling capacitor is soldered on the printed circuit board, the pins should be as short as possible.
Signals from high noise areas should be filtered. Discharge diodes should be added to relay coils. A resistor can be connected in series to soften the I/O line transition edge or provide a certain amount of damping.
Use large-capacity tantalum capacitors or polyester capacitors instead of electrolytic capacitors as energy storage capacitors for circuit charging. Because electrolytic capacitors have large distributed inductance, they are ineffective for high frequencies. When using electrolytic capacitors, use them in pairs with high-performance decoupling capacitors.
When necessary, high-frequency choke devices made of ferrite wound with copper wire can be added to the power line and ground line to block the conduction of high-frequency noise.
Weak signal lead wires, high frequency, and high power lead cables should be shielded. The lead wires and ground wires should be twisted together.
When the printed circuit board is too large or the signal line frequency is too high, making the delay time on the line greater than or equal to the signal rise time, the line should be treated as a transmission line and a terminal matching resistor should be added.
·Try not to use IC sockets and solder the IC directly to the printed board. The IC socket has a large distributed capacitance.
Previous article:Concepts that are difficult for microcontroller beginners to grasp
Next article:Watchdog timer special function register and example software design
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Request a free ZVS buck-boost evaluation board!
- bq30z50/55 senc file export configuration process
- Three-cell lithium battery charging management IC-VAS5176 charging current test
- Can't find header file when compiling
- RTC timekeeping function + GPIO control LCD12864 display
- On-chip memory resources of RSL10
- UART Protocol Timing Summary
- NXP Smart Car Northeast Competition First Prize, we will open source after the competition
- Non-inverting proportional amplifier feedback resistor setting
- I encountered a problem about Keil today