Power line layout in PCB design
1. Power cord layout:
1. According to the current size, try to widen the wire wiring.
2. The direction of the power cord and ground wire should be consistent with the direction of data transmission.
3. A decoupling capacitor of 10~100μF should be connected to the power input end of the printed board.
Two ground wire layout:
1. The digital ground is separated from the analog ground.
2. The grounding wire should be as thick as possible, so that it can pass 3 times the allowable current on the printed board, and generally should be 2~3mm.
3. In the PCB layout design, the ground wire should form an endless loop as much as possible, so as to reduce the potential difference of the ground wire.
Three decoupling capacitor configuration:
1. Connect a 10~100μF electrolytic capacitor across the power input end of the printed board, if it can be greater than 100μF, it is better.
2. Connect a 0.01~0.1μF ceramic capacitor between Vcc and GND of each integrated chip. If space is not allowed, a 1~10μF tantalum capacitor can be configured for every 4~10 chips.
3. Devices with weak anti-noise ability and large change in turn-off current, as well as ROM and RAM, should indirectly decoupling capacitors between Vcc and GND.
4. Match a 0.01μF decoupling capacitor on the reset terminal "RESET" of the microcontroller.
5. The leads of decoupling capacitors should not be too long, especially high-frequency bypass capacitors.
Four device configuration:
1. The clock input terminals of the clock generator, crystal oscillator and CPU should be as close as possible and far away from other low-frequency devices.
2. Keep small current circuits and high current circuits away from logic circuits as much as possible.
3. The position and direction of the printed board in the chassis should ensure that the device with a large amount of heat is on the top.
Five power lines, AC lines and signal lines are routed separately
The power line and AC line should be placed on a different board from the signal line as much as possible, otherwise they should be routed separately from the signal line.
Six other principles:
1. Add a pull-up resistor of about 10K to the bus, which is conducive to anti-interference.
2. When wiring, the address lines should be as long as possible and as short as possible.
3. The lines on both sides of the PCB should be arranged vertically as far as possible to prevent mutual interference.
4. The size of the decoupling capacitor is generally C=1/F, and F is the data transmission frequency.
5. Unused pins are connected to Vcc through a pull-up resistor (about 10K), or connected in parallel with the used pins.
6. Heat-generating components (such as high-power resistors, etc.) should avoid components that are easily affected by temperature (such as electrolytic capacitors, etc.).
7. The use of full decoding has stronger anti-jamming performance than line decoding.
In order to control the interference of high-power devices on the digital element circuit of the microcontroller and the interference of the digital circuit on the analog circuit, the digital ground and the analog ground should be connected to the common ground point with a high-frequency choke ring. This is a cylindrical ferrite magnetic material with several holes in the axial direction. A thicker copper wire is passed through the holes and wound around one or two turns. This kind of device can be regarded as zero impedance for low-frequency signals., Interference to high-frequency signals can be regarded as an inductance. . (Due to the large DC resistance of inductors, inductors cannot be used as high-frequency chokes).
When signal wires other than the printed circuit board are connected, shielded cables are usually used. For high-frequency signals and digital signals, both ends of the shielded cable should be grounded. For shielded cables for low-frequency analog signals, one end should be grounded.
Circuits that are very sensitive to noise and interference or circuits that are particularly high-frequency noise should be shielded with a metal cover. The effect of ferromagnetic shielding on 500KHz high-frequency noise is not obvious, and the shielding effect of thin copper is better. When using screws to fix the shield, pay attention to the corrosion caused by the potential difference caused by the contact of different materials
Seven use decoupling capacitors
The decoupling capacitor between the power supply of the integrated circuit and the ground has two functions: on the one hand, it is the energy storage capacitor of the integrated circuit, and on the other hand, it bypasses the high frequency noise of the device. The typical decoupling capacitor value in digital circuits is 0.1μF. The typical value of the distributed inductance of this capacitor is 5μH. The 0.1μF decoupling capacitor has a distributed inductance of 5μH, and its parallel resonance frequency is about 7MHz. That is to say, it has a better decoupling effect for noise below 10MHz, and has little effect on noise above 40MHz.
Capacitors of 1μF and 10μF, and the parallel resonance frequency is above 20MHz, the effect of removing high-frequency noise is better.
Every 10 pieces of integrated circuits need to add a charge and discharge capacitor, or an energy storage capacitor, about 10μF can be selected. It is best not to use electrolytic capacitors. Electrolytic capacitors are rolled up with two layers of film. This rolled up structure behaves as an inductance at high frequencies. Use tantalum capacitors or polycarbonate capacitors.
The selection of decoupling capacitors is not critical. You can press C=1/F, that is, 0.1μF for 10MHz and 0.01μF for 100MHz.
When soldering, the pins of the decoupling capacitor should be as short as possible. Long pins will cause the decoupling capacitor itself to self-resonate. For example, the self-resonant frequency of a 1000pF ceramic capacitor with a pin length of 6.3mm is about 35MHz, and when the pin length is 12.6mm, it is 32MHz.
Eight experience in reducing noise and electromagnetic interference
Anti-interference design principles of printed circuit boards
1. A series of resistors can be used to reduce the jump rate of the upper and lower edges of the control circuit.
2. Try to make the potential around the clock signal circuit close to 0, circle the clock area with the ground wire, and the clock wire should be as short as possible.
4. Do not leave the output terminal of the gate circuit that is not in use. The positive input terminal of the unused operational amplifier should be grounded, and the negative input terminal should be connected to the output terminal.
5. Try to use a 45° fold line instead of a 90° fold line, wiring to reduce the external emission and coupling of high-frequency signals.
6. The clock line perpendicular to the I/O line has less interference than the parallel to the I/O line.
6. The pin of the component should be as short as possible.
8. Do not run wires under the quartz crystal or under components that are particularly sensitive to noise.
9. Do not form a current loop around the weak signal circuit and the ground wire of the low frequency circuit.
10. When necessary, add ferrite high-frequency choke to the circuit to separate signal, noise, power, and ground.
The PCB factory causes a distributed capacitance of 2pF~10pF in its own packaging materials; a connector on a circuit board has a distributed inductance of 520μH; a dual-in-line 24-pin integrated circuit socket introduces a distributed inductance of 4μH~18μH.
The above is the design distribution of the PCB factory for the circuit.