How to design a microcontroller PCB in Altium?

 Here’s a practical, Altium-first workflow to design a microcontroller PCB (from “empty project” to “ready for fabrication”), with the checks that prevent 90% of first-rev pain.



1) Start with requirements (so the schematic is correct)

  • MCU part number + package (QFN/LQFP/BGA)

  • Power rails (1.8/3.3/5V), max current, ADC reference needs

  • Clocking (internal RC ok? need crystal?)

  • Programming/debug (SWD/JTAG/USB-UART/boot pins)

  • Interfaces (I²C/SPI/UART/CAN/USB), connector types

  • Environment (ESD, EMI, automotive? temperature?)

2) In Altium: create a clean project structure

  1. File → New → Project → PCB Project

  2. Add:

    • Schematic (.SchDoc)

    • PCB (.PcbDoc)

  3. Set units, grids, and templates early (keeps footprint placement sane).

3) Build or verify your libraries (critical)

You need:

  • Schematic symbol

  • Footprint

  • 3D model (optional but helpful)

  • Pin mapping correct (power pins, SWD, BOOT, NRST)

Best practice:

  • Prefer manufacturer/Altium verified libs when possible.

  • If you make your own footprint: verify pad sizes, pitch, courtyard, paste mask, and pin-1 marker against the datasheet.

4) Schematic design: microcontroller “minimum system” blocks

A) Power (must be done right)

  • Decoupling caps: typically 0.1 µF per VDD pin + 1–10 µF bulk near MCU.

  • Analog supply (VDDA/VREF): filter with ferrite bead or small resistor + cap (per datasheet).

  • Add power LED and test points (VIN, 3V3, GND, NRST, SWDIO, SWCLK).

B) Reset + boot straps

  • NRST: pull-up (commonly 10k) + optional RC (if recommended).

  • BOOT0/BOOT1 pins: pull-down/up per your boot strategy, add header/jumper if you’ll need recovery.

C) Clocking

  • If using a crystal: place load caps exactly as datasheet recommends; keep routing short/symmetric.

  • If internal oscillator is enough, skip crystal for cost and simplicity.

D) Programming / Debug

  • Add SWD header (2x5 1.27mm Cortex Debug or 1x4/1x6 custom):

    • SWDIO, SWCLK, NRST, GND, 3V3, (optional SWO)

  • If using USB: add ESD protection + correct impedance routing (see below).

E) I/O protection and connectors

  • Put ESD diodes at external connectors (USB, buttons, long cables).

  • Series resistors (22–47Ω) on fast edges (SPI SCK, USB FS signals, etc.) can help ringing/EMI.

5) Convert to PCB and define rules

  1. Design → Update PCB Document from schematic.

  2. Set:

    • Board shape

    • Layer stack (2-layer vs 4-layer)

    • Design Rules: trace width/clearance, via sizes, differential pairs (USB), solder mask rules.

If you can afford it: 4-layer makes MCU boards much easier (solid GND plane, cleaner EMI).

6) Placement (most important physical step)

  • Place MCU first.

  • Place decoupling capacitors:

    • as close as physically possible to each power pin

    • short trace to VDD pin, short via to GND plane

  • Keep crystal + caps very close and away from noisy switching nodes (buck SW node).

  • Put debug header at edge of board for easy access.

  • Put connectors where cables make mechanical sense.

7) Routing guidelines (quick but high-impact)

  • Ground: use an unbroken ground plane if possible. Don’t split GND unless you really know why.

  • Power: short/wide traces for VDD rails; avoid daisy-chaining sensitive analog supplies.

  • Clock/crystal: keep short, no vias if possible, guard with ground.

  • USB (if used):

    • route D+/D− as a differential pair

    • keep them length-matched and away from noisy power switching

    • follow your board stack’s impedance if you can; otherwise keep short and consistent

  • Add stitching vias around edges / near connectors (helps EMI).

8) ERC/DRC + sanity checks (do not skip)

  • Schematic ERC: unconnected power pins, wrong net labels, missing pull-ups.

  • PCB DRC: clearance, solder mask slivers, unrouted nets.

  • Check:

    • pin 1 orientation on footprint

    • decoupling caps actually connected to correct VDD pins

    • SWD header pinout matches your programmer

    • BOOT and reset resistors match your intended boot mode

9) Output manufacturing files

  • Gerbers / ODB++, NC Drill

  • BOM

  • Pick-and-place/CPL

  • Assembly drawings (optional but helpful)

评论

此博客中的热门博文

Detailed Explanation of STM32 HAL Library Clock System

How to remove write protection of STM32 chip?

The automatic white balance algorithm of Raspberry Pi