PCB, is also called as printed circuit board, and can achieve the wire connection and functions of electronic components. It is an important part in power circuit design. Basic rules of PCB layout wiring are introduced here.
♦ Rules of component layout
1. Different circuit modules are divided, and related circuits that fulfill one function are called as one module. The components at one module should be centered, and the digital circuit and the analog circuit are separated;
2. Components, screws and so on shall not be mounted within 1.27mm around non-mounting holes such as fiducial holes and standard holes, and components shall not be mounted within 3.5mm (for M2.5) and 4mm (for M3) around the mounting hole;
3. VIAs should be avoided to be laid under components such as horizontally mounted resistors, inductors (plug-ins), and electrolytic capacitors to avoid short circuit between the vias and the component housing after wave soldering;
4. The outside of components is 5mm from the board edge;
5. The distance between the outside of the pad of the mounting component and the outside of the adjacent insertion component is greater than 2mm;
6. Metal shell components and metal parts (shielding boxes, etc.) should not touch other components, and should not be close to the printed wires and pad, and their spacing should be greater than 2mm. The outside of the positioning hole, the fastener mounting hole, the elliptical hole and other square holes in the board are greater than 3mm from the edge of the board;
7. The heating components should not be in close proximity to the wires and the thermal elements; High-heating devices should be evenly distributed;
8. The power socket should be arranged around the printed board, and the busbar terminal connected to the power socket should be arranged on the same side of the power socket. Special care should be taken not to arrange power sockets and other solder connectors between the connectors, so as to facilitate the soldering of these sockets and connectors, as well as the design and wiring of power cables. The spacing of power sockets and soldering connectors should be considered to facilitate the insertion and unplugging of power plugs;
9. Arrangement of other components: all IC components are unilaterally aligned, the polarity of polar components is clearly marked, and the polarity marks on the same printed board shall not be more than two directions, and when there are two directions, the two directions are perpendicular to each other;
10. The wires on the board should be sparse properly, and when the density difference is too large, mesh copper foil should be filled, and the mesh copper foil grid should be greater than 8mil (or 0.2mm);
11. There should be no through holes on the SMD pads, so as to avoid the loss of solder paste and the false soldering of components. Important signal wires are not allowed to pass through the socket pins;
12. The SMD is unilaterally aligned, the character direction is consistent, and the packaging direction is consistent;
13. Polarized devices on the same board should be as consistent as possible in the direction indicated by the polarity.
♦ Component wiring rules
1. Wires should not be within 1 mm from the PCB edge, and not be within 1mm around mounting holes;
2. Power wires should be as wide as possible, and power wire width should be no less than 18 mil, and signal wire width should be no less than 12mil, CPU inlet and outlet wires width should be no less than 10mil(or 8mil). Spacing between wires should be no less than 10mil.
3. Common through hole diameter should be no less than 30 mil;
4. Dual in-line: pad 60mil, hole diameter 40mil;
1/4W resistance: 51*55mil (0805 surface mount); The pad is 62mil and the aperture is 42mil;
Electrode capacitance: 51*55mil (0805 surface mount); The pad is 50mil and the hole diameter is 28mil;
5. Note that the power wire and ground wire should be radial as much as possible, and the signal wire should not have loops.
♦ How to improve anti-interference ability and electromagnetic compatibility?
When electronic products with processors are developed, how to improve anti-interference ability and electromagnetic compatibility?
1. Anti-electromagnetic interference should be cared by the following systems:
1) Systems with particularly high clock frequencies of micro-controllers and particularly fast bus cycles.
2) Systems with big power and big current drive circuits, such as spark-generating relays and high-current switches.
3) Systems that include a weak analog signal circuit and a high-precision A/D conversion circuit.
2. The following measures can be adopted to increase anti-electromagnetic interference of system:
1) Micro-controllers with low frequencies should be adopted:
The selection of a micro-controller with a low external clock frequency can effectively reduce noise and improve the anti-interference ability of the system. For square waves and sine waves of the same frequency, there are many more high-frequency components in square waves than sine waves.
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 the frequency, the easier it is to emit and become a source of noise, and the high-frequency noise generated by the micro-controller is about three times the frequency of the clock.
2) Reduce distortion in signal transmission
Micro-controllers are mainly produced by high speed CMOS technology. The quiescent input current at the signal input terminal is about 1mA, and the input capacitance is about 10PF, and the input impedance is quite high. The output of high-speed CMOS circuits has a considerable load capacity, that is, a very high output value. The output of a gate is led to the input with a fairly high input impedance through a very long wire, and the reflection problem is very serious, which will cause signal distortion and increase system noise. When Tpd is greater than Tr, this is a transmission problem, and signal reflection and impedance matching should be considered.
The delay time of signal on the PCB is related with the characteristic impedance of the lead, that is , it is connected with permittivity of PCB materials. It is believed that the speed at which a signal travels through the PCB leads is about 1/3 to 1/2 of the speed of light. Tr (standard delay time)of commonly used logic telephone components in micro-controller systems is 3 to 18 ns.
On a PCB, signal needs to go through a 7 W resistance and a 25 cm lead, and delay time on the lead is about 4--20ns. The lead for signal on PCB is shorter, and the better, and the lead length should be no more than 25 cm. Besides, the number of through holes should be as small as possible, and should be no more than 2.
When the rise time of the signal is faster than the delay time of the signal, impedance matching of signal transmission wire should be considered. For the signal transmission between the integrated modules on a printed circuit board, it is necessary to avoid Td≥Trd. If PCB is comparatively big, the system speed cannot be too fast.
One rule for PCB design can be concluded as: when signal is transmitted on PCB, signal delay time cannot be greater than the nominal delay time of used components.
3) Reduce cross interruption between signals
The rise time of A point is the step signal of Tr goes through the lead AB to the B terminus. The delay time of the signal on the AB wire is Td. At point D, due to the forward transmission of the signal at point A, the reflection of the signal after reaching point B, and the delay of the AB wire, a page pulse signal with a width of Tr will be induced after the Td time. At point C, due to the transmission and reflection of the signal on AB wire, a positive pulse signal can be induced, and this signal width is twice the delay time of the signal on the AB wire, and this signal is 2Td. This is known as cross-interference between signals.
The strength of the interfering signal is related to the di/at of the signal at point C, and is related to the distance between the wires. When the two signal wires are not very long, what is actually seen on AB is the superposition of the two pulses.
The micro-control manufactured by CMOS process has high input impedance, high noise, and high noise tolerance, and the digital circuit is superimposed with 100~200mv noise which does not affect its work. If the AB wire in the diagram is an analog signal, this interference becomes intolerable. For example, when the printed circuit board is a four-layer board, one of which is a large area of ground, or a double-sided board, and the reverse side of the signal wire is a large area of ground, the cross-interference between such signals will be reduced.
The reason is that the characteristic impedance of the signal wire is reduced by a large area of ground, and the reflection of the signal at the D terminal is greatly reduced. The characteristic impedance is inversely proportional to the square of the dielectric constant of the medium between the signal wire and ground, and is proportional to the natural logarithm of the thickness of the medium.
If AB wire is an analog signal, the interference of the digital circuit signal wire CD to the AB wire should be avoided. A large area of ground should be below the AB wire, and the distance between AB wire to CD wire should be greater than the twice to three times of the distance between AB wire and ground.
4) Reduce the noises from power supply
Power supply offers energy for system and brings noises. The reset wires, interruption wires, and other control wires of the micro-controller in the circuit are susceptible to interference from external noise.
Strong interference enters into the circuit through power supply. For the system powered by batteries, the batteries have high frequency noises. The analog signal in the analog circuit is even less resistant to interference from the power supply.
5) The high frequency of printed circuit boards and components
In the case of high frequency, the leads, vias, resistors, capacitors, and distributed inductance and capacitors of connectors on the printed circuit board cannot be ignored. The distributed inductance of the capacitance is not negligible, and the distributed capacitance of the inductance is not negligible.
Vias in printed circuit boards cause a capacitance of approximately 0.6pf. The packaging material of an integrated circuit itself introduces a capacitor of 2~6pf. The connectors on a circuit board have distributed inductance of 520nH.
These parameters of micro-controller should be cared about under high frequency.
6) Components should be located at reasonable sections
The anti-electromagnetic interference problem should be fully considered when locations of components on PCB are arranged. And the principle is that the lead between components should be as short as possible. In terms of layout, it is necessary to reasonably separate the analog signal part, the high-speed digital circuit part, and the noise source part (such as relays, high-current switches, etc.), so that the signals are coupled with each other.
Major measure is grounding to overcome electromagnetic interference.
For double side board, single-point grounding method is used, the power supply and ground are connected to the printed circuit board from both ends of the power supply, the power supply is a contact, and the ground is a contact. There are many ground wires that will gather to the contact of power supply, and this is single-point grounding method.
The so-called analog, digital, and high-power device separation are the separation of wiring, and all gather on this grounding point. When a signal other than a printed circuit board signal is connected, shielded cables are usually used. For high frequency signal and digital signal, both ends of shielded cables are grounded. If shielded cables are used for low frequency analog signal, the one end of shielded cables is grounded.
Circuits that are very sensitive to noise and interference, or circuits that have very serious high-frequency noise, should be shielded with a metal cover.
1) Decoupling capacitors should be used
A good high frequency decoupling capacitor can remove the high frequency up to 1GHZ. Ceramic capacitors or multi-layer ceramic capacitors have better high-frequency characteristics. When a printed circuit board is designed, a decoupling capacitor is added between the power supply of each integrated circuit and ground.
The decoupling capacitor has two functions: on the one hand, it is the energy storage capacitor of the integrated circuit, which provides and absorbs the charging and discharging energy at the moment when the integrated circuit is switched on or off; On the other hand, the high-frequency noise of the capacitor is bypassed.
Typical decoupling capacitor in digital circuits is 0.1uf one with 5nH distributed inductance, and its parallel resonance frequency is about 7MHz, which means that it has a good decoupling effect on noise below 10MHz, and almost no effect on noise more than 40MHz.
The parallel resonance frequency of 1uf and 10uf capacitor is over 20MHz, the effect of removing high-frequency noise is better.
For every 10 or so integrated circuits, a charge-discharge capacitor should be added, or a storage and discharge capacitor, and the capacitor size can be 10uf. Instead of using electrolytic capacitors, electrolytic capacitors are rolled up in two layers of film, and this rolled-up structure behaves as inductance at high frequencies, but bile capacitors or polycarbonate capacitors are adopted.
The value of decoupling capacitor can be calculated as C=1/f, and that is value of decoupling capacitor is 0.1uf at 10MHz. And the value of decoupling capacitor is 0.1~0.01uf for the system composed by micro-controllers.
1. Some methods to decrease noises and electromagnetic interference.
1) A resistor can be used to reduce the skipping rate of the upper and lower edges of the control circuit.
2) Try to provide some form of damping for relays, etc.
3) The frequency clock that satisfies system requirements should be used.
4) The clock generator is as close as possible to the device that uses the clock. The quartz crystal oscillator housing should be grounded.
5) Clock sections should be surrounded by ground wires, and clock wires should be as short as possible.
6) The signal entering the printed board should be filtered, and the signal from the high noise area should also be filtered.
7) The printed board should use 45 polylines instead of 90 polylines of wiring as much as possible to reduce the external emission and coupling of high-frequency signals.
8) The printed board is divided into different sections according to the frequency and current switching characteristics, and the noise components should be further away from the non-noise components.
9) Single-point power supply and single-point grounding can be used for single-sided and double-sided boards, and power wires and ground wires should be as thick as possible.
10) Clocks, buses, and selected signals should be kept away from I/O wires and connectors.
11) The analog voltage input wires and reference voltage terminal should be kept as far away as possible from the digital circuit signal wires, especially the clock.
12) If clock wire is vertical to I/O wire rather than parallel to I/O wire, the interference becomes smaller. The clock pins are away from the I/O cables.
13) Keep the component pins as short as possible and the decoupling capacitor pins as short as possible.
14) Wires should not be below quartz crystals and noise-sensitive devices.
15) Weak signal circuits and low-frequency circuits do not form current loops.
16) Do not form a loop at any signal, and if unavoidable, keep the loop area as small as possible.
17) There should be one decoupling capacitor at one integrated circuit. A small high-frequency bypass capacitor is added to each electrolytic capacitor.
18) Use large-capacity tantalum capacitors or polycool capacitors instead of electrolytic capacitors as circuit charging and discharging energy storage capacitors. When tubular capacitor are used, its housing should be grounded.