Experience summary of single chip microcomputer hardware design

Publisher:kappa20Latest update time:2011-09-15 Source: 互联网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The following is a summary of some issues that should be paid attention to in the design, and the hardware design principles of single-chip microcomputers . I hope everyone can read it.

(1) In terms of component layout, related components should be placed as close as possible. For example, clock generators, crystal oscillators, and CPU clock input terminals are prone to noise, so they should be placed closer together. For those devices that are prone to noise, small current circuits , large current circuit switch circuits, etc., they should be kept as far away from the logic control circuits and storage circuits (ROM, RAM) of the microcontroller as possible. If possible, these circuits can be made into separate circuit boards, which is conducive to anti-interference and improves the reliability of circuit operation.

(2) Try to install decoupling capacitors next to key components such as ROM, RAM and other chips . In fact, printed circuit board traces, pin connections and wiring may contain large inductance effects. Large inductance may cause severe switching noise spikes on the Vcc trace. The only way to prevent switching noise spikes on the Vcc trace is to place a 0.1uF electronic decoupling capacitor between VCC and the power supply ground . If surface mount components are used on the circuit board, chip capacitors can be directly placed close to the components and fixed on the Vcc pin. It is best to use ceramic capacitors because they have low electrostatic loss (ESL) and high-frequency impedance. In addition, the dielectric stability of this capacitor over temperature and time is also very good. Try not to use tantalum capacitors because they have high impedance at high frequencies.

The following points should be noted when placing decoupling capacitors:

•Connect an electrolytic capacitor of about 100uF across the power input terminal of the printed circuit board. If the volume allows, a larger capacitance will be better.

•In principle, a 0.01uF ceramic capacitor needs to be placed next to each integrated circuit chip. If the gap in the circuit board is too small to accommodate it, a 1-10 tantalum capacitor can be placed for every 10 chips.

• For components with weak anti-interference capabilities, large current changes when turned off, and storage components such as RAM and ROM, a decoupling capacitor should be connected between the power line (Vcc) and the ground line.

•The leads of the capacitor should not be too long, especially high-frequency bypass capacitors should not have leads.

(3) In the single-chip microcomputer control system, there are many types of ground wires, including system ground, shield ground, logic ground, analog ground, etc. Whether the ground wire layout is reasonable will determine the anti-interference ability of the circuit board. When designing the ground wire and grounding point, the following issues should be considered:

•Logic ground and analog ground should be wired separately and cannot be used together. Their respective ground wires should be connected to the corresponding power ground wire. When designing, the analog ground wire should be as thick as possible, and the grounding area of ​​the lead-out end should be as large as possible. Generally speaking, for analog input and output signals, it is best to isolate them from the microcontroller circuit through an optical coupler.

•When designing a printed circuit board for a logic circuit , its ground wire should form a closed loop to improve the circuit's anti-interference ability.

• The ground wire should be as thick as possible. If the ground wire is very thin, the ground wire resistance will be large, causing the ground potential to change with the current , resulting in unstable signal level and reduced anti-interference ability of the circuit. If the wiring space allows, ensure that the width of the main ground wire is at least 2 to 3 mm, and the ground wire on the component pin should be around 1.5 mm.

• Pay attention to the selection of grounding points. When the signal frequency on the circuit board is lower than 1MHz, the electromagnetic induction effect between the wiring and the components is small, while the loop current formed by the grounding circuit has a greater impact on interference, so one-point grounding should be used to prevent loops from forming. When the signal frequency on the circuit board is higher than 10MHz, the inductance effect of the wiring is obvious, and the ground impedance becomes very large. At this time, the loop current formed by the grounding circuit is no longer a major problem. Therefore, multi-point grounding should be used to minimize the ground impedance.

• Power supply In addition to making the wiring width as thick as possible according to the current, the wiring direction of the power line and ground line should be consistent with the wiring direction of the data line. At the end of the wiring work, the ground line is used to cover the bottom layer of the circuit board where there is no wiring. These methods are helpful to enhance the anti-interference ability of the circuit.

• The width of the data line should be as wide as possible to reduce impedance. The width of the data line should be at least 0.3mm (12mil), and 0.46-0.5mm (18mil-20mil) is more ideal.

•Since a via in a circuit board will bring about a 10pF capacitance effect, which will introduce too much interference to high-frequency circuits, the number of vias should be reduced as much as possible during wiring. In addition, too many vias will also reduce the mechanical strength of the circuit board.

The hardware circuit design of a single-chip microcomputer application system includes two parts: one is system expansion, that is, when the functional units inside the single-chip microcomputer, such as ROM, RAM, I/O, timer/counter, interrupt system, etc., cannot meet the requirements of the application system, they must be expanded outside the chip, select appropriate chips , and design corresponding circuits. The second is system configuration, that is, configure peripheral devices according to system functional requirements, such as keyboards, displays, printers, A/D, D/A converters, etc., and design appropriate interface circuits.

The expansion and configuration of the system should follow the following principles:

1. Choose typical circuits as much as possible and conform to the conventional usage of single-chip microcomputers to lay a good foundation for the standardization and modularization of hardware systems.

2. The configuration level of system expansion and peripheral equipment should fully meet the functional requirements of the application system and leave appropriate room for secondary development.

3. The hardware structure should be considered together with the application software solution. The hardware structure and software solution will have mutual influence. The principle of consideration is: the functions that can be realized by software should be realized by software as much as possible to simplify the hardware structure. However, it must be noted that the hardware functions realized by software generally have a longer response time than hardware implementation and occupy CPU time.

4. The performance of related devices in the system should be matched as much as possible. For example, when a C MOS chip single chip is used to form a low-power system, all chips in the system should be low-power products as much as possible.

5. Reliability and anti-interference design are an indispensable part of hardware design, which includes chip, device selection, decoupling filtering, printed circuit board wiring, channel isolation, etc.

6. When there are many peripheral circuits of the microcontroller , its driving capability must be considered. When the driving capability is insufficient, the system will not work reliably. The bus load can be reduced by adding line drivers to enhance the driving capability or reducing the power consumption of the chip .

7. Try to design the hardware system in the direction of "single chip". The more system components there are, the stronger the mutual interference between the components, the greater the power consumption, and the inevitable reduction of system stability. As the functions integrated in the microcontroller become more and more powerful, a true system-on-chip SoC can be realized. For example, the μPSD32×× series products recently launched by ST integrate an 80C32 core, a large-capacity FLASH memory, SRAM, A/D, I/O, two serial ports, a watchdog, a power-on reset circuit, etc. on a single chip.

Practice of Common Methods for Hardware Anti-interference in Single-Chip Microcomputer Systems

The main factors that affect the reliable and safe operation of the MCU system mainly come from various electrical interferences inside and outside the system, and are affected by the system structure design, component selection, installation, and manufacturing process. These constitute the interference factors of the MCU system, which often cause the MCU system to malfunction, affecting product quality and output at the least, and causing accidents and major economic losses at the worst.

There are three basic elements that cause 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. Refers to objects that are easily interfered with, such as A/D, D/A converters, single-chip microcomputers, digital ICs, weak signal amplifiers, etc.

Classification of interference

1 There are many types of interference, which can usually be classified according to the cause of noise, conduction method, waveform characteristics, etc. According to the cause of noise, it can be divided into discharge noise, high-frequency oscillation noise, and surge noise. According to the conduction method, it can be divided into common mode noise and series mode noise. According to the waveform, it can be divided into continuous sine wave, pulse voltage , pulse sequence, etc.

2 Interference Coupling Mode The interference signal generated by the interference source has an effect on the measurement and control system through a certain coupling channel. Therefore, it is necessary to look at the transmission mode between the interference source and the interfered object. The interference coupling mode is nothing more than through wires, space, common lines, etc., which can be broken down into the following types:

(1) Direct coupling: This is the most direct way and the most common way in the system. For example, interference signals invade the system through the power line.

(2) Common impedance coupling: This is also a common coupling method. This form often occurs when the currents of two circuits have a common path. In order to prevent this coupling, it is usually necessary to consider it in circuit design. There is no common impedance between the interference source and the interfered object.

(3) Capacitive coupling: also known as electric field coupling or electrostatic coupling. It is the coupling caused by the existence of distributed capacitance.


(4) Electromagnetic induction 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 occurs when the insulation is poor. Commonly used hardware anti-interference technology targets the three elements that cause interference, and the main anti-interference measures taken are as follows.

1 Suppressing 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, and it 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 in the interference source loop and adding freewheeling diodes .

Common measures to suppress interference sources are as follows:

(1) Relay A freewheeling diode is added to the 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 of several 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 leads of the capacitor and inductor 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 will increase the equivalent series resistance of the capacitor, which will affect the filtering effect.

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

(6) Connect an RC suppression circuit 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).

2 Cut off the interference propagation path. 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 that propagates to sensitive devices through wires. The frequency bands of high-frequency interference noise and useful signals are different. 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 and should be handled with special attention. The so-called radiated interference refers to the interference that propagates 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.

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

(3) Pay attention to the crystal oscillator wiring. The crystal oscillator and the microcontroller pins should be as close as possible, the clock area should be isolated with a ground wire, and the crystal oscillator housing should be grounded and fixed.

(4) Reasonable partitioning of circuit boards, 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 same principle applies to the wiring of A/D and D/A chips .

(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 connecting 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 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) 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, X5043, X5045, 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 onto the circuit board and use IC sockets less often.

4 Other common anti-interference measures Use inductors and capacitors at the AC end to filter: remove high-frequency and low-frequency interference pulses.

Transformer double isolation measures: A capacitor is connected in series to the primary input end of the transformer, the shielding layer between the primary and secondary coils and the center point of the primary capacitor are connected to the ground, and the secondary outer shielding layer is connected to the printed circuit board ground. This is a key means of hardware anti-interference.

Add low-pass filter on the secondary side to absorb surge voltage generated by transformer .

Integrated DC regulated power supply is used: because it has overcurrent, overvoltage, overheating and other protections. The I/O port uses photoelectric, magnetic, and relay isolation, and the common ground is removed.

Use twisted pair for communication lines: eliminate parallel mutual inductance. Optical fiber isolation is the most effective for lightning protection.

Use isolation amplifier or field conversion for A/D conversion: reduce errors.

The shell is connected to the ground: to ensure personal safety and prevent external electromagnetic interference. A reset voltage detection circuit is added to prevent the CPU from working due to insufficient reset, especially for devices with EEPROM, where insufficient reset will change the contents of the EEPROM.

Printed circuit board process anti-interference:

① Thicken the power cord, route and ground it properly, and separate the three buses to reduce mutual inductance oscillation.

② For main chips such as CPU, RAM, ROM, etc., connect electrolytic capacitors and ceramic capacitors between VCC and GND to remove high and low frequency interference signals.

③Independent system structure, reducing connectors and connections, improving reliability and reducing failure rate.

④ The integrated block has reliable contact with the socket, and a double-spring socket is used. It is best to solder the integrated block directly to the printed circuit board to prevent poor contact failure of the device.

⑤ If conditions permit, use a printed circuit board with four or more layers, with the middle two layers being the power supply and ground.





Reference address:Experience summary of single chip microcomputer hardware design

Previous article:How to analyze battery consumption in mobile devices
Next article:Frequency conversion color TV, frequency conversion technology and progressive scanning technology

Latest Power Management 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号