The hardware circuit design of a single-chip microcomputer application system includes two parts: one is system expansion, that is, when the functional units inside the single-chip microcomputer, such as ROM, RAM, I/O, timer/counter, interrupt system, etc., cannot meet the requirements of the application system, they must be expanded outside the chip, and appropriate chips must be selected and corresponding circuits designed. The second is system configuration, that is, peripheral devices such as keyboards, monitors, printers, A/D, D/A converters, etc. must be configured according to the system functional requirements, and appropriate interface circuits must be designed.
The expansion and configuration of the system should follow the following principles:
1. Choose typical circuits as much as possible and conform to the conventional usage of single-chip microcomputers to lay a good foundation for the standardization and modularization of hardware systems.
2. 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.
3. The hardware structure should be considered together with the application software solution. The hardware structure and software solution will have mutual influence. The consideration principle is: the 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.
4. The performance of related devices in the system should be matched as much as possible. For example, when a CMOS chip single chip is used to form a low-power system, all chips in the system should be low-power products as much as possible.
5. Reliability and anti-interference design are an indispensable part of hardware design, which includes chip, device selection, decoupling filtering, printed circuit board wiring, channel isolation, etc.
6. When there are many peripheral circuits of the microcontroller, 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.
7. Try to design the hardware system in the direction of "single chip". The more system components there are, the stronger the mutual interference between the 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, a true system-on-chip SoC can be realized. For example, the μPSD32×× series products recently launched by ST integrate an 80C32 core, a large-capacity FLASH memory, SRAM, A/D, I/O, two serial ports, a watchdog, a 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:
(1) Interference source. Refers to the components, equipment or signals that generate interference. It can be described in mathematical terms 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 all become interference sources.
(2) 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.
(3) 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.
1 Classification of interference
There are many types of interference, which can usually be divided into discharge noise, high-frequency oscillation noise, and surge noise according to the cause of the noise, conduction method, waveform characteristics, etc.
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 and so on.
2 Interference coupling mode
The interference signal generated by the interference source affects the measurement and control system through a certain coupling channel. Therefore, it is necessary to look at the transmission method between the interference source and the interfered object. The coupling method of interference is nothing more than through wires, space, common lines, etc., which can be broken down into the following types:
(1) Direct coupling:
This is the most direct way and the most common way in the system. For example, the interference signal invades the system through the power line. For this form, the most effective way is to add a decoupling circuit. This can effectively suppress it.
(2) Common impedance coupling:
This is also a common coupling mode, 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, so that there is no common impedance between the interference source and the interfered object.
(3) Capacitive coupling:
Also known as electric field coupling or electrostatic coupling. It is the coupling caused by the existence of distributed capacitance.
(4) Electromagnetic induction coupling:
Also known as magnetic field coupling. It is the coupling caused by distributed electromagnetic induction.
(5) Leakage coupling:
This coupling is purely resistive and occurs when the insulation is poor.
Commonly used hardware anti-interference technology
In response to the three factors that cause interference, the following anti-interference measures are mainly adopted.
1. Suppress 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, which 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:
(1) Add a freewheeling diode 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. Adding a voltage regulator diode
The rear relay can operate more times per unit time.
(2) 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 across the relay contacts to reduce the impact of sparks.
(3) Add a filter circuit to the motor, and make sure the leads of the capacitor and inductor are as short as possible.
(4) 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.
(5) Avoid 90-degree bends when wiring to reduce high-frequency noise emissions.
(6) Connect an RC suppression circuit 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 transmission 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 should be handled with special attention.
The so-called radiation interference refers to the interference that propagates 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 a ground wire, and add a shield to the sensitive device.
Common measures to cut off interference propagation paths are as follows:
(1) Fully consider the impact of the power supply on the microcontroller. If the power supply is well made, the anti-interference of the entire circuit will be largely solved.
Many microcontrollers are very sensitive to power supply noise. It is necessary to add a filter circuit or voltage stabilizer to the microcontroller power supply to reduce the interference of power supply noise on the microcontroller. 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.
(2) 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).
(3) Pay attention to the crystal oscillator wiring. The crystal oscillator and the microcontroller pins should be as close as possible, the clock area should be isolated with a ground wire, and the crystal oscillator housing should be grounded and fixed.
(4) 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.
(5) 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 A/D and D/A chip wiring.
(6) 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.
(7) Using anti-interference components such as magnetic beads, magnetic rings, power filters, and shielding covers in key places such as microcontroller I/O ports, power lines, and circuit board connecting lines can significantly improve the anti-interference performance of the circuit.
3. Improve the anti-interference performance of sensitive devices
Improving the anti-interference performance of sensitive devices means minimizing the pickup of interference noise from the sensitive devices' side, and recovering from abnormal conditions as quickly as possible.
Common measures to improve the anti-interference performance of sensitive devices are as follows:
(1) When wiring, try to minimize the area of the loop to reduce induced noise.
(2) 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.
(3) 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.
(4) Using power supply 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.
(5) 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.
(6) Try to solder IC devices directly onto 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: eliminate parallel mutual inductance. Optical fiber isolation is the most effective for lightning protection.
Use isolation amplifier for A/D conversion or adopt on-site conversion to reduce errors. Connect the shell to the ground to ensure personal safety and prevent external electromagnetic interference.
Add a reset voltage detection circuit to prevent the CPU from working due to insufficient reset, especially for devices with EEPROM, where insufficient reset will change the contents of the EEPROM.
Printed circuit board process anti-interference:
① Thicken the power cord, route and ground it properly, and separate the three buses to reduce mutual inductance oscillation.
②For main chips such as CPU, RAM, ROM, etc., connect electrolytic capacitors and ceramic capacitors between VCC and GND to remove high and low frequency interference signals.
③Independent system structure, reducing connectors and connections, improving reliability and reducing failure rate.
④ The integrated block has reliable contact with the socket, using a double-spring socket. 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 four or more layers, with the middle two layers being the power supply and ground.
Previous article:Detailed explanation of anti-interference design of single-chip microcomputer system
Next article:Introduction to methods for improving hardware reliability of single-chip microcomputer design
- Popular Resources
- Popular amplifiers
- Learn ARM development(15)
- 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)
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
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Parsing dsp c6000 MVK instructions
- ADI's award-winning live broadcast will start at 10:00 this morning: Voltage Reference Product Technology and Application Selection
- TGF4042 Function Signal Generator Evaluation: Waveform Superposition
- CircuitPython Show
- [Home Smart Lighting Control and Indoor Environment Monitoring System]--9. Single Node Bluetooth BLE Light Switch Design
- Semiconductor Device Physics (3rd Edition)
- How Qorvo implements 5G self-shielding technology
- What is the difference between the main control MCU and the touch control IC?
- Smart Electricity Meter
- TI battery protection and fuel gauge solutions explained