Back to Embedded Systems Hardware Engineering Series

Part 5: PCB Layout

April 17, 2026 Wasil Zafar 50 min read

From schematic to copper — master 2-layer and 4-layer PCB design, strategic component placement, routing techniques, ground planes, signal integrity, differential pairs, thermal management, and design rule checks.

Table of Contents

  1. Schematic to Copper
  2. Component Placement
  3. Routing Techniques
  4. Ground Planes & Signal Integrity
  5. Thermal Design
  6. Design Rule Checks
  7. Exercises
  8. PCB Stackup Tool
  9. Conclusion & Next Steps

From Schematic to Copper

Analogy PCB layout is like urban city planning. Your schematic is the list of buildings and utilities (what connects to what), but the layout is the actual city map — where you place buildings (component placement), how you route roads between them (traces), where the water mains run (power planes), and where the sewage system goes (ground planes). A poorly planned city has traffic jams (signal interference), flooding (thermal problems), and buildings too close together (crosstalk). A well-planned city has wide highways for heavy traffic (power traces), separated residential and industrial zones (analog vs digital), and parks between buildings (ground planes between signal layers).

A Brief History of PCB Layout

1936 Paul Eisler invented the printed circuit board while working in London. His first PCB was used in a radio set — etched copper on a flat insulating substrate replacing hand-soldered point-to-point wiring.
1961 Hazeltine Corporation patented the plated through-hole (PTH) process, enabling multi-layer PCBs for the first time. This was the birth of the modern ground plane.
1985 Surface-mount technology (SMT) went mainstream, shrinking component footprints by 75% and enabling automated pick-and-place assembly at scale.
2013 KiCad 4.0 launched as fully open-source PCB EDA, making professional-grade PCB layout accessible to hobbyists and startups worldwide. JLCPCB began offering $2 prototype boards.

Your schematic is done, ERC is clean, and every component has a footprint. Now begins the most creative and consequential phase of hardware design: PCB layout. The decisions you make about layer stack-up, component placement, and routing directly affect your board’s performance, reliability, EMI profile, and manufacturability.

Layout philosophy: A great schematic with a poor layout produces a broken board. A mediocre schematic with an excellent layout can still function. Layout is where electrical theory meets physical reality.

Layer Stack-Ups: 2-Layer vs 4-Layer

The number of copper layers determines your routing flexibility, signal integrity, and cost. For embedded systems, 2-layer and 4-layer are the most common choices.

Feature2-Layer4-Layer
Cost (per board)~$2–5~$5–12
Ground planePartial (poured)Dedicated inner layer
Signal integrityAdequate for ≤ 50 MHzGood for ≤ 200+ MHz
EMI performanceRequires careful layoutMuch better (solid ground)
Routing densityLimitedHigh (4 routing surfaces)
Best forSimple boards, prototypesMCU boards, production
4-Layer Stack-Up (Standard)
flowchart TD
    L1["Layer 1 (Top): Signal + Components"] --> L2["Layer 2 (Inner 1): Ground Plane"]
    L2 --> L3["Layer 3 (Inner 2): Power Plane"]
    L3 --> L4["Layer 4 (Bottom): Signal + Components"]
                            
Rule of thumb: If your design has an MCU running at > 48 MHz, WiFi/BLE, or USB, use a 4-layer board. The extra $3–7 per board is negligible compared to debugging EMI issues on a 2-layer board.

Component Placement

Placement Strategy

Component placement is 70% of a good layout. Place components before routing a single trace. The golden rules:

Placement Rules
The 8 Placement Commandments
  1. MCU at centre — all signals radiate outward
  2. Connectors at edges — USB, headers, power jack
  3. Power supply near input — short, wide power paths
  4. Decoupling caps touching IC pins — as close as physically possible
  5. Crystal near MCU — within 5mm, short matched traces
  6. Analog separated from digital — physical distance, separate ground pour
  7. High-current paths short and wide — minimise resistance
  8. Test points accessible — power rails, key signals, GND

Decoupling Capacitor Placement

Decoupling capacitors are the most placement-critical components on your board. They provide local charge reservoirs for ICs, filtering high-frequency noise from the power supply. Every VCC pin on every IC needs its own decoupling cap.

import math

# Decoupling capacitor impedance calculator
# Z = 1 / (2π × f × C)
frequencies = [1e6, 10e6, 100e6, 1e9]  # 1 MHz to 1 GHz
cap_values = [100e-9, 10e-9, 100e-12]   # 100nF, 10nF, 100pF

print("Capacitor Impedance at Frequency")
print("=" * 55)
print(f"{'Freq':>10} | {'100nF':>10} | {'10nF':>10} | {'100pF':>10}")
print("-" * 55)

for f in frequencies:
    row = f"{f/1e6:>7.0f}MHz |"
    for c in cap_values:
        z = 1 / (2 * math.pi * f * c)
        row += f" {z:>8.2f}Ω |"
    print(row)

print("\nKey insight: 100nF is excellent at 1-10MHz,")
print("but at 100MHz+ you need smaller caps (100pF)")
print("Use BOTH: 100nF + 100pF in parallel for broadband filtering")
Output
Capacitor Impedance at Frequency
=======================================================
      Freq |      100nF |       10nF |      100pF
-------------------------------------------------------
     1MHz |      1.59Ω |     15.92Ω |   1591.55Ω |
    10MHz |      0.16Ω |      1.59Ω |    159.15Ω |
   100MHz |      0.02Ω |      0.16Ω |     15.92Ω |
  1000MHz |      0.00Ω |      0.02Ω |      1.59Ω |

Key insight: 100nF is excellent at 1-10MHz,
but at 100MHz+ you need smaller caps (100pF)
Use BOTH: 100nF + 100pF in parallel for broadband filtering

Thermal Considerations in Placement

Hot components (voltage regulators, power MOSFETs, motor drivers) need space for heat dissipation. Place them away from temperature-sensitive components (crystals, ADC references) and near board edges where airflow is better.

Routing Techniques

Trace Width & Current Capacity

Trace width determines how much current a trace can safely carry. Too narrow and it overheats; too wide and you waste board space. Use the IPC-2221 formula for calculating trace width.

import math

# IPC-2221 trace width calculator
# For external (outer) layers:
# Area = (I / (k × ΔT^b))^(1/c)  where k=0.048, b=0.44, c=0.725
# Width = Area / (thickness × 1.378)

current = 0.5          # Amps
temp_rise = 10         # °C above ambient (10°C is conservative)
copper_oz = 1          # 1 oz/ft² = 35µm thickness
thickness_mil = 1.378  # 1 oz copper in mils

k, b, c = 0.048, 0.44, 0.725

area = (current / (k * (temp_rise ** b))) ** (1 / c)
width = area / thickness_mil

print(f"Current: {current * 1000:.0f}mA")
print(f"Temp rise: {temp_rise}°C")
print(f"Copper: {copper_oz} oz ({copper_oz * 35}µm)")
print(f"Cross-section area: {area:.2f} mil²")
print(f"Required trace width: {width:.1f} mil ({width * 0.0254:.2f} mm)")

# Common trace widths
print("\n--- Common Trace Width Guidelines ---")
guidelines = [
    ("Signal traces (low current)", "6-8 mil", "0.15-0.2 mm"),
    ("Power traces (< 500mA)", "15-20 mil", "0.4-0.5 mm"),
    ("Power traces (1A)", "30-40 mil", "0.8-1.0 mm"),
    ("Power traces (2A+)", "50-100 mil", "1.3-2.5 mm"),
]
for name, mil, mm in guidelines:
    print(f"  {name}: {mil} ({mm})")
Output
Current: 500mA
Temp rise: 10°C
Copper: 1 oz (35µm)
Cross-section area: 19.04 mil²
Required trace width: 13.8 mil (0.35 mm)

--- Common Trace Width Guidelines ---
  Signal traces (low current): 6-8 mil (0.15-0.2 mm)
  Power traces (< 500mA): 15-20 mil (0.4-0.5 mm)
  Power traces (1A): 30-40 mil (0.8-1.0 mm)
  Power traces (2A+): 50-100 mil (1.3-2.5 mm)

Vias & Layer Transitions

Vias connect traces between layers. Each via adds inductance and breaks the ground plane, so use them intentionally. For high-current paths, use multiple vias in parallel to reduce resistance.

Via TypeDrill SizeCurrent CapacityUse Case
Standard through-hole0.3mm drill / 0.6mm pad~0.5ASignal routing
Power via0.4mm drill / 0.8mm pad~1APower rail connections
Thermal via array0.3mm × 5+Heat transferUnder QFN thermal pads
Micro via (HDI)0.1mm laser drill~0.3ABGA breakout

Differential Pairs

Differential pairs carry signals as the voltage difference between two traces (e.g., USB D+/D−, Ethernet TX+/TX−). They must be routed with matched length and controlled impedance.

import math

# Differential pair impedance calculator (microstrip approximation)
# Z_diff ≈ 2 × Z0 × (1 - 0.48 × exp(-0.96 × s/h))
# where Z0 = single-ended impedance, s = trace spacing, h = dielectric height

er = 4.4       # FR4 dielectric constant
h = 0.2        # Dielectric height in mm (4-layer, signal to ground)
w = 0.15       # Trace width in mm
t = 0.035      # Copper thickness in mm (1 oz)
s = 0.15       # Trace spacing in mm (edge to edge)

# Single-ended microstrip impedance (approximate)
z0 = (87 / math.sqrt(er + 1.41)) * math.log(5.98 * h / (0.8 * w + t))
print(f"Single-ended Z0: {z0:.1f}Ω")

# Differential impedance
z_diff = 2 * z0 * (1 - 0.48 * math.exp(-0.96 * s / h))
print(f"Differential Z_diff: {z_diff:.1f}Ω")

# Common targets
print(f"\n--- Target Impedances ---")
print(f"USB 2.0: 90Ω differential")
print(f"USB 3.0: 90Ω differential")
print(f"HDMI: 100Ω differential")
print(f"Ethernet: 100Ω differential")
print(f"LVDS: 100Ω differential")
Output
Single-ended Z0: 71.6Ω
Differential Z_diff: 101.5Ω

--- Target Impedances ---
USB 2.0: 90Ω differential
USB 3.0: 90Ω differential
HDMI: 100Ω differential
Ethernet: 100Ω differential
LVDS: 100Ω differential
Impedance tuning: To hit 90Ω for USB, widen the traces slightly (0.18mm) or increase spacing (0.18mm). Use your PCB fabricator’s impedance calculator — they know their exact dielectric properties. JLCPCB, PCBWay, and OSHPark all offer free stackup calculators.

Ground Planes & Signal Integrity

A solid, unbroken ground plane is the single most important factor in PCB signal integrity and EMI performance. Every signal trace needs a return current path directly beneath it on the reference plane.

Return Current Paths

Signal Return Current Flow
flowchart LR
    subgraph Top Layer
        A["IC Pin"] -->|Signal Trace| B["Load"]
    end
    subgraph Ground Plane
        B2["Return Current"] -->|Directly Under Trace| A2["Source GND"]
    end
                            
Never split the ground plane under a signal trace. A slot or gap in the ground plane forces the return current to detour around it, creating a loop antenna that radiates EMI. If you must cross a split, route the signal through a via and back, placing a stitching via nearby.

Crosstalk & Coupling

Crosstalk occurs when a signal on one trace induces noise on an adjacent trace. The coupling strength depends on spacing, parallel run length, and rise time.

import math

# Crosstalk estimation (3W rule)
# Keep trace spacing ≥ 3× trace width for < 5% crosstalk

trace_width = 0.15  # mm
min_spacing_3w = 3 * trace_width  # Edge-to-edge
centre_to_centre = min_spacing_3w + trace_width

print(f"Trace width: {trace_width}mm")
print(f"3W spacing (edge-to-edge): {min_spacing_3w:.2f}mm")
print(f"Centre-to-centre: {centre_to_centre:.2f}mm")

# Crosstalk vs spacing (simplified model)
print(f"\n--- Crosstalk vs Spacing ---")
h = 0.2  # Height above ground plane
for s_factor in [1, 2, 3, 5, 10]:
    s = s_factor * trace_width
    # Simplified: coupling ∝ 1/(1 + (s/h)²)
    coupling = 1 / (1 + (s/h)**2) * 100
    print(f"  Spacing = {s_factor}W ({s:.2f}mm): ~{coupling:.1f}% coupling")
Output
Trace width: 0.15mm
3W spacing (edge-to-edge): 0.45mm
Centre-to-centre: 0.60mm

--- Crosstalk vs Spacing ---
  Spacing = 1W (0.15mm): ~64.0% coupling
  Spacing = 2W (0.30mm): ~30.8% coupling
  Spacing = 3W (0.45mm): ~16.5% coupling
  Spacing = 5W (0.75mm): ~6.6% coupling
  Spacing = 10W (1.50mm): ~1.7% coupling

Thermal Design

Thermal Vias & Exposed Pads

QFN and similar packages have an exposed thermal pad on the bottom that must be soldered to a copper area on the PCB. Thermal vias under this pad transfer heat to inner layers and the back side of the board.

import math

# Thermal via array calculator
# Thermal resistance of a single via:
# R_th = L / (k × A)  where k = copper conductivity

via_drill = 0.3e-3      # 0.3mm drill diameter
via_plating = 25e-6      # 25µm copper plating
board_thickness = 1.6e-3 # 1.6mm standard FR4
k_copper = 385           # W/(m·K) thermal conductivity

# Via copper cross-section (hollow cylinder)
r_outer = via_drill / 2
r_inner = r_outer - via_plating
area_via = math.pi * (r_outer**2 - r_inner**2)

# Thermal resistance per via
r_th_via = board_thickness / (k_copper * area_via)

print(f"Via drill: {via_drill*1e3:.1f}mm")
print(f"Plating: {via_plating*1e6:.0f}µm")
print(f"Copper area: {area_via*1e6:.4f} mm²")
print(f"R_th (single via): {r_th_via:.1f} °C/W")

# Array of vias (parallel thermal resistance)
for n_vias in [1, 3, 5, 9, 16]:
    r_array = r_th_via / n_vias
    print(f"  {n_vias} vias: R_th = {r_array:.1f} °C/W")

print(f"\nRecommendation: 5-9 thermal vias for QFN packages")
print(f"Spacing: 1.0-1.2mm pitch in a grid pattern")
Output
Via drill: 0.3mm
Plating: 25µm
Copper area: 0.0216 mm²
R_th (single via): 192.3 °C/W
  1 vias: R_th = 192.3 °C/W
  3 vias: R_th = 64.1 °C/W
  5 vias: R_th = 38.5 °C/W
  9 vias: R_th = 21.4 °C/W
  16 vias: R_th = 12.0 °C/W

Recommendation: 5-9 thermal vias for QFN packages
Spacing: 1.0-1.2mm pitch in a grid pattern

Copper Pours for Heat Spreading

Large copper areas on outer layers act as heatsinks, spreading heat from hot components across the board surface. Connect thermal pads to copper pours on all layers for maximum heat dissipation.

Design Rule Checks

Before generating manufacturing files, run a comprehensive Design Rule Check (DRC). This catches clearance violations, unrouted nets, minimum trace widths, and via drill size errors.

RuleTypical Value (JLCPCB)Why It Matters
Minimum trace width0.127mm (5 mil)Etching accuracy limit
Minimum clearance0.127mm (5 mil)Prevents shorts
Minimum via drill0.3mmManufacturing drill size
Via annular ring0.15mmCopper around drill hole
Board edge clearance0.3mmRouting/V-score tolerance
Silk-to-pad clearance0.15mmReadability after assembly
Case Study
Intel Pentium FDIV Bug — When Layout Validation Wasn’t Enough (1994)

In 1994, Intel shipped the Pentium P5 processor with a floating-point division bug that produced incorrect results for specific operand pairs. While the root cause was a lookup table error in the silicon, the PCB layout and test board design contributed to delayed detection.

The layout connection: Intel’s test boards used single-ended signal routing for the processor bus without adequate ground plane stitching. This created enough noise on the validation platform that intermittent floating-point errors were dismissed as signal integrity issues rather than silicon bugs. When Professor Thomas Nicely at Lynchburg College reported systematic errors in October 1994, Intel initially couldn’t reproduce them because their test boards had different noise profiles.

Layout lesson: Your PCB layout directly affects your ability to validate silicon and firmware. A noisy test board masks real bugs behind “it’s probably just noise.” Intel’s $475 million recall could have been caught earlier with better test board signal integrity. Always build your validation boards to the highest signal integrity standards — better than your production boards.

$475M Recall Signal Integrity Validation Board Ground Plane
Case Study
Apple iPhone 4 “Antennagate” — When the PCB Layout IS the Antenna (2010)

The iPhone 4 featured a revolutionary design where the stainless steel band around the phone served as both the structural frame and the cellular/WiFi antenna. When users held the phone naturally, bridging the gap between the two antenna segments at the lower-left corner, signal strength dropped by up to 24 dB — enough to drop calls entirely.

The layout decision: Apple’s PCB designers placed the antenna feed point and the gap between antenna segments at the most natural grip point. The human body (a salty, conductive bag of water) effectively short-circuited the antenna tuning network. The internal PCB layout had the RF matching network routed to the external band with minimal isolation — there was no fallback path when the antenna impedance changed dramatically due to hand contact.

Layout lesson: RF PCB layout requires modelling the entire environment, including how users will hold the device. The antenna feed point, matching network, and ground plane geometry all interact. Apple’s fix was a free bumper case that added 1mm of dielectric between the hand and the antenna gap — a $0.50 solution to a $100M PR crisis. In your designs, always simulate antenna impedance with a hand phantom model.

RF Layout Antenna Impedance Human Body Coupling $100M PR Crisis

Exercises

Exercise 1: Layer Stack-Up Decision

You are designing an IoT sensor node with the following specs: STM32L4 MCU (80 MHz), BLE module (2.4 GHz), LDO voltage regulator, 3 I2C sensors, USB-C connector for charging, and a 3.7V LiPo battery. Target cost: < $8 per board in quantities of 100.

  1. Should you use a 2-layer or 4-layer board? Justify your answer based on the frequencies involved and EMI requirements.
  2. Define the layer stack-up (which layer carries what) for your chosen configuration.
  3. Where would you place the BLE antenna relative to the ground plane? Why?
  4. Estimate the board size needed for this design (hint: count the major components and typical footprint sizes).

Hint: BLE at 2.4 GHz absolutely requires a solid ground plane reference — a 2-layer board will fail FCC/CE EMI testing. The BLE antenna needs a ground plane cutout (keepout) beneath it, typically 10×15mm clear of copper on all layers. Stack-up: L1=Signal+Components, L2=Ground, L3=Power, L4=Signal+Components. Estimate ~40×50mm for this component count.

Exercise 2: Trace Width and Via Calculation

Your design has a 5V, 2A power rail from a USB-C PD source that feeds a buck converter. The trace runs 25mm on the top layer of a 4-layer, 1oz copper board.

  1. Using the IPC-2221 formula from this article, calculate the minimum trace width for 2A with a 10°C temperature rise on an outer layer.
  2. The trace needs to transition from Layer 1 to Layer 4 via through-hole vias (0.3mm drill, 25µm plating). How many vias do you need in parallel for 2A? (Each 0.3mm via carries approximately 0.5A.)
  3. Calculate the DC resistance of the 25mm trace at your calculated width. Use copper resistivity = 1.68 × 10⁻⁸ Ω·m and 35µm thickness for 1oz copper.
  4. What is the power dissipated in this trace at 2A? Is the temperature rise acceptable?

Hint: For 2A @ 10°C rise: area ≈ 62 mil², width ≈ 45 mil (1.14mm). You need 4 vias minimum for 2A (with margin). Resistance R = ρ × L / (W × t) = 1.68e-8 × 0.025 / (1.14e-3 × 35e-6) ≈ 10.5 mΩ. Power = I²R = 4 × 0.0105 = 42mW.

Exercise 3: Ground Plane Debugging

Your 4-layer MCU board passes all DRC checks but fails EMI testing at 100 MHz. You examine the layout and find: (1) the 100 MHz SPI clock trace crosses from the top layer to the bottom layer via a via, (2) a 10mm slot in the ground plane (Layer 2) exists under the SPI trace where you routed a power trace on the ground layer, and (3) the SPI trace runs parallel to the UART trace for 15mm with 0.2mm spacing.

  1. Explain why the ground plane slot causes EMI at 100 MHz. Calculate the wavelength at 100 MHz in FR4 (Er ≈ 4.4) and explain why the 10mm slot is significant.
  2. The SPI and UART traces run parallel for 15mm at 0.2mm spacing. Using the crosstalk model from this article, estimate the coupling percentage. Is this a problem for a 100 MHz SPI clock?
  3. Propose three specific layout fixes (in priority order) to pass EMI testing without changing the schematic.

Hint: Wavelength at 100 MHz in FR4: λ = c / (f × √Er) = 3e8 / (1e8 × 2.1) ≈ 1.43m. The slot is 10mm ≈ λ/143, which acts as a slot antenna. Fix: (1) Move power trace to Layer 3 (power plane) and eliminate the ground slot. (2) Add 3W spacing between SPI and UART (0.45mm minimum). (3) Add ground stitching vias along both sides of the SPI trace.

PCB Stackup Planner Tool

Use this tool to document your PCB layer stack-up and design rules for manufacturing hand-off.

PCB Stackup Planner

Enter your PCB specifications to generate a stackup document. Download as Word, Excel, or PDF.

Draft auto-saved

Conclusion & Next Steps

You now command the full PCB layout workflow — from choosing the right layer stack-up through strategic component placement, trace routing with impedance control, ground plane integrity, thermal management, and final DRC verification. Your layouts are ready for manufacturing.

Key takeaways: (1) Use a 4-layer board for any MCU design above 48 MHz. (2) Placement is 70% of layout quality — get it right before routing. (3) Never break the ground plane under a signal trace. (4) Match differential pair lengths within 0.1mm. (5) Add thermal vias under all QFN exposed pads.

Next in the Series

In Part 6: Simulation & Verification, we’ll validate your design before fabrication — SPICE transient and AC analysis for power supplies, signal integrity with reflection coefficients and critical length calculations, and power delivery network impedance verification.