[{"data":1,"prerenderedAt":39},["ShallowReactive",2],{"blog-articles":3},[4,23],{"slug":5,"date":6,"read_time":7,"image":8,"cta":9,"zh":11,"en":17},"ai-pcb-design-in-altium-and-kicad","2026-09-16",6,"/og.png?v=8",{"link":10},"https://ai-3.trio-prc.com/",{"title":12,"tag":13,"excerpt":14,"keywords":15,"content":16},"AI 在 Altium 和 KiCad 里画 PCB，到底是怎么动手的","AI 设计 PCB","让 AI 画 PCB 有两条路：一条是模拟你点鼠标，一条是通过接口驱动 EDA。前者演示很顺、换台电脑就废；后者麻烦一点，但能一直用下去。","AI设计PCB,Altium AI,KiCad AI,自动布线,DRC,原理图生成","\u003Ch2>两条技术路线，差别在换一台电脑之后\u003C/h2>\u003Cp>把 AI 接到 EDA 软件上，最快的做法是让程序去操作界面：找到窗口、点菜单、发按键。演示视频里它看起来完全可行。问题出现在第二台电脑上——Altium 换个版本菜单文字变了、屏幕分辨率不同控件坐标偏了、用户手里恰好开着一个模态对话框，流程就断在半路。更糟的情况是它点错地方：把主窗口关掉，或者让脚本引擎弹出层叠的模态框卡死，只能手动重启软件。\u003C/p>\u003Cp>另一条路是让 EDA 自己提供接口：AI 发出的每个动作都是一次调用，由运行在你机器上的连接器交给 EDA 执行。这条路前期要把每个动作一个一个实现出来，但它可测试、可重放、行为确定，出了问题能复现也能回退。ONEPASSPCB 走的是这一条，而且把\"不做任何系统层面的模拟点击\"写成了硬规则。\u003C/p>\u003Ch2>AI 实际能做完的部分\u003C/h2>\u003Cp>从需求到可评审的工程，AI 能接手的大致是这些：按功能建元件与符号、连网络、标位号与参数、摆器件与设板框、跑自动布线、执行设计规则检查并逐条解释违规。这些动作都直接落在你打开着的那个工程文件里，你随时可以停下来接手手工调整——不需要在\"AI 的版本\"和\"我的版本\"之间做合并。\u003C/p>\u003Ch2>自动布线那一步最容易\"跑了但没结果\"\u003C/h2>\u003Cp>自动布线器通常分两段：先走线，再优化。实际用下来，崩溃多半发生在优化阶段，而这时输出文件可能已经建立、只是内容是空的。如果判断标准写成\"文件存在就算成功\"，失败就会被推迟到导回 EDA 那一步才暴露，用户看到的是一句读不懂的报错。\u003C/p>\u003Cp>正确的判据是看文件里有没有真正的布线结果；发现是空的就说清楚下一步：要么关掉优化再跑一次，要么先跑 DRC 把封装占位区的重叠清理掉——重叠焊盘正是优化阶段崩溃最常见的诱因。\u003C/p>\u003Ch2>怎么开始\u003C/h2>\u003Cp>注册账号、下载对应你 EDA 的连接器（Altium Designer 或 KiCad 各一套，互相独立）、双击启动、在网页上拿配对码配上，然后打开工程开始提需求。工程文件始终在你自己的机器上。\u003C/p>\u003Cp>备料那半边的工作流见另一篇：\u003Ca href=\"/blog/why-bom-prices-differ-across-distributors\">同一颗料，为什么各家报的价差这么多\u003C/a>。\u003C/p>",{"title":18,"tag":19,"excerpt":20,"keywords":21,"content":22},"How an AI actually draws a PCB inside Altium and KiCad","AI PCB Design","There are two ways to connect an AI to an EDA tool: simulate your mouse, or drive the tool through an API. The first demos beautifully and dies on the second machine.","AI PCB design,Altium AI,KiCad AI,autorouting,DRC,schematic generation","\u003Ch2>Two approaches, and the difference shows on the second machine\u003C/h2>\u003Cp>The fastest way to wire an AI into an EDA tool is to drive the interface: find the window, click the menu, send the keystrokes. In a demo video it looks perfectly workable. It falls apart on the next machine — a new Altium version renamed the menu, a different screen resolution moved the control, or the user happens to have a modal dialog open. Worse, it can click the wrong thing: close the main window, or leave the scripting engine stuck behind stacked modal dialogs until someone restarts the tool by hand.\u003C/p>\u003Cp>The other approach is to let the EDA tool expose an interface: every AI action is a call, executed by a connector running on your machine. It costs more up front, because each action has to be implemented, but it is testable, replayable and deterministic. ONEPASSPCB took that route and made never simulating input at the OS level a hard rule.\u003C/p>\u003Ch2>What the AI can finish on its own\u003C/h2>\u003Cp>From a requirement to a reviewable project, the AI can create parts and symbols, wire nets, assign designators and values, place components, define the board outline, run the autorouter, and run design rule checks while explaining each violation. All of it lands in the project file you have open, so you can stop and take over by hand at any point — there is no merging between the AI version and your version.\u003C/p>\u003Ch2>Autorouting is where a run finishes with nothing to show\u003C/h2>\u003Cp>Autorouters usually work in two stages: route, then optimize. In practice the crash tends to happen during optimization, by which time the output file may exist but contain nothing. If success is judged by does the file exist, the failure is deferred until the import step and surfaces as an error message nobody can read.\u003C/p>\u003Cp>The right check is whether the file contains an actual routing result. If it does not, say what to do next: disable the optimizer and run again, or run DRC first to clear overlapping courtyards — overlapping pads are the most common trigger for an optimizer crash.\u003C/p>\u003Ch2>Getting started\u003C/h2>\u003Cp>Create an account, download the connector for your tool (Altium Designer and KiCad have separate, independent ones), double-click to start it, pair it with the code shown in the browser, then open your project and start describing what you need. Your project files never leave your machine.\u003C/p>\u003Cp>For the sourcing half of the job, see \u003Ca href=\"/en/blog/why-bom-prices-differ-across-distributors\">why the same part gets such different prices from different distributors\u003C/a>.\u003C/p>",{"slug":24,"date":6,"read_time":7,"image":8,"cta":25,"zh":27,"en":33},"why-bom-prices-differ-across-distributors",{"link":26},"https://ai.trio-prc.com/",{"title":28,"tag":29,"excerpt":30,"keywords":31,"content":32},"同一颗料，为什么各家报的价差这么多","BOM 报价","币种、阶梯、库存、料号召回——比价里最容易踩的四个坑，每一个都能让你把一个买不到的价报给客户。","BOM报价,元器件比价,现货库存,料号匹配,采购,阶梯价","\u003Ch2>先把币种统一，再谈谁便宜\u003C/h2>\u003Cp>各家平台报价的币种并不一致：同一颗料，一家给美金，一家给港币。如果直接按数字排序，0.5 港币会被排在 0.5 美金前面，得到一个纯属错觉的\"最便宜\"。做法只有一个：全部按当日汇率折成同一种货币再比，并且把原始币种价和所用汇率一起显示出来——那是\"美金价怎么来的\"的证据。\u003C/p>\u003Ch2>阶梯价：报出去之前先看你买得起哪一档\u003C/h2>\u003Cp>元器件是按数量分档报价的。取\"最低单价\"很省事，但那一档常常对应几千片的起订量；客户要 200 片，照着报就是一个他买不到的数字。正确的顺序是：先找能真正覆盖本行数量的阶梯，整组都不够时才退回最低档，并把起订量写在旁边。\u003C/p>\u003Ch2>库存为 0 的报价没有意义\u003C/h2>\u003Cp>报一个买不到的价比不报更糟：客户照它下单，交期到了交不出货。所以库存为 0 的供应商直接不参与比价；各家都没货就整行不出价，把每家的库存与参考价如实写进备注，再给一句下一步建议（等交期、换封装、找替代型号由客户定）。\u003C/p>\u003Cp>还有一个细节：\u003Cstrong>拿不到库存数字不等于库存是 0\u003C/strong>。按 0 处理会把本来可用的供应商误杀，所以\"未知\"要单独作为一档，排在有货之后、无货之前。\u003C/p>\u003Ch2>平台返回的料号，未必是你问的那一颗\u003C/h2>\u003Cp>按料号搜索时，平台会主动做模糊召回：问 NE555P 返回 NE555PWR，问 LM358N 返回 LM358N/NOPB。它们可能是另一种封装或温度等级；能不能替代，只有设计这块板的人知道。更极端的情况是返回一颗毫不相干的邻居料号。\u003C/p>\u003Cp>所以规则很硬：只报精确同料号（去掉分隔符后完全相等），精确匹配查不到就不出价，相近型号单独列成\"待确认\"，由你决定。\u003C/p>\u003Ch2>这些规则合起来的效果\u003C/h2>\u003Cp>报价单上的行数会变少一些——有些行会诚实地空着，并写明为什么。但留下的每一行都是现在就能下单买到的。\u003C/p>\u003Cp>设计那半边的工作流见另一篇：\u003Ca href=\"/blog/ai-pcb-design-in-altium-and-kicad\">AI 在 Altium 和 KiCad 里画 PCB，到底是怎么动手的\u003C/a>。\u003C/p>",{"title":34,"tag":35,"excerpt":36,"keywords":37,"content":38},"Why the same part gets such different prices from different distributors","BOM Quoting","Currency, price breaks, stock and part-number recall — four traps in component pricing, each able to hand your customer a price they cannot buy at.","BOM quoting,component pricing,distributor stock,part number matching,sourcing,price breaks","\u003Ch2>Normalize the currency before ranking anything\u003C/h2>\u003Cp>Distributors do not quote in the same currency: for one part you may get USD from one and HKD from another. Sort by the raw number and HKD 0.5 lands ahead of USD 0.5 — a cheapest that is purely an artifact of the currency. There is only one fix: convert everything at the current rate before comparing, and show the original price and the rate used next to the result, because that is the evidence for how the USD figure was reached.\u003C/p>\u003Ch2>Price breaks: check which tier you can actually buy\u003C/h2>\u003Cp>Components are priced in quantity tiers. Taking the lowest unit price is easy, and that tier often starts at several thousand pieces. Quote it to a customer who needs 200 and you have quoted a number they cannot buy. The right order is: find the tier that covers this line quantity, and only fall back to the lowest tier when nobody has enough — with the minimum order quantity stated next to it.\u003C/p>\u003Ch2>A price with no stock behind it is worthless\u003C/h2>\u003Cp>Quoting something unbuyable is worse than quoting nothing: the customer orders against it and the delivery date arrives with no goods. So suppliers with zero stock are excluded from comparison. If nobody has stock, the line stays unpriced, with each supplier stock level and reference price recorded in the note plus a suggested next step — wait for the lead time, change the package, or approve an alternative; that call is the customer to make.\u003C/p>\u003Cp>One detail matters here: \u003Cstrong>a missing stock figure is not zero\u003C/strong>. Treating unknown as zero kills off suppliers that were actually usable, so unknown is its own tier: after in stock, before out of stock.\u003C/p>\u003Ch2>The part number you get back may not be the one you asked for\u003C/h2>\u003Cp>Search by part number and distributors will happily widen the match: ask for NE555P and get NE555PWR, ask for LM358N and get LM358N/NOPB. Those may be a different package or temperature grade, and only the person who designed the board can approve a substitution. In the worst case the API returns an entirely unrelated neighbouring part.\u003C/p>\u003Cp>Hence a hard rule: quote exact part numbers only (equal once separators are stripped). No exact match means no price, and close matches are listed separately as something for you to confirm.\u003C/p>\u003Ch2>What these rules add up to\u003C/h2>\u003Cp>Your quote will have a few fewer priced lines — some stay honestly blank, with the reason attached. But every line that remains is one you can order today.\u003C/p>\u003Cp>For the design half of the job, see \u003Ca href=\"/en/blog/ai-pcb-design-in-altium-and-kicad\">how an AI actually draws a PCB inside Altium and KiCad\u003C/a>.\u003C/p>",1789615679538]