Summary of MCU hardware design experience)

Source: Internet
Author: User

(1) In terms of the layout of components, the related components should be kept as close as possible. For example, the clock input ends of the clock generator, crystal oscillator, and CPU are prone to noise, place them closer. For devices that are easy to generate noise, small current circuits, Large Current Circuit Switching circuits, etc., we should try to keep them away from the logic control circuit and storage circuit (ROM, Ram) of single chip microcomputer ), if possible, the circuit can be made into another circuit board, which is conducive to anti-interference and improve the reliability of circuit operation.

(2) Try to install decoupling capacitors next to key components, such as ROM and RAM chips. In fact, printed circuit board cabling, pin connections, and wiring may all contain a large inductance effect. A large inductance may cause a severe switch noise Spike when the VCC goes online. The only way to prevent online switch noise spikes of VCC is to place an electronic decoupling capacitor of 0.1uf between the VCC and the power source. If a surface mount component is used on the circuit board, the slice capacitor can be directly attached to the component and fixed on the VCC pin. It is best to use the porcelain capacitor because the capacitor has a low electrostatic loss (ESL) and High-Frequency Impedance. In addition, the medium stability of the capacitor temperature and time is also very good. Do not use the TA capacitor whenever possible, because it has a high impedance at a high frequency.

Pay attention to the following points when setting the decoupling capacitor:
• An electrolytic capacitor of about UF is interconnected at the power input end of the printed circuit board. It is better to increase the capacitance if the size permits.
• In principle, a 0.01uf porcelain chip capacitor should be placed next to each integrated circuit chip. If the gap between the circuit board is too small to fit, one or more chips can be placed every 10 ~ 10.
• For components with weak anti-interference capabilities and large changes in current upon shutdown, and storage components such as Ram and Rom, the decoupling capacitor should be connected between the power cord (VCC) and the ground wire.
• The lead length of the capacitor should not be too long, especially the high-frequency bypass capacitor should not contain the lead.

(3) In the single-chip microcomputer control system, there are many types of ground wires, such as systematic, shielded, logical, and analog ground. Whether the ground wires are properly laid determines the anti-interference capability of the circuit board. When designing ground and ground points, consider the following:
• Logically separate the ground from the analog ground for cabling and cannot be used together. connect their respective ground wires to the corresponding power ground wires respectively. During the design, the simulated ground should be as bold as possible, and the grounding area of the lead end should be increased as much as possible. Generally speaking, it is better to isolate the analog signal of input and output from the single chip microcomputer circuit through optical coupling.
• When designing a printed circuit, the ground line should form a closed loop to improve the anti-interference capability of the circuit.
• The ground line should be as rough as possible. If the ground wire is very fine, the resistance of the ground wire will be large, resulting in the variation of the ground potential with the current
The signal level is unstable, resulting in a decline in the anti-interference capability of the circuit. Make sure that the width of the main ground wire is at least 2 ~ More than 3mm, the grounding wire on the element pin should be around 5mm.
• Pay attention to the selection of grounding points. When the signal frequency on the circuit board is lower than 1 MHz, the electromagnetic induction between the wiring and components has little effect, while the circulation formed by the grounding circuit has a great impact on the interference, so that it does not form a loop. When the signal frequency on the circuit board is higher than 10 MHz, the ground impedance becomes very large due to the obvious inductance effect of the wiring, and the circulation formed by the grounding circuit is no longer the main problem. Therefore, multi-point grounding should be adopted to minimize the ground impedance.
• Power cord layout should not only strip width as much as possible based on the current size, but also make the cabling direction of the power cord and ground line consistent with that of the data line at the end of cabling, the ground wire is used to fill the bottom layer of the circuit board without wiring. These methods help to enhance the anti-interference capability of the circuit.
• The data line width should be as wide as possible to reduce the impedance. The data line must be at least 0.3mm (12mil) in width ~ 0.5mm (18mil ~ 20 mil) is more ideal.
• Because a circuit board through the hole will bring about 10pF capacitance effect, this will introduce too much interference to the high-frequency circuit, so when wiring, we should try to reduce the number of through holes. Furthermore, excessive passing holes may reduce the mechanical strength of the circuit board.
The hardware circuit design of a Single-Chip Microcomputer Application system consists of two parts: one is system expansion, that is, the function unit inside the single-chip microcomputer, for example, Rom, Ram, I/O, Timer/counter, interrupt system, etc. cannot meet the requirements of the application system, must be expanded outside the chip, select the appropriate chip, design the corresponding circuit. Second, the system configuration, that is, to configure peripheral devices, such as keyboards, monitors, printers, A/D, and D/A converters, according to the system functional requirements, the appropriate interface circuit should be designed.

System Expansion and configuration should follow the following principles:
1. Select a typical circuit as much as possible and comply with conventional single-chip microcomputer usage. It lays a good foundation for the standardization and modularization of hardware systems.
2. The system expansion and peripheral device configuration level should fully meet the functional requirements of the application system, and leave room for further development.
3. The hardware structure should be considered in conjunction with the application software solution. The hardware structure and software solution may affect each other. The principle of consideration is that the functions that can be implemented by the software may suffer as much as possible from the software implementation to simplify the hardware structure. However, it must be noted that the hardware functions implemented by the Software generally have a longer response time than the hardware implementation and occupy the CPU time.
4. The performance of related devices in the system should be matched as much as possible. For example, if CMOS chip microcontroller is used to form a low-power system, all chips in the system should choose low-power products as much as possible.
5. Reliability and anti-interference design is an essential part of hardware design, including chip, device selection, decoupling filtering, printed circuit board wiring, and channel isolation.
6. When there are many peripheral circuits of a single-chip microcomputer, the driving capability must be considered. When the drive capability is insufficient, the system is not reliable and can be driven by adding a line.
Driver or reduce chip power consumption to reduce bus load.
7. Try to design the hardware system in the "single chip" direction. The more system devices, the stronger the mutual interference between devices, and the larger the power consumption, which inevitably reduces the system stability. As the single-chip integration function becomes more and more powerful, the real on-chip system SOC can be achieved, for example, ST's new series of μpsd32 × products are integrated into a single chip, including 80c32 core, large-capacity FLASH memory, SRAM, A/D, I/O, two serial ports, watchdog, and power-on. reset Circuit and so on.

Practice of common anti-interference methods for single chip microcomputer system hardware
The main factors that affect the reliable and safe operation of the single-chip microcomputer system are various electrical interference between the system and the outside, and are also affected by the system structure design, component selection, installation, and manufacturing process. These constitute the Interference Factors of the single-chip microcomputer system, which often leads to the abnormal operation of the single-chip microcomputer system. The light affects the product quality and output, and the heavy will lead to accidents and cause major economic losses.
There are three basic elements for interference:
(1) interference sources. It refers to the components, devices, or signals that produce interference. The mathematical language is described as follows: du/dt. Where di/dt is large, it is the interference source. Such as lightning, relay, thyristor, motor, and high-frequency Clock may all be sources of interference.
(2) Propagation Path. A channel or medium that interferes with the transmission from an interference source to a sensitive device. The typical interference Propagation Path is transmitted through the wire and the radiation of space.
(3) sensitive devices. An object that is easily disturbed. Such as A/D, D/A converter, single chip microcomputer, digital IC, weak signal amplifier, etc. Interference Classification

1. Classification of interference there are many types of interference, which can be classified according to the reason of noise generation, transmission mode, waveform characteristics, and so on.
Based on the cause: it can be divided into discharge noise, high-frequency oscillating noise, and surge noise. By conduction mode: it can be divided into common mode noise and serial mode noise. By waveform: it can be divided into continuous sine wave, pulse voltage, pulse sequence and so on.

2. interference coupling: The interference signal generated by the interference source works on the measurement and control system only through a certain coupling channel. Therefore, it is necessary for me to look at the transmission mode between the interference source and the affected object. Interference coupling methods are divided by wires, spaces, public wires, and so on. There are mainly the following types:
(1) Direct Coupling: This is the most direct method and the most common method in the system. For example, interference signals intrude into the system through the power cord.
(2) Public impedance coupling: this is also a common coupling mode, which often occurs when the current of two circuits has a common path. To prevent such coupling, we usually need to consider circuit design. So that there is no public Impedance Between the interference source and the affected object.
(3) capacitive coupling: Also known as electric field coupling or Electrostatic coupling. The coupling is produced by the existence of the distributed capacitor.
(4) electromagnetic inductive coupling: Also known as magnetic field coupling. It is the coupling caused by distributed electromagnetic induction.
(5) leakage coupling: This coupling is purely resistive and will happen when the insulation is poor.

Commonly used hardware anti-interference technology for the formation of interference, the anti-interference mainly has the following measures.

1. to suppress the interference source, reduce the du/dt and di/dt of the interference source as much as possible. This is the highest priority and most important principle in anti-interference Design and often achieves twice the result with half the effort. Reducing the interference source's du/dt is mainly achieved through parallel capacitance at both ends of the interference source. The di/dt that reduces the interference source is implemented by concatenating the inductance or resistance in the interference source loop and adding a continuous diode. Common Measures to suppress interference sources are as follows:
(1) The relay coil is added with a continuous diode to eliminate the back-EMR interference generated when the coil is disconnected. Only the continued diode will lead to the disconnection time lag of the relay. After increasing the voltage regulator diode, the relay can be operated more times in a unit of time.
(2) spark Suppression Circuit is connected at both ends of the relay contact (RC series circuit is generally used, the resistance is usually several K to several dozen K, and the capacitor is selected as 0.01 uF) to reduce the impact of spark.
(3) apply a filter circuit to the motor. Make sure that the capacitor and inductance leads are as short as possible.
(4) Each IC on the circuit board must be connected with a 0.01 μF ~ 0.1 μF High-Frequency Capacitor to reduce the IC impact on the power supply. Pay attention to the High-Frequency Capacitor wiring. The connection line should be near the power supply end and should be as short as possible. Otherwise, the equivalent series resistance of the capacitor is increased, which will affect the filtering effect.
(5) Avoid 90-degree line lines during cabling and reduce high-frequency noise emission.
(6) the two ends of the thyristor are connected to the RC Suppression Circuit to reduce the noise produced by the thyristor (when this noise is severe, the thyristor may be broken down ).

2 cut-off Interference propagation paths can be divided into two types: Conduction Interference and radiation interference. Conduction Interference refers to the interference that is transmitted to sensitive devices through wires. High-frequency interference noise is different from the band of useful signals. You can add a filter on the wire to cut off the transmission of high-frequency interference noise. Sometimes, you can also isolate the photocoupler to solve the problem. Power supply noise has the greatest harm, so pay special attention to it. Radiation interference refers to interference that is transmitted to sensitive devices through spatial radiation. The general solution is to increase the distance between the interference source and the sensitive device. The leased line isolates them and adds a mask to the sensitive device. Common measures to cut the interference Propagation Path are as follows:
(1) fully consider the impact of power supply on single chip microcomputer. If the power supply is well done, the entire circuit's anti-interference solution is more than half done. Many single-chip microcomputer are very sensitive to power noise. They need to apply a filter circuit or voltage regulator to the single-chip microcomputer power supply to reduce the interference of power noise on the single-chip microcomputer. For example, you can use magnetic beads and capacitors to form a π-shaped filter circuit. Of course, when the conditions are not high, you can use 100 Ω resistor instead of magnetic beads.
(2) If the I/O port of the single-chip microcomputer is used to control noise devices such as the motor, the I/O port and the noise source should be isolated (Added π-shaped filter circuit ).
(3) Pay attention to crystal oscillator wiring. The crystal oscillator is as close as possible to the single-chip microcomputer pins. The clock zone is isolated by cable, and the crystal oscillator shell is grounded and fixed.
(4) the circuit board is reasonably partitioned, such as strong and weak signals, numbers, and analog signals. Remove interference sources (such as motors and relays) from sensitive components (such as single-chip microcomputer.
(5) Land use lines isolate the Digital Zone from the simulation zone. The numbers and analog locations must be separated, and the last point is connected to the power source. A/D, D/A chip wiring is also based on this principle.
(6) single-chip microcomputer and high-power devices must be ground separately to reduce mutual interference. High-power devices should be placed at the edge of the circuit board as much as possible.
(7) The use of anti-interference elements such as magnetic beads, magnetic rings, power supply filters, and shields in key areas such as single-chip I/O Ports, power cables, and circuit board connections can significantly improve the anti-interference performance of the circuit.

3. Improve the anti-interference performance of sensitive devices. Improve the anti-interference performance of sensitive devices. This means to minimize interference noise pickup and recover 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 during cabling to reduce the inductive noise.
(2) When wiring, the power cord and ground wire should be as rough as possible. In addition to reducing the pressure drop, it is more important to reduce coupling noise.
(3) do not leave unused I/O Ports of the single-chip microcomputer empty. grounding or power supply is required. The idle end of other IC is grounded or powered without changing the system logic.
(4) The use of power monitoring and Watchdog Circuit for single-chip microcomputer, such as imp809, imp706, imp813, x5043, x5045, etc., can greatly improve the anti-interference performance of the entire circuit.
(5) When the speed can meet the requirements, reduce the crystal oscillator of the single chip microcomputer as much as possible and select a low-speed digital circuit.
(6) IC devices should be directly soldered to the circuit board as far as possible, with less IC blocks.

4. other commonly used anti-interference measures apply inductance and Capacitor filtering at the AC end: Remove high-frequency low-frequency interference pulses. Dual-isolation measures for transformer: capacitor is connected at the primary input end of the transformer. the shielding layer between the primary and secondary coils is connected to the earth with the center of the capacitance, and the secondary external shielding layer is connected to the printed board. This is a key means of hardware anti-interference. Secondary low-pass filter: absorbs the surge voltage produced by the transformer. Integrated DC regulated power supply: Due to overcurrent, overvoltage, overheating and other protection. The I/O port is isolated by optical, magnetic, and relay, and public areas are removed. Twisted Pair wires for communication lines: eliminate parallel mutual inductance. Fiber optic isolation for lightning protection is the most effective. A/D conversion uses an isolating amplifier or field conversion: reduces errors. Housing connected to the Earth: Solving personal safety and preventing external electromagnetic interference. Add a Reset Voltage detection circuit. To prevent unfilled reset, the CPU will work, especially for devices with EEPROM. Resetting will change the content of the EEPROM. Printed Board process anti-interference:
① The power cord is bold, reasonably laid, grounded, and separated by three buses to reduce mutual vibration.
② CPU, Ram, Rom and other main chips, indirect electrolytic capacitors of VCC And Gnd and porcelain chip capacitors, removing high and low frequency interference signals.
③ Independent system structure, reducing connectors and connections, improving reliability and reducing failure rates.
④ The Integrated Block has reliable contact with the socket, and uses a dual-spring outlet. It is best that the Integrated Block is directly welded to the printed board to prevent malfunction of the device.
⑤ Use a four-layer or above printed board with two layers in the middle as the power supply and ground.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.