The basic process of the circuit board can be divided into three steps: circuit schematic design, generation of network table, printed circuit board design. There are specific requirements for both device layout and wiring on the board.

For example, input and output wiring should be avoided parallel to avoid interference. It is necessary to add ground wire to separate the parallel running of two signal lines. The wiring of two adjacent layers should be perpendicular to each other as far as possible, and parasitic coupling is likely to occur in parallel. The power supply and ground wire should be perpendicular to each other as far as possible. In terms of wire width, a wide ground wire can be used as the primary circuit for a digital circuit PCB, that is, a ground network (analog circuit cannot be used in this way), and a large area of copper is used.

The following article on the single-chip control board PCB design needs to pay attention to the principles and some details are described.
1. Component layout

In terms of the layout of components, the interrelated components should be placed as close as possible. For example, clock generator, crystal oscillator and clock input of CPU are prone to noise, so they should be placed close to each other.

For those easy to produce noise devices, small current circuit, large current circuit switching circuit, should try to make it away from the single-chip logic control circuit and memory circuit (ROM, RAM), if possible, these circuits can be made into circuit boards, which is conducive to anti-interference, improve the reliability of the circuit work.

2. Decoupling capacitor

Try to install decoupling capacitors next to key components such as ROM and RAM chips. In fact, PCB wiring, pin wiring and wiring may contain large inductance effect. A large inductance may cause a high switching noise spike in the Vcc alignment.

The only way to prevent the Vcc from switching noise spikes is to place a 0.1uf electronic decoupling capacitor between the Vcc and the power source. If a surface mount element is used on the circuit board, the Vcc pin can be fixed directly against the element with a chip capacitor.

It is better to use ceramic capacitors because they have low ESL and high frequency impedance, and they have good dielectric stability in temperature and time. Tantalum capacitors should be avoided as they have a high impedance at high frequencies.

The following points should be noted when installing decoupling capacitors:

The power input of the printed circuit board is spanned by an electrolytic capacitor of about 100uF. If the volume allows, a larger capacitance is better.
In principle, a 0.01uF ceramic capacitor should be placed next to each IC chip. If the gap of the circuit board is too small to fit, 1-10 tantalum capacitors can be placed around every 10 chips.
Decoupling capacitors should be connected between the power line (Vcc) and the ground wire for components with weak anti-interference ability and large current variation when switching off, as well as storage components such as RAM and ROM.
Capacitance leads should not be too long, especially for high frequency bypass capacitors.
3. Ground wire design

In the single-chip microcomputer control system, there are many kinds of ground wire, there are system ground, shielding ground, logic ground, analog ground, etc., whether the ground wire layout is reasonable, will determine the anti-interference ability of the circuit board. The following considerations should be taken into account when designing ground and ground connections:

Logical and analog ground to separate wiring, can not be used together, their respective ground wire and the corresponding power ground wire. In the design, the analog ground wire should be as bold as possible, and try to increase the grounding area of the terminal. Generally speaking, it is better to isolate the input and output analog signals from the single chip circuit by optical coupler.
When designing the printed circuit version of a logic circuit, its ground wire should form a closed loop form to improve the anti-interference ability of the circuit.
The ground wire should be as thick as possible. If the ground wire is very thin, the resistance of the ground wire will be large, causing the ground potential to change with the change of the current, leading to the instability of the signal level, resulting in the decline of the anti-interference ability of the circuit. When the wiring space allows, the width of the main ground wire should be at least 2-3mm, and the grounding wire on the component pin should be about 1.5mm.
Pay attention to the choice of ground. When the signal frequency on the circuit board is lower than 1MHz, the influence of electromagnetic induction between wiring and components is very small, while the influence of circulation formed by grounding circuit on interference is large, so a point of grounding should be adopted to make it not form a loop. When the signal frequency on the circuit board is higher than 10MHz, due to the obvious inductance effect of PCB wiring design, the grounding resistance becomes very large, and the circulation formed by the grounding circuit is no longer a major problem. Therefore, multi-point grounding should be adopted to minimize the grounding impedance.
4, other

Power line layout in addition to try to go bold line width according to the size of the current, the PCB layout design should also make the power cord, ground line direction is consistent with square body go line of the data line at the end of the PCB layout design work, land line will circuit board didn’t leave the bottom of the line covered, these methods can help enhance the anti-interference ability of the circuit.

The width of the data line should be as wide as possible to minimize impedance. The width of the data line should be at least 0.3mm(12mil), preferably 0.46-0.5mm (18mil~20mil).

Since a through hole in the circuit board will bring about a capacitance effect of about 10pF, which will introduce too much interference to the high-frequency circuit, the number of through holes should be reduced as much as possible in the PCB wiring design. Moreover, too many holes will also cause the mechanical strength of the circuit board reduced.