

Flight controller
An AI PCB Generator. Completely automated.
- Size
- 71.2 × 80.6 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 107
- Nets
- 181
- Pads
- 491
- Tracks, vias
- 870, 99
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 27 Oct 2026
- Updated
- 27 Oct 2026
Overview
Flight controller is an open-source printed circuit board by SurajShivakumar, from the SurajShivakumar/AIPCB repository on GitHub. It is a 4-layer board of 71.2 × 80.6 mm with 107 parts on 181 nets, routed with 870 tracks and 99 vias.
It is built around the BMP280, MP4572GQB-P and AP7361C-33E, with the MPU-6000 and USBLC6-2SC6 among its other parts. Its parts include 59 capacitors, 22 resistors, 6 ICs, 6 connectors and 3 inductors. It belongs with the robots and motor control boards and the STM32 boards of this library.
Main components
5BMP280
LGA-8(2x2.5)-40℃~+85℃ 0.12hpa 1.5pa/K 1.71V~3.6V 1hpa 300nA 30Kpa~1.1bar I2C、SPI Integrated ADC and digital interface、On-chip calibration and non-volatile storage、Standby mode、On-chip temperature output LGA-8(2x2.5) Pressure Sensors ROHSBoschPressure SensorsMP4572GQB-P
QFN-12(2.5x3)-40℃~+125℃@(TJ) 1 2.2MHz 2A 4.5V~60V Buck Buck Built-in Yes QFN-12(2.5x3) DC-DC Converters ROHSMonolithic Power SystemsDC-DC ConvertersAP7361C-33E
SOT-223-40℃~+85℃@(Ta) 1 1A 3.3V 340mV@(1A) 6V 75dB@(1kHz) 80uA Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown、Enable control Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSDiodes IncorporatedVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsMPU-6000
QFN-24-EP(4x4)-40℃~+85℃ 16bit 1KB 2.375V~3.46V 5uA IMU (accelerometer + gyroscope) SPI、I2C X,Y,Z X,Y,Z ±16g ±2000dps 运动事件检测、同步与时间戳、过量程保护功能 QFN-24-EP(4x4) Accelerometers ROHSTDK InvenSenseAccelerometersUSBLC6-2SC6
SOT-23-60.35pF、0.8pF 100nA 150W@8/20us 15V 2 5V 6A@8/20us 6V ESD SOT-23-6 ESD and Surge Protection (TVS/ESD) ROHSUMWESD And Surge Protection (TVS/ESD)
README
README.mdAI PCB Copilot
Prompt an LLM to read, review, simulate and edit KiCad projects while you watch the changes in a browser.
It has two parts, both MCP servers, so any MCP client can use them (Claude Code, Claude Desktop, Cursor, opencode + a local model):
| Server | What it does |
|---|---|
kicad | The editing engine: mixelpixx/KiCAD-MCP-Server v2.8.2 (MIT). ~240 tools: place, wire and label symbols; footprints; routing; exports; JLCPCB parts. |
copilot | This repo. Checkpoints and undo, pin-level netlist diff, verify_edit, measured design review, SPICE on LTspice and ngspice, and a live browser view. |
See PLAN.md for the design and roadmap.
Setup (Windows)
You need KiCad 9 or 10, Node 18+, Python 3.11+ and git. LTspice is optional; ngspice comes with KiCad.
powershell -ExecutionPolicy Bypass -File setup.ps1The script clones the engine at its pinned tag, builds it against KiCad's Python, installs the copilot and runs the tests.
Use it with Claude Code
cd "AI PCB Generator"
claude # approve the 'kicad' and 'copilot' servers the first timeExample prompts:
- "Open workspace/fc and start the live view."
- "Review this board." (uses the
review-schematicskill) - "Add a 10k pull-up from nFAULT to 3.3V." (uses
edit-schematic: checkpoint → edit → verify → keep or undo) - "Simulate the BEMF dividers at 25.2 V and check the ADC pins stay under 3.3 V, on both LTspice and ngspice." (uses
simulate) - "Undo that."
Work on copies. sample_boards/ holds the originals; copy a board into workspace/ and point the agent there.
Seeing changes live
- Browser (always):
start_live_viewserveshttp://127.0.0.1:8765. It re-renders throughkicad-cliwithin about a second of every save, circles the parts changed since the last checkpoint, and lists diffs, ERC counts, checkpoints and review findings. Clicking a finding jumps to its parts. The "Interactive" tab uses KiCanvas (alpha).- You can also run it without an agent:
.venv\Scripts\python -m copilot.viewer workspace\fc
- You can also run it without an agent:
- KiCad schematic editor: KiCad 9/10 has no API for editing an open schematic, so the agent edits the file.
.mcp.jsonturns onKICAD_INTERACTIVE_SCHEMATIC, which makes eeschema reload after each write. Save your own edits before asking the agent to edit. It will never auto-confirm a "discard changes" dialog. - KiCad PCB editor: truly live (undoable) when the board is open in pcbnew with Preferences → Plugins → Enable IPC API server on.
Copilot tools
| Tool | Purpose |
|---|---|
project_status, start_live_view | Session setup |
checkpoint, list_checkpoints, undo, restore_checkpoint | Snapshots in a shadow git repo at <project>/.copilot/git. This never touches your own git. |
netlist_diff, verify_edit | Pin-level diff (name-independent), ERC new/resolved, flags parts touched outside the plan and unplanned net merges |
get_netlist | Ground-truth connectivity from kicad-cli |
review_design | ERC, optional DRC with schematic parity, netlist rules, fab-rule checks. Writes .copilot/review.md |
spice_check, spice_build_deck, spice_run, spice_simulators | Decks from the schematic; LTspice / ngspice / both with a cross-check; pass/fail assertions |
pin_positions, connect_power, draw_wire, tidy_schematic | Edits in hand-drawn style: power symbols instead of text labels; straight on-grid wires with junction dots; grid snap and text de-overlap; saves byte-identical to KiCad's own file format |
Build + route the V2 ESC in one go (repo root, PowerShell):
.\autopcb_run # build, route, finish, stitch, clean up, DRC - live progress dashboard in this window
.\autopcb_run --skip-build # keep the current placement, just re-route
.\autopcb_logs # watch a run from a second window (stays open; Ctrl+C to close; --once / --log)
.\autopcb_run --docker # same run inside the autopcb-kicad container: nothing opens on the desktopEverything is also logged to logs/autopcb.log.
Each run ends with design checks and a commit. After DRC, the pipeline:
- runs
tools/esc_checks.py. This covers what DRC can't see:- switching-loop cap distance
- charge-pump caps
- gate-drive length
- signals crossing a phase pour
- vias in pads
- ground return under the crystal/MCU
- mounting holes
- 3D models
- renders every copper layer and the 3D top and bottom views into
workspace/esc_v2/review/. - commits the KiCad project and the review folder to the
esc-v2branch of Autonomous-Flight-Team/ESC_PCB, usingtools/publish_branch.py. Pass--no-publishto skip the commit.
No windows.
- Every tool starts its child processes hidden (
tools/_quiet.py). --dockerruns the whole build and route in Linux. The image isdocker/Dockerfile: KiCad 9.0.6, numpy, numba and Pillow. It is built on first use, and the Docker engine is started headless withdocker desktop start.- The image has no 3D model library, so the 3D views and the git push run on Windows afterwards, also hidden.
- KiCad paths come from
tools/_env.py. Override them withAUTOPCB_KPY,KICAD_CLIandKICAD_SHARE.
Board scripts (tools/, run with KiCad's Python at vendor/KiCAD-MCP-Server/venv/Scripts/python.exe):
| Script | Purpose |
|---|---|
sync_board.py | "Update PCB from Schematic", scripted: adds and moves footprints, reloads changed library footprints, renames nets on existing copper, locks existing routing |
route_board.py | Freerouting autoroute. Plane nets are left to pours. --keep adds routes without touching existing ones. Picks a Java new enough for Freerouting. |
finish_route.py + maze_route.py | Routes exactly what KiCad's ratsnest still reports missing, with a clearance-aware 2-layer maze router that respects edge and top-layer keep-outs |
prune_tracks.py, stitch_islands.py, silk_fix.py | Remove dangling stubs and vias; stitch pour islands; move reference designators off pads and other silkscreen |
build_esc_v2.py | Generates the 4-layer V2 ESC board: placement, stackup, zones, via fields, top-layer signal keep-out |
drc_summary.py, jlc_lookup.py | Compact DRC report; JLCPCB/LCSC part lookup (basic/extended, stock, price) |
Review rules:
- Errors:
- capacitors wired only to each other (a missing supply label)
- missing decoupling on IC supply pins
- USB-C CC pins without pull-downs
- unannotated parts, missing footprints
- schematic/PCB disagreement
- tracks or vias below the fab's limits
- Warnings:
- missing pull-ups on I2C / open-drain lines
- crystals without load caps
- LEDs without a resistor
- look-alike net names that aren't connected
- single-pin labelled nets
- sheets pointing at missing files
- symbols off the page
- project DRC limits looser than the fab
- Fab profiles live in fab-profiles/.
Other clients
Point any MCP client at the same two commands. The paths are relative to this folder; use absolute paths if the client starts elsewhere.
- engine:
node vendor/KiCAD-MCP-Server/dist/index.js - copilot:
.venv/Scripts/python.exe -m copilot.server
Free / local: opencode with Ollama or LM Studio. Use a model with solid tool calling (Qwen3-Coder class or bigger); small models struggle with long edit chains. The engine ships setup-windows-opencode.ps1 for its half.
Tests
.venv\Scripts\python -m pytestThe tests cover the netlist diff, value parsing, an RC transient on both simulators with a cross-check, and the review rules against netlists from the sample boards.
Known limits
- Schematic edits are file edits. "Live" in eeschema means it reloads after each write.
- The engine's own net listing misses power-symbol nets. The copilot uses
kicad-clias ground truth. - The engine can report a connection as done when it isn't.
verify_editcatches this, which is why the edit loop always verifies. - SPICE models R/C/L/ferrite/diode/zener/LED automatically. ICs need a
loadsstand-in or amodelsline. - DRC takes about 1 minute on a 4-layer board, so it's opt-in.
Parts
107| Qty | Value | Footprint | References |
|---|---|---|---|
| 24 | 100n | Capacitor_SMD:C_0402_1005Metric | C2, C10, C13, C14, C15, C16, C18, C19, C21, C22, C23, C24, C25, C26, C27, C28 +8 |
| 6 | 0.1u | Capacitor_SMD:C_0402_1005Metric | C17, C31, C37, C46, C50, C52 |
| 6 | 1u | Capacitor_SMD:C_0402_1005Metric | C35, C36, C42, C43, C51, C59 |
| 5 | 47k | Resistor_SMD:R_0402_1005Metric | R6, R8, R9, R10, R11 |
| 4 | 10n | Capacitor_SMD:C_0402_1005Metric | C39, C41, C56, C58 |
| 4 | 10u | Capacitor_SMD:C_0402_1005Metric | C44, C45, C48, C49 |
| 4 | 1n | Capacitor_SMD:C_0402_1005Metric | C38, C40, C55, C57 |
| 4 | MountingHole | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4 |
| 3 | 100k | Resistor_SMD:R_0402_1005Metric | R16, R17, R22 |
| 3 | 10k | Resistor_SMD:R_0402_1005Metric | R1, R3, R12 |
| 3 | 22u | Capacitor_SMD:C_0402_1005Metric | C47, C53, C54 |
| 2 | 2.2u | Capacitor_SMD:C_0402_1005Metric | C29, C30 |
| 2 | 22p | Capacitor_SMD:C_0402_1005Metric | C5, C11 |
| 2 | 22u | Capacitor_SMD:C_0805_2012Metric | C9, C12 |
| 2 | 2k2 | Resistor_SMD:R_0402_1005Metric | R4, R5 |
| 2 | 5k1 | Resistor_SMD:R_0402_1005Metric | R13, R14 |
| 2 | Conn_01x04_Pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J3, J5 |
| 1 | 10 | Resistor_SMD:R_0402_1005Metric | R15 |
| 1 | 120R | Inductor_SMD:L_0603_1608Metric | FB1 |
| 1 | 15u | Inductor_SMD:L_Bourns-SRN4018 | L3 |
| 1 | 16MHz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | 1k | Resistor_SMD:R_0402_1005Metric | R2 |
| 1 | 20k | Resistor_SMD:R_0402_1005Metric | R18 |
| 1 | 22 | Resistor_SMD:R_0402_1005Metric | R7 |
| 1 | 240n | Inductor_SMD:L_0603_1608Metric | L1 |
| 1 | 4.7u | Capacitor_SMD:C_0402_1005Metric | C20 |
| 1 | 4.7u | Inductor_SMD:L_Bourns-SRN4018 | L2 |
| 1 | 41k2 | Resistor_SMD:R_0402_1005Metric | R20 |
| 1 | 4700n | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 76k8 | Resistor_SMD:R_0402_1005Metric | R21 |
| 1 | 7k68 | Resistor_SMD:R_0402_1005Metric | R19 |
| 1 | AP7361C-33E | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | BMP280 | Package_LGA:Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering | U3 |
| 1 | BZT52C6V2-7-F | Diode_SMD:D_SOD-123 | CR1 |
| 1 | Conn_01x08_Pin | Connector_JST:JST_GH_BM08B-GHS-TBT_1x08-1MP_P1.25mm_Vertical | J1 |
| 1 | Conn_01x10_Pin | Connector_JST:JST_GH_BM10B-GHS-TBT_1x10-1MP_P1.25mm_Vertical | J6 |
| 1 | GREEN | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | Jumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm | JP1 |
| 1 | MP4572GQB-P | MP4572:QFN-12_MPQ4572-AEC1_MNP | U6 |
| 1 | MPU-6000 | Sensor_Motion:InvenSense_QFN-24_4x4mm_P0.5mm | U2 |
| 1 | Micro_SD_Card | Connector_Card:microSD_HC_Wuerth_693072010801 | J2 |
| 1 | STM32H743IITx | Package_QFP:LQFP-176_24x24mm_P0.5mm | U4 |
| 1 | SW_Push | Button_Switch_SMD:SW_SPST_TL3342 | SW2 |
| 1 | SW_SPDT | Button_Switch_SMD:SW_SPDT_PCM12 | SW1 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U5 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J4 |
More from SurajShivakumar/AIPCB
1- 2 layers63 × 71.5 mm

Similar boards
- 4 layers40 × 40 mm

- 6 layers36 × 36 mm

- 6 layers50 × 81.3 mm

- 4 layers50 × 50 mm

- 6 layers54.8 × 39.2 mm

- 4 layers29.5 × 29.5 mm

- 6 layers29.5 × 29.5 mm

- 8 layers34.5 × 31.5 mm

Questions
How big is the Flight controller PCB?
It measures 71.2 × 80.6 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Flight controller use?
107 parts, built around the BMP280, MP4572GQB-P, AP7361C-33E and MPU-6000. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Flight controller KiCad files?
From the SurajShivakumar/AIPCB repository on GitHub, at the commit this page was made from: the board is sample_boards/flight_controller.kicad_pcb and its schematic sample_boards/ESC PCB V1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Flight controller design in my own project?
Its repository states no licence, so its author keeps all rights: ask SurajShivakumar before reusing the design.