First, the following some of the system to pay special attention to anti-electromagnetic interference

1, the microcontroller clock frequency is particularly high, the bus cycle is particularly fast system.
2, the system contains high-power, high current drive circuit, such as the spark of the relay, high current switch.
3, with weak analog signal circuit and high-precision A / D converter circuit system.

Second, in order to increase the system's anti-electromagnetic interference ability to take the following measures

1, the choice of low frequency microcontrollers
The use of low external clock frequency microcontrollers can effectively reduce noise and improve the system's anti-jamming capability. The same frequency of square wave and sine wave, square wave in the high-frequency components than the sine wave much more. Although the amplitude of the wave of the high frequency component of the square wave is smaller than that of the fundamental wave, the higher frequency is easier to emit as a noise source, the most influential high frequency noise generated by the microcontroller is about three times the clock frequency.

2, to reduce the distortion in the signal transmission
Microcontrollers are mainly manufactured using high-speed CMOS technology. Signal input side of the static input current of about 1mA, the input capacitor 10PF or so, the input impedance is very high, high-speed CMOS circuit output has a considerable load capacity, that is a considerable output value, a door output through a very Long lines lead to a very high input impedance input, the reflection problem is very serious, it will cause signal distortion, increase system noise. When Tpd> Tr, it becomes a transmission line problem, must consider the signal reflection, impedance matching and other issues.

The delay time of the signal on the printed circuit board is related to the characteristic impedance of the lead, that is, the dielectric constant of the printed circuit board material. It can be roughly assumed that the transmission speed of the signal in the printed circuit board is about 1/3 to 1/2 of the speed of light. The Tr (standard delay time) of the commonly used logical telephone elements in the system constituted by the microcontrollers is between 3 and 18 ns.

On the printed circuit board, the signal passes through a 7W resistor and a 25cm long lead, and the line delay time is approximately between 4 and 20ns. In other words, the signal on the printed circuit lead the shorter the better, the longest should not exceed 25cm. And the number of vias should be as little as possible, preferably no more than two.

When the rise time of the signal is faster than the signal delay time, it is necessary to follow the fast electronically. At this time to consider the transmission line impedance matching, for a printed circuit board on the integrated block between the signal transmission, to avoid the emergence of Td> Trd situation, the greater the speed of the printed circuit board system can not be too fast.

Use the following conclusions to summarize a rule for printed circuit board design:
The signal is transmitted on the printed board and its delay time should not be greater than the nominal delay time of the device used.

3, to reduce the signal line between the * interference
A step signal with a rise time Tr is passed through line AB to the B terminal. The delay time of the signal on the AB line is Td. At point D, due to the forward transmission of the A-point signal, the signal reflection after the point B and the delay of the AB line, the time delay of the Td time will induce a page pulse signal with a width Tr. At point C, due to the transmission and reflection of the signal on the AB, it will sense a width of twice the delay time of the signal on the AB line, that is, 2Td positive pulse signal. This is the interference between the signals. The intensity of the interfering signal is related to the di / at of the C-point signal, which is related to the distance between lines. When the two signal lines are not very long, AB is actually seen on the two pulse superposition.

CMOS technology manufacturing micro-control by the input impedance is high, high noise, noise margin is also high, the digital circuit is superimposed 100 ~ 200mv noise does not affect its work. If the AB line is an analog signal, this interference becomes intolerable. If the printed circuit board is a four-layer board, where one layer is a large area, or double-sided, the opposite side of the signal line is a large area, the interference between the signals will become smaller. The reason is that a large area to reduce the characteristic impedance of the signal line, the signal at the D-side of the reflection is greatly reduced. The characteristic impedance is inversely proportional to the square of the dielectric constant of the signal line to ground, which is proportional to the natural logarithm of the thickness of the medium. If the AB line is an analog signal, to avoid the digital circuit signal line CD on the AB interference, AB line below a large area to the AB line to the CD line distance is greater than the AB line and distance of 2 to 3 times. Can be used to shield the local, in the lead side of the left and right sides of the cloth to the ground line.

4, reduce the noise from the power supply
The power supply adds energy to the power supply while supplying energy to the system. Circuit in the microcontroller reset line, interrupt line, and some other control lines are most susceptible to external noise interference. Strong interference on the grid through the power into the circuit, even if the battery-powered system, the battery itself also has high-frequency noise. Analog circuits in the analog signal can not withstand the interference from the power supply.

5, pay attention to the printed circuit board and components of the high-frequency characteristics
In the case of high frequency, the printed circuit board on the lead, through the hole, resistance, capacitance, connector distribution inductance and capacitance can not be ignored. Capacitance distribution inductance can not be ignored, the inductive distributed capacitance can not be ignored. The resistance produces a reflection of the high frequency signal, and the distributed capacitance of the lead will act. When the length is greater than 1/20 of the corresponding wavelength of the noise frequency, the antenna effect is generated and the noise is emitted through the lead.

Printed circuit board vias cause about 0.6pf of capacitance.
An integrated circuit itself encapsulates the material into a 2 ~ 6pf capacitor.
A connector on a circuit board has a 520nH distributed inductance. A double-stranded 24-pin integrated circuit block, the introduction of 4 ~ 18nH distributed inductance.
These small distribution parameters are negligible for microcontrollers in this lower frequency system, and special attention must be paid to high speed systems.

6, the components should be a reasonable layout
Elements in the printed circuit board on the arrangement of the location to fully consider the anti-electromagnetic interference problem, one of the principles is the lead between the components to be as short as possible. In the layout, the analog signal part, high-speed digital circuit part, the noise source part (such as the relay, high current switch, etc.) these three parts are reasonably separated, so that the signal coupling between the smallest.

Handle the ground wire

Printed circuit boards, the most important power lines and ground. To overcome the electromagnetic interference, the most important means is to ground.
For the double-panel, the ground layout of particular attention, through the use of single-point grounding method, power and ground from the power supply at both ends connected to the printed circuit board, the power of a contact, to a contact. Printed circuit board, to have more than return to the ground, which will be gathered back to the power of that contact, is the so-called single point ground. The so-called analog ground, digital ground, high-power device to open points, refers to the wiring separated, and finally brought together to the ground point up. When connected to a signal other than a printed circuit board, a shielded cable is usually used. For high frequency and digital signals, both ends of the shielded cable are grounded. Low-frequency analog signal with a shielded cable, one end of the ground as well.
Circuites that are very sensitive to noise and interference or circuits with severe high frequency noise should be shielded with metal shields.