- 07
- Mar
A summary of PCB layout skills
PCB, also known as Printed Circuit Board, can realize circuit connection and function realization between electronic components, and is also an important part of power circuit design. This article will introduce the basic rules of PCB layout and routing today.
pcba
Basic rules for component layout
1. The layout shall be carried out according to the circuit module, and the relevant circuit that realizes the same function is called a module. The components in the circuit module shall adopt the principle of nearby concentration, and the digital circuit and analog circuit shall be separated.
2. Elements and components shall not be mounted within 1.27mm around non-mounting holes such as positioning holes and standard holes, and components shall not be mounted within 3.5mm (for M2.5) and 4mm (for M3) around mounting holes such as screws.
3. Avoid arranging through holes under horizontally mounted resistors, inductors (plug-in), electrolytic capacitors and other components to avoid short circuit between through holes and component shell after wave soldering.
4. The distance between the outer side of the components and the board edge is 5mm.
5. The distance between the outside of the bonding pad of the mounting element and the outside of the adjacent plug-in element is more than 2mm.
6. Metal shell components and metal parts (shielding box, etc.) shall not collide with other components, and shall not close to printed wire and bonding pad, and the distance between them shall be greater than 2mm. The dimension from the outside of positioning hole, fastener installation hole, elliptical hole and other square holes in the plate to the plate edge is greater than 3mm.
7. The heating element shall not be close to the wire and thermal element; High-temperature devices should be evenly distributed.
8. The power socket shall be arranged around the printed board as far as possible, and the bus terminal connected to the power socket shall be arranged on the same side. Special attention should be paid not to place power sockets and other welding connectors between connectors, in order to facilitate the welding of these sockets and connectors, and the design and binding of power cables. The space between power sockets and welding connectors shall be convenient for plug and pull of power plugs.
9. Layout of other components: all IC components shall be aligned on one side, and the polarity of the components with polarity shall be clearly marked. The polarity mark on the same printed board shall not be more than two directions. When there are two directions, the two directions shall be perpendicular to each other.
10. The board wiring shall be properly dense. When the density difference is too large, it shall be filled with mesh copper foil, and the mesh shall be greater than 8mil (or 0.2mm).
11. There should be no through-holes on the patch pad to prevent the loss of solder paste from causing faulty soldering of components. Important signal lines are not allowed to pass through the socket pins.
12. The patch is aligned on one side, the character direction is consistent, and the packaging direction is consistent.
13. For devices with polarity, the direction of polarity indication on the same board shall be consistent as far as possible.
Component wiring rules
1. No wiring is allowed in the area of ≤ 1mm from the PCB board edge and 1mm around the mounting hole.
2. The power line shall be as wide as possible and not less than 18mil; The signal line width shall not be less than 12mil; The CPU incoming and outgoing lines should not be less than 10mil (or 8mil); Line spacing shall not be less than 10mil.
3. Normal through hole shall not be less than 30mil.
4. Dual in-line: 60mil pad, 40mil aperture.
L 1/4W resistance: 51 * 55mil (0805 surface sticker); When inserting directly, the pad is 62mil and the hole diameter is 42mil.
L Non-polar capacitance: 51 * 55mil (0805 surface sticker); In case of direct insertion, the pad is 50mil, and the aperture is 28mil.
5. Note that the power line and ground wire should be radial as far as possible, and the signal line should not be looped.
How to improve anti-interference ability and electromagnetic compatibility?
How to improve anti-interference ability and electromagnetic compatibility when developing electronic products with processors?
1. The following systems should pay special attention to anti-electromagnetic interference:
(1) Microcontroller clock frequency is particularly high and bus cycle is particularly fast.
(2) The system contains high-power and high-current drive circuits, such as spark generating relays, high-current switches, etc.
(3) The system includes weak analog signal circuit and high-precision A/D conversion circuit.
2. The following measures are taken to increase the anti-electromagnetic interference capability of the system:
(1) Select the microcontroller with low frequency:
Selecting a microcontroller with low external clock frequency can effectively reduce noise and improve the anti-interference ability of the system. For square wave and sine wave of the same frequency, the high-frequency component of square wave is much more than that of sine wave.
Although the amplitude of the high-frequency component of the square wave is smaller than the fundamental wave, the higher the frequency is, the easier it is to be emitted as a noise source. The influential high-frequency noise generated by the microcontroller is about three times the clock frequency.
(2) Reduce distortion in signal transmission
The microcontroller is mainly manufactured by high-speed CMOS technology. The static input current at the signal input end is about 1mA, the input capacitance is about 10PF, and the input impedance is quite high. The output end of the high-speed CMOS circuit has a considerable load capacity, that is, a considerable output value. When the output end of a gate is led to the input end with a very high input impedance through a long line, the reflection problem is very serious. It will cause signal distortion and increase system noise. When Tpd>Tr, it becomes a transmission line problem. We must consider 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 considered that the transmission speed of signal in the lead of printed circuit board is about 1/3 to 1/2 of the speed of light. The Tr (standard delay time) of common logic telephone elements in the system composed of microcontroller 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 online delay time is about 4~20ns. In other words, the shorter the signal lead on the printed circuit, the better, and the length should not exceed 25cm. And the number of vias should be as small as possible, not more than 2.
When the rise time of the signal is faster than the delay time of the signal, it should be processed according to fast electronics. At this time, the impedance matching of the transmission line should be considered. For the signal transmission between integrated blocks on a printed circuit board, Td>Trd should be avoided. The larger the printed circuit board, the faster the system speed should be.
A rule of PCB design is summarized with the following conclusion: the delay time of signal transmission on the PCB should not be greater than the nominal delay time of the device used.
(3) Reduce cross interference between signal lines:
A step signal with rise time of Tr at point A is transmitted to terminal B through lead AB. The delay time of signal on AB line is Td. At point D, due to the forward transmission of signal at point A, the signal reflection after reaching point B and the delay of AB line, a page pulse signal with a width of Tr will be induced after Td time. At point C, due to the transmission and reflection of the signal on AB, a positive pulse signal with a width twice the delay time of the signal on AB will be induced, that is, 2Td. This is the cross interference between signals.
The strength of the interference signal is related to the di/at of the signal at point C and the distance between 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 does not affect its operation by adding 100-200mv noise. If line AB in the figure is an analog signal, such interference will become intolerable. For example, if 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 line is a large area of ground, the cross interference between the signals will be reduced.
The reason is that the characteristic impedance of the signal line is reduced in a large area, 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 from the signal line to the ground, and is directly proportional to the natural logarithm of the thickness of the medium.
If the AB line is an analog signal, the interference of the digital circuit signal line CD to AB should be avoided. There should be a large area of ground below the AB line, and the distance between the AB line and the CD line should be 2-3 times greater than the distance between the AB line and the ground. The ground wire can be laid on the left and right sides of the lead wire with a junction by local shielding.
(4) Reduce noise from power supply
While the power supply provides energy to the system, it also adds its noise to the power supply. The reset line, interrupt line and other control lines of the microcontroller in the circuit are easily disturbed by external noise.
The strong interference on the power grid enters the circuit through the power supply. Even in the battery-powered system, the battery itself also has high-frequency noise. The analog signal in the analog circuit can not withstand the interference from the power supply.
(5) Pay attention to the high-frequency characteristics of printed wire boards and components
At high frequency, the lead, via, resistance, capacitance, distributed inductance and capacitance of the connector on the printed circuit board cannot be ignored. The distributed inductance of capacitance cannot be ignored, and the distributed capacitance of inductance cannot be ignored.
The resistance will reflect the high-frequency signal, and the distributed capacitance of the lead will play a role. When the length is greater than 1/20 of the corresponding wavelength of the noise frequency, the antenna effect will be generated, and the noise will be emitted outward through the lead.
The via of the printed circuit board causes about 0.6pf capacitance. A 2~6pf capacitor is introduced into the packaging material of an integrated circuit itself. The connector on a circuit board has 520nH distributed inductance. A 24-pin integrated circuit socket with double in-line inserts, introducing 4~18nH distributed inductance.
These small distributed parameters can be ignored in the microcontroller system at low frequency; Special attention must be paid to high-speed systems.
(6) Element layout shall be reasonably partitioned
The anti-electromagnetic interference problem shall be fully considered when the components are arranged on the printed circuit board. One of the principles is that the lead between the components shall be as short as possible. In terms of layout, the analog signal part, high-speed digital circuit part, and noise source part (such as relay, high-current switch, etc.) should be reasonably separated so that the signals between them can be coupled into.
Handle the ground wire well: on the printed circuit board, the power wire and ground wire are important. The main means to overcome electromagnetic interference is grounding.
For double-sided boards, the ground wire layout is particularly particular. Through the single-point grounding method, the power supply and ground are connected from both ends of the power supply to the printed circuit board, with one contact for the power supply and one contact for the ground. On the printed circuit board, there should be multiple return ground wires, which will converge to the contact of the return power supply, which is called single-point grounding.
The so-called opening of analog ground, digital ground and high-power devices means that the wiring is separated and all are gathered at this grounding point. When connecting with signals other than printed circuit boards, shielded cables are usually used. For high-frequency and digital signals, both ends of the shielded cable are grounded. Shielded cable for low-frequency analog signal shall be grounded at one end.
Circuits that are very sensitive to noise and interference or circuits with high frequency noise should be shielded with metal covers.
(7) Use decoupling capacitor well
A good high-frequency decoupling capacitor can remove high-frequency components up to 1GHZ. Ceramic chip capacitors or multilayer ceramic capacitors have good high-frequency characteristics. When designing a printed circuit board, a decoupling capacitor should be added between the power supply and ground of each integrated circuit.
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 of the integrated circuit at the moment of opening and closing the door; On the other hand, bypass the high-frequency noise of the device.
The typical decoupling capacitance of 0.1uf in digital circuit has 5nH distributed inductance, and its parallel resonance frequency is about 7MHz, that is, it has good decoupling effect for noise below 10MHz, and has little effect on noise above 40MHz.
1uf, 10uf capacitance, parallel resonance frequency above 20MHz, the effect of removing high-frequency noise is better. It is often advantageous to have a high-frequency capacitor of 1uf or 10uf at the place where the power supply enters the printed board. Even battery-powered systems need this capacitor.
Each 10 pieces of integrated circuit should be added with a charge and discharge capacitor, or called a storage and discharge capacitor. The size of the capacitor can be 10uf. Without electrolytic capacitor, electrolytic capacitor is rolled up by two thin films. This rolled structure is shown as inductance at high frequency, and uses bile capacitor or polycarbonate brewing capacitor.
The selection of decoupling capacitance value is not strict, which can be calculated as C=1/f; Namely, 0.1uf is taken for 10MHz, and 0.1-0.01uf can be taken for the system composed of microcontroller.
3. Some experience in reducing noise and electromagnetic interference.
(1) If you can use low-speed chips, you don’t need high-speed ones. High-speed chips are used in key places.
(2) The method of stringing a resistor can be used to reduce the speed change rate of the upper and lower edges of the control circuit.
(3) Try to provide some form of damping for relays, etc.
(4) Use a frequency clock that meets the system requirements.
(5) The clock generator shall be as close as possible to the device using the clock. The quartz crystal oscillator shell shall be grounded.
(6) Circle the clock area with the ground wire, and the clock line should be as short as possible.
(7) The I/O drive circuit should be as close as possible to the edge of the printed board, so that it can leave the printed board as soon as possible. The signal entering the printed board shall be filtered, and the signal coming from the high noise area shall also be filtered. At the same time, the method of string terminal resistance shall be used to reduce the signal reflection.
(8) The useless end of MCD shall be connected to high voltage, or grounded, or defined as output end. The end of the integrated circuit that should be connected to the power supply ground shall be connected, and shall not be suspended.
(9) The input end of the unused gate circuit should not be suspended. The positive input end of the unused operational amplifier should be grounded, and the negative input end should be connected to the output end.
(10) The printed board should use 45 folded lines instead of 90 folded lines to reduce the external transmission and coupling of high-frequency signals.
(11) The printed circuit board is divided according to the frequency and current switching characteristics, and the noise components and non-noise components should be farther away.
(12) Single-point power supply and single-point grounding shall be used for single-panel and double-sided boards. The power line and ground wire shall be as thick as possible. If it is affordable, multi-layer boards shall be used to reduce the power supply and ground capacitance inductance.
(13) Clock, bus and chip selection signal shall be far away from I/O line and connector.
(14) Analog voltage input line and reference voltage terminal shall be far away from digital circuit signal line, especially clock.
(15) For A/D devices, the digital part and the analog part would rather be unified than handed over.
(16) The interference of the clock line perpendicular to the I/O line is less than that of the parallel I/O line, and the clock component pin is far away from the I/O cable.
(17) The component pin shall be as short as possible, and the decoupling capacitor pin shall be as short as possible.
(18) The key lines should be as thick as possible, and protective areas should be added on both sides. The high-speed line should be short and straight.
(19) The line sensitive to noise should not be parallel to the high current and high-speed switch line.
(20) Do not route wires under quartz crystal and noise-sensitive devices.
(21) Do not form current loops around weak signal circuits and low-frequency circuits.
(22) Do not form a loop for any signal. If it is unavoidable, keep the loop area as small as possible.
(23) One decoupling capacitor for each integrated circuit. A small high-frequency bypass capacitor shall be added to each electrolytic capacitor.
(24) Use large-capacity tantalum capacitor or poly-cool capacitor instead of electrolytic capacitor as circuit charge and discharge energy storage capacitor. PCB layout when using tubular capacitors, the shell should be grounded.