Basic Rules for PCB Layout and Wiring

PCB, also known as Printed Circuit Board, is used to connect electronic components and achieve their functions. It is also an important part of power circuit design. Today, this article will introduce the basic rules for PCB layout and wiring.

Basic Rules for Component Layout

1. Layout should be based on circuit modules, where related circuits that perform the same function are referred to as modules. Components in the circuit modules should be arranged in close proximity to each other, with a separation between digital and analog circuits.

2. Non-installed holes such as positioning holes and standard holes should not have any components or devices within 1.27mm of the perimeter. Installed holes such as screws should not have any components or devices within 3.5mm (for M2.5) or 4mm (for M3) of the perimeter.

3. Components such as resistors, inductors (plug-ins), and electrolytic capacitors should not be placed over holes to avoid short-circuits between the components and the hole after wave soldering.

4. The distance between the outer edge of the components and the edge of the board should be 5mm.

5. The distance between the outer edge of the solder pad of the mounted component and the outer edge of the adjacent plug-in component should be greater than 2mm.

6. Metal-cased components and metal components (shielding boxes, etc.) should not come into contact with other components, and should not be placed close to printed lines or solder pads. The distance between them should be greater than 2mm. The size of the outer edge of the positioning holes, fastening holes, oval holes and other square holes should be greater than 3mm.

7. Heat-generating components should not be placed close to wires and thermosensitive components. High-heat components should be evenly distributed.

8. Power sockets should be arranged around the perimeter of the board as much as possible, and the wiring connections of the power socket and its busbar should be arranged on the same side. It is especially important not to place power sockets and other welding connectors between connectors, in order to facilitate the welding and cable design of these sockets and connectors. The layout spacing of power sockets and welding connectors should consider the convenience of plugging and unplugging the power plug.

9. For other component arrangements: all IC components should be aligned on one side, and polarized components should be clearly marked. There should not be more than two polarity markings on the same board, and if two directions are needed, they should be perpendicular to each other.

10. The board layout should be properly spaced, and if the spacing difference is too large, a mesh copper foil should be used to fill the gaps, with a grid size greater than 8mil (or 0.2mm).

11. There should be no through-holes on surface-mount pads to prevent solder paste loss and component soldering problems. Important signal lines are not allowed to pass through between socket pins.

12. Surface-mount components should be aligned on one side, with consistent character and packaging directions.

13. Polarized devices should be consistent with the polarity markings on the same board.

Basic Rules for Component Wiring

1. Wiring is prohibited within the area of ≤1mm from the edge of the PCB and within 1mm around mounting holes.

2. Power lines should be as wide as possible, not less than 18mil; signal lines should not be less than 12mil; CPU input/output lines should not be less than 10mil (or 8mil); and the distance between lines should not be less than 10mil.

3. Normal through-holes should not be less than 30mil.

4. Dual in-line: pad size of 60mil, hole size of 40mil. For 1/4W resistor: 51*55mil (0805 SMD); pad size of 62mil, hole size of 42mil for straight insertion. For non-polarized capacitors: 51*55mil (0805 SMD); pad size of 50mil, hole size of 28mil for straightforward insertion.

5. Pay attention to the fact that power lines and ground lines should be arranged radially as much as possible, and signal lines should not have looped routing.

Improving Anti-Interference Capability and Electromagnetic Compatibility

When developing electronic products with processors, how to improve anti-interference capability and electromagnetic compatibility?

1. The following systems need special attention to electromagnetic interference:

(1) Systems with high-frequency microcontroller clock frequency and fast bus cycle.

(2) Systems containing high-power and high-current drive circuits, such as spark relays, high-current switches, etc.

(3) Systems with weak analog signal circuits and high-precision A/D conversion circuits.

2. Measures to increase anti-electromagnetic interference capability are as follows:

(1) Select a microcontroller with a lower frequency:

Selecting a microcontroller with a lower external clock frequency can effectively reduce noise and improve the system’s anti-interference capability. For the same frequency, square waves have much higher high-frequency components than sine waves.

Although the amplitude of the high-frequency component of the square wave is smaller than that of the fundamental waveform, the higher frequency is more likely to be emitted as a noise source. The high-frequency noise generated by the microcontroller is approximately 3 times the clock frequency.

(2) Reducing distortion in signal transmission

Microcontrollers are mainly manufactured using high-speed CMOS technology. The static input current at the signal input terminal is about 1mA, the input capacitance is about 10PF, and the input impedance is relatively high. The output end of high-speed CMOS circuits has considerable loading capacity, that is, a relatively large output value. When the output end of a gate is led to the input end with a relatively high input impedance through a long line, the reflection problem becomes serious, which can cause signal distortion and increase system noise. When Tpd>Tr, it becomes a transmission line problem, and issues such as signal reflection and impedance matching must be considered.

The delay time of the signal on the printed circuit board is related to the characteristic impedance of the lead, that is, it is related to the dielectric constant of the printed circuit board material. It can be roughly considered that the transmission speed of the signal on the printed board lead is between 1/3 and 1/2 of the speed of light. The Tr (standard delay time) of commonly used logical telephone components in a system composed of a microcontroller is between 3 and 18ns.

On the printed circuit board, the delay time of the signal passing through a 7W resistor and a 25cm long lead is roughly between 4 and 20ns. That is to say, the shorter the lead of the signal on the printed board, the better, and the length should not exceed 25cm. Moreover, the number of through-holes should be as few as possible, no more than 2.

When the rise time of the signal is faster than the delay time of the signal, fast electronics processing should be performed. At this time, impedance matching of the transmission line should be considered. For signal transmission between integrated blocks on a printed circuit board, the situation of Td>Trd should be avoided. The larger the printed circuit board, the faster the system speed should not be too fast.

The following conclusion can be used to summarize a rule for printed circuit board design: the delay time of the signal during transmission on the printed board should not be greater than the nominal delay time of the device used.

(3) Reducing cross-talk between signal lines:

At point A, a step signal with a rise time of Tr is transmitted to point B through the lead AB. The delay time of the signal on the AB line is Td. At point D, due to the forward transmission of the signal from point A, the signal reflection at point B and the delay of the AB line, a 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 the AB line, a positive pulse signal with a width of twice the delay time of the signal on the AB line, that is, 2Td, will be induced. This is cross-talk between signals.

The strength of the interference signal is related to di/at of the signal at point C and the distance between the lines. When the two signal lines are not very long, what is actually seen on AB is the superposition of two pulses.

Microcontrollers manufactured using CMOS technology have high input impedance, high noise, and high noise tolerance. The digital circuit can tolerate the superposition of 100~200mv noise without affecting its operation. If the AB line in the diagram is an analog signal, this interference becomes intolerable. If the printed circuit board is a four-layer board, with one layer being a large ground area, or a double-sided board, and the back of the signal line is a large ground area, the cross-talk between signals will be reduced.

The reason is that the large ground area reduces the characteristic impedance of the signal line, and the reflection at point D is greatly reduced. The characteristic impedance is inversely proportional to the square of the dielectric constant of the medium between the signal line and ground, and directly 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 on AB, there should be a large ground area below the AB line, and the distance between the AB and CD lines should be greater than 2-3 times the distance between the AB line and ground. Local shielding ground can be used, and ground wires can be placed on both sides of the lead on the side with the leads.

(4) Mitigating power supply noise

While supplying energy to the system, the power source adds its own noise to the supplied power. Control lines, such as the reset and interrupt lines of a microcontroller, are susceptible to external noise interference.

Strong interference from the power grid enters the circuit through the power supply, and even battery-powered systems are affected by high-frequency noise from the battery itself. Analog signals in the circuit are even less tolerant to power supply interference.

(5) Pay attention to the high-frequency characteristics of printed circuit boards and components

In high-frequency situations, the distributed inductance and capacitance of leads, vias, resistors, capacitors, connectors, and other components on the printed circuit board cannot be ignored. The distributed capacitance of a capacitor cannot be ignored, and the distributed inductance of an inductor cannot be ignored.

Resistors reflect high-frequency signals, and the distributed capacitance of leads becomes effective. When the length exceeds 1/20 of the corresponding wavelength of the noise frequency, the antenna effect occurs, and the noise is emitted outward through the leads.

The vias on the printed circuit board cause a capacitance of approximately 0.6pF. The packaging material of an integrated circuit itself introduces a capacitance of 2-6pF. The connector on a circuit board has a distributed inductance of 520nH. A dual-row straight-pin 24-pin integrated circuit socket introduces a distributed inductance of 4-18nH.

These small distributed parameters can be ignored in microcontroller systems operating at lower frequencies, but must be carefully considered in high-speed systems.

(6) Reasonably partition component layout

When arranging the position of components on a printed circuit board, the issue of electromagnetic interference should be fully considered. One principle is to keep the leads between components as short as possible. In terms of layout, the analog signal part, high-speed digital circuit part, and noise source part (such as relays, high-current switches, etc.) should be separated reasonably to minimize signal coupling between them.

Properly handle grounding wires: On a printed circuit board, power lines and ground wires are important. The main means of overcoming electromagnetic interference is grounding.

For double-sided boards, the arrangement of ground wires is particularly important. By using a single-point grounding method, the power supply and ground are connected to the printed circuit board from both ends of the power supply, with one connection point for the power supply and another for the ground. There should be multiple ground return wires on the printed circuit board, all of which converge to the connection point that returns to the power supply, which is called a single-point grounding.

The so-called separation of analog ground, digital ground, and high-power device ground means that the wiring is separated and all converge at the grounding point. Shielded cables are usually used to connect with signals outside the printed circuit board. For high-frequency and digital signals, both ends of the shielded cable should be grounded. For shielded cables used for low-frequency analog signals, it is best to ground one end.

Circuits that are very sensitive to noise and interference or circuits with particularly severe high-frequency noise should be shielded with a metal cover.

(7) Proper use of decoupling capacitors

Good high-frequency decoupling capacitors can remove high-frequency components up to 1 GHz. 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 and ground of each integrated circuit.

Decoupling capacitors have two functions: on the one hand, they are energy storage capacitors for the integrated circuit, providing and absorbing the charging and discharging energy of the integrated circuit when it opens and closes; on the other hand, they bypass the high-frequency noise of the device.

The typical decoupling capacitor for digital circuits is a 0.1 μF decoupling capacitor with a distributed inductance of 5 nH. Its parallel resonance frequency is approximately 7 MHz, which means it has a good decoupling effect on noise below 10 MHz and almost no effect on noise above 40 MHz.

1 μF and 10 μF capacitors have a parallel resonance frequency above 20 MHz and have a better effect on removing high-frequency noise. It is often beneficial to have a 1 μF or 10 μF decoupling capacitor at the point where the power enters the printed circuit board, even for systems powered by batteries.

For every 10 integrated circuits, a charging and discharging capacitor, or a storage capacitor, with a capacitance of 10 μF should be added. Electrolytic capacitors should not be used because their rolled-up structure exhibits inductance at high frequencies. Use tantalum capacitors or polypropylene capacitors instead.

The selection of decoupling capacitor values is not strict and can be calculated according to C=1/f. For systems composed of microcontrollers, a decoupling capacitor between 0.1 μF and 0.01 μF can be used.

3. Some Tips for Reducing Noise and Electromagnetic Interference

(1) Use low-speed chips whenever possible, and only use high-speed chips in critical areas.

(2) Use a resistor in series to reduce the rising and falling edge rate of the control circuit.

(3) Provide some form of damping for relays and other components.

(4) Use a clock that meets the system requirements.

(5) Place the clock generator as close as possible to the device that uses the clock. The casing of the quartz crystal oscillator should be grounded.

(6) Use a ground wire to encircle the clock area, and keep the clock line as short as possible.

(7) Place the I/O drive circuit close to the edge of the printed circuit board, and let it leave the board as soon as possible. Filter the signals entering the printed circuit board, and filter the signals coming from high noise areas. Use a resistor in series with the terminal to reduce signal reflection.

(8) Unused pins of the MCD should be connected to either high, ground or defined as output pins. The pin that needs to be connected to the power ground should be connected for all integrated circuits and should not be left floating.

(9) Unused gate circuit input pins should not be left floating. Unused operational amplifier positive input pins should be grounded, and negative input pins should be connected to the output pin.

(10) Use 45-degree angled traces on the printed circuit board instead of 90-degree angled traces to reduce the emission and coupling of high-frequency signals.

(11) Divide the printed circuit board into sections based on frequency and current switching characteristics, and place noise components farther away from non-noise components.

(12) For single-sided and double-sided boards, use single-point power and ground connections, and make power and ground traces as thick as possible. If economically feasible, use a multilayer board to reduce the parasitic inductance of the power and ground.

(13) Clocks, buses, and chip select signals should be far away from I/O lines and connectors.

(14) Analog voltage input lines and reference voltage terminals should be kept as far away as possible from digital circuit signal lines, especially clocks.

(15) For A/D devices, it is better to separate the digital and analog parts than to cross them.

(16) Clock lines perpendicular to I/O lines have less interference than parallel I/O lines. Clock component pins should be far from I/O cables.

(17) Component pins should be as short as possible, and decoupling capacitor pins should be as short as possible.

(18) Key lines should be as thick as possible and have protection ground on both sides. High-speed lines should be short and straight.

(19) Do not run noise-sensitive lines parallel to high-current or high-speed switching lines.

(20) Do not run traces underneath quartz crystals or noise-sensitive components.

(21) Do not form current loops around weak signal circuits or low-frequency circuits.

(22) Do not form any signal loops. If unavoidable, make the loop area as small as possible.

(23) Each integrated circuit should have a decoupling capacitor. A small high-frequency bypass capacitor should be added next to each electrolytic capacitor.

(24) Use large tantalum or polypropylene capacitors instead of electrolytic capacitors as charge and discharge energy storage capacitors. When using tubular capacitors, the casing should be grounded.

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top