PCB layout
1. The layout principle of "big before small, difficult before easy" should be followed, that is, important unit circuits and core components should be laid out first.
2. The layout must refer to the schematic diagram, and place components according to the signal flow rules of the schematic diagram.
3. The arrangement of components should be convenient for later debugging and maintenance, and there should be enough space around the components to be debugged.

4. The heating elements should be evenly distributed, which is more conducive to the heat dissipation of the single board and the whole machine. All temperature sensitive devices except the temperature detection element should be kept as far away as possible from the components with large heat generation.
5. The layout should meet the following requirements as much as possible: the shortest total connection and the shortest critical signal line; complete separation of high-voltage signals from low-voltage weak signals; separation of analog signals from digital signals; separation of high-frequency signals from low-frequency signals; The spacing of high-frequency components should be sufficient.
6. When laying out components, due consideration should be given to putting devices using the same power supply together as much as possible.
Prioritize key signal lines: key signals such as analog signals, high-speed signals, clock signals, and synchronous signals are routed first.
Try to provide dedicated wiring layers for key signals such as clock signals, high-frequency signals, and sensitive signals, and ensure the smallest loop area.
The principle of density priority: start wiring from the most complex connection relationship on the board and the most densely connected area.
Networks that require impedance control should be routed as far as possible according to the requirements of line length and line width.
Routing way:
1. Right-angle routing:
The copper foil at the corner of the right-angle trace is 1.414 times the normal line width, which will cause a sudden change in the characteristic impedance at the right-angle bend. This has no great impact on ordinary traces, but for high-speed signals, the change in characteristic impedance will Bring signal reflection, making the signal quality worse. At the same time, the additional parasitic capacitance at the corner will also cause time delay for signal transmission. In addition, right-angled tips are prone to emitting or receiving electromagnetic waves, which can also create EMI problems.
2. Short-term and closed-loop
When designing, the wiring length should be kept as short as possible to reduce the interference caused by too long wiring, especially for some important signal lines, such as clock lines, the oscillator must be placed very close to the device. Its main purpose is to adjust the time lag to meet the design requirements of the system time series.
Prevent signal lines from forming self-loops between different layers. Such problems are prone to occur in multi-layer board design, and the closed loop will cause radiation interference.
3. Serpentine line
Serpentine line is a common wiring method in PCB. Its main purpose is to adjust the time lag to meet the design requirements of the system time series. Serpentine traces will destroy signal quality and change transmission delay, so they should be avoided when wiring. However, in actual design, the signal lines usually need to be routed in this way to reduce the time offset between the same group of signals, and often have to be intentionally routed. Generally, parallel wires should be drilled as few holes as possible. When holes must be punched, both wires should be punched together to achieve impedance matching. A group of buses with the same attribute should be routed side by side as much as possible to achieve the same length as possible. The vias drawn from the patch pad should be as far away from the pad as possible.
Copper laying
Whether it is a power supply or a signal, it has a return path. No matter where the current flows, it must flow back. Therefore, in our circuit, any signal exists in the form of a closed loop. Our power ground It refers to the path of the current in the power supply loop. Usually, the current flowing through our power supply is relatively large, and our signal ground is mainly a path for the signal return of our device module, so we can lay copper to reduce the wiring And increase the area of the land to realize the integrity of the land.