AI-Assisted Schematic and PCB Design: A Practical Guide
This guide shows how to use AI tools for schematic and PCB design, using a single-channel three-phase FOC control board based on a general Cortex-M4 MCU as the example. It covers setting up a verifiable toolchain, preparing rule files and context, iterating prompts in three rounds, key layout and routing criteria, common schematic issues, and turning the workflow into reusable team assets.
1. From “Drawable” to “Usable”: The Capability Leap in AI-Assisted Hardware Design
A little over a month ago, handing a three-phase motor driver board to an AI coding tool produced results at a beginner’s practice level: vague component selection, mismatched footprints and symbols, and trace widths disconnected from current requirements. After continued model iterations, the same request now produces engineering files with a four-layer stackup, sensible partitioning, and adequate current margin. This shows one thing: the weakness of AI in hardware design is shifting from “not understanding the rules” to “needing to be guided correctly.”
It is worth emphasizing that the tool itself does not replace design review. What it does well is quickly laying out common engineering conventions, while hard constraints such as current paths, thermal design, and safety clearances still require engineers to provide explicit criteria. This article uses a single-channel three-phase FOC control board with a general Cortex-M4-based MCU as the main controller to explain how to describe requirements as instructions a model can execute.
2. Environment Setup and Context Preparation
Before starting, prepare a “verifiable” environment. Hardware design differs from pure software: every generation must be checkable immediately, or errors will be amplified layer by layer.
- Schematic and PCB toolchain: Choose an electronic design automation tool that supports scripting and uses plain-text or parseable project files, making it easy for the model to read and write and to run batch checks.
- Rule files up front: Write constraints such as trace width, clearance, via size, and stackup thickness into explicit rule files, and use them as fixed context for every conversation round.
- Symbol and footprint library alignment: Confirm library versions in advance to avoid the model referencing footprint names that do not exist.
- Rollback-capable version control: Commit a snapshot after each prompt round to make comparison and regression tracing easier.
An illustrative context declaration can be written as:
Project constraints:- Layers: 4 layers, 1.6mm, outer layers 1oz, inner layers 1oz- Main current: three-phase output 8A continuous, 12A peak- Trace width rules: main current >= 2.5mm, signal traces 0.2mm- Clearance: pad-to-pad >= 0.2mm, high/low-voltage isolation >= 3mm- Interfaces: CAN, UART debug, SWD download, Hall input
3. A Three-Round Prompt Iteration Structure
The approach in the original work is worth reusing: instead of one long description, converge in rounds.
Round 1: Task and clarification. Provide only the goal and the MCU family, and ask the model to identify requirement gaps and ask questions back rather than produce a design immediately. This step translates “I need a FOC board” into a set of options: bus voltage level, sampling method, whether to integrate op-amps, and gate-drive power supply scheme.
Round 2: Finalizing the design. Confirm each option the model lists to form a frozen technical plan. In this round, be sure to pin down uncertain parameters, such as shunt resistor values, switching frequency, and dead time.
Round 3: Constraint checking and rework. Have the model self-check against the rule files above, output a list of non-compliant items, and fix them one by one. You can ask it to explicitly list the minimum clearance and narrowest copper width for each net.
4. Key Criteria for PCB Layout and Routing
The completeness of this four-layer board is mainly reflected in four quantifiable decisions.
High/low-voltage partitioning. The inverter bridge is placed near the motor terminal block, while the main controller and low-voltage sampling are concentrated on the other side, with the power input at the board edge. Partitioning is not for appearance; it shortens the power loop area and reduces the chance of switching noise coupling into the sampling chain.
Current carrying and via sharing. The three-phase main traces are placed on an inner or bottom layer, with a single trace width on the order of 2.6mm; when transitioning between layers, multiple vias per phase share the current to avoid a single via becoming a bottleneck. More importantly, handle “local bottlenecks”: the narrow copper from the MOSFET pads must be widened, or wider main traces will not help.
Stackup roles. The top layer carries components and signals; the first inner layer is a complete plane to provide nearby return paths for signals; the second inner layer allocates some copper to power-stage supply; the bottom layer routes the motor outputs. High current and small signals are thus physically separated.
Manufacturability details. Clear silkscreen, sufficient mounting holes, and debug interfaces grouped on one side may seem trivial, but they determine whether the board works on the first power-up.
5. Common Schematic-Level Issues
Sensible module placement does not mean there are no serious flaws. AI-generated schematics most often have three types of problems: first, boundary conditions for auto-recovery/reset and debug circuits are ignored; second, op-amp gain and bias network values lack derivation; third, interface protection devices are missing or their selection does not match the port voltage levels. During review, check the six chains “power—clock—reset—sampling—drive—communication” one by one rather than reading the entire schematic.
6. Turning the Method into Reusable Assets
One success is not enough to demonstrate capability. What is truly valuable is solidifying prompt templates, rule files, and checklists into team assets, and using general cloud services such as logging and monitoring to record each round of generation and verification results, forming a traceable iteration loop. When models continue to improve, these assets can be migrated directly instead of starting from scratch.
