This article will introducePCB Layout and RoutingBasic rules, including component layout and routing guidelines, as well as best practices for improving noise immunity and electromagnetic compatibility.

Basic Rules for Component Layout
1. Layout by Circuit Module
Circuit modules should be organized by function, and related circuit components should be grouped together as closely as possible. At the same time, digital and analog circuits should be laid out separately to avoid mutual interference.
2. Rules for Locating Holes and Standard Holes
Do not mount components within 1.27 mm of non-mounting holes, and do not mount components within 3.5 mm (for M2.5) or 4 mm (for M3) of mounting holes such as screw holes.
3. Avoid fabric vias
Avoid placing vias directly beneath components such as surface-mount resistors, inductors (through-hole), and electrolytic capacitors to prevent short circuits between the vias and the component casings after wave soldering.
4. Distance from the outer edge of the component to the edge of the board
The distance from the outer edge of the component to the edge of the board should be kept within 5 mm.
5. Ensure proper pad spacing
The distance between the outer edge of a surface-mount component’s pad and the outer edge of an adjacent through-hole component should be greater than 2 mm to ensure soldering quality.
6. Prevent metal-to-metal contact
Metal-enclosed components and metal parts (such as shielding boxes) must not come into contact with other components or be placed directly adjacent to printed traces or pads; the clearance between them must be greater than 2 mm.
7. Increase the distance between the alignment holes
The distance from the outer edge of the plate to positioning holes, fastener mounting holes, elliptical holes, and other such openings should be greater than 3 mm to facilitate installation and alignment.
8. Distribute the heating elements evenly
Heating elements must not be placed in close proximity to wires or thermosensitive components; high-heat components should be distributed evenly to prevent localized overheating and interference.
9. Arrange electrical outlets appropriately
Power connectors should be placed as close as possible to the edges of the printed circuit board, and the power connectors and their associated busbar terminals should be located on the same side to facilitate connection and disconnection.
Component Routing Rules
1. Define the wiring areas appropriately
Do not route traces within 1 mm of the edge of the PCB or within 1 mm of mounting holes.
2. Width of Power and Signal Cables
Power traces should be as wide as possible, but no less than 18 mil; signal trace widths should be no less than 12 mil; CPU input and output traces should be no less than 10 mil (or 8 mil); and the spacing between traces should be no less than 10 mil.
3. Control of Standard Via Holes
The diameter of a standard via must be at least 30 mil.
4. Component Pin Rules
The pad diameter for dual-in-line through-hole components is 60 mil, and the hole diameter is 40 mil; the dimensions of a 1/4W resistor are 51 x 55 mil (0805 surface-mount), and for through-hole mounting, the pad diameter is 62 mil and the hole diameter is 42 mil; The dimensions of a non-polarized capacitor are 51 x 55 mil (0805 surface-mount); when mounted as a through-hole component, the pad diameter is 50 mil and the hole diameter is 28 mil.
5. Avoid Signal Loops
Signal traces should be arranged in a radial pattern as much as possible to avoid signal loops, especially in high-frequency circuits, where loops can cause interference.
How can we improve interference immunity and electromagnetic compatibility?
1. Systems Designed to Resist Electromagnetic Interference
Systems with extremely high clock frequencies and very fast bus cycles, as well as those containing high-power, high-current driver circuits, circuits with weak analog signals, and high-precision A/D conversion circuits, are particularly susceptible to electromagnetic interference.
2. Take measures to improve interference resistance
– Select a low-frequency microcontroller
Selecting a microcontroller with a lower external clock frequency can effectively reduce noise and improve the system's immunity to interference.
– Reduce distortion during signal transmission
Avoid using excessively long signal traces on the printed circuit board to minimize signal distortion and noise.
– Reduce crosstalk between signal lines
Cross-talk between signal lines can be minimized through proper routing, maintaining adequate spacing, and effective shielding.
– Power Supply Noise Control
Power supply noise can be controlled using appropriate filters and decoupling capacitors to prevent it from propagating into the circuit.
– Component Layout Zones
Arrange components in a well-organized layout, separating the analog signal sections, high-speed digital circuits, and noise sources to minimize mutual signal coupling.
PCB layout and routing are critical aspects of electronic product design. By following the basic rules and best practices for interference mitigation outlined above, you can improve PCB performance, reduce electromagnetic interference, and ensure the proper operation of electronic devices.
Frequently Asked Questions
1. Why should digital and analog circuits be laid out separately?
Separating the layout of digital and analog circuits can prevent them from interfering with each other, thereby maintaining signal purity and accuracy.
2. Why should signal loops be avoided?
Signal loops can cause interference and noise, which affect circuit performance. Therefore, signal loops should be avoided, and appropriate routing measures should be taken.
3. Why use high-capacity decoupling capacitors?
High-capacity decoupling capacitors can absorb the charging and discharging energy that occurs during circuit switching, while also providing effective decoupling against high-frequency noise.
4. Why should the power and ground wires be thicker?
Coarsening the power and ground lines can reduce the resistance between the power supply and ground, decrease inductance, and improve the circuit’s stability and immunity to interference.
5. What is electromagnetic compatibility?
Electromagnetic compatibility refers to the ability of electronic equipment to operate normally in an electromagnetic environment without generating or being subjected to unwanted electromagnetic interference. Good circuit layout and design can improve electromagnetic compatibility.
