作者開源 EasyEDA Copilot,支援在 EasyEDA Pro 設計原理圖與 PCB
I built an open-source AI agent for EasyEDA that can design schematics and PCBs
作者開源 EasyEDA Copilot,這款 AI 智能體可在 EasyEDA Pro 建立及編輯原理圖與 PCB,並透過 MCP 連接編輯器及專用演算法。模型描述元件擺放和走線要求,由演算法執行計算;走線目前整合 KiCad Routing Tools,複雜電路板仍可能需要多次嘗試或手動修正。
Hi! I want to share my open-source project, EasyEDA Copilot. It allows AI agents to create and edit schematics and PCBs directly in EasyEDA Pro.
I work with both programming and electronics. I studied electronics in college, where we learned to use EasyEDA. I found it much easier to learn than Altium Designer, so I continued using it for my own projects.
The idea for EasyEDA Copilot came about quite a while ago, even before GPT-6 Astra learned to design PCBs in KiCad. At the time, I wanted to try building my own AI agent and combine two areas I'm interested in: programming and electronics.
The first version could only edit schematics. Over time, I added more features: schematic creation, component search, automatic component placement, and PCB routing.
Now EasyEDA Copilot can handle a large part of the design process, and the result is still a normal, editable EasyEDA document.
How EasyEDA Copilot Works
The main integration uses MCP.
The architecture looks roughly like this:
AI agent => MCP => specialized algorithms => EasyEDA
The MCP server connects to the EasyEDA extension through a local WebSocket. The agent can access information about schematics, components, connections, layers, and other objects.
A separate Skill can also be built from MCP.
The main difference between my approach and simply giving AI access to the editor is that the model doesn't have to do all the work itself.
For example, there's an official EasyEDA API Skill that allows agents to execute JavaScript through the editor's API.
I took a slightly different approach.
In EasyEDA Copilot, the model mostly describes what needs to be done. For example, which components should be placed close together, where connectors should go, or which routing rules to use.
Then regular algorithms do the actual work.
At the same time, the agent can still execute JavaScript directly in EasyEDA. If it needs to do something unusual or manually fix part of a PCB, it can use the editor's API.
So the model defines the tasks, but it doesn't have to calculate the coordinates of every component or trace segment itself.
How Component Placement Works
Placement uses a separate algorithm that receives components, connections, board geometry, and constraints.
The agent describes the requirements using a DSL.
Here's a small example:
board.rect(40, 30, {
layers: ["top"],
clearance: 0.3
});
block("MCU", ["U1", "C1", "C2"], "mcu");
block("CONNECTORS", ["J1", "J2"], "connector");
edgeMount("J1", "left");
edgeMount("J2", "right");
veryNear(pin("C1", 1), pin("U1", 5));
veryNear(pin("C2", 1), pin("U1", 8));
Here we define a 40×30 mm board, two groups of components, connector positions, and a requirement to place capacitors close to specific microcontroller pins.
The algorithm then finds a suitable placement on its own.
GPU acceleration is used to speed up placement calculations. Many operations can run in parallel, which is especially useful when working with a large number of components.
The algorithm also takes into account component dimensions, overlaps, electrical connections, mechanical constraints, and placement rules.
After the calculations, the agent can inspect a preview, change the constraints, or apply the placement in EasyEDA.
How PCB Routing Works
Routing uses a similar approach.
The agent describes the rules: trace widths, clearances, layers, vias, differential pairs, and other requirements.
For example:
drc({
trackWidthMm: 0.2,
clearanceMm: 0.15
});
powerNet("+5V", {
trackWidthMm: 0.6,
allowedLayers: "OUTER"
});
diffPair("USB", {
positive: "USB_DP",
negative: "USB_DM",
trackWidthMm: 0.2,
gapMm: 0.15,
maxSkewMm: 0.5
});
plane({
net: "GND",
layers: "BOTTOM"
});
runAll();
In this example, we define general routing rules, a separate trace width for power, a USB differential pair, and a ground plane on the bottom layer.
The current implementation uses KiCad Routing Tools. I wrote an integration that passes board data from EasyEDA to the router, runs the routing process, and then brings the result back into the editor.
After that, the agent can check for remaining unrouted connections and run EasyEDA's built-in DRC.
There's also a checkpoint system. The document state is saved before changes are applied. If something goes wrong while applying the result, the previous version can be restored.
Of course, routing isn't perfect yet. Complex boards require multiple attempts or manual fixes.
I'm currently developing my own routing algorithm. The main goals are to increase speed and improve routing completion rates on complex boards.
Project Examples
STM32 CAN AND RS485
One example is an STM32 board with CAN and RS-485 interfaces.
I used EasyEDA Copilot to work on both the schematic and PCB in this project.
5A USB-PD Trigger
Another example is a USB-PD trigger designed for up to 5 A.
It has a completed schematic and a fully routed PCB.
Other Projects
I've also tried EasyEDA Copilot on other schematics and PCBs.
For example, I have a project for a portable single-channel oscilloscope with a target bandwidth of 200 MHz. So far, only the schematic is ready.
The repository also contains examples of an ESP32-C3 controller, a four-layer MIMXRT1011 board, and a 2 GHz RF amplifier.
You can see them in the GitHub repository.
SPICE Simulation
Besides PCB design, EasyEDA Copilot can also run SPICE simulations using ngspice.
For this, I've put together a library of around 40,000 components.
For example, you can ask the agent to design an input stage for a trigger. It can select components, calculate values, build the circuit, and run a simulation.
This allows you to check how a circuit behaves before building the actual device.
Of course, a simulation doesn't guarantee that the real circuit will behave exactly the same way. The results depend on component models and simulation conditions.
For now, SPICE is available through the original built-in interface of EasyEDA Copilot. Most of the project's development is now focused on MCP.
What's Next
I'm continuing to work on my own PCB router.
I also plan to add PCB analysis tools: Signal Integrity (SI), Power Integrity (PI), and thermal analysis.
I'd like the agent to be able not only to create schematics and PCBs, but also to run engineering calculations, find problems, and fix them.
But these features are still under development.
Source Code
EasyEDA Copilot is an open-source project licensed under MIT.
GitHub: https://github.com/biosshot/easyeda-copilot
To use it, you need EasyEDA Pro Desktop, Node.js, and an MCP client such as Claude Code or Codex.
The repository contains installation instructions, documentation, and project examples.
I'd be happy to hear feedback, especially from people who work with electronics and have tried automating the design process.
來源:DEV Community · dev.to






