Anti-interference design of digital circuits and single-chip microcomputers

Publisher:幸福家庭Latest update time:2012-10-23 Source: 21IC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the design of electronic systems, in order to avoid detours and save time, the requirements for anti-interference should be fully considered and met, and anti-interference remedial measures should be avoided after the design is completed. There are three basic elements that form 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 refer to objects that are easily interfered with, such as A/D, D/A converters, single-chip microcomputers, digital ICs, weak signal amplifiers, etc.

The basic principle of anti-interference design is to suppress the interference source, cut off the interference propagation path, and improve the anti-interference performance of sensitive devices. (Similar to the prevention of infectious diseases)

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. After adding a voltage regulator diode, the 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 at both ends of the relay contact to reduce the impact of electric sparks.

(3) Add a filter circuit to the motor, and make sure the capacitor and inductor leads 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 is equivalent to increasing the equivalent series resistance of the capacitor, which will affect the filtering effect.

(5) Avoid 90-degree folds when wiring to reduce high-frequency noise emissions.

(6) 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).

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 the sensitive device through the wire. The frequency band of high-frequency interference noise is different from that of useful signals. 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, so special attention should be paid to its treatment. The so-called radiated interference refers to the interference transmitted to the sensitive device 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.

2 Common measures to cut off interference propagation paths are as follows:

(1) 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.

(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). 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. 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. This measure can solve many difficult problems.

(4) The circuit board should be partitioned reasonably, 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 A/D and D/A chip wiring also follows this principle. The manufacturer has taken this requirement into consideration when allocating the A/D and D/A chip pinouts.

(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 connection lines can significantly improve the circuit's anti-interference performance. [page]

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, X25043, X25045, 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 on the circuit board and use IC sockets less often.

Let me first talk about my experience in this area! Please correct me if I am wrong, and please feel free to contribute your good experience and insights!

Software:

1. I am used to clearing all unused code spaces to "0", because this is equivalent to NOP, which can be reset when the program runs out of control;

2. Add several NOPs before the jump instruction, the purpose is the same as 1;

3. When there is no hardware WatchDog, you can use software to simulate WatchDog to monitor the operation of the program;

4. When adjusting or setting the parameters of external devices, in order to prevent the external devices from making mistakes due to interference, the parameters can be resent regularly, so that the external devices can recover to the correct state as soon as possible;

5. For anti-interference in communication, data check bits can be added, and 2 out of 3 or 3 out of 5 strategies can be adopted;

6. When there are communication lines, such as I^2C, three-wire system, etc., in practice we find that setting the Data line, CLK line, and INH line to high is better than setting them to low in anti-interference effect.

Hardware:

1. The ground wire and power wire are definitely important!

2. Decoupling of lines;

3. Separation of digital and analog ground;

4. Each digital component needs a 104 capacitor between the ground and the power supply;

5. In applications with relays, especially when the current is high, to prevent the relay contact spark from interfering with the circuit, you can connect a 104 and diode between the relay coil, and connect a 472 capacitor between the contact and the normally open end, which has a good effect!

6. To prevent crosstalk of I/O ports, the I/O ports can be isolated by diode isolation, gate circuit isolation, optocoupler isolation, electromagnetic isolation, etc.

7. Of course, multi-layer boards are definitely better at resisting interference than single-sided boards, but their costs are several times higher.

8. Choosing a device with strong anti-interference ability is more effective than any other method. I think this is the most important thing.

Reference address:Anti-interference design of digital circuits and single-chip microcomputers

Previous article:Download interface of STC microcontroller
Next article:Design of Switched Reluctance Motor Drive System Based on Single Chip Microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号