原理图创建和编辑
简介
用 KiCad 设计的原理图不仅仅是一个电子设计的简单图形表示。它通常是开发链的切入点,可用于:
原理图主要由符号、导线、标签、结点、总线和电源符号组成。为了使原理图更清晰,你可以放置纯图形元素,如总线入口、注释和折线。
符号是从符号库中添加到原理图中的。原理图制作完成后,网络连接和封装的集合被导入 PCB 编辑器,用于设计电路板。
原理图可以使用单一的原理图页面,也可以分割成多个原理图页面。在 KiCad 中,多张原理图是按层次组织的,有一个根原理图和子原理图。每个原理图都是它自己的 .kicad_sch
文件,它本身就是一个完整的 KiCad 原理图。层次原理图的工作在层次原理图章节中描述。
原理图编辑操作
原理图编辑工具位于右侧工具栏中。 当一个工具被激活时,它将一直处于活动状态,直到选择了另一个工具或用 Esc 键取消该工具。当其他工具被取消时,选择工具总是被激活。
Selection tool (the default tool) |
|
Highlight a net by marking its wires and net labels with a different color. If the PCB Editor is also open then copper corresponding to the selected net will be highlighted as well. Net highlighting can be cleared by clicking with the highlight tool in an empty space, or by using the Clear Net Highlighting hotkey (~). |
|
Display the symbol selector dialog to place a new symbol. |
|
Display the power symbol selector dialog to place a new power symbol. |
|
Draw a wire. |
|
Draw a bus. |
|
Draw wire-to-bus entry points. These elements are only graphical and do not create a connection, thus they should not be used to connect wires together. |
|
Place a "no-connection" flag. These flags should be placed on symbol pins which are meant to be left unconnected. "No-connection" flags indicate to the Electrical Rule Checker that the pin is intentionally unconnected and not an error. They also affect schematic connectivity for stacked symbol pins. |
|
Place a junction. This connects two crossing wires or a wire and a pin, which can sometimes be ambiguous without a junction (i.e. if a wire end or a pin is not directly connected to another wire end). |
|
Place a local label. Local labels connect items located in the same sheet. For connections between two different sheets, use global or hierarchical labels. |
|
Place a net class directive label. |
|
Place a directive rule area. |
|
Place a global label. All global labels with the same name are connected, even when located on different sheets. |
|
Place a hierarchical label. Hierarchical labels are used to create a connection between a subsheet and the sheet’s parent sheet. See the Hierarchical Schematics section for more information about hierarchical labels, sheets, and pins. |
|
Place a hierarchical subsheet. You must specify the file name for this subsheet. |
|
Import a hierarchical pin from a subsheet. This command can be executed only on hierarchical subsheets. It will create hierarchical pins corresponding to hierarchical labels placed in the target subsheet. |
|
Place a text comment. |
|
Place a text box. |
|
Draw a rectangle. |
|
Draw a circle. |
|
Draw an arc. |
|
Draw a bezier curve. |
|
Draw a graphic lines. Note: Lines are graphical objects and are not the same as wires placed with the Wire tool. They do not connect anything. |
|
Place a bitmap image. |
|
Delete clicked items. |
网格和捕获
Schematic elements such as symbols, wires, text, and graphic lines are snapped to the grid when moving, dragging, and drawing them. Additionally, the wire tool snaps to pins even when grid snapping is disabled.
Both grid and pin snapping can be disabled while moving the mouse by using the modifier keys in the table below.
在苹果键盘上,使用 Cmd 键而不是 Ctrl。 |
辅助键 | 效果 |
---|---|
Ctrl |
禁用网格捕捉。 |
Shift |
禁用将导线捕捉在引脚上。 |
The default grid size is 50 mil (0.050") or 1.27 millimeters. This is the recommended grid for placing symbols and wires in a schematic and for placing pins when designing a symbol in the Symbol Editor. Smaller grids can also be used, but this is intended only for text and symbol graphics, and not recommended for placing pins and wires.
导线只有在两端完全重合的情况下才能与其他导线或引脚连接。因此,保持符号引脚和导线与网格对齐是非常重要的。建议在放置符号和绘制导线时始终使用 50 mil 的网格,因为 KiCad 标准符号库和所有遵循其风格的库也使用 50 mil 的网格。使用 50 mil 以外的网格尺寸将导致原理图没有正确的连接!。 |
符号、导线和其他没有对准网格的元素,可以通过选择它们,点击右键,并点击 将元素对准网格,将它们重新对准网格。 |
You can adjust the grid size by right-clicking and selecting a new grid from the list in the Grid submenu. Pressing the n or N hotkeys will cycle to the next and previous grid in the list, respectively.
You can also select a new grid or edit the available grids in the Grids pane of the preferences dialog. As a shortcut to reach this dialog, right click the button on the left toolbar and select Edit Grids….
In this dialog you can select an active grid from the list of grids, reorder the list of grids, and add or remove grids. Grids defined in this dialog can have unequal X and Y spacing as well as an optional name.
This dialog also lets you designate two grids from the list as "Fast Grids", which can be quickly selected using Alt+1 and Alt+2.
Finally, you can configure grid overrides for different types of objects. Grid overrides let you set particular grid sizes for different types of objects which will be used instead of the default grid when working with those objects. For example, you can set a 50 mil grid for wires and connected items while using smaller grids to finely position text and graphics. Grid overrides can be individually enabled and disabled in this dialog, or globally enabled and disabled using the button on the left toolbar (Ctrl+Shift+G).
The visual appearance of the grid can also be customized in several ways. You can change the thickness of the grid markings, switch their shape (dots, lines, or crosses), and set the minimum displayed spacing in the Display Options page of the preferences dialog, and you can change the grid color in the Colors page of the preferences dialog.
The grid can be shown or hidden using the button on the left-hand toolbar. By default the grid is still active even if it is hidden, but this is configurable in the Display Options preferences page. There you can set the grid to be disabled when it is hidden or even disable the grid entirely.
编辑对象属性
All objects have properties that are editable in a dialog. Use the hotkey E or select Properties from the right-click context menu to edit the properties of selected item(s).
You can only use the properties dialog to edit one item at a time. To edit multiple items, use the Properties Manager, described below. There are also other tools that can be used to edit specific types of objects in bulk, such as the Edit Text and Graphics tool for editing text, labels, and graphic shapes, or the Symbol Fields Table for editing symbol fields in bulk.
You can also view and edit item properties using the Properties Manager. The Properties Manager is a docked panel that displays the properties of the selected item or items for editing. If multiple types of items are selected at once, the properties panel displays only the properties shared by all of the selected item types.
Editing a property in the Properties Manager immediately applies the change. When multiple items are selected, property modifications are applied to each selected item individually, not to the whole selection as a group. For example, when changing the orientation of multiple items, each item is individually rotated around its own origin, not the group’s origin.
Show the Properties Manager with View → Show Properties Manager or the button on the left toolbar.
In properties dialogs and many other dialogs, any field that contains a numeric value can also accept a basic math expression that results in a numeric value. For example, a dimension may be entered as 2 * 2mm
, resulting in a value of 4mm
. Basic arithmetic operators as well as parentheses for defining order of operations are supported.
使用符号
放置符号
要将符号摆放到原理图中,可以使用图标 或者快捷键 A 。 出现选择符号对话框,让您选择要添加的符号。 符号按符号库分组。
默认情况下,仅显示符号/库名称和描述列。 可以通过右键单击列标题并选择“选择列”来添加其他列。
The Choose Symbol dialog filters symbols by name, keywords, description, and all additional symbol fields according to what you type into the search field. You can choose to sort search results alphabetically or by best match by clicking on the button.
有一些高级筛选器可用:
-
Wildcards:
*
matches any number of any characters, including none, and?
matches any single character. -
Key-value pairs: if a library part’s description or keywords contain a tag of the format "Key:123", you can match relative to that by typing "Key>123" (greater than), "Key<123" (less than), etc. Numbers may include one of the following case-insensitive suffixes:
p
n
u
m
k
meg
g
t
10-12
10-9
10-6
10-3
103
106
109
1012
ki
mi
gi
ti
210
220
230
240
-
Regular expressions: if you’re familiar with regular expressions, these can be used too. The regular expression flavor used is the wxWidgets Advanced Regular Expression style, which is similar to Perl regular expressions.
如果符号指定了一个默认的封装,这个封装将在右下方预览。如果符号包括封装过滤器,可以在右边的封装下拉菜单中选择满足封装过滤器的备用封装。
选择一个要放置的符号后,该符号将被吸附在光标上。 左键点击原理图中所需要摆放的位置,将符号放入原理图中。在将符号放入原理图之前,可以通过快捷键或右键菜单来旋转、镜像或编辑它的字段。这些操作也可以在放置后进行。
如果 放置重复副本 选项被选中,在放置一个符号后 KiCad 将开始放置该符号的另一个副本。这个过程一直持续到用户按下 Esc。
对于有多个单元的符号,如果 放置所有单元 选项被选中,在放置符号后 KiCad 将开始放置该符号中的下一个单元。 这将持续到最后一个单元被放置或用户按下 Esc。
放置电源符号
电源符号是代表与电源网络连接的符号。 这些符号被分组在 power
库中,所以可以使用符号选择器来放置。 然而,由于电源的放置很频繁, 工具是可用的。这个工具使用方法类似,只是搜索是直接在 power
库和其他包含电源符号的库中进行。
移动符号
符号可以用移动(M)或拖动(G)工具移动。这些工具将作用于选定的符号,如果没有选定符号,则作用于光标下的符号。
移动 工具移动符号本身,而不保持与符号引脚的导线连接。
拖动 工具在移动符号时不会破坏其引脚的导线连接,因此也会移动连接的导线。
你也可以用鼠标点击并拖动符号,这取决于偏好设置中 鼠标和触摸板 部分的 左键拖动手势 设置。
符号也可以旋转(R)或在X(X)或Y(Y)方向上进行镜像。
编辑符号属性
符号的字段可以在符号的属性窗口中进行编辑。用快捷键 E 或通过双击符号来打开符号属性窗口。
The Symbol Properties window displays all the fields of a symbol in a table. New fields can be added, and existing fields can be deleted, edited, reordered, moved, or resized. Fields can be arbitrarily named, but names beginning with ki_
, e.g. ki_description
, are reserved by KiCad and should not be used for user fields.
每个字段的名称和值可以是可见的或隐藏的,并且有几个格式化选项:水平和垂直对齐、方向、位置、字体、文本颜色、文本大小和黑体/斜体。字段的自动放置也可以在每个字段的基础上启用。显示位置始终针对正常显示的符号(无旋转或镜像)指示,并且与符号的锚点相关。
符号字段的格式化选项可以通过右击符号字段表的标题行来显示或隐藏,并启用或禁用所需的列。默认情况下,不是所有的列都显示。 |
The Update Symbol from Library… button is used to update the schematic’s copy of the symbol to match the copy in the library. The Change Symbol… button is used to swap the current symbol to a different symbol in the library. These functions are described later.
Edit Symbol… opens the Symbol Editor to edit the copy of the symbol in the schematic. Note that the original symbol in the library will not be modified. The Edit Library Symbol… button opens the Symbol Editor to edit the original symbol in the library. In this case, the symbol in the schematic will not be modified until the user clicks the Update Symbol from Library… button.
符号有几个属性,它们会影响 KiCad 其他部分对符号的处理方式。
Exclude from simulation prevents the symbol from being included in SPICE simulations.
Exclude from bill of materials prevents the component from being included in BOM exports.
Exclude from board means that the symbol is schematic-only, and a corresponding footprint will not be added to the PCB.
Do not populate means that the component should not be attached to the PCB, although a corresponding footprint should still be added to the board. DNP symbols appear desaturated and with a red "X" over them in the schematic, as shown below.
单独编辑符号字段
可以用 E 快捷键直接编辑单个符号文本字段(选择字段而不是符号),或者双击字段。
一些符号字段有自己的快捷键,可以直接编辑它们。选定符号后,可分别用 U、V 或 F 快捷键编辑位号、值和封装字段。
该对话框中的选项与完整的 "符号属性" 对话框中的选项相同,但都是针对单个字段的。
Symbol fields can be automatically moved to an appropriate location with the Autoplace Fields action (select a symbol and press O). Field autoplacement is configurable in the Schematic Editor’s Editing Options, including a setting to always autoplace fields. You can also disable autoplacement for individual fields in the Symbol Properties or Field Properties dialogs.
Updating and exchanging symbols
When a symbol is added to the schematic, KiCad embeds a copy of the library symbol in the schematic so that the schematic is independent of the system libraries. Symbols that have been added to the schematic are not automatically updated when the library changes. Library symbol changes are manually synced to the schematic so that the schematic does not change unexpectedly.
You can use the Compare Symbol with Library tool to inspect the differences between a symbol in a schematic with its corresponding library symbol. |
To update symbols in the schematic to match the corresponding library symbol, use Tools → Update Symbols from Library…, or right click a symbol and select Update Symbol…. You can also access the tool from the symbol properties dialog.
The top of the dialog has options to choose which symbols will be updated. You can update all symbols in the schematic, update only the selected symbols, or update only the symbols that match a specific reference designator, value, or library identifier. The reference designator and value fields support wildcards: *
matches any number of any characters, including none, and ?
matches any single character.
The middle of the dialog has options to control what parts of the symbol will be updated. You can select specific fields to update or not update, which properties of the fields to update (text, visibility, size and style, and position), and how to handle fields that are missing or empty in the library symbol. You can also choose whether to update symbol attributes, such as do not populate and exclude from simulation / bill of materials / board.
The bottom of the dialog displays messages describing the update actions that have been performed.
To change an existing symbol to a different symbol, use Edit → Change Symbols…, or right click an existing symbol and select Change Symbol…. This dialog is also accessible from the symbol properties dialog.
The options for the Change Symbols dialog are very similar to the Update Symbols from Library dialog.
Another way to swap existing symbols for new ones is to use Tools → Edit Symbol Library Links…. This dialog contains a table of every symbol in the design, grouped by current library symbol. By choosing a new symbol in the New Library Reference column, you can make all instances of the existing symbol instead point to the new symbol. If the Update symbol fields from new library option is used, the contents of the existing symbols' fields will be updated to match the new symbols' fields.
The Map Orphans button attempts to automatically remap orphaned symbols to symbols with the same name in an active library. For example, if there is a symbol with the current library reference mylib:symbol123
, but the mylib
library cannot be found, the Map Orphans button will attempt to find a symbol named symbol123
in any of the libraries that are present. This button is only enabled if orphaned symbols are present in the schematic (see the legacy schematics section).
This dialog is primarily useful for managing symbols that appear in multiple libraries, when you want to switch from one library to another. For example, if a schematic uses symbols that are in both a global library and a project-specific library, the Symbol Library References dialog could be used to switch between using the global symbols or the equivalent project-specific symbols. It does not have features for fine-grained control of how fields are updated; for that, use the Change Symbols dialog.
Comparing symbols between schematic and library
When a symbol in a schematic diverges from the corresponding symbol in the original symbol library, you can use the Compare Symbol with Library tool to inspect the differences between the two versions of the symbol. Run the tool using Inspect → Compare Symbol With Library.
The Summary tab shows the name of the symbol, including its library and schematic reference designator, and provides a list of the differences between the schematic and library versions of the symbol.
The Visual tab shows a visual comparison of the schematic and library versions of the symbol. This can be used as a visual diff tool.
By default, the comparison displays both versions of the symbol superimposed on each other. To see the changes more easily, you can drag the slider at the bottom of the tab to the right to emphasize the library version of the symbol in the superimposed view (making the schematic version of the symbol more transparent) or drag it to the left to emphasize the schematic version (making the library version more transparent). At the far right and left ends of the slider, the schematic and library versions of the symbol, respectively, are fully hidden. It may be helpful to drag the slider back and forth to see the changes more clearly.
The screenshot above shows a visual comparison with the schematic version of the symbol deemphasized. You can see a partially transparent pin 5 (from the schematic version of the symbol) is in a different location than the fully opaque pin 5 (from the library symbol). This indicates that the pin was moved in either the schematic or library version of the symbol.
符号字段表
符号字段表允许你在电子表格界面中查看和修改所有符号的字段值。你可以用 按钮打开符号字段表。
Cells are navigated with the arrow keys, or with Tab / Shift+Tab to move right / left and Enter to move down, respectively.
通过点击和拖动可以选择一个单元格范围。选定的整个单元格范围可以通过(Ctrl+C)或(Ctrl+V)进行复制或粘贴。从表中复制单元格的对于创建 BOM 非常有用。下面将介绍复制和粘贴单元格的更多细节。
Any symbol field can be shown or hidden using the Show checkboxes on the left or by right-clicking on the header of the table. New symbol fields can be added using the button; a field with that name will be added to every symbol. Each field can have its own label, which doesn’t have to be the same as the field name, and is used as the column header. Fields can be renamed with the button or deleted with the button.
Similar symbols can optionally be grouped by any symbol field using the Group By checkboxes. Symbols are grouped into a single row in the table if all of their Group By fields are identical. The grouped row can be expanded to show the individual symbols by clicking the arrow at the left of the row. The Group Symbols checkbox enables or disables symbol grouping, and the button recalculates groupings.
预置可用于配置字段列表。预置可存储显示的字段、用于分组的字段以及列顺序。 您可以创建并保存自己的预置,也可以使用多个默认预置之一。 自定义预置可以在此对话框或 《原理图设置,原理图设置》 对话框中删除。
Symbols can be filtered by reference designator using the Filter textbox at the top. The filter supports wildcards: *
matches any number of any characters, including none, and ?
matches any single character. You can also change the display scope, showing only symbols in the current sheet, the current sheet and all of its subsheets, or the entire project. Symbols with the DNP (do not populate) attribute set can be optionally excluded by checking the Exclude DNP box.
You can cross-probe from this dialog by selecting a row in the table. Depending on the Cross-probe action setting at the bottom of the dialog, this can highlight the corresponding symbol in the schematic, select the corresponding symbol in the schematic, or do nothing. The selection action can also select the symbol’s footprint in the board editor, depending on the PCB Editor cross-probing settings.
The Symbol Fields Table is also a bill of materials tool. You can use the Export button to save the symbol fields to an external file. The fields are exported to the BOM exactly as they are currently shown in the spreadsheet view. File format settings are configured in the Export tab. For more information about exporting a BOM, see the BOM tool documentation.
Virtual fields
If you create a field in the Symbol Fields Table whose name begins with a text variable, a virtual field will be created. Virtual fields have a value that is evaluated for each symbol based on the contents of the field name. For example, a virtual field named ${SYMBOL_NAME}
will evaluate to the symbol’s name for each symbol. A virtual field can contain any text, as long as it starts with a text variable, so a virtual field named ${SYMBOL_LIBRARY}:${SYMBOL_NAME}
will evaluate to <library name>:<symbol name>
for each symbol.
Virtual fields exist only in the Symbol Fields Table and in BOM exports. While they are displayed as a column in the dialog and BOMs, and they can be used to group or sort symbols in BOM exports just like regular fields, adding a virtual field in the Symbol Fields Table does not add a corresponding field to each symbol in the schematic.
Any text variable can be used in virtual fields, including sheet and project text variables.
Text variables that correspond to symbol attributes (${DNP}
, ${EXCLUDE_FROM_BOARD}
, ${EXCLUDE_FROM_SIM}
, ${EXCLUDE_FROM_BOM}
) are displayed specially. In the Symbol Fields Table, they are shown as checkboxes for each symbol that directly set or unset the corresponding symbol attribute. In BOM exports, they expand to the friendly name of the attribute if the attribute is set (e.g. Excluded from board
for ${EXCLUDE_FROM_BOARD}
and DNP
for ${DNP}
) or to an empty string if the attribute is not set.
Finally, there are two special virtual fields that can be created:
-
${QUANTITY}
is a virtual field that contains the number of grouped instances of each symbol. -
${ITEM_NUMBER}
is a virtual field that contains the row number of each symbol in the table.
简化填写字段的技巧
电子表格中有几种特殊的复制/粘贴方法,用于将数值粘贴到更大的区域,包括自动增加粘贴的单元格。这些功能在粘贴几个符号中共享的数值时可能很有用。
这些方法如下所示。
1. 复制(Ctrl+C) | 2. 选择目标单元格 | 3. 粘贴 (Ctrl+V) |
---|---|---|
这些技巧在其他带有网格控制元素的对话框中也可以使用。 |
位号和符号批注
位号是设计中元件的唯一标识符。它们通常被印在 PCB 和装配图上,使你能够将原理图中的符号与电路板上的相应元件相匹配。
在 KiCad 中,位号由一个表示元件类型的字母(R
表示电阻,C
表示电容,U
表示集成电路,等等)及后面的数字组成。如果符号有多个单元,那么位号也会有一个表示单位的尾部字母。没有设置位号的符号有一个 ?
字符,而不是数字。位号必须是唯一的。
位号可以在符号添加到原理图时自动设置,也可以通过手动编辑单个符号的位号字段或使用批注工具批量设置或重置位号。
设置一个符号的位号的过程被称为 批注。 |
自动批注
启用自动批注后,符号被添加到原理图中时将被自动批注。你可以在 偏好设置 中 原理图编辑器 → 批注选项 窗格中选中 自动批注符号 复选框来启用自动批注。自动批注也可以通过左侧工具栏的 按钮进行切换。
当同时添加多个符号时,它们会根据 顺序 设置进行批注,按 X 或 Y 位置排序。
编号 选项为新的位号设置起始编号。 可以是最小的可用数字,也可以是基于原理图页码的数字。
关于批注选项的更多信息,请参见批注工具的文档。
批注工具
批注工具会自动为原理图中的符号指定位号。要启动批注工具,请点击顶部工具栏上的 按钮。
该工具提供了几个选项来控制符号的批注方式。
Scope: Selects whether annotation is applied to the entire schematic, to only the current sheet, or to only the selected symbols. If the Recurse into subsheets option is selected, symbols in subsheets of the selected scope will be reannotated; otherwise symbols in subsheets will not be reannotated. For example, if Recurse into subsheets and Selection only selected, symbols in any selected subsheets will be reannotated.
Options: Selects whether annotation should apply to all symbols and reset *existing reference designators, or apply only to unannotated symbols.
Order: Chooses the direction of numbering. If symbols are sorted by X position, all symbols on the left side of a schematic sheet will be lower numbered than symbols on the right side of the sheet. If symbols are sorted by Y position, all symbols on the top of a sheet will be lower numbered than symbols at the bottom of the sheet.
Numbering: Selects the starting point for numbering reference designators. The lowest unused number above the starting point is picked for each reference designator. The starting point can be an arbitrary number (typically zero), or it can be the sheet number multiplied by 100 or 1000 so that each part’s reference designator corresponds to the schematic page it is on.
清除批注 按钮可以清除所选范围内的所有位号。
批注信息可以用底部的复选框进行过滤,或用 保存… 按钮保存到报告中。
电气连接
有两种主要的方式来建立连接:导线和标签。导线进行直接连接,而标签则与具有相同名称的其他标签连接。下面的原理图中显示了导线和标签的情况。
可以用总线进行连接,也可以通过隐藏的电源引脚进行隐性连接。
本节还将讨论两种特殊类型的符号,可以用右侧工具栏上的 "电源符号" 按钮添加:
-
Power symbols: symbols for connecting wires to a power or ground net.
-
PWR_FLAG: a specific symbol for indicating that a net is powered when it is not connected to a power output pin (for example, a power net that is supplied by an off-board connector).
导线
导线用于在两点之间直接建立电气连接。 要建立连接,必须将一段导线的末端与另一段导线或一个引脚相连。只有导线的末端才能建立连接;如果一根导线穿过另一根导线的中间,不会建立连接。
未连接的导线端有一个小方块,表示连接点。 当连接到导线端时,这个方块就会消失。未连接的引脚有一个圆圈,连接完成时时也会消失。
导线只有在两端完全重合的情况下才能与其他导线或引脚连接。因此,保持符号引脚和导线与网格对齐很重要。建议在放置符号和绘制导线时始终使用 50 mil 的网格,因为 KiCad 标准符号库和所有遵循其风格的库也使用 50 mil 的网格。 |
符号、导线和其他没有对准网格的元素,可以通过选择它们,右键点击,并选择 将元素对准网格,来将它们重新对准网格。 |
绘制和编辑导线
用导线连接对象,请使用右侧工具栏中的导线工具 (w)。也可以通过点击未连接的符号引脚或导线末端进行导线连接。
可以用左侧工具栏的 按钮将导线限制在 90 度角,或者用 按钮将导线限制在 45 度角。 按钮允许你以任何角度放置导线。可以使用 Shift+Space 在这些模式中循环,或者在 偏好设置 → 原理图编辑器 → 编辑选项 中选择所需的模式。这些模式除了影响导线外,还影响 图形线。
与 PCB编辑器中一样, 快捷键 / 切换导线的模式。
可以使用移动(M)或拖动(G)工具来移动和编辑导线。 与符号一样,移动 工具只移动选定的线段,而不保持与其他导线的现有连接。而 拖动 工具则保持现有的连接。
可以使用 选择连接 工具(Alt+4)选择连接的导线。这个工具可以从所选导线或光标下的导线开始,选择所有与之相连的导线,直到到达一个结点。 再次使用该工具可以将现有的选择范围扩大到下一个结点。
你可以通过右击导线并选择 分割 将一个导线分成两段。该导线将在当前的鼠标位置被分开。你也可以通过右击一个导线并选择 断开 将其与相邻的导线分开。
Normally the line style of a wire follows the net’s net class settings (nets are in the Default
net class if no other net class is specified). However, the line style for the selected wire segments can be overridden in the wire’s properties dialog (E when a wire segment is selected). The wire’s width, color, and line style (solid, dashed, dotted, etc.) can be set. Setting the width to 0
, clearing the color, and using the Default
line style uses the default width, color, and style, respectively, from the net class settings. If a wire junction is included in the selection, the junction size can also be edited here.
导线结点
交叉的导线不是隐式连接的。如果需要连接,必须明确地添加结点来连接它们(按钮在右侧工具栏)。结点将被自动添加到开始或结束于现有导线之上的导线。
在上面的原理图中,连接到 P1
引脚 18、19、20、21、22 和 23 的导线上使用了结点。
Junction size automatically follows the schematic’s Junction dot size setting in Schematic Setup → General → Formatting. Color follows the net class setting. The automatic size and color can be overridden in each junction dot’s properties; a size of 0
is equivalent to the schematic default size, and clearing the color uses the net class color.
标签
标签是用来给导线和引脚分配网络名称的。具有相同网络名称的导线被认为是连接在一起的,所以标签可以用来进行连接,而不需要直接画线连接。
A net can only have one name. If two different labels are placed on the same net, an ERC violation will be generated. Only one of the net names will be used in the netlist. The final net name is determined according to the rules described below.
有三种类型的标签,每种都有不同的连接范围。
-
Local labels, also referred to simply as labels, only make connections within a sheet. Add a local label with the button in the right toolbar.
-
Global labels make connections anywhere in a schematic, regardless of sheet. Add a global label with the button in the right toolbar.
-
Hierarchical labels connect to hierarchical sheet pins and are used in hierarchical schematics for connecting child sheets to their parent sheet. Add a hierarchical label with the button in the right toolbar.
如果在同一个原理图页面,无论标签类型如何,具有相同名称的标签将被连接。 |
You can convert from one type of label to another type of label using the Change To tools. |
添加和编辑标签
使用相应按钮或快捷键创建标签后,会出现标签属性对话框。
有几个选项可以控制标签的外观。你可以改变文本的 字体、大小和颜色,并设置粗体和斜体以便强调。 你还可以设置文本相对于标签连接点的方向。层次和全局标签有几个额外的选项:自动 选项根据连接的原理图元素自动设置标签方向,形状 选项控制标签轮廓的形状(输入、输出、双向、三态 或 被动)。轮廓形状纯粹是视觉上的,没有电气上的影响。
在原理图设置对话框 中,全局标签有额外的设置来控制标签文本周围的边距。 |
标签也可以添加字段。有两个字段有特殊的意义("网络类" 和 "页面位号",下面会介绍),但也可以添加任意字段。标签字段的行为类似于符号字段:你可以显示或隐藏它们的名称和值,调整对齐方式、方向、位置、大小、字体、颜色或进行强调。
通过右击标签字段表的标题行,可以显示或隐藏标签字段的格式化选项,并启用或禁用所需的列。默认情况下,并非所有的列都显示。 |
与符号字段一样,标签字段可以通过从原理图中打开特定标签字段的属性进行单独编辑(双击标签字段,或使用 E)。
确认标签属性后,标签将被粘附到光标上进行放置。标签的连接点是标签角落里的小方块。当标签被连接到导线或引脚的末端时,这个方块就会消失。
连接点相对于标签文本的位置可以通过在标签的属性中选择不同的标签方向,或通过镜像/旋转标签来改变。
通过选择一个标签并使用 E 快捷键、双击该标签或在右键菜单中使用 属性…,可以随时访问标签属性对话框。
用标签分配网络类
In addition to assigning net names, labels can be used to assign net classes. A label field named Net Class
assigns the specified net class to the net associated with the label. To make it easier to assign net classes in this way, Net Class
is the default name for new label fields, and Net Class
fields present a dropdown list of all the net classes in the design. Net classes must be created in the Schematic Setup or Board Setup windows before they can be assigned with a label field.
For more information about assigning net classes, see the net class documentation.
页面间引用
全局标签可以显示页面间引用,它展示了原理图中出现同一全局标签的其他地方的页码列表。 点击页面间引用就可以进入所列出的页面。如果列出了多个引用,点击引用列表会弹出一个菜单来选择所需的页面。
页面间引用在 原理图设置 窗口的格式页面中进行全局控制。 可以启用或禁用引用,并且可以调整列表的显示格式,包括可选的前缀或后缀字符。
下图显示了一个全局标签,其中有对其他两个原理图页面的引用。在原理图设置中,分别添加了前缀和后缀 [
和 ]
。
全局标签会自动添加一个 "页面参考" 字段,其值为 "${INTERSHEET_REFS}",用于控制该标签的页面间引用。${INTERSHEET_REFS}
文本变量会被扩展为全局标签页面间引用的完整列表,和在原理图设置中的一致。页面间引用的可见性在 "原理图设置" 中全局控制,而不是通过 "页面间引用" 字段的可见性控制。对于其他类型的标签,"页面间引用" 字段没有意义。
总线
总线是一种在原理图中分组相关信号的方法,以简化复杂的设计。 总线可以像导线一样用总线工具画出来 ,并像信号线一样用标签命名。
在下面的原理图中,许多引脚都连接到总线上,也就是中间的蓝色粗线。
总线成员
在 KiCad 6.0 及以后版本中,有两种类型的总线:矢量总线和分组总线。
一个 矢量总线 是一个信号的集合,以一个共同的前缀开始,以一个数字结束。 矢量总线被命名为 <前缀>[M..N]
,其中`前缀`是任何有效的信号名称,M
是第一个后缀数字,N
是最后的后缀数字。 例如,总线 DATA[0…7]
包含信号 DATA0
、DATA1
,以此类推,直到 DATA7
。 指定 M
和 N
的顺序并不重要,但两者必须是非负数。
一个 分组总线 是一个或多个信号和/或矢量总线的集合。 分组总线可以用来把相关的信号捆绑在一起,即使它们有不同的名字。 分组总线使用一种特殊的标签语法:
‘<OPTIONAL_NAME>{SIGNAL1 SIGNAL2 SIGNAL3}’
该分组的成员被列在大括号({}
)内,用空格字符隔开。 在大括号的前面有一个可选的分组名。 如果分组总线没有命名,PCB 中产生的网络将作为该分组内的信号名称。 如果分组总线有名字,产生的网络将以名字为前缀,用句号(.
)分隔前缀和信号名称。
例如,总线 {SCL SDA}
有两个信号成员,在网表中这些信号将是 SCL
和 SDA
。 总线 USB1{DP DM}
将产生名为 USB1.DP
和 USB1.DM
的网表。 对于在几个类似电路中重复出现的较大的总线的设计,使用这种技术可以节省时间。
分组总线也可以包含矢量总线。 例如,总线 MEMORY{A[7..0] D[7..0] OE WE}
同时包含了矢量总线和普通信号,并将在 PCB 上形成 MEMORY.A7
和 MEMORY.OE
这样的网络。
总线的绘制和连接方式与信号线相同,包括使用结点来创建交叉线之间的连接。 与信号线一样,总线不能有一个以上的名称—如果在同一总线上有两个冲突的标签,将产生一个 ERC 违规。
总线成员之间的连接
总线相同成员之间连接的引脚必须通过标签连接。不可能将一个引脚直接连接到总线上;这种连接方式将被 KiCad 忽略。
在上面的例子中,连接是通过放置在连接到引脚的导线上的标签来实现的。连接总线的总线入口(45 度的线段)只是图形化的,并不是形成逻辑连接的必要条件。
事实上,使用重复命令(Insert),如果元件引脚以递增的顺序排列,可以非常快速地进行连接(在实践中,这种情况常见于存储器、微处理器等元件):
-
放置第一个标签(例如:
PCA0
)。 -
尽量使用重复命令来放置成员。 KiCad 将自动创建下一个标签(
PCA1
,PCA2
…)垂直对齐,理论上是在其他引脚的位置上。 -
在第一个标签下画线。然后使用重复命令将其他导线放在标签下。
-
如果需要,以同样的方式放置总线入口(放置第一个入口,然后使用重复命令)。
在偏好设置菜单的 原理图编辑器 → 编辑选项 部分,你可以设置重复的参数:
|
总线展开
展开工具允许你快速地从总线上分离出信号。 要展开一个信号,请右击一个总线对象(一个总线导线等),并选择 从总线上展开。 或者,当光标在一个总线对象上时,使用 展开总线 快捷键(默认:C)。 该菜单允许你选择要展开的总线成员。
在选择总线成员后,下一次点击将把总线成员的标签放在所需的位置。 该工具会自动生成一个总线入口和通向标签位置的导线。 放置完标签后,你可以继续放置额外的导线(例如,连接到一个元件引脚),并以任何正常方式完成布线。
总线别名
总线别名是一种快捷方式,可以让你更有效地处理大型分组总线。 它允许你定义一个分组总线,并给它一个简短的名称,然后可以在整个原理图中代替完整的分组名称。
要创建总线别名,请在原理图设置中打开 总线别名定义 窗格。
一个别名可以被命名为任何有效的信号名称。 使用该对话框,你可以向别名添加信号或矢量总线。 作为一种快捷方式,你可以输入或粘贴信号和/或总线的列表,用空格隔开,它们将全部被添加到别名定义中。 在这个例子中,我们定义了一个名为 USB
的别名,成员为 DP
、DM
和 VBUS
。
After defining an alias, it can be used in a group bus label by putting the alias name inside the curly braces of the group bus: {USB}
. This has the same effect as labeling the bus {DP DM VBUS}
. You can also add a prefix name to the group, such as USB1{USB}
, which results in nets such as USB1.DP
. For complicated buses, using aliases can make the labels on your schematic much shorter. Keep in mind that the aliases are just a shortcut, and the name of the alias is not included in the netlist.
总线别名被保存在创建别名时打开的原理图文件中。在 总线别名定义 窗口中,与所选别名相关的原理图文件显示在别名列表的底部。在一个给定的原理图页面中创建的任何别名都可以在同一层次设计中的任何其他原理图页面中使用。如果一个层次设计中的多个原理图包含相同名称的总线别名,这些别名必须都有相同的成员。如果多个同名的总线别名没有一致的成员,ERC 将报告违规情况。
有多个标签的总线
KiCad 5.0 或更早的版本允许将具有不同标签的总线连接在一起,并在网表编制时将这些总线的成员连接起来。这种行为在 KiCad 6.0 中被移除了,因为它与分组总线不兼容,而且还会导致网表的混乱,因为一个给定的信号将得到的名称不容易预测。
如果您在现代版本的 KiCad 中打开使用此功能的设计,您将看到“迁移总线”对话框,该对话框将指导您更新原理图,以便在任何给定的总线线路上只存在一个标签。
对于具有多个标签的每组总线,您必须选择要保留的标签。 下拉名称框允许您在设计中存在的标签之间进行选择,或者您可以选择一个不同的名称并手动将新名称输入名称字段。
电源符号
Power symbols are symbols that are conventionally used to represent a connection to a power net, such as VCC
or GND
. Power symbols are virtual: they do not represent a physical component on the PCB.
In addition to being a visual indicator that the attached net is a power rail, power symbols make global connections: two power symbols with the Value
connect to each other anywhere in the schematic, regardless of sheet. The power symbol’s Value
field determines the name of the attached net.
In previous versions of KiCad, power symbols used invisible power input pins, which make implicit global connections based on the pin name as described below. Beginning in KiCad 8, power symbols do not need to use invisible pins, and the global connection is made based on the power symbol’s value. |
在下图中,电源符号用于将电容器的正负极分别连接到 VCC
和 GND
网络上。
In the KiCad standard library, power symbols are found in the power
library, but power symbols can be created in any library. Creating custom power symbols is described in the symbol editor documentation. Instead of making a new symbol, you can also modify an existing power symbol in the schematic: changing its Value
field will change the net the power symbol connects to.
网络名分配规则
原理图中的每个网络都被分配了一个名称,无论这个名称是由用户指定还是由 KiCad 自动生成。
当多个标签附加到同一个网时,最终的网络名将按以下顺序确定,从最高优先级到最低:
-
全局标签
-
局部标签
-
层次标签
-
层次原理图引脚
如果一个网络有多个同一类型的标签,则按字母顺序排序,使用第一个。
如果一个网络经过层次的多张原理图,它的名字将取决于层次结构中优先级最高的标签。通常,局部标签优先级高于层次标签。
如果以上标签类型都没有添加到网络中,那么网络的名称将根据连接的符号引脚自动生成。
PWR_FLAG
上面的截图中可以看到两个 PWR_FLAG
符号。它们向 ERC 表明,两个电源网络 VCC
和 GND
实际上连接到一个电源上,虽然没有明确的电源输出(如电压调节器输出)连接到以上两个网络。
如果没有这两个标志,ERC 工具会诊断出:错误:输入电源引脚没有被任何输出电源引脚驱动。
PWR_FLAG
符号可以在 power
符号库中找到。将任何电源输出引脚连接到网络上,可以达到同样的效果。
无连接标志
No-connection flags () are used to indicate that a pin is intentionally unconnected. These flags prevent "unconnected pin" ERC warnings for pins that are intentionally unconnected. Also, while symbol pins that are stacked on top of each other are normally connected to the same net, if a no-connection flag is added to the stacked pins they will instead be connected to separate nets.
Note that no-connection flags are distinct from the "unconnected" symbol pin type, although they both prevent "unconnected pin" ERC warnings on the pin in question and prevent stacked pins from connecting to each other.
隐藏电源引脚
When the power pins of a symbol are visible, they must be connected, as with any other signal. However, symbols are sometimes drawn with hidden power input pins, which are connected implicitly. KiCad automatically connects invisible pins with type Power Input to a global net with the same name as the pin. For example, if a symbol has a hidden power input pin named VCC
, this pin will be globally connected to the VCC
net on all sheets. This kind of implicit connection is not recommended in new designs.
Care must be taken with hidden power input pins because they can create unintentional connections. By nature, hidden pins are invisible and do not display their pin name. This makes it easy to accidentally connect two power pins to the same net. For this reason, using invisible power pins in symbols is not recommended and is only supported for compatibility with legacy designs and symbols. |
隐藏的引脚可以在原理图中显示,方法是在 原理图编辑器 → 偏好设置的 显示选项 部分勾选 显示隐藏的引脚,或者选择 视图 → 显示隐藏的引脚。在左侧工具栏上还有一个切换是否显示隐藏引脚的图标 。 |
网络类
Net classes are groups of nets that can be assigned design rules (for the PCB) and graphical properties (for the schematic).
More than one net class can be assigned to a net (through a combination of graphical assignments and net class patterns). For nets with multiple net classes assigned, an effective aggregate net class is formed, taking any net class properties from the highest priority net class which has that property set. Net class priority is determined by the ordering in the Schematic or Board Setup dialogs. The Default
net class is used as a fallback for any missing properties after all explicit net classes have been considered.
Net classes may be created and edited in either the Schematic or Board Setup dialogs. Nets can be added to net classes in either the schematic or board using pattern-based assignments described below. Nets can also be assigned to net classes in the schematic using graphical assignments with net class directives or net labels.
Selecting a wire or label displays the net’s net class in the message panel at the bottom of the window.
Managing net classes in Schematic Setup
Net classes are managed in the Net Classes panel of the Schematic Setup dialog.
The top pane lists the net classes that exist in the design. The Default
net class always exists, and you can add additional net classes with the button or remove the selected net class with the button.
Net classes can be moved up and down in priority order with the and buttons. Note that the Default
net class will always be the lowest priority net class and can therefore not be moved.
Each net class can have unique graphic properties that determine how wires of that net class are displayed in the schematic. Wire and bus thicknesses, color, and line style (solid, dashed, dotted, etc.) can all be adjusted. Setting the color to transparent will use the theme’s default wire/bus color for the net class, which is configurable in Preferences.
You can also set board design rules for each net class, although the DRC fields are hidden by default. Right click the header row to show or hide additional columns. For more information about setting net class design rules, see the PCB editor documentation.
All net class parameters for user-defined net classes are optional. However, all properties belonging to the Default
net class must be set. When a net has more than one net class assigned, the appropriate value for graphic properties or board design rules is taken from the highest priority assigned net class with the relevant value set. If only one net class is assigned which contains missing properties, any missing values will be taken from the Default
net class.
The bottom pane lists pattern-based net class assignments. Each row has a net name pattern and a net class; nets with names that match the pattern are assigned to the specified net class. If a net matches multiple patterns, the first match is used. Pattern-based net class assignments are dynamic: when a new net is added that matches an existing pattern, it will be assigned to the associated net class automatically. Net patterns can use both wildcards (*
to match any number of any characters, including none, and ?
to match any character) and regular expressions. The nets that match the selected pattern are displayed to the right of the pattern list.
例如, net*
模式匹配名为 net
, net1
, network
, 和任何其他以 net
开头的网络名称的网络。 因为 *
在正则表达式中的含义略有不同(*
匹配零个或多个前面的字符), net*
模式也匹配名为 ne
的网络。
记住,网络名必须包括完整的原理图页面路径。例如,一个在根原理图中本地标记的网络有一个以 / 为前缀的名称。
|
Use the button to add a net class assignment pattern or the button to remove a pattern.
Instead of adding net class patterns in the Schematic Setup dialog, you can directly create net class patterns from the schematic canvas. Right click a net and select Assign Netclass… to bring up the Add Netclass Assignment dialog. The net class pattern is pre-filled with the name of the selected net, but the pattern can be changed if desired. All nets matching the pattern are displayed in the dialog. This method can only be used on nets with an assigned name.
Graphically assigning net classes in the schematic
As an alternative to pattern-based net class assignment, net classes can be graphically assigned to nets in the schematic using either directive labels, net labels, or rule areas. Net classes must be created in Schematic Setup before they can be assigned graphically.
In the image below, a directive label is used to assign signals to the 50R
net class.
Directive labels are added with the button in the right toolbar. They behave like labels, except that they cannot be used to name a net. The attached net is assigned a net class according to the value of the directive’s Net Class
field. The Net Class
field presents a dropdown list of all the net classes in the design.
如果一个标识符被附加到一个总线上,总线上的所有成员都被分配到指定的网络类。
In addition to the associated net class, you can edit the directive’s shape (dot, circle, diamond, or rectangle), orientation, pin length, and color in the directive’s properties.
Net labels can also be used to assign net classes to nets by adding a Net Class
field to the label.
The Rule Area tool can be used to draw a shape to which net class directives can be attached. Any wire, bus, label, or symbol pin which crosses or is inside the rule area will be assigned the net class of a net class directive attached to the rule area border. An example is shown in the image below; all wires passing through the rule area will be assigned the RAM_ADDR
net class.
You can show or hide directive labels in the schematic using the View → Show Directive Labels option.
图形对象
文字、图形和图像可以被添加到原理图中,用于文档的目的。这些对象对原理图没有任何电气影响。
下面的图片除了符号和几种类型的标签外,还显示了图形线和文字("COMMUNICATION DSP")。
Text and text boxes
Two kinds of text can be added to schematics, which are referred to as text () and text boxes (). Both are added using their respective buttons in the right toolbar. Text boxes are similar to regular text except that they have an optional border and they automatically reflow text within that border.
这两种文本项目都支持多行文本和基本的格式设置功能,文本框还可以将文本换行以适应文本框外框,并有额外的格式选项。所有的文本都有可调整的字体、颜色、大小、黑体和斜体,左右对齐,以及垂直和水平方向。文本框还支持水平居中,垂直对齐选项,以及彩色边框和填充。
链接
文本和文本框可以通过在文本属性的 链接 框中输入一个目标而成为一个链接。链接目标可以是一个本地文件(使用 file://
协议前缀,后跟文件路径),或者是一个网站(使用 http://
或 https://
,后跟其余的 URL),或导航到同一原理图设计中的另一个页面(使用 #
后跟页码)。这些也可以使用链接目标框中的下拉菜单自动填写。
字体
文本和文本框支持自定义字体,可通过文本的属性对话框中的 字体 下拉选择。除了 KiCad 字体外,你还可以使用安装在你电脑上的任何 TTF 字体。
用户字体不会被嵌入工程中。如果该工程在另一台没有安装所选字体的计算机上打开,将会被替换为不同的字体。为了获得最大的兼容性,请使用 KiCad 字体。 |
Text markup
文本标记支持上标, 下标, 评估工程变量和访问符号字段值。
功能 | 标记语法 | 结果 |
---|---|---|
上标 |
|
textsuperscript |
下标 |
|
textsubscript |
上划线 |
|
text |
|
variable_value |
|
|
field_value of symbol refdes |
Simulation directives
Text and textboxes can contain simulation directives for SPICE simulations. The Exclude from simulation checkbox prevents text from being interpreted as a simulation directive.
图形形状
Graphic rectangles (), circles (), arcs (), and lines () can all be added using their respective buttons in the right toolbar.
线宽、颜色和样式(实线、虚线或点线)可以在每个图形(E)的属性对话框中进行配置。矩形、圆形和弧形也可以设置填充颜色并去除其轮廓线。
将形状的线宽设置为 0,则使用原理图的默认线宽,该线宽可在 <schematic-setup,原理图设置>> 中配置。虚线的间距也可以在那里配置。移除线条或填充物的颜色将会使用颜色主题的图形颜色,这可以在 偏好设置 中配置。
与导线一样,图形的线条服从线条的绘制模式设置(90 度,45 度,或自由角度),可以用左侧工具栏的切换按钮来设置 (, , and )。 Shift+Space 循环切换这些模式。
与 PCB 布线一样 ,/ 快捷键切换线条模式。
位图图像
位图图像可以通过 按钮添加到原理图中。原理图中的图像可以被移动和缩放。属性对话框允许设置位置和比例,以及将图像转换为灰度。
批量编辑文本和图形
文本和图形的属性可以通过 编辑文本和图形属性 对话框(工具 → 编辑文本和图形属性…)进行批量编辑。该工具还可以修改导线和总线的视觉属性。
范围和筛选器
Scope settings restrict the tool to editing only certain types of objects. If no scopes are selected, nothing will be edited.
Filters restrict the tool to editing particular objects in the selected scope.
Objects will only be modified if they match all enabled and relevant filters
(some filters do not apply to certain types of objects. For example, symbol
field filters do not apply to wires and are ignored for the purpose of changing
wire properties). If no filters are enabled, all objects in the selected scope
will be modified. For filters with a text box, wildcards are supported: *
matches any number of any characters, including none, and ?
matches any single
character.
Filter fields by name filters to the specified symbol, label, or sheet field.
Filter items by parent reference designator filters to fields in the symbol with the specified reference designator. Filter items by parent symbol library id filters to fields in symbols with the specified library identifier. Filter items by parent symbol type filters to fields in symbols of the selected type (power or non-power).
Filter items by net filters to wires and labels on the specified net.
Only include selected items filters to the current selection.
可编辑的属性
可以在对话框的底部为被筛选对象的属性设置新值。
Drop-down lists and text boxes can be set to -- leave unchanged --
to preserve existing values. Checkboxes can be checked or unchecked to enable or disable a change, but can also be toggled to a third "leave unchanged" state. Color properties must be checked to change the value; a checkerboard swatch indicates that the color will be inherited from the default value from the the schematic settings or net class properties.
可以修改的文本属性有 字体、文本大小、文本方向(右/上/左/下)、水平 和 垂直对齐、文本颜色、强调(粗体*和*斜体)以及字段和字段名的 可见性。
可以修改的图形和导线属性有:线宽、线样式(实线、虚线和点线)、线颜色、图形的 填充颜色,以及导线结点的 结点尺寸 和 结点颜色。
原理图标题栏
标题栏是用页面设置工具()编辑的。
可以编辑标题栏中的每个字段,以及纸张大小和方向。 如果为某个字段选中了 导出到其他原理图页 选项,则该字段将在所有原理图页的标题栏中更新,而不仅仅是当前原理图页。
你可以用 发布日期 旁的左箭头按钮将日期设置为今天或其他任何日期,但原理图中的日期不会自动更新。
也可以选择一个原理图模板文件。
原理图页码(页面X/Y)会自动更新,也可以用 编辑 → 编辑原理图页码… 手动设置。
Schematic editing convenience functions
There are several convenience features in the Schematic Editor that make some common editing and connection operations faster.
Pin helpers
You can quickly add wires, labels, or no-connection markers to a selection of pins using the Pin Helpers tools in the right-click context menu. This can help you quickly break out unconnected pins from a symbol or hierarchical sheet. By selecting Pin Helpers → Wire, the wire tool will begin drawing a wire from all selected pins at once. If you select No Connect, no-connection markers will be added to the end of each selected pin. And if you choose Net Label, Hierarchical Label, or Global Label, a label of the respective type will be placed at the end of each selected pin. Each label’s name will be set to the corresponding pin name. The new labels will remain selected, so you can easily move them away from the symbol using M or G, depending on whether you wish to maintain a wired connection between the pins and the labels.
Pin helpers require you to select individual pins, not their parent symbol or sheet. Symbol pins cannot be individually selected if the clicking on a pin selects the symbol option is enabled in the Editing Options pane of the Schematic Editor preferences. Therefore, this option must be disabled to use the Pin Helper tools. |
Converting between object types
Existing labels and text objects can be changed to another type of label or text by right clicking the object(s) and selecting the target object type from the Change To submenu. The allowed types for source and target objects are local labels, global labels, hierarchical labels, directive labels, text objects, and text boxes. The value of the original object is preserved in the resulting object: when a text object is converted to a label, the label’s value (net name) will be the original text, and vice versa.
Swapping objects
You can swap the position of two selected objects using the Swap command (S; also available in the right-click context menu). This works on symbols, labels, and graphical items. The first object is assigned the location and rotation of the second object, and vice versa. If there are more than two objects selected, the locations are cycled: the last object gets the position of the first object, the first object gets the location of the second, and so on.
One possible use of the swap command is to exchange two units within a a symbol, for example the two amplifiers in a dual op-amp. You could also use swap with a selection of labels to quickly modify net assignments to symbol pins. In combination with cross-selection from the PCB, this can be a convenient way to make schematic changes for easier routing. This is sometimes known as pin or gate swapping. |
原理图设置
The Schematic Setup window is used to set schematic options that are specific to the currently active schematic. For example, the Schematic Setup window contains formatting options, electrical rule configuration, net class setup, and schematic text variable setup.
您可以使用 从另一个项目导入设置… 按钮从已有项目导入原理图设置。 这允许您选择一个项目用作模板并选择要导入的设置 (格式首选项, 字段名称模板, 管脚冲突映射, 违规严重性设置和网络类)。
原理图格式
格式化面板包含符号、文本、标签、图形和导线的外观设置。
Symbol unit notation sets how each unit of a multi-unit symbol is referred to
in its reference designator. By default, a different letter for each unit is
appended to the reference designator with no separator, for example U1B
for
the second unit of symbol U1
, but this can be changed. Numbers can be used
instead of letters, and various separators can be used between the symbol
designator and the unit identifier (.
, -
, _
, or none).
Default text size sets the default text height used by the text, text box, and
label tools. Overbar offset ratio controls the vertical spacing between text
and an overbar (~{}
) over that text, as a ratio of the text height.
Label offset ratio controls the vertical spacing between a local label’s text
and the attached wire, relative to the label’s text size. This also affects the
spacing between symbol pins and their pin number. Global label margin ratio
defines the size of the box around a global label, relative to the global
label’s text size. Increasing the margin may be useful to avoid overlapping text
with overbars (~{}
) or letters with descenders, but this may cause closely
packed global labels to overlap with each other.
Default line width sets the default line width for symbol graphics, if the symbol does not override the default line width. Pin symbol size scales symbol pin graphic style annotations, such as the bubble on an inverted pin.
Junction dot size sets the schematic’s default wire junction dot size. The default size can be overridden by editing an individual junction dot’s properties. Connection width specifies the grid size used for the Symbol pin or wire end off connection grid ERC check. Schematics typically use a 50 mil grid for electrical connections, so this should usually remain set at 50 mils.
The Operating Point Overlay settings configure how operating point simulation results are displayed on the schematic canvas. The significant digits settings control the number of significant digits printed on voltage and current overlays. The range settings control the units used to display voltage and current measurements.
Show inter-sheet references enables or disables the display of
inter-sheet references, which are a list of page
numbers next to a global labels that link to other places in the schematic where
the same global label appears. Show own page reference controls whether the
current page is included in the list of page numbers. Standard and
abbreviated determine whether to display the complete list of page numbers or
only the first and last page numbers. The prefix and suffix fields add
optional characters before and after the list of page numbers. In the image
of an inter-sheet reference below, a prefix and suffix of [
and ]
,
respectively, have been added.
虚线外观在格式部分中控制。 虚线长度 控制破折号的长度,而 间隙长度 控制破折号和点之间的间距。 破折号和间隙长度是相对于线宽的:间隙长度为 2
则表示线宽的两倍。
字段名称模板
字段名称模板是空的符号字段,会自动添加到原理图中的所有符号。 当原理图中的每个符号都需要在符号中定义的默认字段之外的其他字段时,这可能很有用,例如制造商部件号的字段。
模板字段可以设置为可见或不可见,也可以设置为URL 字段。
在原理图设置中定义的字段名称模板仅适用于当前项目。 字段名称模板也可以在偏好设置中定义,它适用于在您的计算机上编辑的所有项目。
BOM presets
BOM presets are saved configurations for the Symbol Fields Table and BOM export tool. There are two types of presets. BOM presets configure which fields are displayed in the symbol fields table, which order they are displayed in, and how they are used to group symbols. These fields are also directly used in the BOM output. BOM formatting presets configure the output BOM file format, including which separator characters are used to separate fields. Both types of presets are created in the Symbol Fields Table, but can are listed and can be deleted here.
ERC 违规严重性和管脚冲突映射
违规严重性 面板可让您配置应将哪些类型的 ERC 消息报告为错误、警告或忽略。
引脚冲突映射 允许您配置连接规则,以根据相互连接的引脚类型定义错误和警告的电气条件。 例如,默认情况下,当输出引脚连接到另一个输出引脚时会产生错误。
这些面板在 [ERC - 配置,ERC 章节] 中有更详细的解释。
网络类
The Net Classes panel allows you to manage net classes for the project and assign nets to net classes with patterns. Managing net classes in this panel is equivalent to managing them in the Board Setup dialog. Nets can also be assigned to net classes in the schematic using graphical assignments with net class directives or net labels.
Pattern-based net class assigment is explained in more detail in the net classes section.
文本变量
文本替换变量可以在文本变量部分创建。 这些变量允许您用变量名替换任何文本字符串。 这种替换发生在变量名称在 ${VARIABLENAME}
的变量替换语法中使用的任何地方。
例如,您可以创建一个名为 VERSION
的变量并将文本替换设置为“1.0”。 现在,在 PCB 上的任何文本对象中,您可以输入 ${VERSION}
,KiCad 将其替换为 1.0
。 如果将文本替换更改为 2.0
,则包含 ${VERSION}
的每个文本对象都将自动更新。 您还可以混合使用常规文本和变量。 例如,您可以使用文本 Version: ${VERSION}
创建一个文本对象,它将被替换为 Version: 1.0
。
文本变量也可以在 电路板设置中创建。 文本变量是项目范围的; 在原理图编辑器中创建的变量在电路板编辑器中也可用,反之亦然。
还有一些内置系统文本变量。
Opening legacy schematics
Modern versions of KiCad can always open projects created in older versions of KiCad. However, schematics created in some older versions of KiCad have special considerations that must be observed when opening them in order to prevent any data loss.
Opening KiCad 5.0 and 5.1 schematics
Modern versions of KiCad can open schematics created in versions prior to KiCad 6.0, but the cache library file (<projectname>-cache.lib
) must be present to load the schematic correctly.
Since version 6.0, KiCad stores all symbols used in a project in the schematic. This means that you can open a schematic made in KiCad 6.0 or later on any computer, even if the libraries used in the project are not installed or have changed. Modern KiCad schematic files use the .kicad_sch
extension.
Prior to version 6.0, KiCad did not store symbols in the schematic. Instead, KiCad stored references to the symbols and their libraries. It also stored a copy of every symbol used by the project in a separate cache library file (<projectname>-cache.lib
). As long as the cache library was included with the project, the project could be distributed without the system library files, because KiCad could load any needed symbols from the cache library as a fallback if the libraries referenced in the schematic were missing. Legacy KiCad schematic files use the .sch
extension.
When you open a legacy schematic, KiCad will look in the cache library to find all of the symbols used in the schematic in the cache library. When you save the legacy schematic, KiCad will save it as a new file in the modern schematic format (.kicad_sch
), with the necessary symbols embedded in the schematic itself. The original legacy schematic and the cache library will remain, unmodified, but they are no longer necessary once the schematic has been saved in the modern format.
Projects created in KiCad prior to version 6.0 must have a cache library. If the cache library is missing, the schematic will lose symbol information if the system symbol libraries are modified, reorganized, moved, or deleted. The libraries included with legacy versions of KiCad are substantially different than the modern KiCad libraries, so in practice KiCad will almost always fail to open legacy projects unless the cache library is present. |
When you open a legacy schematic, KiCad may display the Project Rescue Helper dialog. This means that one or more symbols in the cache library do not match the corresponding symbol in the external library. The dialog helps you "rescue" symbols from the cache library into your schematic, if desired. You can also open the rescue dialog at any time using Tools → Rescue Symbols…. The cache library file must be present in order to use the rescue tool.
The rescue dialog lists all symbols that don’t match between the cache library and the external symbol library. The discrepancy can be because:
-
the cached symbol or the library symbol has been modified, so the two symbols no longer match, or
-
the cached symbol does not have a corresponding symbol in the symbol library, because the symbol or library was moved, renamed, deleted, or is not present on the current computer.
For each symbol in the list, selecting the symbol displays the reference designator and value for each instance of the symbol, and shows a visual preview of the symbol. If a corresponding symbol exists in the system symbol library, the dialog shows both copies of the symbol for comparison. If the symbol only exists in the cache library, the dialog only shows the cached symbol.
In this example, the project originally used a diode with the cathode facing left, but the library now contains one with the cathode facing right. This change would break the design, so it would be important to use the cached symbol as the original designer intended.
Pressing Rescue Symbols here will cause the selected symbols from the cache library to be saved into a special rescue
library (<projectname>-rescue.kicad_sym
). The corresponding symbols in the schematic will be updated to use the newly rescued symbols. Any unselected symbols will not be rescued, but their symbol linkage can be updated in the schematic later.
Alternatively, pressing Skip Symbol Rescue will exit the dialog without rescuing any symbols. KiCad will use the versions of the symbols found in the external libraries. You can run the rescue function again with Tools → Rescue Symbols…, or manually edit symbol linkage in the symbol’s properties.
If you would prefer not to see this dialog, you can press Never Show Again. This has the same effect as pressing Skip Symbol Rescue for the current schematic and all future schematics.
If a symbol in a legacy schematic cannot be found in either the cache library or the external library, KiCad cannot rescue that symbol. A placeholder symbol is inserted into the schematic in its place, as shown below.
You can attempt to remap these orphaned symbols using the Change Symbols or Edit Symbol Library Links dialogs, but either option may require manual corrections to the schematic. These tools are explained in more detail in the Updating and exchanging symbols section.
Opening pre-5.0 schematics
Modern versions of KiCad can open schematics created in versions prior to KiCad 5.0, but you will need to go through a symbol remapping process to open the schematic without losing symbol information.
Since version 5.0, KiCad schematics refer to specific symbols using both the symbol and library name. Even if multiple libraries each contain a symbol with the same name, the designer’s intended symbol is unambiguously specified.
Prior to version 5.0, KiCad schematics stored only the symbol name, not the library name. Symbols in the schematic were indirectly mapped back to the original library by searching through the project’s library list for a matching symbol. When you open a pre-5.0 schematic, KiCad will attempt to automatically "remap" the symbols so that each bare symbol name is replaced with a fully-specified symbol library and symbol name pair. The original schematics will be backed up in a rescue-backup
folder.
You can skip the automatic remapping, but you will need to remap the symbols yourself using the Change Symbols dialog. You can also re-run the Remap Symbols tool using Tools → Remap Legacy Library Symbols….