(1) Select a low frequency microcontroller:
The use of a microcontroller with a low external clock frequency can effectively reduce noise and improve the system's anti-interference ability. For square waves and sine waves of the same frequency, the high frequency components in the square wave are much more than the sine waves. Although the amplitude of the wave of the high-frequency component of the square wave is smaller than the fundamental wave, the higher the frequency, the easier it is to emit the noise source. The most influential high-frequency noise generated by the microcontroller is about three times the clock frequency.
(2) Reduce distortion in signal transmission
Microcontrollers are primarily manufactured using high speed CMOS technology. The static input current of the signal input terminal is about 1mA, the input capacitance is about 10PF, and the input impedance is quite high. The output of the high-speed CMOS circuit has considerable load capacity, that is, a considerable output value, and the output of one gate passes a very long period. The long line leads to the input with a relatively high input impedance, and the reflection problem is very serious, which causes signal distortion and increases system noise. When Tpd>Tr, it becomes a transmission line problem, and signal reflection, impedance matching, etc. must be considered.
The delay time of the signal on the printed board is related to the characteristic impedance of the lead, which is related to the dielectric constant of the printed wiring board material. It can be roughly assumed that the transmission speed of the signal on the printed circuit board leads is between about 1/3 and 1/2 of the speed of light. The Tr (standard delay time) of a logical telephone component commonly used in a system composed of a microcontroller is between 3 and 18 ns.
On the printed circuit board, the signal passes through a 7W resistor and a 25cm lead, and the line delay time is approximately 4~20ns. That is to say, the shorter the lead of the signal on the printed circuit, the better, the longest should not exceed 25cm. Also, the number of vias should be as small as possible, preferably no more than two.
When the rise time of the signal is faster than the signal delay time, it must be processed according to fast electronics. In this case, the impedance matching of the transmission line should be considered. For the signal transmission between the integrated blocks on a printed circuit board, the situation of Td>Trd should be avoided. The larger the printed circuit board, the less the speed of the system should 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 the delay time should not be greater than the nominal delay time of the device used.
(3) Reduce cross interference between signal lines:
At step A, a step signal with a rise time of Tr is transmitted through the lead 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 reaching point B and the delay of the AB line, a page pulse signal of width Tr is induced after Td time. At point C, due to the transmission and reflection of the signal on the AB, a width of twice the delay time of the signal on the AB line, that is, a positive pulse signal of 2Td, is induced. This is the cross interference between the signals. The strength of the interfering signal is related to the di/at of the C-point signal and to the distance between the lines. When the two signal lines are not very long, what is seen on AB is actually the superposition of two pulses.
The micro-control made by CMOS technology has high input impedance, high noise and high noise tolerance. The digital circuit is superimposed with 100~200mv noise and does not affect its operation. If the AB line in the figure is an analog signal, this interference becomes intolerable. For example, if the printed circuit board is a four-layer board, one of which is a large-area ground or a double-panel, and the reverse side of the signal line is a large-area ground, the cross-interference between such signals becomes small. The reason is that the large-area ground reduces the characteristic impedance of the signal line, and the reflection of the signal at the D-end is greatly reduced. The characteristic impedance is inversely proportional to the square of the dielectric constant of the medium between the signal line and the ground, and is proportional to the natural logarithm of the thickness of the medium. If the AB line is an analog signal, to avoid the interference of the digital circuit signal line CD to AB, there should be a large area below the AB line, and the distance from the AB line to the CD line is greater than 2 to 3 times the distance between the AB line and the ground. A local shield can be used to ground the left and right sides of the leads on the lead side.
(4) Reduce noise from the power supply
While the power supply supplies power to the system, it also adds its noise to the power supply that is being supplied. The reset lines, interrupt lines, and other control lines of the microcontroller in the circuit are most susceptible to external noise. Strong interference on the electrical network enters the circuit through the power supply. Even in battery-powered systems, the battery itself has high frequency noise. Analog signals in analog circuits are more resistant to interference from the power supply.