Hardware, IoT & Embedded · PCB Basics

PCB Basics for Software Folks: From Schematic to Board

What you need to know before your first custom PCB.

Reading time: ~8–12 min
Level: All levels
Updated:

Building your first PCB feels like switching from writing code to manufacturing a tiny product. The logic is still yours—but now physics has opinions: power integrity, noise, footprints, clearances, and “did I swap pin 1?” This guide translates PCB design into a software-friendly workflow: specs → schematic → layout → checks → manufacturing files. You’ll learn the terms that matter, the steps that prevent expensive mistakes, and the minimum set of rules that keep first boards boring (in a good way).


Quickstart

If you want fast wins: do these in order. They reduce “first PCB pain” more than any advanced routing trick.

1) Start with a “first-board spec” (10 minutes)

Treat it like a README: constraints first, creativity second.

  • 2-layer FR4, 1.6 mm, 1 oz copper (default friendly)
  • No BGA, no 0.4 mm pitch parts, no RF antennas on v1
  • Target fabrication rules: 6/6 mil trace/space and 0.3 mm drill (common)
  • Define connectors, mounting holes, and power input early

2) Draw the schematic like code, then lint it

Your schematic is the source of truth. The PCB is the “compiled artifact”.

  • Name nets (3V3, VIN, SDA/SCL) so debugging is sane
  • Add decoupling caps next to each IC power pin (don’t “remember later”)
  • Run ERC (Electrical Rules Check) and fix everything you understand
  • Mark anything uncertain as “needs review” and resolve before layout

3) Place parts for current flow, not aesthetics

Think “data locality” but for electrons: short loops, clean return paths.

  • Power path: input → regulator → bulk cap → loads (short and wide)
  • Decoupling caps within a few mm of the IC pins
  • Keep high-speed/clock traces short and away from noisy power switching
  • Put programming/debug header somewhere you can actually reach

4) Before ordering, do the “3 export checks”

Most first-board failures are preventable with these final checks.

  • DRC clean: no clearance/width errors
  • Silkscreen readable: pin 1 markers, polarity, labels not on pads
  • Manufacturing preview: inspect Gerbers + drill file like a final render
A good first PCB goal

Aim for a board that boots and can be debugged—not a board that’s tiny and “perfect.” Version 1 is for learning. Version 2 is for refinement.

Overview

“PCB design” is really two designs that must agree: the logical design (schematic: what connects to what) and the physical design (PCB layout: how those connections exist in copper). Software folks already understand this pattern: it’s like writing source code and producing a build artifact, with static analysis and tests in between.

What you’ll get from this post

  • A mental model of the PCB pipeline (schematic → board → manufacturing files)
  • Core terms you’ll see in every tool and factory quote
  • A practical step-by-step workflow for a “first board” that works
  • A list of common mistakes and the quickest fixes
  • A scan-friendly cheatsheet you can use before ordering
Phase Output What can go wrong What to do about it
Schematic Symbols + nets + BOM intent Wrong pin mapping, missing power pins, unclear net names ERC + review + datasheet cross-check
Layout Footprints + copper + mechanical Bad placement, noisy power/ground, routing rule violations DRC + “current-loop thinking” + placement sanity checks
Manufacturing Gerbers + drill + pick-and-place (optional) Wrong layers, missing drills, unreadable silkscreen Gerber viewer inspection + export checklist
Bring-up Working hardware Can’t program/debug, swapped connectors, unstable power Add test points, headers, and power validation steps
Why this matters

A PCB mistake can cost days and shipping fees. But the upside is huge: once you’ve built your own board, your prototypes become smaller, cleaner, cheaper, and easier to reproduce than breadboards or jumper-wire art.

Core concepts

You don’t need to become an RF wizard to ship useful boards. You do need a few definitions and mental models that make every PCB decision less mysterious.

Schematic vs PCB

Schematic

The logical circuit: symbols connected by nets. This is where you express intent and correctness.

  • Defines electrical connectivity
  • Drives net names and BOM meaning
  • Checked with ERC (electrical rules)

PCB layout

The physical implementation: footprints, copper traces, planes, holes, and mechanical constraints.

  • Defines geometry (where parts and copper go)
  • Drives manufacturability and signal quality
  • Checked with DRC (design rules)

Parts: symbol, footprint, and the “library trust” problem

A component has two key representations: a symbol (what pins exist logically) and a footprint (the pad pattern physically). If either is wrong, your board can be dead on arrival even if the wiring is “correct.”

Library items are not gospel

Always validate footprints for new parts against the datasheet: pad sizes, pitch, orientation, pin 1 marker, and courtyard. Treat this like “copying code from the internet”: it can be fine, but you still run tests.

Nets, planes, and return current

In software, you can “connect anything to anything.” On a PCB, how you connect matters because current needs a loop: it goes out on a trace and returns through ground (often the nearest ground plane path). A continuous ground plane usually makes designs quieter and more forgiving.

Trace

A copper “wire” on a layer. Width and length matter for resistance, heat, and signal integrity.

  • Wider for power/high current
  • Shorter for clocks/high-speed signals
  • Controlled width/spacing for some differential pairs

Plane / pour

A large copper area (often ground) that provides low-impedance return paths and shields noise.

  • Usually keep ground as a solid reference
  • Split planes carefully (splits can create noisy return paths)
  • Use stitching vias to connect ground regions

Stackup and layers (2-layer vs 4-layer)

A “layer” is a copper sheet. More layers give you better routing and better ground/reference planes, but cost more. For many hobby and IoT boards, 2-layer is enough—until you hit density, noise, or speed limits.

Option When it’s enough When it struggles
2-layer Simple MCUs, sensors, low-speed buses (I2C/SPI at modest speeds), LED drivers, power under an amp Dense routing, noisy switching regulators, fast edges, mixed-signal with sensitive analog
4-layer Higher speed, cleaner EMI, dense boards, better power/ground integrity More planning, slightly higher cost; still needs good placement and decoupling

Checks: ERC, DRC, and “manufacturing preview”

Think of ERC and DRC as compiler warnings and static analysis: they catch a large class of mistakes early. But like software, passing checks doesn’t guarantee correctness—so you still review the final output.

Rule of thumb

  • ERC catches schematic issues (unconnected pins, power pins, inconsistent nets)
  • DRC catches layout issues (clearances, trace widths, missing connections)
  • Gerber preview catches export issues (wrong layers, missing drills, silkscreen on pads)

Step-by-step

Below is a workflow that maps well to how software builders think: define constraints, design with checks, export artifacts, and do a final “release review” before ordering.

Step 1 — Define constraints (your board’s “API”)

Before you draw anything, write down what must be true. This prevents redesign loops caused by late mechanical or connector decisions.

Functional constraints

  • Power input range (USB? battery? VIN?) and max current
  • Microcontroller/module choice and required peripherals
  • Connectors (pin count, orientation, keyed vs not)
  • Programming/debug access (UART/JTAG/SWD) and test points

Physical constraints

  • Board size, mounting holes, enclosure clearance
  • Keepouts (antennas, high-voltage, mechanical parts)
  • LED/viewable elements and label readability
  • Fabrication capability (trace/space, drill, layer count)

A tiny “constraints file” you can keep in your repo

This isn’t for the factory—it's for humans. It keeps your design decisions explicit and reviewable.

project: pcb-basics-demo
rev: A
board:
  size_mm: [60, 40]
  layers: 2
  material: FR4
  thickness_mm: 1.6
fab_rules:
  min_trace_mm: 0.152   # ~6 mil
  min_space_mm: 0.152   # ~6 mil
  min_drill_mm: 0.30
  via_diameter_mm: 0.60
power:
  vin: "USB-C 5V"
  rails:
    - {name: 3V3, max_current_mA: 500}
notes:
  - "No BGA on rev A"
  - "Keep SWD header accessible"
  - "Add mounting holes: 4x M3"

Step 2 — Build the schematic (and make it reviewable)

Schematic mistakes are cheap to fix; layout mistakes are annoying; manufactured mistakes are expensive. Make the schematic readable enough that another person (or future you) can review it in minutes.

Schematic hygiene checklist

  • Use meaningful net names (3V3, VIN, SDA, SCL, RESET)
  • Group by function: power, MCU, sensors, connectors, protection
  • Add decoupling caps for every IC (typically 0.1 µF near pins, plus a bulk cap per rail)
  • Add polarity/ESD protection where users will touch (connectors, USB, external headers)
  • Run ERC and resolve warnings you understand; don’t ignore everything

Step 3 — Choose/verify footprints (the “pin 1” stage)

Footprints are where software confidence goes to die: everything looks “connected” until you realize pin numbers don’t match pads. Treat footprint verification like unit tests for your libraries.

Verify these against the datasheet

  • Pin numbering and orientation (pin 1 marker)
  • Pad size and pitch (especially connectors and QFN/QFP)
  • Courtyard/keepout (can parts physically fit side-by-side?)
  • Thermal pad rules (if the package has an exposed pad)

Assembly-friendly defaults

  • Prefer 0603/0805 passives for manual soldering
  • Use well-known connector footprints (JST, pin headers) where possible
  • Add clear polarity marks for diodes, electrolytics, LEDs
  • Put reference designators where you can read them after assembly

Step 4 — Place components (optimize for current loops)

Placement is 80% of a good PCB. Routing should feel “easy” if placement is correct. If routing feels impossible, it’s usually a placement issue, not a routing skill issue.

Placement mental model

Imagine current as packets that hate latency: they want short loops and clear return paths. Put the “producer and consumer” of current near each other (regulator ↔ load, driver ↔ connector, decoupler ↔ IC pin).

Power placement rules

  • Bulk cap near power entry (absorbs transients)
  • Regulator close to input and load (reduce loop area)
  • Short, wide traces for high-current paths
  • Keep switching node copper small (if using switching regulators)

Signal placement rules

  • Crystal/oscillator close to MCU pins (short traces)
  • Keep sensitive analog away from switching power
  • Route buses as a group (I2C/SPI) and avoid long detours
  • Place connectors where cables won’t stress components

Step 5 — Route and pour ground (keep it boring)

For a first board, avoid heroic routing. Use clean 45° traces (or gentle arcs), keep ground continuous, and don’t create long skinny power traces that turn into resistors.

Routing priorities (in order)

  1. Power + ground (thick, short, stable)
  2. Clocks/high-speed (short, direct, reference to ground)
  3. Critical buses (grouped, consistent)
  4. Everything else (fill in, keep readable)

When you add a ground pour, connect it properly (thermals on pads where appropriate) and use stitching vias to tie top and bottom ground pours together. This improves return paths and reduces noise.

Step 6 — Run checks (ERC/DRC) and fix root causes

The goal isn’t “zero errors by disabling rules.” The goal is understanding what each warning means in your context. Fix the root cause, not the symptom.

High-signal DRC issues

  • Unconnected nets (ratsnest leftovers)
  • Clearance violations (manufacturing failures)
  • Too-thin power traces (voltage drop, heating)
  • Silkscreen on pads (assembly problems)

High-signal ERC issues

  • Power pins not powered (missing net labels)
  • Inputs floating (missing pull-ups/pull-downs)
  • Pin type conflicts (output↔output shorts)
  • Unconnected pins that should be tied off per datasheet

Step 7 — Export manufacturing files (and review them)

Factories don’t take your project file—they take standardized outputs: Gerbers (layers), drill files (holes), and optionally pick-and-place and BOM (for assembly). Always inspect exports in a viewer before ordering.

Automate exports like a “release build”

If your tool supports CLI exports, treat your PCB outputs like build artifacts: reproducible and zipped.

# Example: reproducible manufacturing export (adjust paths/tooling to your CAD)
set -euo pipefail

OUT="fab_out"
rm -rf "$OUT" && mkdir -p "$OUT"

# Export Gerbers + drills (example commands; use your CAD's export tooling)
kicad-cli pcb export gerbers --output "$OUT/gerbers" "project.kicad_pcb"
kicad-cli pcb export drill   --output "$OUT/drill"   "project.kicad_pcb"

# Sanity: ensure expected outputs exist
test -d "$OUT/gerbers" && test -d "$OUT/drill"
find "$OUT" -type f | wc -l

# Package for fab
zip -r "project_revA_fab.zip" "$OUT"
Don’t skip the Gerber review

A PCB can pass DRC and still export incorrectly (wrong layers, missing drills, mirrored silk). Open the exported files and confirm: board outline, copper layers, soldermask openings, silkscreen, and drills.

Step 8 — Plan bring-up (how you’ll debug on day 1)

Bring-up is the first time your design meets reality. Make it easy by adding access points and a simple validation plan: check rails, check clocks, check programming, then peripherals.

Bring-up checklist

  • Measure each rail (3V3, 5V, etc.) at a labeled test point
  • Confirm reset line behavior and boot mode pins
  • Verify programming/debug works before soldering “everything”
  • Test one peripheral at a time (I2C scan, SPI ID, UART loopback)

BOM sanity = fewer surprises

A lot of “board doesn’t work” is actually “wrong part” or “wrong footprint variant.” Even a tiny script can catch missing fields or mismatched packages before you order.

import csv
import sys

REQUIRED = {"Reference", "Value", "Footprint", "Manufacturer Part Number"}

def load(path: str):
    with open(path, newline="", encoding="utf-8") as f:
        return list(csv.DictReader(f))

def main(path: str) -> int:
    rows = load(path)
    if not rows:
        print("BOM is empty.")
        return 2

    missing_cols = REQUIRED - set(rows[0].keys())
    if missing_cols:
        print("Missing BOM columns:", ", ".join(sorted(missing_cols)))
        return 2

    bad = 0
    for r in rows:
        mpn = (r.get("Manufacturer Part Number") or "").strip()
        fp  = (r.get("Footprint") or "").strip()

        if not mpn:
            bad += 1
            print(f"[NO MPN] {r.get('Reference','?')} {r.get('Value','?')} ({fp})")

        # Basic heuristic: warn on tiny passives for first boards
        if "0402" in fp:
            print(f"[WARN] 0402 part: {r.get('Reference','?')} ({r.get('Value','?')})")

    print(f"Checked {len(rows)} BOM lines. Issues: {bad}")
    return 1 if bad else 0

if __name__ == "__main__":
    sys.exit(main(sys.argv[1] if len(sys.argv) > 1 else "bom.csv"))

Common mistakes

These are the “classic” first-board failures. The good news: they’re predictable, and once you know them, you stop repeating them.

Mistake 1 — Trusting an unverified footprint

Everything looks right until the part physically doesn’t fit or pins don’t match pads.

  • Fix: check pad pitch, pin numbering, and orientation against the datasheet.
  • Fix: print the footprint at 1:1 on paper and place the part on it (surprisingly effective).

Mistake 2 — Missing decoupling (or placing it far away)

The MCU “sort of works” until Wi-Fi turns on, a motor switches, or an ADC looks noisy.

  • Fix: put 0.1 µF caps near each IC power pin (short traces, short ground return).
  • Fix: add bulk capacitance per rail near the loads and near the regulator.

Mistake 3 — Skinny power traces

Voltage drop and heat show up as “random resets” or flaky peripherals.

  • Fix: widen power traces, especially to regulators, motors, LEDs, and radios.
  • Fix: keep high-current loops short and avoid routing them through sensitive ground regions.

Mistake 4 — No debug access

The board is assembled… and now you can’t flash firmware or see logs.

  • Fix: add a programming header (SWD/JTAG/UART) and label it on silkscreen.
  • Fix: add test points for power rails, reset, and one bus line.

Mistake 5 — Silkscreen and polarity confusion

A reversed diode/LED or a rotated IC can waste hours.

  • Fix: clear pin 1 markers, diode arrows, capacitor polarity, connector pin 1.
  • Fix: keep reference designators visible after assembly (not under parts).

Mistake 6 — Ground plane chopped into islands

Noise problems appear because return current takes long detours.

  • Fix: keep ground as continuous as possible, avoid unnecessary splits.
  • Fix: add stitching vias and avoid routing that slices the plane under sensitive signals.
A practical debugging mindset

If something feels “random,” suspect power and ground first. Measure rails under load, then look at reset/boot pins, then verify clocks, then firmware.

FAQ

Do I need a 4-layer PCB for my first project?

Usually no. A 2-layer board is great for learning and many IoT/embedded designs. Choose 4 layers when you’re fighting density, EMI/noise, fast edges, or you need solid reference planes for cleaner signals.

What’s the difference between ERC and DRC?

ERC checks the schematic for electrical logic issues (unconnected pins, power pin problems, pin-type conflicts). DRC checks the PCB for physical/manufacturing issues (clearance, trace width, missing connections, silk on pads). Run both, and treat warnings as prompts to review—not as noise to ignore.

How close should decoupling capacitors be to an IC?

As close as you can reasonably place them—ideally within a few millimeters of the power pin, with a short path to ground. The goal is a small current loop: pin → capacitor → ground → back to pin’s return reference.

How do I pick trace width for power?

Use the fattest traces you can without making routing impossible. For “first boards,” a simple rule is: signals can be thin (within fab limits), power should be visibly thicker, and any path carrying hundreds of milliamps or more should be intentionally wide and short. If you’re unsure, widen it—copper is cheap compared to debugging time.

What files do I actually send to a PCB manufacturer?

Typically: Gerbers (one file per layer), a drill file (holes), and a board outline. If you want assembly: also send a BOM and pick-and-place file. Always inspect the exported files in a viewer before placing an order.

What’s the easiest way to avoid “wrong connector orientation”?

Put pin 1 markers on silkscreen, label important pins (GND, VCC, TX/RX), and use keyed connectors when possible. Also: check connector mating orientation in your enclosure or cable routing—mechanics wins.

Cheatsheet

Use this as your “pre-order checklist.” If you can check these boxes, your chance of a clean first spin goes way up.

Schematic (logical) checklist

  • All power rails named and consistent (VIN, 5V, 3V3)
  • Decoupling caps present for every IC
  • Reset/boot strapping matches datasheet (pull-ups/pull-downs)
  • Connectors labeled (pin 1, polarity, purpose)
  • ERC run and reviewed (no “mystery warnings”)

Layout (physical) checklist

  • Board outline correct + mounting holes included
  • Power traces wide + short; ground pour present
  • Decoupling caps placed close to pins
  • Silkscreen readable; polarity/pin 1 markers clear
  • DRC clean (or each exception understood and justified)

Manufacturing export checklist

Check What you should see Why it matters
Gerber layers Top/bottom copper, mask, silk, outline Missing layers = broken board
Drills All vias and holes appear No holes = no assembly
Silk vs pads No text on pads; pin 1 visible Assembly and debugging clarity
Connector alignment Correct orientation and spacing Prevents “can’t plug it in”
Test points Rails and debug nets accessible Faster bring-up
If you only do one final step

Open your exported Gerbers and drill files and inspect them slowly. It’s the PCB equivalent of reading the generated SQL before running a migration.

Wrap-up

PCB design gets dramatically less intimidating once you treat it like a build pipeline: define constraints, design logically, implement physically, run checks, then review the final artifacts. Your first PCB doesn’t need to be tiny or fancy—it needs to be debuggable and repeatable.

Next actions (pick one)

  • Take an existing breadboard project and turn it into a “rev A” PCB with generous spacing.
  • Create a personal footprint validation ritual (datasheet check + pin 1 + 1:1 print).
  • Add a bring-up plan to your hardware repo (rails, reset, programming, peripherals).
  • Build a second revision on purpose: fix one thing (layout, connectors, noise) based on learnings.

Want more embedded practicality? The related posts below cover clean prototyping, debugging tools, and common bus protocols.

Quiz

Quick self-check (demo). This quiz is auto-generated for hardware / iot / embedded.

1) What’s the difference between a schematic symbol and a footprint?
2) Which statement best describes ERC vs DRC?
3) Where should you place a 0.1 µF decoupling capacitor for an IC?
4) When is moving from a 2-layer to a 4-layer PCB most justified?