How to avoid detours in the anti-interference design of single-chip microcomputer

Publisher:沈阳阿荣Latest update time:2014-01-20 Source: dqjswKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  Friends who have worked on products all have experienced this: a design may seem simple, and the hardware design and code writing can be completed quickly, but there are more or less unexpected events during the debugging process. These are all manifestations of insufficient anti-interference capabilities.

  Let’s discuss how to avoid detours in your design:

  Anti-interference is reflected 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, a lot of effort must be put into hardware.

  Look at the interference pathways:

  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 registers.

  Solution: discussed later.

  2. Power supply interference: Although the MCU can adapt to a wide voltage range (3-5.5V), it is very sensitive to power supply fluctuations. For example, the MCU can work stably at 3V, but cannot work stably when the voltage fluctuates between 3V and 5.5V.

  Solution: Use a power stabilizer block to filter the power supply. Tip: Be sure to use a 0.1UF ceramic capacitor in the power bypass to filter out high-frequency interference, because electrolytic capacitors are ineffective for high-frequency interference exceeding tens of kHz.

  3: Power-on and power-off interference: But every MCU system has to go through such a process when powered on, so special attention should be paid.

  Although the MCU can work stably at 3V, it does not mean that it cannot work at voltages 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 rises from 0V to the rated voltage. For example, when the voltage reaches 2V, the MCU starts to work, but it is extremely unstable at this time and is very easy to run away.

  Solution: 1. Allow the MCU to start working after the power supply is stable. The PIC has an integrated POR (internal power-on delay reset) function, which must be enabled in the configuration bit.

  External 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 uses a dedicated chip. There is a lot of information on this, and it can be found everywhere.

  The most difficult to eliminate is the first type of interference mentioned above, and interference signals can occur at any time, and the intensity of interference signals is also different.

  But they also have similarities: the interference signal also follows 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 field.

  The most serious interference is spark interference, followed by magnetic field interference. Spark interference mainly occurs when there are high-power switches, relays, contactors, brush motors, etc. nearby. Magnetic field interference mainly occurs when there are high-power AC motors, transformers, etc. nearby.

  Solution: The first point, which is also the most classic, is to work hard on the PCB routing and component position arrangement. There is a lot of knowledge involved and it would take a few days to finish talking about it^^.

  2: Consider 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 that 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, people use 4K-20K resistors for pull-up (the internal pull-up resistor of PIC's B port is about 20K).

  Since the interference signal also follows Ohm's law, the more interference there is, the smaller the pull-up resistor should be, because the voltage generated by the interference signal on the resistor will be smaller.

  Since the smaller the pull-up resistor is, 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 port B in a strong interference situation, you must use an external 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 intermediaries can reduce impedance to the most ideal level. In many industrial control boards, a large number of digital circuits can be seen to ensure performance and protect the MCU.

  C: A small capacitor is connected in parallel to the I/O port.

  Since capacitors pass AC and block DC, and interference signals are generated and extinguished instantly, capacitors can filter out interference signals. However, the downside is that it causes the rate at which the I/O port collects signals to decrease. For example, it is absolutely not advisable to connect capacitors to serial ports, because capacitors will filter out digital signals as interference signals.

  For some detection switches, reed switches, Hall elements and the like, capacitors can be connected in parallel, because the changes in these switch quantities cannot have a very high rate, and connecting a small capacitor will not have any effect on signal acquisition.

Keywords:MCU Reference address:How to avoid detours in the anti-interference design of single-chip microcomputer

Previous article:Design and production of single chip microcomputer power supply circuit
Next article:Design considerations for single chip microcomputer control board

Recommended ReadingLatest update time:2024-11-23 19:13

What are the applications of single chip microcomputers?
What are the main applications of single-chip microcomputers? There are 6 categories in total. What are the applications in intelligent instruments and meters? What are the applications in industrial control? What are the applications in household appliances? What are the applications in computer networks and communica
[Microcontroller]
Protues simulation realizes DHT11 and 51 single-chip source program
Protues simulation DHT11 display temperature and humidity simulation schematic diagram is as follows The DHT11 microcontroller source program is as follows: #include reg51.h #include intrins.h #define uchar unsigned char #define uint unsigned int sbit Data=P3^6; //define data line uchar rec_dat ; //Received data
[Microcontroller]
Protues simulation realizes DHT11 and 51 single-chip source program
PIC microcontroller LCD1602 display
P IC   single chip   LCD 1602 displays the website address and phone number ;************************************ PCL EQU 2H ;Define the low byte address of program memory STATUS EQU 3H ;Define the status register address PORTD EQU 8H ;Define the RD port data register address PORTC EQU 7H ;define the address of RC po
[Microcontroller]
MCU addition: send the result of 52h+0fch to port P1
Key points: Understand the addition of binary numbers ?XML:NAMESPACE PREFIX = O / ; The running result is p1.7 to p1.0 is on and off, on and off, off and off, which is the binary 01001110 ; Note that it is arranged from high to low, and the number has exceeded 256, so the carry cy=1
[Microcontroller]
MCU addition: send the result of 52h+0fch to port P1
Multi-functional all-in-one machine application solution based on AT32 MCU
In the past, four machines were indispensable for the establishment of business offices, such as copiers, printers, scanners and fax machines. In order to shorten manpower working time and improve work efficiency, various office equipment are gradually introduced to better meet human needs, such as multi-function all-
[Home Electronics]
Multi-functional all-in-one machine application solution based on AT32 MCU
Design of voice reporting circuit for fire control system with microcontroller 89C52 as the core
introduction In most modern control systems, light-emitting diodes (LEDs), digital tubes, LCDs, buzzers, etc. are usually used for status/result display and fault alarm. If digital language technology is used on the display alarm instrument, it will be suitable for auditory transmission of information. Using language
[Microcontroller]
Design of voice reporting circuit for fire control system with microcontroller 89C52 as the core
51 MCU external interrupt program
/*The following is the source code that can be mutated in keilC, just paste it directly, both external interrupt 0 (INT0) and external interrupt 1 (INT1) are available*/ /*The program is very simple, but still very useful for novices*/ /*******************************************************************/ /* */ /*
[Microcontroller]
Design of a temperature monitoring system based on single chip microcomputer
In the field of industrial control, temperature control is widely used. The control accuracy directly affects the quality and service life of the product. It is of great significance to study and design high-performance temperature control systems. The diversification of control algorithms also provides convenient cond
[Microcontroller]
Design of a temperature monitoring system based on single chip microcomputer
Latest Microcontroller Articles
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号