The fundamental process of designing a circuit board can be broken down into three key steps: circuit schematic design, netlist generation, and printed circuit board design. Whether it’s the device layout on the board or the wiring, there are specific requirements that must be adhered to.
For instance, input and output wiring should be minimized to prevent interference. Parallel routing of two signal lines should be separated by a ground wire, and the wiring between adjacent layers should ideally be perpendicular. This helps to mitigate parasitic coupling, which is likely to occur in parallel configurations. Additionally, power and ground wires should be distributed across two layers, maintaining perpendicular orientation whenever possible. Regarding line width, a broader ground wire can serve as a loop for the digital circuit PCB, functioning as a ground network (note that this method is not suitable for analog circuits), utilizing a substantial area of copper.
The following article outlines the principles and important considerations for PCB design in microcontroller control boards.
1. Component layout
When it comes to component placement, related components should be positioned as closely as possible. For instance, the clock generator, crystal oscillator, and CPU clock input are all susceptible to noise and should be placed nearer to one another. Devices that generate noise, low-current circuits, and high-current switching circuits should be kept at a distance from the logic control and storage circuits (ROM, RAM) of the microcontroller. If feasible, these circuits can be organized onto separate boards, which enhances anti-interference measures and improves the reliability of circuit operation.
2. Decoupling capacitor
1. Aim to install decoupling capacitors near critical components, such as ROM, RAM, and other chips. Indeed, printed circuit board traces, pin connections, and wiring can exhibit significant inductance effects. High inductance may lead to severe switching noise spikes on the Vcc trace. The only effective way to mitigate these noise spikes is to place a 0.1uF decoupling capacitor between VCC and ground. If surface mount components are used, chip capacitors can be directly placed adjacent to the components and soldered to the Vcc pin. It’s preferable to use ceramic capacitors, as they offer low equivalent series inductance (ESL) and high-frequency impedance, along with excellent dielectric stability over temperature and time. Avoid tantalum capacitors, as they present higher impedance at elevated frequencies.
2. Keep the following points in mind when placing decoupling capacitors:
▪ Connect a 100uF electrolytic capacitor across the power input of the printed circuit board. If space allows, opt for a larger capacitance.
▪ Ideally, a 0.01uF ceramic capacitor should be placed next to each integrated circuit chip. If space is too limited, consider placing a 1-10uF tantalum capacitor for every ten chips.
▪ For components like RAM and ROM, which exhibit weak interference immunity and substantial current fluctuations during power-down and storage, connect a decoupling capacitor between the power line (Vcc) and ground.
▪ Ensure that the capacitor leads are not excessively long; high-frequency bypass capacitors should ideally have no lead length.
3. Ground wire design
In a single-chip control system, multiple types of ground wires exist, including system ground, shield ground, logic ground, and analog ground. Proper grounding layout is crucial for the circuit board’s interference immunity. When designing ground wires and grounding points, consider the following:
▪ Keep logic ground and analog ground separate; they should not share the same path. Connect their respective ground wires to the appropriate power grounds. Ideally, the analog ground wire should be as thick as possible, and the grounding area at the terminal should be maximized. Typically, isolating input and output analog signals from the microcontroller circuit using optocouplers is recommended.
▪ In designing the printed circuit board for logic circuits, ensure the ground wire forms a closed loop to enhance the circuit’s anti-interference capacity.
▪ The ground wire should be as thick as feasible. Thin ground wires increase resistance, causing ground potential to fluctuate with current changes, destabilizing signal levels and reducing interference immunity. If space permits, aim for a main ground wire width of at least 2-3mm, with component pin ground wires around 1.5mm.
▪ Carefully choose grounding points. For signal frequencies below 1MHz, the electromagnetic induction between traces and components is minimal, so a single-point ground is preferable to avoid loops. For frequencies above 10MHz, PCB layout inductance becomes significant, making circulating currents less of an issue; thus, multi-point grounding should be employed to lower ground impedance.
4. Other
▪ Besides power line layout, trace width should be maximized according to current size. In PCB layout design, align the routing direction of power and ground lines with that of data lines. Ultimately, use ground wires to cover areas of the circuit board devoid of traces; these techniques all contribute to enhancing the circuit’s interference resistance.
▪ Data line width should be as broad as possible to minimize impedance. The minimum width should not be less than 0.3mm (12mil), with an ideal range of 0.46-0.5mm (18mil-20mil).
▪ Since vias on the circuit board introduce about 10pF of capacitance, they can cause excessive interference in high-frequency circuits. Therefore, minimize the number of vias during PCB design. Additionally, an excessive number of vias may compromise the mechanical strength of the circuit board.
For instance, input and output wiring should be minimized to prevent interference. Parallel routing of two signal lines should be separated by a ground wire, and the wiring between adjacent layers should ideally be perpendicular. This helps to mitigate parasitic coupling, which is likely to occur in parallel configurations. Additionally, power and ground wires should be distributed across two layers, maintaining perpendicular orientation whenever possible. Regarding line width, a broader ground wire can serve as a loop for the digital circuit PCB, functioning as a ground network (note that this method is not suitable for analog circuits), utilizing a substantial area of copper.
The following article outlines the principles and important considerations for PCB design in microcontroller control boards.
1. Component layout
When it comes to component placement, related components should be positioned as closely as possible. For instance, the clock generator, crystal oscillator, and CPU clock input are all susceptible to noise and should be placed nearer to one another. Devices that generate noise, low-current circuits, and high-current switching circuits should be kept at a distance from the logic control and storage circuits (ROM, RAM) of the microcontroller. If feasible, these circuits can be organized onto separate boards, which enhances anti-interference measures and improves the reliability of circuit operation.
2. Decoupling capacitor
1. Aim to install decoupling capacitors near critical components, such as ROM, RAM, and other chips. Indeed, printed circuit board traces, pin connections, and wiring can exhibit significant inductance effects. High inductance may lead to severe switching noise spikes on the Vcc trace. The only effective way to mitigate these noise spikes is to place a 0.1uF decoupling capacitor between VCC and ground. If surface mount components are used, chip capacitors can be directly placed adjacent to the components and soldered to the Vcc pin. It’s preferable to use ceramic capacitors, as they offer low equivalent series inductance (ESL) and high-frequency impedance, along with excellent dielectric stability over temperature and time. Avoid tantalum capacitors, as they present higher impedance at elevated frequencies.
2. Keep the following points in mind when placing decoupling capacitors:
▪ Connect a 100uF electrolytic capacitor across the power input of the printed circuit board. If space allows, opt for a larger capacitance.
▪ Ideally, a 0.01uF ceramic capacitor should be placed next to each integrated circuit chip. If space is too limited, consider placing a 1-10uF tantalum capacitor for every ten chips.
▪ For components like RAM and ROM, which exhibit weak interference immunity and substantial current fluctuations during power-down and storage, connect a decoupling capacitor between the power line (Vcc) and ground.
▪ Ensure that the capacitor leads are not excessively long; high-frequency bypass capacitors should ideally have no lead length.
3. Ground wire design
In a single-chip control system, multiple types of ground wires exist, including system ground, shield ground, logic ground, and analog ground. Proper grounding layout is crucial for the circuit board’s interference immunity. When designing ground wires and grounding points, consider the following:
▪ Keep logic ground and analog ground separate; they should not share the same path. Connect their respective ground wires to the appropriate power grounds. Ideally, the analog ground wire should be as thick as possible, and the grounding area at the terminal should be maximized. Typically, isolating input and output analog signals from the microcontroller circuit using optocouplers is recommended.
▪ In designing the printed circuit board for logic circuits, ensure the ground wire forms a closed loop to enhance the circuit’s anti-interference capacity.
▪ The ground wire should be as thick as feasible. Thin ground wires increase resistance, causing ground potential to fluctuate with current changes, destabilizing signal levels and reducing interference immunity. If space permits, aim for a main ground wire width of at least 2-3mm, with component pin ground wires around 1.5mm.
▪ Carefully choose grounding points. For signal frequencies below 1MHz, the electromagnetic induction between traces and components is minimal, so a single-point ground is preferable to avoid loops. For frequencies above 10MHz, PCB layout inductance becomes significant, making circulating currents less of an issue; thus, multi-point grounding should be employed to lower ground impedance.
4. Other
▪ Besides power line layout, trace width should be maximized according to current size. In PCB layout design, align the routing direction of power and ground lines with that of data lines. Ultimately, use ground wires to cover areas of the circuit board devoid of traces; these techniques all contribute to enhancing the circuit’s interference resistance.
▪ Data line width should be as broad as possible to minimize impedance. The minimum width should not be less than 0.3mm (12mil), with an ideal range of 0.46-0.5mm (18mil-20mil).
▪ Since vias on the circuit board introduce about 10pF of capacitance, they can cause excessive interference in high-frequency circuits. Therefore, minimize the number of vias during PCB design. Additionally, an excessive number of vias may compromise the mechanical strength of the circuit board.