How to Improve the Anti-disturbance Function of MCU System

Publisher:山宝宝Latest update time:2015-12-25 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Friends who have worked on products have all experienced that a design seems easy, and hardware design and code writing can be done quickly, but more or less accidents occur during the debugging process. These are all manifestations of insufficient anti-interference capabilities. Let's
talk about how to avoid detours in your design:
Anti-interference is currently developed in two aspects, one is hardware design, and the other is software writing.
Here is a key reminder: In MCU design, the main anti-interference design is in hardware, supplemented by software. Because the computing power of MCU is limited, it is necessary to spend a lot of time on hardware.
Look at the way interference occurs:
1: The main path for interference signals to interfere with MCU is through the I/O port, which affects the data collection of MCU and other internal storage.
Solution: Discuss later.
2: Power supply interference: Although MCU is used to a wider voltage (3-5.5V), it is very sensitive to power supply fluctuations. For example, MCU can work safely at 3V voltage, but cannot work safely when the voltage fluctuates between 3V-5.5V.
Solution: Use a power supply voltage regulator to filter the power supply. Note: Be sure to bypass the power supply and add a 0.1UF ceramic capacitor to filter out high-frequency interference, because electrolytic capacitors are ineffective for high-frequency interference exceeding tens of KHZ.
3: Power on and off interference: But every MCU system has to go through such a process when it is powered on, so be especially careful.
Although the MCU can work safely at a voltage of 3V, it does not mean that it cannot work at a voltage below 3V. Of course, the MCU is extremely unstable at such a low voltage. When the system is powered on, the system power supply voltage is gradually increased from 0V to the rated voltage. For example, when the voltage reaches 2V, the MCU starts to work, but this is extremely unstable and it is very easy to run away.
Solution : 1 Let the MCU start working after the power is stable. The PIC integrates POR (internal power-on delay reset) in the chip. This function must be turned on in the configuration bit.
Surface power-on delay reset circuit. There are many forms. The low-cost one is to connect a resistor-capacitor circuit to the reset pin. The high-cost one is to use a dedicated chip. There are a lot of materials in this regard, and they can be found everywhere.
The most difficult to eliminate is the first type of interference mentioned above, and the interference signal can occur at any time, and the intensity of the interference signal is not the same.
But they also have similarities: the interference signal also obeys Ohm's law, and the coupling path of the interference signal is nothing more than electromagnetic interference, one is electric sparks, and the other is magnetic fields.
Among them, the most severe interference is electric spark interference, followed by magnetic field interference. The occasions where electric spark interference occurs are mainly near high-power switches, relays, contactors, brushed motors, etc. The occasions where magnetic field interference occurs are mainly near high-power AC motors, transformers, etc.
Treatment measures: The first point: It is also the most classic, that is, to work hard on the PCB routing and component position arrangement. There is a lot of knowledge in this, and it can't be finished in a few days^^.
Second: Summarize the input impedance of each I/O port, acquisition rate and other factors to design the peripheral circuit of the I/O port.
Generally, there are three situations to determine the input impedance of an I/O port:
A: The I/O port has a pull-up resistor, and the pull-up resistor value is the input impedance of the I/O port.
Generally, everyone uses a 4K-20K resistor for pull-up (the internal pull-up resistor of the B port of the PIC is about 20K).
Since the interference signal also obeys Ohm's law, the smaller the pull-up resistor should be when there is more interference, because the voltage generated by the interference signal on the resistor is smaller.
Since the smaller the pull-up resistor, the more power it consumes, in home designs, the pull-up resistor is generally 10-20K, and in strong interference situations, the pull-up resistor can even be as low as 1K.
(If you want to abandon the pull-up function of the B port in a strong interference situation, you must use a surface pull-up.)
B: The I/O port is connected to the output pin of other digital circuits. At this time, the input impedance of the I/O port is the impedance of the output port of the digital circuit, which is generally tens to hundreds of ohms.
It can be seen that using digital circuits as an intermediary can reduce impedance to the minimum. Many digital circuits can be seen on many industrial control boards, even to ensure performance and protect the MCU.
C: A small capacitor is connected in parallel to the I/O port.
Since the capacitor is connected to the DC and the interference signal is generated and extinguished, the capacitor can filter out the interference signal. But the disadvantage is that it causes the speed of the I/O port to collect signals to drop. For example, it is absolutely not advisable to connect capacitors to the serial port, because the capacitor will filter out the digital signal as an interference signal.
For some detection switches, reed switches, Hall elements, etc., capacitors can be connected in parallel, because the changes in these switch quantities cannot have a high speed, and connecting a small capacitor will not have any effect on the signal collection. It is easier to find fault with other people's work than to find your own faults.
Reference address:How to Improve the Anti-disturbance Function of MCU System

Previous article:Flash reading and writing program for msp430F149 microcontroller
Next article:MSP430 Tutorial 14: MSP430 MCU ADC12 Module

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号