Teach you to design a microcontroller hardware system

The hardware circuit design of a single-chip application system consists of two parts: First, the system expansion, that is, the functional unit inside the microcontroller, such as ROM, RAM, I/O, timer/counter, interrupt system, etc. can not meet the requirements of the application system, It must be extended off-chip, select the appropriate chip, and design the appropriate circuit. The second is the configuration of the system, that is, configuring peripheral devices such as keyboard, display, printer, A/D, D/A converter, etc. according to system function requirements, and designing appropriate interface circuits.

The system should be extended and configured to follow the following principles:

1. Select a typical circuit as much as possible and follow the normal usage of the microcontroller. 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 together with the application software solution. The hardware structure and software solution will have mutual influence. The principle is that the software can realize the functions as much as possible by software to simplify the hardware structure. However, it must be noted that the hardware functions implemented by software generally have longer response times than hardware implementations and take up CPU time.

4, the relevant devices in the system should be as close as possible to performance matching. If a CMOS chip is used to form a low-power system, all chips in the system should be selected as low-power products as possible.

5, reliability and anti-interference design is an indispensable part of hardware design, including chip, device selection, decoupling filtering, printed circuit board wiring, channel isolation and so on.

6. When there are many peripheral circuits of the MCU, the driving capability must be considered. When the driving ability is insufficient, the system works unreliable, and the bus load can be reduced by adding a line driver 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 piece”. The more system devices, the stronger the mutual interference between devices, and the increased power consumption, which inevitably reduces the stability of the system. As the integrated functions of the MCU are getting stronger and stronger, the real system-on-chip SoC can be realized. For example, ST's newly launched μPSD32 & TImes; &TImes; series products integrate 80C32 core, large-capacity FLASH memory, SRAM, on one chip. A/D, I/O, two serial ports, watchdog, power-on reset circuit, etc.

Practice of Common Methods for Anti-interference of Single-Chip System Hardware

The main factors affecting the reliable and safe operation of the single-chip 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 all constitute the interference factors of the single-chip system, which often leads to the malfunction of the single-chip system, which affects the quality and output of the product, and will lead to accidents and major economic losses.

There are three basic elements that form interference:

(1) Source of interference. Refers to the component, device, or signal that produces interference, described in mathematical language as follows: du/dt, where di/dt is large, is the source of interference. Such as: lightning, relays, thyristors, motors, high-frequency clocks, etc. may become sources of interference.

(2) Propagation path. Refers to the path or medium that interferes with the propagation from the source of interference to the sensitive device. Typical interference propagation paths are conduction through the wires and radiation from the space.

(3) Sensitive devices. Refers to objects that are easily disturbed. Such as: A / D, D / A converter, microcontroller, digital IC, weak signal amplifier.

Classification of interference

1 classification of interference

There are many types of interference classification, and they can usually be classified according to the cause of noise generation, conduction mode, waveform characteristics, and the like. According to the reasons for the occurrence:

Can be divided into discharge noise, high frequency oscillation noise, 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 and so on.

2 Interference coupling method

The interference signal generated by the interference source acts on the measurement and control system through a certain coupling channel. Therefore, it is necessary for me to look at the way the interference source and the interfered object are transmitted. The coupling method of interference is simply subdivided by wires, space, public lines, etc., mainly in the following types:

(1) Direct coupling:

This is the most direct way and one of the most common ways in the system. For example, the interference signal enters the system through the power line. The most effective way to do this is to add a decoupling circuit. Thereby very good suppression.

(2) Common impedance coupling:

This is also a common form of coupling, which often occurs when two circuit currents have a common path. In order to prevent this coupling, it is usually considered in circuit design. There is no common impedance between the interferer and the victim.

(3) Capacitive coupling:

Also known as electric field coupling or electrostatic coupling. It is the coupling due to the presence of distributed capacitance.

(4) Electromagnetic induction coupling:

Also known as magnetic field coupling. It is due to the coupling of distributed electromagnetic induction.

(5) Leakage coupling:

This coupling is purely resistive and can occur when insulation is not good.

Common hardware anti-jamming technology

For the three elements that form interference, the main measures taken are the following.

1 suppression interference source

To suppress the interference source is to reduce the du/dt, di/dt of the interference source as much as possible. This is the most important and most important principle in anti-jamming design, and it often has a multiplier effect. Reducing the du/dt of the interference source is mainly achieved by connecting capacitors across the interference source. Reducing the di/dt of the interferer is achieved by connecting the inductor or resistor in series with the source loop and adding a freewheeling diode.

Common measures to suppress interference sources are as follows:

(1) The relay coil increases the freewheeling diode to eliminate the back EMF interference generated when the coil is disconnected. Adding a freewheeling diode will delay the turn-off time of the relay. After the Zener diode is added, the relay can move more times per unit time.

(2) Connect the spark suppression circuit at both ends of the relay contact (usually RC series circuit, the resistance is generally selected from a few K to tens of K, and the capacitor is selected as 0.01uF) to reduce the influence of spark.

(3) Add a filter circuit to the motor, pay attention to the capacitor and inductor leads as short as possible.

(4) Each IC on the board should be connected with a high frequency capacitor of 0.01μF ~ 0.1μF to reduce the impact of the IC on the power supply. Pay attention to the wiring of high-frequency capacitors. The wiring should be close to the power supply terminal and be as short and as short as possible. Otherwise, it will increase the equivalent series resistance of the capacitor, which will affect the filtering effect.

(5) Avoid 90-degree fold lines during wiring and reduce high-frequency noise emission.

(6) The RC suppression circuit is connected to both ends of the thyristor to reduce the noise generated by the thyristor (this thyristor may break down when the noise is severe).

2 cut off the interference propagation path

According to the propagation path of interference, it can be divided into two types: conducted interference and radiated interference.

Conducted interference is the interference that propagates through a wire to a sensitive device. The high-frequency interference noise and the frequency band of the useful signal are different, and the propagation of the high-frequency interference noise can be cut off by adding a filter to the wire, and sometimes the isolation optocoupler can be added. Power supply noise is the most harmful, so pay special attention to handling.

Radiation interference refers to interference that propagates through a spatial radiation to a sensitive device. The general solution is to increase the distance between the interferer and the sensitive device, isolate them with ground and add a shield to the sensitive device.

Common measures to cut off the interference propagation path are as follows:

(1) Fully consider the impact of the power supply on the microcontroller. The power supply is well done, and the anti-interference of the entire circuit is solved.

Many single-chip microcomputers are very sensitive to power supply noise. It is necessary to add a filter circuit or a voltage regulator to the power supply of the single-chip microcomputer to reduce the interference of the power supply noise on the single-chip microcomputer. For example, a magnetic bead and a capacitor can be used to form a π-shaped filter circuit. Of course, a 100Ω resistor can be used instead of the magnetic bead when the condition is not high.

(2) If the I/O port of the MCU is used to control noise devices such as motors, isolation should be added between the I/O port and the noise source (increasing the π-shaped filter circuit).

(3) Pay attention to the crystal wiring. The crystal oscillator and the MCU pins are placed as close as possible, and the clock region is isolated by the ground wire. The crystal oscillator case is grounded and fixed.

(4) Reasonable division of the circuit board, such as strong and weak signals, digital and analog signals. Keep interference sources (such as motors, relays) and sensitive components (such as microcontrollers) as far as possible.

(5) Separate the digital area from the analog area with a ground wire. The digital ground is separated from the analog ground, and finally connected to the power ground at one point. A/D and D/A chip wiring are also based on this principle.

(6) The ground wire of the MCU and the high-power device should be grounded separately to reduce mutual interference. Place high-power devices on the edge of the board as much as possible.

(7) The use of anti-jamming components such as magnetic beads, magnetic rings, power filters, and shields in key areas such as I/O ports, power lines, and circuit board connectors can significantly improve the anti-jamming performance of the circuit.

3 Improve the anti-jamming performance of sensitive devices

Improving the anti-interference performance of sensitive devices refers to the method of minimizing the pickup of interference noise and recovering from an abnormal state as soon as possible from the sensitive device side.

Common measures to improve the anti-jamming performance of sensitive devices are as follows:

(1) Minimize the loop loop area during wiring to reduce induced noise.

(2) When wiring, the power and ground wires 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 port of the MCU, do not hang it, ground it or connect it to the power supply. The idle ends of other ICs are grounded or connected to the power supply without changing the system logic.

(4) The power supply monitoring and watchdog circuit for the single-chip microcomputer, such as IMP809, IMP706, IMP813, X5043, X5045, etc., can greatly improve the anti-interference performance of the whole circuit.

(5) Under the premise that the speed can meet the requirements, try to reduce the crystal oscillator of the single-chip microcomputer and select the low-speed digital circuit. (6) The IC device is soldered directly on the circuit board as much as possible, and the IC holder is used less.

4 Other common anti-interference measures

The AC terminal is filtered by the inductor capacitor: the high frequency low frequency interference pulse is removed.

Double isolation of transformer: The primary input end of the transformer is connected in series with capacitors. The shield between the primary and secondary coils is connected to the primary center of the capacitor, and the secondary outer shield is connected to the printed board. This is the key means of hardware anti-interference. Secondary plus low pass filter: Absorbs the surge voltage generated by the transformer.

Integrated DC regulated power supply: protection due to overcurrent, overvoltage, overheating.

The I/O port is isolated by photoelectric, magnetoelectric, and relay, and the common ground is removed.

Twisted pair for communication lines: Eliminate parallel mutual inductance.

Lightning isolation is most effective with lightning protection.

A/D conversion with an isolation amplifier or with on-site conversion: reduces errors.

The outer casing is connected to the earth: to solve personal safety and to prevent external electromagnetic field interference.

Add a reset voltage detection circuit. To prevent the reset from being insufficient, the CPU will work, especially for devices with EEPROM. If the reset is not sufficient, the contents of the EEPROM will be changed.

Printed board process anti-jamming:

1 The power cable is thick, reasonable wiring, grounding, and the three buses are separated to reduce mutual inductance oscillation.

2CPU, RAM, ROM and other main chips, between CCC and GND, connect electrolytic capacitors and ceramic capacitors to remove high and low frequency interference signals.

3 independent system structure, reducing connectors and wiring, improving reliability and reducing failure rate.

4 The integrated block is reliable in contact with the socket, and the double-spring socket is used, and the integrated block is directly soldered on the printed board to prevent the device from contacting the fault.

5 conditional use of four or more printed boards, the middle two layers for power and ground

Screen & Camera Protection: Higher than screen edge and camera design, protect phone screen and camera lens from scratches effectively. Comfort-grip and environmentally friendly materials for best choice Protective case. Made with Bumpers constructed of shock-absorbent tpu materials Integrated with rugged clear tpu back, Provide 360° Heavy Duty Protection.
Precise cutouts: Precise cutouts provide you with easy access to all port, speaker, chaging port, S pen and sensitive button. Clear and beauty phone case for Iphone Xs max .Clear, thin, sleek, stylish, pocket-friendly specially for Iphone Xs max 6.5 , with wraparound colors and graphics add seamless style.
360° Rotable Kickstand Design: Metal kickstand can rotate 360°, easy to rotate and sturdy on the case. Built in kickstand gives you the convenience to watch videos and movies hands-free with desired comfort and stability. Besides, built-in metal magnetic sheet for stable adsorption, which can be directly adsorbed to the magnetic car mount holder. (Not includes the magnetic car mount holder).
Perfect protection: Anti-scratch Anti-fingerprint transparent toughened back cover displays the true color of your phone. Protection with Air-Cushion Technology for all corners, and all around protection for your device with a slim design.

Mobile Phone Iron Ring Case

phone Iron Ring Case,soft lron Ring phone case,lron Ring for soft tpu phone case,soft back phone case

Dongguan City Leya Electronic Technology Co. Ltd , https://www.dgleya.com

Posted on