Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Introduction of common methods of hardware anti-interference in single chip microcomputer system
Introduction of common methods of hardware anti-interference in single chip microcomputer system
Introduction of common methods of hardware anti-interference in single chip microcomputer system

The main factors affecting the reliable and safe operation of single chip microcomputer system mainly come from various electrical interferences inside and outside the system, and are influenced by system structure design, component selection, installation and manufacturing technology. All these constitute the interference factors of the single-chip microcomputer system, which will often lead to the abnormal operation of the single-chip microcomputer system, affect the product quality and output, and even lead to accidents and major economic losses. Today, I will introduce you to the common methods of hardware anti-interference of single chip microcomputer system. Let's have a look.

There are three basic elements that form interference:

(1) interference source. Refers to the components, equipment or signals that cause interference, which are described in mathematical language as follows: du/dt,

The place where di/dt is large is the interference source. Such as lightning, relays, thyristors, motors, high-frequency clocks, etc. May become a source of interference.

(2) the propagation path. Refers to the path or medium in which interference propagates from interference source to sensitive equipment. The typical interference propagation paths are conducted through wires and radiated in space.

(3) Sensitive devices. Refers to objects that are easily disturbed. Such as: A/D, D/A converter, single chip microcomputer, digital integrated circuit, weak signal amplifier, etc.

Classification of interference

1. 1 Classification of interference

There are many kinds of classification of interference, which can usually be classified according to the causes of noise, conduction mode, waveform characteristics and so on. According to the reason:

It can be divided into discharge noise, high frequency oscillation noise and surge noise.

According to the conduction mode, it can be divided into * * * mode noise and series mode noise.

According to waveform: it can be divided into continuous sine wave, pulse voltage and pulse sequence.

Coupling mode of 1.2 interference

The interference signal generated by interference sources only acts on the measurement and control system through a certain coupling channel. Therefore, it is necessary for us to look at the propagation mode between the interference source and the disturbed object. Interference coupling mode is nothing more than through wires, space, public lines and so on. , and then subdivided, there are mainly the following:

(1) 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. For this form, the most effective method is to add decoupling circuit.

(2) Common impedance coupling: This is also a common coupling method, which often appears when the current paths of two circuits are the same. In order to prevent this coupling, it is usually considered in circuit design. There is no common impedance between the interference source and the disturbed 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 kind of coupling is purely resistive and will happen when the insulation is not good.

2 Common hardware anti-interference technology

Aiming at the three factors that cause interference, anti-interference measures mainly include the following means.

2. 1 Suppression of interference sources

Suppressing interference sources means reducing du/dt and di/dt of interference sources as much as possible. This is the most priority and important principle in anti-jamming design, which often gets twice the result with half the effort. Reducing the du/dt of the interference source is mainly achieved by connecting capacitors in parallel at both ends of the interference source. Reducing the di/dt of the interference source is realized by connecting an inductor or a resistor in series with the interference source loop and adding a freewheeling diode.

Common measures to suppress interference sources are as follows:

(1) Add a freewheeling diode in the relay coil to eliminate the back electromotive force interference when the coil is disconnected. Only adding freewheeling diode will delay the turn-off time of relay, and the relay can act more times per unit time after Gazzina diode.

(2) Connect spark suppression circuits (generally RC series circuits, with a resistance of several K to several tens K and a capacitance of 0.0 1uF) in parallel at both ends of relay contacts to reduce the impact of electric sparks.

(3) Add a filter circuit to the motor, and pay attention to the capacitor and inductor leads as short as possible.

(4) Each IC on the circuit board should be connected in parallel with 0.0 1 μ f ~ 0. 1.

μF high frequency capacitor, reducing the influence of IC on power supply. Pay attention to the wiring of high frequency capacitors. Wiring should be close to the power terminal and as short as possible. Otherwise, it will increase the equivalent series resistance of the capacitor and affect the filtering effect.

(5) Avoid 90-degree disconnection during wiring to reduce high-frequency noise emission.

(6) RC suppression circuits are connected in parallel at both ends of the thyristor to reduce the noise generated by the thyristor (this noise may break down the thyristor when it is serious).

Anti-interference measures of single chip microcomputer;

In order to improve the reliability of the single chip microcomputer itself. In recent years, in order to improve the reliability, SCM manufacturers have taken a series of measures in the design of SCM. These technologies are mainly embodied in the following aspects.

1. Reduce the external clock frequency

The external clock is a high-frequency noise source, which will not only interfere with this application system, but also may interfere with the outside world, making the electromagnetic compatibility detection not up to standard. In the application system that requires high system reliability, choosing low-frequency single chip microcomputer is one of the principles to reduce system noise. Take 805 1 single chip microcomputer as an example. When the shortest instruction cycle is 1μs, the external clock is 12mhz. The clock of Motorola single chip microcomputer system with the same speed only needs 4mhz, which is more suitable for industrial control system. In recent years, some manufacturers of 805 1 compatible single-chip computers have also adopted some new technologies to reduce the demand for external clocks to 1/3 without sacrificing the operation speed. However, Motorola single-chip microcomputer generally adopts internal phase-locked loop technology in the newly introduced 68hc08 series and its 16/32-bit single-chip microcomputer, which reduces the external clock frequency to 32khz and increases the internal bus speed to 8mhz or even higher.

2. Low noise series single chip microcomputer

In traditional integrated circuit design, power supply and ground are usually arranged on both sides of symmetry. For example, the lower left corner is ground and the lower right corner is power supply. This allows power supply noise to pass through the entire silicon wafer. The improved technology arranges power supply and ground on two adjacent pins, which on the one hand reduces the current through the whole silicon chip, on the other hand, it is easier to arrange external decoupling capacitors in pcb design and reduce system noise. Another example of reducing noise in integrated circuit design is the design of driving circuit. Some single-chip computers provide several output pins with high current, ranging from tens of milliamps to hundreds of milliamps. These high-power driving circuits are integrated into the single chip microcomputer, which undoubtedly increases the noise source. Edge-jumping softening technology can eliminate this influence. A high-power tube is connected in parallel into several small tubes, and then resistors with different equivalent resistance values are connected at the output end of each tube. Reduce di/dt.

3. Clock monitoring circuit, watchdog technology and low voltage reset.

It is one of the measures to improve the reliability of single chip microcomputer system to monitor the system clock and generate a system reset signal to restore the system clock when it is found that the system clock stops oscillating. There is a contradiction between the effective clock monitoring and the stop of power saving instruction. Only one of them can be used.

Watchdog technology is to monitor the running state of a timed interrupt service program in an application program. When this program does not work, it is judged as a system failure, thus generating a system reset.

Low-voltage reset technology is to monitor the power supply voltage of single chip microcomputer and generate reset signal when the voltage is lower than a certain value. Due to the development of single chip microcomputer technology, the requirements of single chip microcomputer itself for power supply voltage range are getting wider and wider. The power supply voltage dropped from the original 5v to 3.3v, and continued to drop to 2.7v, 2.2v,1.8V. Whether to use the low-voltage reset function should be weighed according to the specific application.

4. Electronic transfer technology

The newly introduced Motorola m68hc08 series single chip microcomputer adopts eft technology, which further improves the anti-interference ability of single chip microcomputer. When the sine wave signal of the oscillating circuit is disturbed by the outside world, some burrs will be superimposed on its waveform. After being shaped by Schmidt circuit, this burr will become a trigger signal and interfere with the normal clock signal. Alternating Schmidt circuit and rc filtering can make this burr fail, which is eft technology. With the development of vlsi technology, the anti-interference technology inside the circuit is also developing.

5. Software measurement

The MCU itself also has some anti-interference considerations in instruction design. Illegal instruction reset or illegal instruction interrupt is a reset or interrupt that may occur when an illegal instruction or illegal addressing space is encountered while running a program. Single chip microcomputer application system program is written in advance, and there can be no illegal instructions and addressing. The system must have been disturbed, and there was an error when the cpu read the instruction.

The above is the internal anti-interference measures that the widely used single chip microcomputer should have. When choosing a single chip microcomputer, it is necessary to check whether these performances are available, so as to design a highly reliable system.

Designers have their own experience in application software design. It should be reminded here that the unused rom should be disposed of at last. The principle is that if the program falls here, it can recover itself.

Interference suppression element for single chip microcomputer system

1. decoupling capacitor

A decoupling capacitor should be configured between the power supply and the ground of each integrated circuit to filter out the high-frequency noise of the power supply. As an energy storage element, it absorbs or provides the current change (di/dt) caused by the turn-on and turn-off of transistors in integrated circuits, thus reducing the system noise. Decoupling capacitors should be monolithic capacitors or ceramic chip capacitors with good high frequency characteristics. A large capacity storage capacitor should be placed at the power inlet of each printed circuit board. Because of the winding structure of electrolytic capacitor, its distributed inductance is large, which has little effect on filtering high-frequency interference signals. When used, it should be used in pairs with decoupling capacitors. Tantalum capacitor is better than electrolytic capacitor.

2. Suppress high-frequency inductance

The high-frequency choke coil device is composed of thick enameled wire penetrating into a ferrite core with several holes in the axial direction. Connecting it in series with the power line or ground line can prevent the introduction of high-frequency signals from the power line/ground line. This element is especially suitable for power supply in analog circuit area, digital circuit area and high power drive area on printed circuit board. It should be noted that it must be placed between the energy storage capacitor and the power supply in this area, not between the energy storage capacitor and the electrical equipment.

3. Self-recovery fuse

This device is made of a new polymer material. When the current is lower than its rated value, its DC resistance is only a few tenths of ohms. When the current reaches a certain level, its resistance rises rapidly, generating heat, and the thermoelectric resistance increases, thus blocking the power supply current. When the temperature drops, it can automatically return to normal. This device can prevent the so-called "SCR trigger" phenomenon when cmos devices encounter strong impact interference. This phenomenon means that the substrate of integrated circuit silicon wafer becomes conductive, which leads to the increase of current and the heating or even burning of cmos integrated circuits.

4. Lightning protection device

When the single-chip microcomputer system used outdoors or the power line and signal line are introduced indoors from the outdoor overhead, the lightning protection of the system should be considered. Commonly used lightning protection devices include: gas discharge tube, transient voltage suppressor (tvs), etc. When the power supply voltage is greater than a certain value, usually tens of volts or hundreds of volts, the gas is discharged by breakdown, and the strong impact pulse on the power supply line is introduced into the earth. TVS can be regarded as two parallel Zener diodes with opposite directions. When the voltage across the power supply is higher than a certain rating, they will turn on. Its characteristic is that it can instantly pass hundreds or even thousands of amperes of current. This kind of components should be used in conjunction with inductors that resist * * * 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. Ground

Grounding here refers to the earth, also known as protected land. Providing a good ground wire for single chip microcomputer system is very beneficial to improve the anti-interference ability of the system. Especially for systems with lightning protection requirements, good grounding is very important. A series of anti-interference components mentioned above are intended to remove lightning strike, surge interference and fast pulse group interference, and the removal method 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 power supply ground of single chip microcomputer is commonly called logical ground, and their relationship with ground can be connected, floated or connected with a resistor, depending on the application situation. You can't just connect the ground wire to the heating pipe. Never confuse the ground wire with the zero wire in the live wire and zero wire of the power wire.

2. Isolation and shielding

Typical signal isolation is photoelectric isolation. Using photoelectric isolation devices to isolate the input and output of single chip microcomputer, on the one hand, interference signals cannot enter the single chip microcomputer system, on the other hand, the noise of the single chip microcomputer system itself will not spread out in a conductive way. Shielding is used to isolate space radiation, and metal boxes are used to cover components with particularly high noise, such as switching power supply, which can reduce the interference of noise sources on single chip microcomputer system. Analog circuits that are particularly afraid of interference, such as high-sensitivity weak signal amplification circuits, can be shielded. It is important that the metal shield itself must be connected to the real ground.

filter

Filtering refers to classifying various signals according to their frequency characteristics and controlling their direction. Commonly used are various low-pass filters, high-pass filters and band-pass filters. The purpose of using low-pass filter on the connected AC power line is to let 50 cycles of AC pass smoothly and introduce other high-frequency noise into the earth. The configuration index of low-pass filter is insertion loss. The low insertion loss of the selected low-pass filter cannot suppress noise, while the high insertion loss will lead to "leakage" and affect the personal safety of the system. Qualcomm and bandpass filter should be selected and used according to the signal processing requirements in the system.

Wiring and technology of printed circuit board

The design of printed circuit board is very important for the anti-interference of single chip microcomputer system. Printed circuit boards and wiring should be designed according to three principles: controlling noise sources, minimizing noise transmission and coupling, and minimizing noise absorption. When you design a printed circuit board for a single chip microcomputer, don't violate the following rules for inspection.

Printed circuit boards should be reasonably distinguished. Single chip microcomputer system can usually be divided into three areas, namely, analog circuit area (afraid of interference), digital circuit area (afraid of interference and interference) and power drive area (interference source).

The printed board adopts the principle of single point power supply and single point grounding. The power and ground wires of the three areas are led out from this point in three ways. Noise elements and non-noise elements are further apart.

The clock oscillation circuit and the dedicated high-speed logic circuit are partially wound. Let the surrounding electric field approach zero. I/o drivers and power amplifiers should be as close as possible to the edge of the printed circuit board and lead-out connectors.

If you can use low speed, you don't need high speed. High-speed equipment is only used in key places.

Use the clock with the lowest frequency that meets the system requirements, and the clock generator should be as close as possible to the device using the clock.

The shell of quartz crystal oscillator should be grounded, and the clock line should be as short as possible, so don't draw everywhere.

45-degree broken line wiring is used instead of 90-degree broken line wiring to reduce the emission of high-frequency signals.

Single board, double board, power cord and ground wire should be as thick as possible. There should be as few vias for signal lines as possible.

The noise of laminated board is 20db lower than that of double board. The noise of 6-layer board is lower than that of 4-layer board 10db. Try to use multilayer boards when economic conditions permit. The key lines should be as short and thick as possible, with protected areas on both sides. If sensitive signals and noise band signals are led out through flat ribbon cables, they should be led out in the way of grounding wire-signal-grounding wire. The area of ground wire should be increased instead of other signal wires under the condition of synchronous oscillator and noise sensitive devices. The signal line should not form a loop. If it is unavoidable, the cycle should be as small as possible. The clock line perpendicular to the i/o line has less interference than that parallel to the i/o line, and the clock line should be far away from the i/o line. For class a/d devices, the digital part and the analog part would rather bypass than cross. Noise sensitive lines should not be parallel to high-speed lines and high-current lines. If there are multiple power supply and grounding terminals in ic circuits such as single chip microcomputer, each terminal should be added with a decoupling capacitor. I/o ports not used by single chip microcomputer should be defined as output. Each integrated circuit needs to add a decoupling capacitor, and the decoupling capacitor is a monolithic capacitive ceramic chip capacitor with good high-frequency signal. When the decoupling capacitor is soldered on the printed circuit board, the pin should be as short as possible. Signals from high noise areas should be filtered. A discharge diode should be added to the relay coil. A series resistor can be used to soften the transition edge of i/o line or provide some damping. Use large-capacity tantalum capacitor or polyester capacitor instead of electrolytic capacitor to charge the circuit. Because the distributed inductance of electrolytic capacitor is large, it is ineffective for high frequency. When electrolytic capacitors are used, they should be used in pairs with decoupling capacitors with high characteristics. If necessary, a high-frequency choke device made of ferrite wound copper wire can be installed on the power line and grounding line to block the conduction of high-frequency noise. Weak signal outgoing lines and high-frequency high-power outgoing cables should be shielded. Lead wire and ground wire should be twisted. When the printed circuit board is too large or the signal line frequency is too high, so that the delay time on the line is 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 on the printed board, because the distributed capacitance of ic sockets is very large.

2.2 Cut off the interference propagation path

According to the propagation path of interference, it can be divided into conduction interference and radiation interference.

Conducted interference refers to interference that propagates to sensitive equipment through wires. The frequency band of high frequency interference noise is different from that of useful signal. The transmission of high-frequency interference noise can be cut off by adding a filter on the wire, and sometimes it can be solved by adding an isolated optical coupler. Power supply noise is the most harmful, so special attention should be paid to handling it.

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 interference sources and sensitive equipment, isolate them with ground lines, and add shielding to sensitive equipment.

Common measures to cut off the propagation path of interference are as follows:

(1) Fully consider the influence of power supply on single chip microcomputer. When the power supply is completed, the anti-interference of the whole circuit is solved by more than half. Many single-chip computers are sensitive to power supply noise, so it is necessary to add filter circuits or voltage regulators to the power supply of single-chip computers to reduce the interference of power supply noise to single-chip computers. For example, the π -shaped filter circuit can be composed of magnetic beads and capacitors. Of course, when the conditions are not high, you can use100Ω resistor instead of magnetic beads.

(2) If I/O port of single chip microcomputer is used to control noise equipment such as motor, isolation should be added between I/O port and noise source (π-shaped filter circuit should be added).

(3) Pay attention to the wiring of the crystal oscillator. The crystal oscillator is as close as possible to the pin of the single chip microcomputer, the clock area is isolated by ground wire, and the crystal oscillator shell is grounded and fixed.

(4) Reasonable division of the circuit board, such as strong and weak signals, digital signals and analog signals. Try to keep interference sources (such as motors and relays) away from sensitive components (such as single chip microcomputer).

(5) Separate the digital area from the analog area by grounding wire. Digital ground should be separated from analog ground and finally connected to power ground at one point. The wiring of A/D and D/A chips is also based on this principle.

(6) The grounding wires of single-chip microcomputer and high-power devices should be grounded separately to reduce mutual interference. High-power devices should be placed on the edge of the circuit board as far as possible.

(7) Anti-interference components such as magnetic beads, magnetic rings, power filter and shielding cover are used in key places such as I/O port of single chip microcomputer, power supply line and circuit board connection line, which can significantly improve the anti-interference performance of the circuit.

2.3 Improve the anti-interference performance of sensitive devices

Improving the anti-interference performance of sensitive devices refers to the method of minimizing the pick-up of interference noise and recovering from the abnormal state of sensitive devices as soon as possible.

Common measures to improve the anti-interference performance of sensitive equipment are as follows:

(1) wiring, reduce the loop area as much as possible to reduce the induced noise.

(2) When wiring, the power cord and ground wire should be as thick as possible. Besides reducing the pressure drop, it is more important to reduce the coupling noise.

(3) For the idle I/O port of the single chip microcomputer, don't hang in the air, but be grounded or connected to the power supply. Without changing the system logic, the idle terminals of other IC are grounded or connected to the power supply.

(4) Using the power monitoring and watchdog circuit of single chip microcomputer, such as IMP809, IMP706, IMP8 13,

X5043, X5045, etc. The anti-interference performance of the whole circuit can be greatly improved.

(5) On the premise that the speed can meet the requirements, try to reduce the crystal oscillator of the single chip microcomputer and choose low-speed digital circuits.

(6)IC devices should be directly soldered on the circuit board as far as possible, and IC seats should be used less.

2.4 Other common anti-interference measures

(1) AC terminal inductance and capacitance filtering: removing high-frequency and low-frequency interference pulses.

(2) Double isolation measures of transformer: the primary input of transformer is connected with capacitor in series, the central contact point between primary and secondary windings and primary capacitor is grounded, and the secondary outer shield is grounded to printed board, which is the key means of hardware anti-interference. Secondary plus low-pass filter: absorbs the surge voltage generated by transformer.

(3) Integrated DC regulated power supply is adopted, which has the functions of over-current, over-voltage and overheating protection.

(4)I/O ports are isolated by photoelectric, magnetoelectric and relay, and the common ground is removed.

(5) Twisted pair for communication lines: eliminating parallel mutual inductance.

(6) Optical fiber isolation is the most effective lightning protection measure.

(7) Isolation amplifier for A/D conversion or field conversion: reduce errors.

(8) Enclosure grounding: to solve personal safety and prevent external electromagnetic interference.

(9) Add reset voltage detection circuit. In order to prevent insufficient reset, CPU will work, especially for devices with EEPROM. Insufficient reset will change the contents of EEPROM.

(10) PCB process anti-interference;

(1) the power cord should be thick, wiring and grounding should be correct, and the three buses should be separated to reduce mutual inductance oscillation.

(2) CPU, RAM, ROM and other major chips. Electrolytic capacitor and ceramic capacitor are connected between VCC and GND to eliminate high and low frequency interference signals.

③ Independent system structure, reducing connectors and wires, improving reliability and reducing failure rate.

(4) The integrated block is in reliable contact with the socket, and a double-spring socket is adopted, preferably the integrated block is directly welded on the printed board to prevent the equipment from failing due to poor contact.

⑤ Conditionally use more than four layers of printed boards, with the middle two layers being power supply and grounding.

;