MCU application note system design principles(improve anti-interference performance)

MCU hardware system design principles
 A single chip microcomputer application system hardware circuit design includes two parts: one is the system expansion, namely the MCU internal functional units, such as ROM, RAM, I / O, timer / counter, interrupt system can not meet the requirements of application system, must be in the off-chip expand, selection of appropriate chip, design the corresponding circuit. Two is the configuration of the system, namely according to the functional requirements of the system configuration of peripheral devices, such as keyboard, display, printer, A / D, D / A converter, to design the appropriate interface circuit.
  System expansion and allocation should follow the following principle:
 1, as far as possible to choose typical circuit, and in accordance with the conventional usage of singlechip. Hardware system of standardization, modularization and lay a good foundation.
 2, system expansion and configuration of the peripheral device level should be fully meet the application requirements of system functions, and properly qualified, so that is two times the development of.
 3, hardware structure should be combined with application software solutions are considered together. The hardware structure and software programs will have mutual influence, consider the principle is: the software can realize the function by software as far as possible, in order to simplify the hardware structure. But must pay attention, realized by software and hardware function, average response time than the hardware realization of long, and CPU holding time.
 In 4, system of related devices to do the performance matching. Such as the selection of CMOS chip single chip microcomputer low power system, the system all the chips should be selected for low power products.
 In 5, the reliability and anti-jamming design hardware design is an indispensable part, it includes a chip, device selection, decoupling filter, a printed circuit board wiring, channel isolation.6, peripheral circuit of more, must be considered in their driving ability. Drive capacity is insufficient, system unreliable work, can be through the addition of line drives enhanced driving capability or reduce power consumption to reduce bus load.
 In 7, North Korea as the " monolithic" design direction of the hardware system. System devices more, mutual interference between devices are more strong, power consumption is increased, it will inevitably reduce the stability of the system. With the single-chip integrated on-chip function is more and more strong, true system on chip SoC can already be achieved, such as ST company recently launched PSD32 X series of products in a chip with integrated 80C32 nuclear, large capacity FLASH memory, SRAM, A / D, I / O, two serial, watchdog power on reset circuit, etc..
  Computer system hardware anti-interference methods used in practice
  Effects of single chip microcomputer system of the reliable operation of main factors mainly from internal and external to the system, all kinds of electrical interference, and the system structure design, components selection, installation, manufacturing process. All these constitute a single chip system interference factors, often results in SCM system disorders, light affect the quality and output of products, will lead to accidents, causing heavy economic losses.
Formed by interference of three basic factors:
( 1) the interference source. The interference element, device or signal, using mathematical language to describe the following: Du / DT, di / dt place is the interference source. Such as: lightning, relay, motor, controllable silicon, the high frequency clock are likely to be the source of interference.
( 2) the propagation path. Refers to the interference from the interference source spread to sensitive devices or media access. A typical interference propagation path is through the wire conduction and space radiation.
( 3) sensitive device. To easily interference object. Such as: A / D, D / A converter, microprocessor, digital IC, weak signal amplifier.
1 disturbance classification
 1.1 disturbance classification
 Disturbance classification there are many, you can usually follow the cause of noise, transmission mode, waveform characteristics of different classification. According to the generated reasons:
 Can be divided into the discharge noise, noise, high frequency oscillation surge noise.
 According to the conduction mode: can be divided into common mode noise and normal mode noise.According to the waveform: can be divided into continuous sine wave, pulse voltage, pulse sequence and so on.
 The 1.2 interference coupling method
 Interference source generated interference signal is passed through a coupling channel to measurement and control system has the function of. Therefore, it is necessary for us to have a look the interference source and interference between object transfer mode. Interference coupling modes, it is through the wire, space, a public line and so on, subdivision, basically have the following kinds:
( 1) the direct coupling:This is the most direct way, is also present in the system the most widespread way. For example, interference signals through the power line into system. In this form, the most effective method is to join the decoupling circuit.
( 2) the coupling of common impedance:It is also common to coupling mode, this form is often occurred in the two circuit current have the common pathway of. In order to prevent this kind of coupling, usually in the circuit design to consider. The interference source and interference object without public impedance.
( 3) coupling capacitor:Also known as electric coupling or electrostatic coupling. Due to the existence of the distributed capacitance coupling.
( 4) the electromagnetic induction coupling:Also known as the magnetic field coupling. Is due to the distribution of electromagnetic induction and the coupling.
( 5) leakage coupling:This coupling is purely resistive, occurs in insulation is not good.2 commonly used hardware anti jamming technologyAccording to the interference in formation of three elements, the anti-jamming mainly has the following means.2.1 suppresses the interference sourceSuppression of interference source is as far as possible to reduce the interference source Du / DT, di / dt. This is the anti-interference design in the most preferred and most important principle, often will play a multiplier effect. Reduce the interference source Du / dt mainly through the interference source are parallel capacitor to achieve. Reduce the interference source di / DT is the interference source loop series inductance or resistance and increase the freewheeling diode to realize.Suppression of interference source of commonly used measures are as follows:
( 1) the relay coil to increase the freewheeling diode, eliminate disconnect coil counter electromotive force generated interference. Only with a freewheeling diode makes the disconnecting relay time lag, increase the voltage stabilizing diode after relay in unit time can act more times.
( 2) in the relay contacts at both ends and is connected with the spark suppression circuit (usually RC series circuit, resistance generally choose several to dozens of K K 0.01uF, capacitor ), reduce the electric spark effect.
( 3) to the motor and filter circuit, capacitance, inductance that lead to as short as possible.
( 4) on the circuit board to each IC is connected with a 0.01 ~ F 0.1 ~ F high frequency capacitor, so as to reduce the effect of IC on power. Note frequency capacitance of the wiring, wiring should be close to the power supply end and to short, otherwise, is equal to increase the capacitance equivalent series resistance, will affect the filtering effect.
( 5) wiring to avoid 90 degree line, reduce the high frequency noise emission.
( 6) the two ends of the thyristor is connected with RC suppression circuit, reduce the noise generated by the controllable silicon ( this noise is serious when may put the silicon controlled breakdown ).
2.2 cut off the interference propagation pathAccording to the interference of the propagation path can be divided into two kinds of conduction interference and radiation interference.The so-called conduction interference refers to sensitive device through a wire communication interference. High frequency noise and the useful signal of different frequency bands, can pass through the wire increases filter method of severing of high-frequency noise propagation, sometimes also can add isolation optocoupler to solve. Power supply noise is the most dangerous, to pay special attention to the treatment of.The so-called radiation interference by means of space radiation transmitted into sensitive device interference. A general solution is to increase the interference source and sensitive devices with ground distance, their isolation and the sensitive device with shielding cover.Cut off the interference propagation path of commonly used measures are as follows:
( 1 ) give full consideration to the influence of the power chip. Power do well, the whole circuit interference is solved most of. Many SCM is very sensitive to power noises, to chip power filter circuit or a voltage regulator, to reduce power supply noise interference on the mcu. For example, you can use of magnetic beads and capacitive components - shaped filter circuit, of course, is not highly required also used 100 ohm resistance instead of beads.
( 2) if the MCU I / O ports used for control of motor noise device, in the I / O and noise sources should be added between isolation ( increased PI shaped filter circuit ).
( 3) note that crystal wiring. Crystal chip pins as close to the ground, with the clock zone isolation, grounding and fixed shell of crystal oscillator.
( 4) the circuit board reasonable zoning, such as strong, weak signal, digital, analog signal. As close as possible to the interference source (such as a motor, relay ) and sensitive element ( SCM) away from the.
(5 ) with the digital and analog ground area isolation. Digital and analog to separation, finally at one point connected to the power source. A / D, D / A chip wiring is also based on this principle.
( 6) single chip and large power device of wire to earth alone, in order to reduce the mutual interference. Large power device as far as possible, on the edge of a circuit board.
( 7 ) in the single chip microcomputer I / O port, power line, circuit board connection line and other key local use of interference elements such as beads, magnetic ring, shield, filter, can significantly improve the anti-jamming performance.2.3 to improve the anti jamming performance of sensitive devicesImprove sensitive device anti-interference performance is defined from the sensitive device here consider to minimize interference noise pickup, and never resumed as soon as the method of normal state.Improve sensitive device of anti interference performance of commonly used measures are as follows:
( 1) wiring minimize the loop area, in order to reduce the induction noise.
( 2) wiring, power line and ground line to coarse. In addition to reduce pressure drop, more important is reducing coupling noise.
( 3) for single idle I / O port, not suspended, to be grounded or connected to a power supply. Other IC idle end without changing the system logic of the grounding power supply.
(4 ) the use of SCM power supply monitoring and watchdog circuit, such as: IMP809, IMP706, IMP813, X5043, X5045, can greatly improve the anti-jamming performance.
( 5 ) in speed can meet the requirements of the premise, as far as possible to reduce chip crystal oscillator and selection of low speed digital circuit.
( 6) the IC device to directly welded on the circuit board, using less IC seat.2.4 other commonly used anti interference measures
( 1 ) exchange terminal inductance capacitance filter: remove high frequency interference pulse.
( 2) transformer dual isolation measures: transformer primary input end is connected capacitor, primary, secondary coil between the shielding layer and the primary capacitance between the center contact earth, secondary external shielding layer connected with the printed circuit board, which is the key means of hardware anti interference. Secondary plus low-pass filter: absorbing surge voltage transformer.
( 3) adopting integrated type DC regulated power supply: there are overcurrent, overvoltage, overheat protection function.
( 4) I / O by using photoelectric relay, magnetic, isolation, and remove the public.
( 5) communication lines with twisted pair: exclusion of parallel transformer.
( 6) lightning protection using optical fiber isolation is most effective.
( 7) A / D conversion isolation amplifier or the scene transitions : reduction of error.
( 8) shell connected with earth: settlement of personal safety and anti electromagnetic interference.
( 9) and a reset voltage detection circuit. To prevent the reduction is not full, CPU, especially EEPROM device, reset would not be sufficient to change the content of EEPROM.
( 10) printed board process anti interference:
A power line, bold, reasonable line, grounding, three bus separately to reduce the mutual inductance oscillating.
B, CPU, RAM, ROM chip, VCC and GND connected between the electrolytic capacitors and ceramic capacitors, removing the high, low frequency interference signals.
C, independent system structure, reduce the connector and connection, improve reliability, reduce the failure rate.
D, integrated block and the socket contact is reliable, with a socket, preferably integrated block is directly welded on a printed circuit board, to prevent the device contact fault.
E, conditional with more than four layers of printed board, two middle layers as power and ground.