PCB layout
Design rules
-
PCB manufactures have certain requirements that the design must follow to be manufacturable without problems.
-
JLCPCB has requirements on this page: https://jlcpcb.com/capabilities/Capabilities
-
-
PCB design software can usually check the requirements during component placement and routing. Requirements can also be manually checked with DRC (design rules check).
-
Design rules should be changed in the design software based on the manufacturer’s requirements/capabilities before starting PCB layout.
General steps
-
Start with initial component placement. Majority of time should be spent in this step to make routing the signals easier.
-
Route the signals and power, and connect ground with vias to internal layers. Adjust component placement where necessary to make room for vias and tracks or to bring components closer to each other.
-
Create ground copper areas on internal layers. It’s also useful to add ground copper areas on top and bottom layers for better thermal performance.
Component placement
-
Use airwires to find good location and orientation for components.
-
Try to make airwires as short as possible to have short tracks.
-
Find signals that are crossing each other. Then swap the pins on the schematic if possible or adjust the components placement or move components to bottom layer. It’s easier to route the signals if tracks are not crossing each other.
-
-
Place larger components first and then place smaller components next to the larger ones.
-
For example place microcontroller first and then place decoupling capacitors next to the pins. Then place resistors close to the microcontroller.
-
Decoupling capacitors
-
Place decoupling capacitors as close as possible to power pins.
-
This reduces the noise that could picked up on the longer track.
-
Shorter tracks also resist the current flow less.
-
-
Connect ground with vias.
-
Avoid placing vias between component pins and decoupling capacitor.
-
Current should flow from power supply to capacitor and from decoupling capacitor to the component.
-
When components are hand soldered, then it’s fine to place the vias inside the capacitor’s pads.
-
When reflow soldering, vias would need to be plugged/filled first to avoid solder paste flowing into the via holes.
-
Routing
Signal speed
Signal speed is determined by the rise time (usually from 10% to 90 % of the signal level) of the signal. Typically, it’s specified as the 3 dB bandwidth, with the following formula.
For example if the rise time is 2.5 ns, then the bandwidth is 140 MHz.
Most of the component outputs have fixed signal rise and fall times. Some of the components support adjustable output rise and fall times through drive strength or slew rate settings. Final rise and fall times depend on the external tracks and components connected to that output.
Slower rise times help to reduce noise. Faster rise times are needed when higher switching frequency or higher efficiency is required.
More information:
Electromagnetic fields
Electric and magnetic fields are formed around the tracks on the PCB, when it is powered and the charges move around the conductors. It is important to avoid the fields from spreading out too much as this can cause adjacent conductors to (capacitively and magnetically) couple more strongly. Stronger coupling can cause more unwanted currents and voltages in nearby conductors. Fields that spread out more also cause more radiated noise.
More information:
-
https://resources.altium.com/p/how-signals-propagate-in-a-pcb
-
Robert Feranec | Don’t design PCB without watching this! | Simulations and visualisations
General
-
Route tracks as short and straight as possible.
-
Avoid layer changes as much as reasonable.
-
Vias can create impedance discontinuities that cause more noise and degrade signal integrity.
-
Prioritise higher speed signals or more sensitive signals. For example USB differential pair signals.
-
-
Reduce crosstalk by having more space between tracks.
-
Typical rule of thumb is to have at least three times the distance between tracks as the distance between signal and reference (usually GND) layers.
-
If there isn’t enough space on the PCB for keeping clearance between tracks, minimise the length of closely routed tracks by increasing clearance as soon as possible.
-
More information:
-
Robert Feranec | What Every PCB Designer Should Know - Crosstalk Explained (with Eric Bogatin)
Track widths
-
Current carrying capability should be considered when choosing the width for a track.
-
Wider tracks have less resistance and can carry more current.
-
Calculators can be used to calculate track widths and other properties:
-
Wider tracks are also mechanically more robust, which can be useful when doing hand soldering or rework.
-
Vias
-
Via size can be calculated by current capability.
-
Multiple smaller vias can be used in parallel instead of one larger via.
-
Calculators can be used to calculate via properties:
-
Current return paths
-
Current return paths should be considered when placing components and routing tracks.
-
Current flows through the path of least impedance.
-
Electrical impedance is a combination of resistance, capacitive reactance and inductive reactance.
-
-
At low frequencies current flows through the shortest (least resistance) path.
-
With higher frequencies, more return current will flow underneath the track on the path of least impedance.
-
For example if the track is on the first layer, and the ground area is on the second layer, then at higher frequencies the return current tends to flow through the ground area below the track on the first layer.
-
-
Area enclosed with forward and return current is called current loop.
-
Larger current loops create more noise.
-
Loop area should be minimised by placing components close to each other, using short tracks and making sure the return current can flow through the path of least impedance.
-
Return (usually ground) vias should be placed close to the signal and power vias to keep the loop area small.
-
More information:
-
https://www.allaboutcircuits.com/technical-articles/better-pcb-design-return-paths-impedance/
-
Robert Feranec | What Every PCB Designer Should Know - Return Current Path (with Eric Bogatin)
-
Robert Feranec | How GND VIAs Improve Your PCB Layout
