Skip to the content
4 layers71.2 × 80.6 mmFlight controller, the printed circuit board in 3D

Flight controller

SurajShivakumar/AIPCB

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

5

README

README.md

AI 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):

ServerWhat it does
kicadThe editing engine: mixelpixx/KiCAD-MCP-Server v2.8.2 (MIT). ~240 tools: place, wire and label symbols; footprints; routing; exports; JLCPCB parts.
copilotThis 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
powershell -ExecutionPolicy Bypass -File setup.ps1

The 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

powershell
cd "AI PCB Generator"
claude          # approve the 'kicad' and 'copilot' servers the first time

Example prompts:

  • "Open workspace/fc and start the live view."
  • "Review this board." (uses the review-schematic skill)
  • "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_view serves http://127.0.0.1:8765. It re-renders through kicad-cli within 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
  • KiCad schematic editor: KiCad 9/10 has no API for editing an open schematic, so the agent edits the file. .mcp.json turns on KICAD_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

ToolPurpose
project_status, start_live_viewSession setup
checkpoint, list_checkpoints, undo, restore_checkpointSnapshots in a shadow git repo at <project>/.copilot/git. This never touches your own git.
netlist_diff, verify_editPin-level diff (name-independent), ERC new/resolved, flags parts touched outside the plan and unplanned net merges
get_netlistGround-truth connectivity from kicad-cli
review_designERC, optional DRC with schematic parity, netlist rules, fab-rule checks. Writes .copilot/review.md
spice_check, spice_build_deck, spice_run, spice_simulatorsDecks from the schematic; LTspice / ngspice / both with a cross-check; pass/fail assertions
pin_positions, connect_power, draw_wire, tidy_schematicEdits 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):

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 desktop

Everything is also logged to logs/autopcb.log.

Each run ends with design checks and a commit. After DRC, the pipeline:

  1. 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
  2. renders every copper layer and the 3D top and bottom views into workspace/esc_v2/review/.
  3. commits the KiCad project and the review folder to the esc-v2 branch of Autonomous-Flight-Team/ESC_PCB, using tools/publish_branch.py. Pass --no-publish to skip the commit.

No windows.

  • Every tool starts its child processes hidden (tools/_quiet.py).
  • --docker runs the whole build and route in Linux. The image is docker/Dockerfile: KiCad 9.0.6, numpy, numba and Pillow. It is built on first use, and the Docker engine is started headless with docker 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 with AUTOPCB_KPY, KICAD_CLI and KICAD_SHARE.

Board scripts (tools/, run with KiCad's Python at vendor/KiCAD-MCP-Server/venv/Scripts/python.exe):

ScriptPurpose
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.pyFreerouting 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.pyRoutes 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.pyRemove dangling stubs and vias; stitch pour islands; move reference designators off pads and other silkscreen
build_esc_v2.pyGenerates the 4-layer V2 ESC board: placement, stackup, zones, via fields, top-layer signal keep-out
drc_summary.py, jlc_lookup.pyCompact 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

powershell
.venv\Scripts\python -m pytest

The 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-cli as ground truth.
  • The engine can report a connection as done when it isn't. verify_edit catches this, which is why the edit loop always verifies.
  • SPICE models R/C/L/ferrite/diode/zener/LED automatically. ICs need a loads stand-in or a models line.
  • DRC takes about 1 minute on a 4-layer board, so it's opt-in.

Parts

107
QtyValueFootprintReferences
24100nCapacitor_SMD:C_0402_1005MetricC2, C10, C13, C14, C15, C16, C18, C19, C21, C22, C23, C24, C25, C26, C27, C28 +8
60.1uCapacitor_SMD:C_0402_1005MetricC17, C31, C37, C46, C50, C52
61uCapacitor_SMD:C_0402_1005MetricC35, C36, C42, C43, C51, C59
547kResistor_SMD:R_0402_1005MetricR6, R8, R9, R10, R11
410nCapacitor_SMD:C_0402_1005MetricC39, C41, C56, C58
410uCapacitor_SMD:C_0402_1005MetricC44, C45, C48, C49
41nCapacitor_SMD:C_0402_1005MetricC38, C40, C55, C57
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
3100kResistor_SMD:R_0402_1005MetricR16, R17, R22
310kResistor_SMD:R_0402_1005MetricR1, R3, R12
322uCapacitor_SMD:C_0402_1005MetricC47, C53, C54
22.2uCapacitor_SMD:C_0402_1005MetricC29, C30
222pCapacitor_SMD:C_0402_1005MetricC5, C11
222uCapacitor_SMD:C_0805_2012MetricC9, C12
22k2Resistor_SMD:R_0402_1005MetricR4, R5
25k1Resistor_SMD:R_0402_1005MetricR13, R14
2Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3, J5
110Resistor_SMD:R_0402_1005MetricR15
1120RInductor_SMD:L_0603_1608MetricFB1
115uInductor_SMD:L_Bourns-SRN4018L3
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
11kResistor_SMD:R_0402_1005MetricR2
120kResistor_SMD:R_0402_1005MetricR18
122Resistor_SMD:R_0402_1005MetricR7
1240nInductor_SMD:L_0603_1608MetricL1
14.7uCapacitor_SMD:C_0402_1005MetricC20
14.7uInductor_SMD:L_Bourns-SRN4018L2
141k2Resistor_SMD:R_0402_1005MetricR20
14700nCapacitor_SMD:C_0603_1608MetricC1
176k8Resistor_SMD:R_0402_1005MetricR21
17k68Resistor_SMD:R_0402_1005MetricR19
1AP7361C-33EPackage_TO_SOT_SMD:SOT-223-3_TabPin2U1
1BMP280Package_LGA:Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumberingU3
1BZT52C6V2-7-FDiode_SMD:D_SOD-123CR1
1Conn_01x08_PinConnector_JST:JST_GH_BM08B-GHS-TBT_1x08-1MP_P1.25mm_VerticalJ1
1Conn_01x10_PinConnector_JST:JST_GH_BM10B-GHS-TBT_1x10-1MP_P1.25mm_VerticalJ6
1GREENLED_SMD:LED_0603_1608MetricD1
1Jumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP1
1MP4572GQB-PMP4572:QFN-12_MPQ4572-AEC1_MNPU6
1MPU-6000Sensor_Motion:InvenSense_QFN-24_4x4mm_P0.5mmU2
1Micro_SD_CardConnector_Card:microSD_HC_Wuerth_693072010801J2
1STM32H743IITxPackage_QFP:LQFP-176_24x24mm_P0.5mmU4
1SW_PushButton_Switch_SMD:SW_SPST_TL3342SW2
1SW_SPDTButton_Switch_SMD:SW_SPDT_PCM12SW1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U5
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J4

More from SurajShivakumar/AIPCB

1
  • 2 layers63 × 71.5 mmESC PCB V1, the printed circuit board in 3D

    ESC PCB V1

    SurajShivakumar/AIPCB

    An AI PCB Generator. Completely automated.

    79 parts

Similar boards

  • 4 layers40 × 40 mmDrone fc, the printed circuit board in 3D

    Drone fc

    FidelOdok/MetaForge

    AI Engineering Agent

    38 parts8Apache-2.0
  • 6 layers50 × 81.3 mmBRS HW v1, the printed circuit board in 3D

    BRS HW v1

    lucasnoce/BRS_v1

    Basic Rocket System

    129 parts3MIT
  • 4 layers50 × 50 mmDrone PCB, the printed circuit board in 3D

    Drone PCB

    eshazen/StudentProjects2025

    Student project docs for spring 2025

    63 parts
  • 6 layers54.8 × 39.2 mmAutodrone V2, the printed circuit board in 3D

    Autodrone V2

    jpwolfe9912/Autodrone_V2

    145 parts
  • 4 layers29.5 × 29.5 mmEW281C FC, the printed circuit board in 3D

    EW281C FC

    jpwolfe9912/EW281C_FC

    Flight Controller for EW281C

    82 parts
  • 6 layers29.5 × 29.5 mmF722-FC Mini V2, the printed circuit board in 3D

    F722-FC Mini V2

    jpwolfe9912/F722-FC-Mini-V2

    113 parts

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.