kicad-schematic
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSKILL ON HOW TO WIRE UP OR MODIFY A KICAD SCHEMATIC
KiCad原理图布线或修改技能指南
For Humans:
面向人类用户:
This skill for fully wiring up a schematic after initial IC selection, or modifying subcircuits after
You need to give the agent a good idea of the goal/vision for the schematic. Ideally, you need to provide it with as many relevant datasheets as possible so it doesn't have trouble sourcing them.
本技能适用于完成初始IC选型后的完整原理图布线,或后续的子电路修改工作。
你需要向Agent清晰说明原理图的目标/愿景。理想情况下,你应提供尽可能多的相关datasheet,避免Agent在获取资料时遇到困难。
For Agents:
面向Agent:
These are instructions on how to wire up a schematic after initial IC selection. If you were asked to choose/find parts (besides passives, oscillators, or similar) and create symbols, start with that.
This skill is not for selecting specific parts/part numbers, and you shouldn't do so if you weren't asked to.
以下是初始IC选型后进行原理图布线的操作说明。若你被要求选择/查找元件(无源元件、振荡器等除外)并创建符号,请先完成该步骤。
本技能不用于选择特定元件/元件型号,除非明确要求,否则请勿进行此类操作。
How to draw the schematic
如何绘制原理图
You can move anything around and label things. Generally, do most wiring with labels instead of drawing lines, with an important exception listed further below.
You should color related nets so they stand out (e.g., SPI1 is one color, I2C2 is another, etc.).
Prefer single-sheet schematics that you can view all at once, even if it means bigger sheets. Break them down into more sheets and hierarchy when repetition is required, stuff the schematic is requires bigger than A2 page size even when somewhat compacted, or if user supplied them like that to begin with.
After understanding what subcircuits need to look like in general, put each subcircuit in a simple KiCad rectangle, colored and labeled with brief, bold text somewhere inside it. Prefer big-ish subcircuits that are not too defined. For example, most power supplies can usually be one subcircuit; ICs and their passives/oscillators/etc. can certainly be one subcircuit.
I know for a fact that your skill set is not adequate for wiring cleanly and correctly by just looking/modifying at the schematic file and the netlist that you can export from KiCad.
You need, instead, to iterate based on image input. That means you need to plot high-resolution SVG files of the schematic in KiCad and convert them into images that you can take in as image input and use for what you need. This way you will be able to validate that it is connected correctly and looks right as well.
You still need to look at netlists to deterministically validate connections.
Important things you should be looking for are that all visible properties of components are not overlapping with other things or each other, and that everything is clean and tidy (no overly long wires, etc.).
You need to make it look like it's straight out of a reference schematic for the parts: clean and tidy.
To do that, you will need to modify symbols to make them clean, readable, easy to wire up, and easy to read. But this carries risk: make sure you deterministically check that symbols keep the exact same pins as originally and have the same pin name for each pin number.
You need to use a ton of image input; do not hesitate. Every time it's not clean, you need to make it look good and look at it again. Develop efficient ways to do that at the start of the project so it doesn't cause slowdowns later.
You should also be plotting pictures of subcircuits and more specific things you need to clean up. I know for a fact that you can't take in the whole schematic all at once, so zoom in. Iterate. It has to look clean and functional and be correct.
For passives, use the small KiCad standard symbols.
You will need to modify symbols of ICs to make passives look good.
Wire them up logically next to the component where it makes sense (for example, pull-downs/ups and decoupling). This is the exception to the "use nets" rule, these will need to be wired with normal wires, not nets, for the most part. Passives are an exception to the general "use labels instead of lines" rule.
Again, you need to iterate with pictures to make sure they look clean.
For new passives, mostly as placeholders, add footprints from the standard KiCad library (unless otherwise instructed) of a roughly logical size based on the function.
Do use some discretion about what passives should be directly connected to what for aesthetics.
You can't start looking for parts during the schematic wire-up process. If a part was not already given to you and you were not asked to find it, don't look for it.
If you need something like a voltage regulator, an oscillator, or small stuff like that, feel free to create a generic/abstact symbol for one and place it in the self-contained library in this directory (if it exists; otherwise, create one). Then use it. For more complex stuff, you might need to just leave a comprehensive but short note that a whole complex component is missing, continue with the schematic, and mention it briefly at the end as an important item.
Lastly the schematic should be somewhat compact, so if there is a lot of white space bring stuff closer together on the sheet so it's easier to read
Again, if you think you are done, check the whole schematic, for falsely roated, misplaced, ugly text, overlapping stuff, illogical stuff, hard to read schematics, too much white space. and go back into fixing mode to fix them. You might need to loop around after actually finishing the schematic, at least 3-5 times on the whole schematic until you get it right, be sure it is at the end.
你可以移动任何元素并添加标签。通常,大多数布线使用标签而非绘制连线,但下文会列出一个重要例外。
应为相关网络设置不同颜色以便区分(例如,SPI1设为一种颜色,I2C2设为另一种颜色等)。
优先采用可一次性查看的单页原理图,即使这意味着需要更大的图纸。当需要重复内容、原理图压缩后仍超过A2尺寸,或用户最初提供的就是多页分层结构时,再将其拆分为多页并建立层级。
在明确子电路的大致结构后,将每个子电路放入简单的KiCad矩形框内,框内添加彩色、加粗的简短标签。优先选择范围稍大的子电路,不要划分过细。例如,大多数电源可作为一个子电路;IC及其配套的无源元件、振荡器等也可作为一个子电路。
我明确知道,仅通过查看/修改原理图文件和从KiCad导出的netlist,你的技能不足以完成清晰且正确的布线。
相反,你需要基于图像输入进行迭代。这意味着你需要在KiCad中生成原理图的高分辨率SVG文件,并将其转换为可作为图像输入的格式,以此验证连接是否正确、外观是否达标。
你仍需查看netlist来确定性验证连接情况。
需要重点关注的是:元件的所有可见属性不得与其他元素重叠,整体布局需整洁(无过长连线等)。
最终的原理图应看起来如同元件的参考原理图一般:整洁且规范。
为此,你需要修改符号使其整洁、易读、便于布线。但这存在风险:务必确保修改后的符号保留原始引脚编号及对应的引脚名称。
你需要大量使用图像输入,不要犹豫。每次发现布局不整洁时,都需要进行调整并再次查看。在项目开始时就建立高效的操作方式,避免后续进度变慢。
你还应生成子电路及需要优化的特定部分的图片。我明确知道你无法一次性处理整个原理图,因此请放大查看、反复迭代。最终的原理图必须外观整洁、功能正常且连接正确。
对于无源元件,使用KiCad标准的小型符号。
你需要修改IC的符号,使无源元件的布局更美观。
将无源元件合理地连接到对应的元件附近(例如下拉/上拉电阻、去耦电容)。这是“使用网络标签”规则的例外情况,此类连接大多需要使用普通连线而非网络标签。无源元件是“使用标签替代连线”通用规则的例外。
同样,你需要通过图片迭代确保布局整洁。
对于新增的无源元件(大多作为占位符),从KiCad标准库中选择与功能匹配的合理尺寸封装(除非另有指示)。
在美学层面,需酌情判断无源元件应直接连接到哪些元件。
在原理图布线过程中,不得开始查找元件。若未提供某个元件且未要求你查找,则请勿进行查找。
若需要稳压器、振荡器或类似小型元件,可创建通用/抽象符号并将其放入当前目录的独立库中(若库不存在则创建一个),然后使用该符号。对于更复杂的元件,你只需留下简短但全面的说明,指出缺少该复杂元件,继续完成原理图,并在最后将其作为重要事项简要提及。
最后,原理图应尽量紧凑,若存在大量空白区域,可将元件靠近放置,以便于阅读。
再次提醒:若你认为已完成工作,请检查整个原理图,查看是否存在错误旋转、位置错误、文本丑陋、元素重叠、逻辑不合理、可读性差、空白过多等问题,然后返回修改模式进行修正。完成原理图后,你可能需要对整个原理图进行至少3-5次循环检查,直到确保没有问题为止。
How to do research
如何开展调研
Now that you know how to wire up a schematic in KiCad cleanly, we will go over research. These two parts are not separate; you might need to do them together. You can start wiring up subcircuits after researching how, looking at them and how they fit into the general schematic (with pictures and netlists), and then iterating in your research.
You really need to understand the science behind the board, really understand the goal and how everything ties together. Take time for introspection about what the goal is every step of the way. Every time you complete a part, think about it and how it helps the vision for the schematic.
Also, a very quick second step is looking for important datasheets based on the ICs and general vision. If you are missing some datasheets and realize that you really need them, look for them on the internet and try to download them. You might find it hard to get around bot protection; quickly find ways around that and see if you have any other skills available for that purpose as well.
Do not be hesitant to do internet searches to figure stuff out and understand what you need to do. If you have any uncertainty about how something should work, you can use internet search to clear things up.
But the real sources of truth are datasheets and reference material; you can base decisions on these. You will often need to extract information from PDFs, and very often you will need to take shots of pictures in the PDFs. Don't be hesitant to actually use image input to directly look at reference-design pictures or graphs (or other stuff like that) in PDF material. And contiually compare your schematic to the reference.
Once you know enough about how to wire up a subcircuit, you can start bit by bit, always referring to reference material. Be logical and precise, but don't overdo it. That means that you should not overthink decisions. Instead, you should note down all real liberties you took and provide them in a nice, readable, and brief report as part of your answer to the user.
You can take some liberties based on the goal of the project, but they should definitely be mentioned at the end.
For the most part, your job with this skill will be adding adding decoupling, wiring up MCUs to peripherals with legal pin selection for each function, adding oscillators, adding voltage conversion, and filtering if necessary, and other low level work like this. You need to look into reference materials and base your decisions on truths in them. Often you may choose a reference design in them, look at it as a picture, and follow it. But most importantly, you need to be thinking at a high level.
For example, for decoupling, think about derating depending on conditions, DC voltage, etc., and think about upstream circuitry like voltage regulators and switches and how much capacitance they can take.
If you need to do more high-level work than the work described above as "most of your job," you can go ahead, but make sure you understand why it's necessary and do not add a lot of bloat. Always be able to explain your decisions logically without much possibility of dispute, and do explain them in your answer at the end, along with other liberties you took.
既然你已了解如何在KiCad中整洁地绘制原理图,接下来我们介绍调研工作。这两部分并非独立,你可能需要同时进行。在调研清楚子电路的布线方式、查看参考资料及网表并了解其在整体原理图中的位置后,即可开始逐步布线,并在调研中不断迭代。
你需要真正理解电路板背后的原理,明确目标以及各部分如何协同工作。每一步都要花时间思考目标是什么。完成每个部分后,思考其如何助力实现原理图的愿景。
其次,快速的步骤是基于IC和整体愿景查找重要的datasheet。若发现缺少某些必需的datasheet,可在互联网上搜索并尝试下载。你可能会遇到反爬机制,需快速找到解决方法,同时查看是否有其他可用技能辅助完成此操作。
若对某些操作存在疑问,不要犹豫,通过互联网搜索理清思路。
但真正的权威来源是datasheet和参考资料;你的决策应基于这些内容。你经常需要从PDF中提取信息,并且经常需要截取PDF中的图片。不要犹豫,直接使用图像输入查看PDF中的参考设计图片或图表(或其他内容)。并持续将你的原理图与参考设计进行对比。
在充分了解子电路的布线方式后,即可逐步开始布线,始终参考参考资料。保持逻辑清晰、精准,但不要过度纠结。这意味着你无需过度思考决策,而是应记录所有自主做出的调整,并在给用户的回复中附上一份简洁易读的报告。
你可根据项目目标做出一些调整,但务必在最后提及这些调整。
通常,你使用本技能的主要工作包括添加去耦电容、为MCU与外设进行合法引脚功能分配并布线、添加振荡器、进行电压转换及必要的滤波,以及其他类似的底层工作。你需要查阅参考资料并基于其中的信息做出决策。你通常会选择参考资料中的参考设计,将其作为图片查看并遵循。但最重要的是,你需要从全局层面进行思考。
例如,对于去耦电容,需考虑不同条件下的降额设计、直流电压等,并考虑上游电路(如稳压器和开关)可承受的电容值。
若你需要完成超出上述“主要工作”的更高级任务,可继续进行,但务必理解其必要性,避免添加冗余内容。始终能够清晰、无可争议地解释你的决策,并在回复末尾与其他自主调整一起说明。