2236 views|0 replies

8489

Posts

0

Resources
The OP

Some measures to prevent digital circuits from being disturbed in single chip microcomputers [Copy link]

There are three basic elements that form interference: (1) Interference source, which refers to the component, device or signal that generates interference. It can be 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 all become interference sources. (2) Propagation path, which refers to the path or medium through which interference propagates from the interference source to the sensitive device. The typical interference propagation path is conduction through wires and radiation in space. (3) Sensitive device, which refers to an object that is easily interfered with. Such as: A/D, D/A converter, single chip microcomputer, digital IC, weak signal, etc. The basic principle of anti-interference design is: suppress interference sources, cut off interference propagation paths, 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 the 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 the du/dt of interference sources is mainly achieved by connecting capacitors in parallel at both ends of the interference source. Reducing the di/dt of interference sources is achieved by connecting inductors or resistors in series with the interference source loop and adding freewheeling diodes. The common measures to suppress interference sources are as follows: (1) Add a freewheeling diode to the relay coil to eliminate the interference generated when the coil is disconnected. Adding only a freewheeling diode will delay the disconnection time of the relay. After adding a voltage-stabilizing diode, the relay can operate more times per unit time. (2) Connect a spark suppression circuit (usually RC, the resistor is generally selected from a few K to tens of K, and the capacitor is selected from 0.01uF) at both ends of the relay contact to reduce the impact of electric sparks. (3) Add a filter circuit to the motor, and pay attention to the capacitor and inductor leads to be 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 IC on power supply. Pay attention to the wiring of high-frequency capacitor. The connection line 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. (6) Connect RC suppression circuit at both ends of thyristor to reduce the noise generated by thyristor (this noise may break down thyristor when it is serious). According to the propagation path of interference, it can be divided into two categories: conducted interference and radiated interference. Conducted interference refers to interference that is 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. Sometimes, it can also be solved by adding isolation optocouplers. Power supply noise is the most harmful and should be handled with special attention. Radiated interference refers to interference that is 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. 2. Common measures to cut off the interference transmission path (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 is mostly solved. Many microcontrollers are very sensitive to power supply noise. It is necessary to add a filter circuit or a voltage regulator 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, if 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). 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 properly divided into zones, such as strong and weak signals, digital and analog signals. Keep interference sources (such as motors and relays) away from sensitive components (such as microcontrollers) as far as possible. (5) Use ground wire to isolate the digital area from the analog area, separate it from the analog ground, and finally connect it to the power ground at one point. The wiring of A/D and D/A chips also follows this principle. Manufacturers have taken this requirement into consideration when allocating the pin arrangement of A/D and D/A chips. (6) The microcontroller and the large ground wire 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 anti-interference performance of the circuit. 3. Improving the anti-interference performance of sensitive devices Improving the anti-interference performance of sensitive devices refers to the method of minimizing the pickup of interference noise from the side of the sensitive devices and recovering from abnormal conditions as soon as possible. Common measures to improve the anti-interference performance of sensitive devices are as follows: (1) Minimize the area of the loop when wiring to reduce the inductive 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 the ground or power supply. The idle ends of other ICs should be connected to the ground or power supply without changing the system logic. (4) Using power supply monitoring and watchdog circuits for microcontrollers, such as: IMP809, IMP706, IMP813, X25043, X25045, etc., can greatly improve the anti-interference performance of the entire circuit. (5) Under the premise that the speed can meet the requirements, try to reduce the crystal oscillator of the microcontroller and choose a low-speed digital circuit. (6) IC devices should be directly soldered on the circuit board as much as possible, and IC sockets should be used less. Next, I will talk about my experience in this regard. Software: 1. Clear all unused code spaces to "0" because this is equivalent to NOP, which can be reset when the program runs away; 2. Add a few NOPs before the jump instruction, with the same purpose 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 it comes to adjusting or setting the parameters of external devices, in order to prevent the external devices from making mistakes due to interference, you can resend the parameters at regular intervals, so that the external devices can recover as soon as possible; 5. For anti-interference in communication, you can add data check bits, and you can adopt a 3-out-of-2 or 5-out-of-3 strategy; 6. When there are communication lines, such as I2C, three-wire system, etc., we actually found that setting the Data line, CLK line, and INH line to high is better than setting them to low. Hardware: 1. The ground wire and power wire are definitely important!2. Decoupling of the circuit; 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 large, to prevent the relay contact spark from interfering with the circuit, you can connect a 104 and a diode between the relay coil, and a 472 capacitor between the contact and the normally open end, which has a good effect! 6. To prevent crosstalk of the I/O port, the I/O port can be isolated. The methods include diode isolation, gate circuit isolation, optical isolation, electromagnetic isolation, etc.; 7. Of course, the anti-interference of the multilayer board is definitely better, but the cost is several times higher. 8. Choosing a device with strong anti-interference ability is more effective than any other method. This should be the most important thing.

This post is from Microcontroller MCU

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list