差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
kicad6lable [2022/04/17 20:28] gongyusu |
kicad6lable [2022/05/29 21:40] (当前版本) gongyu |
||
---|---|---|---|
行 1: | 行 1: | ||
- | ## 第19节:添加字符标注 | + | ## 第19节:添加字符和图形 |
- | ### PCB上字符标注的作用是什么? | + | 上一节我们完成了布线,很快就完成板子的设计了。剩下的就是添加文本标签。 |
+ | 使用文本标签可以标记管脚的功能,板子上元器件的名字以及给我们的板子一个名字和版本号。文本标签放置在丝印层,在后面的一节,我们再学习一下如何在这层添加装饰图案。 | ||
- | ### 如何在PCB上进行字符标注? | + | 从右侧图层选择区选择F.Silkscreen层,在该层边上会有一个小的蓝色三角表明选择的层。 |
+ | 我们开始添加文本 - VCC,对准。。。弹出一个属性窗口,调节文字的属性 - 宽度、高度设置为0.8mm,粗细 | ||
+ | 点击OK | ||
- | 图形 | + | 可以微调文本放置的位置,使用M快捷键 |
- | 边切边绘制完成后,让我们使用相同的图形工具向电路板添加一些装饰性图形。许多脚印在丝印层中携带它们自己的图形。在我们的[[PCB]]中,你可以看到[[LED]],电阻和螺丝端子已经有图形了。你可以在图9.74中用白色表示它们。 | + | |
+ | 其它标签要保持一致 - 采用复制的方式,然后修改文本的内容,其它属性不做任何修改。 | ||
+ | |||
+ | 鼠标悬浮在要复制的对象上,快捷键Ctrl + D | ||
+ | |||
+ | 也可以先用Ctrl + C快捷键,然后Ctrl + V | ||
+ | |||
+ | 3D查看一下: | ||
+ | 顶层 | ||
+ | 底层 | ||
+ | |||
+ | 可以看到在顶层有铜线将焊盘连接在一起,背后没有任何铜线,我们用的是单面板。 | ||
+ | |||
+ | 在发出去加工之前,添加上版本好,养成好的习惯,这样可以跟后续修改的版本进行区分 | ||
+ | |||
+ | 在板子上创建一个新的标签V1.0并把它们放置在板上 | ||
+ | |||
+ | 等做完这些,我突然发现在板子上可以添加一个开关,以方便控制,同时我们可以看一下电源走线的问题以及覆铜的功能。我们下一章来看看。 | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ### 1. 在PCB上字符标注 | ||
+ | * 顶层丝印 | ||
+ | * 底层丝印 | ||
+ | * 文字 | ||
+ | * 图案 | ||
+ | * 隐藏/显示 | ||
+ | |||
+ | |||
+ | 板边完成后,让我们使用相同的图形工具向电路板添加一些装饰性图形。许多封装在丝印层中携带它们自己的图形。在我们的[[PCB]]中,你可以看到[[LED]],电阻和螺丝端子已经有图形了。。 | ||
+ | |||
+ | ### 2. 添加图形 | ||
让我们添加一些定制的图形元素。 | 让我们添加一些定制的图形元素。 | ||
行 17: | 行 52: | ||
圆弧工具是画圆的好工具。在以后的项目中,我们也将使用它来为我们的PCB创建圆角,看起来更好,不那么尖锐。您可以使用圆弧工具类似于圆工具,但它将绘制一个部分圆,而不是绘制一个完整的圆。我在两个螺丝孔的内侧添加了一些装饰性的弧线。在图9.75中你可以看到我的PCB图,在图9.76中可以看到它的3D渲染。 | 圆弧工具是画圆的好工具。在以后的项目中,我们也将使用它来为我们的PCB创建圆角,看起来更好,不那么尖锐。您可以使用圆弧工具类似于圆工具,但它将绘制一个部分圆,而不是绘制一个完整的圆。我在两个螺丝孔的内侧添加了一些装饰性的弧线。在图9.75中你可以看到我的PCB图,在图9.76中可以看到它的3D渲染。 | ||
+ | |||
你也可以在PCB的底部添加图形。目前,这里还没有任何图形元素。让我们添加几个方框和一个圆。 | 你也可以在PCB的底部添加图形。目前,这里还没有任何图形元素。让我们添加几个方框和一个圆。 | ||
行 33: | 行 69: | ||
文本 | 文本 | ||
要向PCB添加文本,我们可以使用文本工具,它是图9.40中标记为“8”的图形工具之一。让我们继续,用它把你的名字添加到黑板上。选择前丝印层,然后点击“T”按钮。单击PCB上您希望文本出现的位置。将出现文本属性窗口。在文本框中输入你的名字,并仔细检查: | 要向PCB添加文本,我们可以使用文本工具,它是图9.40中标记为“8”的图形工具之一。让我们继续,用它把你的名字添加到黑板上。选择前丝印层,然后点击“T”按钮。单击PCB上您希望文本出现的位置。将出现文本属性窗口。在文本框中输入你的名字,并仔细检查: | ||
- | •“f . silk”出现在图层下拉菜单中, | + | •“f.silk”出现在图层下拉菜单中, |
•“正常”出现在显示下拉菜单中。 | •“正常”出现在显示下拉菜单中。 | ||
您可以控制文本的大小及其样式,但除此之外,文本控件是有限的。您可以选择将文本放置在其他层中,包括顶部或底部铜质层。铜质层是用来制作垫子和轨道的,所以除非你有很好的理由,否则使用丝绸层来制作文字。 | 您可以控制文本的大小及其样式,但除此之外,文本控件是有限的。您可以选择将文本放置在其他层中,包括顶部或底部铜质层。铜质层是用来制作垫子和轨道的,所以除非你有很好的理由,否则使用丝绸层来制作文字。 | ||
如果你选择在底层添加文本,请注意将“显示”下拉菜单设置为“镜像”。这将逆转文本,以便在制造商打印时它是可读的。 | 如果你选择在底层添加文本,请注意将“显示”下拉菜单设置为“镜像”。这将逆转文本,以便在制造商打印时它是可读的。 | ||
+ | |||
+ | |||
我还将添加文字,提供有关电阻大小的信息,以及螺杆终端pads的极性。这些信息对于电路板的最终用户非常有用。在图9.82中你可以看到最终的顶层丝印,在图9.83中是它的3D渲染。 | 我还将添加文字,提供有关电阻大小的信息,以及螺杆终端pads的极性。这些信息对于电路板的最终用户非常有用。在图9.82中你可以看到最终的顶层丝印,在图9.83中是它的3D渲染。 | ||
+ | |||
文本“330”的字符宽度为1毫米。其余的人物都是1.5毫米宽。我将“+”和“-”符号放置在螺旋终端的外围,以便在螺旋终端焊接后它们仍然可见。对于LED,这些符号的唯一用途是在组装期间,以帮助我将LED放置在正确的方向。一旦LED灯亮了,这两个符号就会被隐藏,但这不是问题,因为我不再需要它们了。 | 文本“330”的字符宽度为1毫米。其余的人物都是1.5毫米宽。我将“+”和“-”符号放置在螺旋终端的外围,以便在螺旋终端焊接后它们仍然可见。对于LED,这些符号的唯一用途是在组装期间,以帮助我将LED放置在正确的方向。一旦LED灯亮了,这两个符号就会被隐藏,但这不是问题,因为我不再需要它们了。 | ||
+ | |||
我将添加一些文字到底部的板,那里有更多的空间比前面。我通常包括一个板名,版本号,日期和我的名字。继续添加你的文本,但记住在显示下拉菜单中选择“镜像”。 | 我将添加一些文字到底部的板,那里有更多的空间比前面。我通常包括一个板名,版本号,日期和我的名字。继续添加你的文本,但记住在显示下拉菜单中选择“镜像”。 | ||
我已经改变字符宽度为1毫米,以使全文适合于可用的空间。我也将图层改为B.Silk,显示改为镜像,对齐改为右对齐。您可以使用“M”热键来精确地将文本块放置在PCB上,就像处理任何足迹一样。 | 我已经改变字符宽度为1毫米,以使全文适合于可用的空间。我也将图层改为B.Silk,显示改为镜像,对齐改为右对齐。您可以使用“M”热键来精确地将文本块放置在PCB上,就像处理任何足迹一样。 | ||
图9.85和9.86显示了最终结果。 | 图9.85和9.86显示了最终结果。 | ||
+ | |||
在我们宣布这个项目完成之前,有一件事你需要注意。参考图9.85,注意到文字“REF**”出现在螺丝孔的脚印上吗?这不是我们想要包含在我们制造的pcb中的文本。您不希望出现在最终PCB中的文本或其他图形元素,可以通过编辑项目的属性使其不可见。 | 在我们宣布这个项目完成之前,有一件事你需要注意。参考图9.85,注意到文字“REF**”出现在螺丝孔的脚印上吗?这不是我们想要包含在我们制造的pcb中的文本。您不希望出现在最终PCB中的文本或其他图形元素,可以通过编辑项目的属性使其不可见。 | ||
+ | |||
让我们让'REF**'的三个实例不可见。将鼠标光标精确地放在右侧螺丝孔的“REF**”文本上。然后,使用“E”热键显示文本项目的属性窗口。 | 让我们让'REF**'的三个实例不可见。将鼠标光标精确地放在右侧螺丝孔的“REF**”文本上。然后,使用“E”热键显示文本项目的属性窗口。 | ||
+ | |||
项目的Display属性位于OK按钮的正上方。点击“Invisible”单选按钮,然后点击“Ok”。 | 项目的Display属性位于OK按钮的正上方。点击“Invisible”单选按钮,然后点击“Ok”。 | ||
在图9.89和图9.88中,你可以确认'REF**'实例现在是不可见的。 | 在图9.89和图9.88中,你可以确认'REF**'实例现在是不可见的。 | ||
+ | |||
做得好!至此,您的PCB已经完成。确保保存工作(KiCad不会自动保存)。 | 做得好!至此,您的PCB已经完成。确保保存工作(KiCad不会自动保存)。 | ||
- | 你可能会想,为什么不去制造这个板呢?虽然你刚刚创建的棋盘是一个优秀的第一个项目,我希望你通过设计一个更具挑战性的棋盘来扩展你的技能。那个板,一个简单的面包板电源供应,也将是非常有用的许多您未来的项目,所以它是一个极好的候选人发送到制造。 | ||
- | 让我们通过仔细查看图层管理器,状态栏和菜单来完成这一节,然后我们将继续另一个项目。 | ||
- | 层管理器 | ||
- | 您已经熟悉从您的工作在简单的LED和电阻PCB的图层管理器。图层管理器除了允许你选择你下一步要工作的图层之外,还允许你选择布局的哪些方面被渲染。 | ||
- | 层管理器以两种不同的形式出现。它可以作为顶部工具栏的一个简单的下拉菜单,也可以在右侧工具栏的右侧提供功能齐全的变体。因为完整的层管理器占用了Pcbnew中相当大的空间,您可能需要在布局表中使用它,所以Pcbnew在右侧工具栏中提供了一个按钮,允许您显示或隐藏层管理器工具栏。 | ||
- | 你可以在图9.90的例子中看到所有这些。 | ||
- | 布局管理器的下拉版本和工具栏版本的图层选项卡几乎相同。它们都允许你选择当前层。但工具栏版本还允许隐藏或显示属于某个层的项目。例如,要在前面的铜层上绘制轨迹,只需取消fcu选项。我们的小PCB中的红色轨道将消失。 | ||
- | 作为另一个例子,试着隐藏前面和后面丝印层中的项目。 | ||
- | 在下拉版本中,隐藏和显示图层项是不可能的。 | ||
- | 工具栏版本还有第二个标签,标题为Items(图9.91)。 | ||
- | 在Items选项卡中,您可以控制PCB的其他项目的可见性。例如,试着取消选中“文本前面”项。这将使文本消失,即使它属于多个图层。尝试使用Items选项卡中的其他一些选项,包括Grid选项。当您选中或取消选中Grid选项时,请注意Grid按钮(在右边工具栏的顶部)如何更新其状态。 | ||
- | 状态栏 | ||
- | 状态栏出现在Pcbnew窗口的底部。它包含两个段。最上面的一个显示当前选中项目的属性,第二个显示坐标、距离和缩放信息。 | ||
- | 让我们看一个例子。在简单的LED和电阻PCB中,单击LED足迹。LED占用空间的属性将出现在状态栏中(参见图9.92)。 | ||
- | |||
- | 通过这种方式,您可以快速获得关于足迹、轨迹、文本和图形项的信息。 | ||
- | 状态栏的一个非常有用的功能是距离计数器。您以前在Eeschema中见过这个特性。它在Pcbnew中以完全相同的方式工作。让我们看一个例子。 | ||
- | 你刚刚设计的PCB的宽度和高度是多少,单位是毫米?我们可以测量它。请将鼠标指针放在PCB板的左端,按空格键复位计数器,然后将其移动到右端。dx计数器显示为44.50 mm。由于在测量过程中我将指针向下移动,dy的值为-0.25 mm(图9.93)。 | ||
- | |||
- | 在Y轴上做同样的操作,找出PCB的高度。我的PCB的高度是12.75 mm(图9.94)。 | ||
- | |||
- | 就像Eeschema中的状态栏一样,Pcbnew中的状态栏也提供了关于绝对光标坐标、缩放级别和所选距离单位的信息。 | ||
- | |||
- | 菜单 | ||
- | |||
- | 为了完成我们的Pcbnew之旅,让我们快速看一下菜单。 | ||
- | |||
- | 首先要注意的是,许多通过工具栏可用的功能也可以通过菜单系统使用。例如,在“文件”菜单中,你会发现打印、编辑页面设置、绘制和保存布局的选项,而在“视图”菜单中,你会发现放大/缩小、重绘和使布局适合屏幕的选项。 | ||
- | |||
- | 除了Place之外,所有的菜单都包含独特的功能。在本节中,我们将回顾这些函数中最常用的几个。 | ||
- | |||
- | 文件 | ||
- | |||
- | 在图9.95中,你可以看到File菜单的内容。 | ||
- | |||
- | 你应该能认出里面的很多东西: | ||
- | |||
- | 1. 页面设置,允许您编辑标题块的内容 | ||
- | |||
- | 以及页面布局,如你所知。 | ||
- | |||
- | 2. 打印,允许您在纸上打印布局。 | ||
- | |||
- | 3.导出,允许您导出各种格式的布局。为 | ||
- | |||
- | 例如,您可以在第三方绘图应用程序中使用SVG文件(每层一个),以及使用支持这种格式的外部自动路由(如FreeRouting,你可以在相关的食谱中了解)的spectra DSN。 | ||
- | |||
- | 4. Plot,允许您将布局导出为适合发送给制造商(如Gerber)的格式。有趣的是,还可以使用Plot将其导出为SVG、PDF和其他格式。所有这些都可以用来制造最终的PCB。 | ||
- | |||
- | 5. Close表示关闭Pcbnew。 | ||
- | |||
- | 除上述功能外,“文件”菜单还提供了几个功能 | ||
- | |||
- | 新: | ||
- | |||
- | 1. 保存一个副本为…,允许您保存布局下的新文件 | ||
- | |||
- | 的名字。当你想要扩展你的布局时,这很有用。例如,您可以设计一个布局,使用名为“led_电阻or_smd”的表面安装组件。KiCad_pcb',另一个文件名为' led_电阻or_th.KiCad_pcb'。 | ||
- | |||
- | 2. 恢复到最后的备份,允许您加载布局恢复文件。Pcbnew每10分钟自动保存您的工作。这个值可以通过Preferences, General窗口进行配置。备份文件有'。KiCad_pcb-bak的扩展。当您单击Revert to Last时,Pcbnew将要求您确认是否要还原到备份文件的内容并替换当前的工作。 | ||
- | |||
- | 3.Rescue,允许您加载自动创建的备份。默认情况下,Pcbnew每10分钟备份一次您的工作。您可以从“首选项”菜单项中通过“常规设置”窗口控制时间间隔。我个人每隔几分钟就手动保存我的工作,并提交到项目的Git存储库中,不喜欢依赖KiCad的自动保存功能。 | ||
- | |||
- | 4. 制造输出,让您访问几种类型的文件格式,可以在PCB制造过程中使用。在这本书中,您将学习如何使用行业标准的Gerber文件导出用于制造。 | ||
- | |||
- | 5. 导入,允许您导入光谱自动路由和DXF(绘图交换格式)文件,包含CAD模型。DXF是Autodesk开发的一种格式。例如,使用它,您可以在类似Fusion 360的程序中创建PCB布局,并将其导入KiCad。 | ||
- | |||
- | 6. Export,允许您将布局数据导出到spectrum、GenCAD(用于PCB制造和测试的文件格式)、IDFv3 (PCB文件格式)等。这些文件格式使得KiCad PCB项目可以与其他CAD软件一起使用。除非您需要与第三方CAD软件进行交互操作,否则不太可能需要冒险进入此菜单。 | ||
- | |||
- | 7. Archive footprint提供了将布局中找到的footprint打包到项目目录中的能力,这样您就可以与协作者共享项目。您的合作者将能够与您的项目一起工作,即使他们碰巧没有安装所需的足迹库。 | ||
- | |||
- | 接下来让我们看看编辑菜单中的功能。 | ||
- | |||
- | 编辑 | ||
- | 在图9.96中,你可以看到编辑菜单的内容。 | ||
- | |||
- | 在“编辑”菜单中,你可以看到标准的“撤消”、“重做”、“删除”和“查找”按钮,但除此之外,还有几个更值得仔细查看的按钮。 | ||
- | 总而言之: | ||
- | •全局删除,它允许您删除一个特定的所有项目 | ||
- | 种类 | ||
- | •Cleanup Tracks和Vias,可以让你清理散落的物品, | ||
- | 比如不相连的轨道和多余的通道。 | ||
- | •移动和交换层,它允许你交换任何层 | ||
- | 其他层。 | ||
- | •设置Footprint Field size,它允许你设置默认属性 | ||
- | 足迹文本值。 | ||
- | “全局删除”窗口提供了一种快速而有效的方法 | ||
- | 从布局中移除所有特定类型的项。这是您很少使用的功能之一,但当您需要它们时,它会为您节省很多时间。虽然这是一种删除项的通用方法,但请记住,您仍然可以访问撤消功能,因此如果您犯了错误,您可以恢复您的工作。 | ||
- | 当您使用全局删除时,请尽量有选择性。选择“Clear board”单选按钮将删除布局中的所有内容。选择“文本”将只删除文本项目。您也可以将您的选择应用到特定的层或所有层。 | ||
- | |||
- | |||
- | 清理轨道和via窗口可以帮助我们快速清理剩下的轨道和via。试试这个实验。在你的LED和电阻布局,添加一些流浪轨道。当你铺设一个轨道,键入'V'添加一个via,并继续绘制。双击以结束绘制。不要将散乱的轨道连接到任何垫子上。这就是它“流浪”的原因。现在,通过点击编辑和清理轨道和via打开清理选项窗口。保持当前的默认选项不变,然后单击OK。 | ||
- | 你刚才添加的偏离轨道和通道应该消失。 | ||
- | |||
- | 交换层功能(图9.99)非常有用,当你想把所有的轨道从一个层转移到另一个层。例如,假设您想将所有的轨迹从前面的铜层(‘F.Cu’)移动到底部的铜层(‘B.Cu’)。 | ||
- | 要做到这一点,首先打开交换层窗口,点击编辑和交换层。然后,点击“…”',紧挨着' fcu '标签,然后从出现的小窗口中,选择'B.Cu',然后单击'x'按钮解散小窗口,然后单击确定。现在在你的LED和电阻布局中尝试一下。看到(最初的红色轨道现在变成绿色了吗?这是因为轨道从前面的铜层转移到后面的铜层。 | ||
- | 要恢复轨道到前面的铜层,做相反的。回到交换图层窗口,点击“…”'按钮,然后从出现的小窗口中选择'F.Cu'。然后,解散小窗口并单击OK。 | ||
- | 在图9.100中,你可以看到设置文本字段窗口。宽度、高度和厚度属性控制在编辑器中如何呈现占用空间文本值。做一个小实验来看看这是如何工作的:在Pcbnew中加载简单的LED和电阻布局,打开设置文本大小窗口。改变宽度和高度为2,厚度为0.35。单击OK。您应该会看到,所有属于属性的文本项都将使用新属性重新绘制,并且看起来会比原来大两倍。要使它们回到原来的大小,将宽度和高度恢复为1,厚度恢复为0.15。 | ||
- | |||
- | 视图 | ||
- | 在图9.101中,你可以看到View菜单的内容。 | ||
- | 在“视图”菜单中,你可以看到熟悉的“缩放”、“适应”和“重绘”按钮,但除此之外,还有几个我想让你看看的按钮。 | ||
- | 1. 3D查看器,显示PCB的3D视图 | ||
- | 2. 显示Ratsnest,它显示所有未连接的网的列表 | ||
- | 印刷电路板的 | ||
- | 3.绘图模式,它允许您从各种图形选项中进行选择,这有助于您在繁忙的板上工作 | ||
- | 你已经多次使用过3D查看器(图9.102)。除了查看器的默认设置之外,您还应该了解其他几个特性。首先,尝试使用顶部菜单栏,它允许你放大/缩小、平移和旋转模型。 | ||
- | 你可以通过它的显示选项窗口来控制查看器的大部分呈现行为,你可以通过点击顶部工具栏的齿轮按钮来访问它(图9.103)。尝试各种选项,看看它们对模型渲染的影响。通过Preferences菜单有更多的呈现控件。 | ||
- | 另一个有用的功能是在“文件”菜单中。在那里,您可以将呈现的视图导出为PNG或JPEG图像文件。这是一个很好的方法来捕获高质量的渲染板,您可以插入到博客文章或文档中。 | ||
- | 设置 | ||
- | 设置菜单只包含两个项目,设计规则和图层设置。你可以在图9.104中看到Setup菜单。 | ||
- | |||
- | 这个菜单中最重要的两个项目是最上面的两个:图层设置和设计规则。您将在本书的所有项目中使用它们。您可以在接下来的几页中阅读这些项目的摘要。 | ||
- | 下面的四个项目允许您配置布局的次要方面,例如文本的默认外观,以及pad的默认配置。 | ||
- | |||
- | 让我们仔细看看这些。 | ||
- | 设计规则编辑器 | ||
- | 在Breadboard Power Supply和以后的项目中,您将花费大量时间学习如何使用设计规则编辑器。简单地说,这个编辑器允许您创建具有特定设计属性的网类。属于这些网的轨道,然后绘制与此属性的坚持。 | ||
- | 例如,您可以创建一个名为“PWR”的网络类,它通过直径和其他应该专门应用于属于该类的轨道的属性来指定轨道宽度。您可以创建另一个名为“SGN”的类,它为传递信号的轨道指定这些属性,而不是功率。这是有意义的,因为一个典型的信号轨道只需要传输几毫安的电流,而一个给电路元件供电的轨道将需要传输更多的电流。 | ||
- | |||
- | 在图9.105中,你可以看到Net Classes Editor的默认值。在我们简单的PCB中,只有一个网,它被分配给Default类。在以后的项目中,您将学习如何创建类和分配网到其中一个。 | ||
- | 在同一个图中,还有全局设计规则标签(图9.106)。 | ||
- | |||
- | 在那里,您可以创建自定义轨道和通过大小,并在顶部工具栏的下拉菜单中提供它们。通过这种方式,你可以使用特殊的大小来创建轨道和通道,这些大小可以覆盖它们所分配的类。 | ||
- | 层设置 | ||
- | 在图层设置(图9.107)中,你可以控制你想要的图层的数量,以及在某种程度上,这些图层的类型。 | ||
- | |||
- | Pcbnew可以生产多达32层铜层的pcb,这是在层设置窗口中可配置的。 | ||
- | 有多达四层pcb的预置,部件在前面,后面,或两者。当您尝试选择其中一个时,请注意每个层启用或禁用状态上的效果。例如,如果你选择“Two layers, parts on Front only”预设,你会注意到许多铜层是禁用的。如果你点击“OK”提交更改,这些图层将从图层管理器中消失,只显示启用的图层。 | ||
- | 您可以更改层配置,因为您正在您的PCB上工作。例如,您可能从一个2层的PCB开始,然后意识到您需要额外的层来完成路由。这不是问题。只需进入图层设置窗口,添加几个图层。 | ||
- | |||
- | 其他的设置选项 | ||
- | Setup菜单下面的四个选项包含: | ||
- | 1. 文本和图纸 | ||
- | 2. 默认填充属性 | ||
- | 3. 掩膜间隙垫片 | ||
- | 4. 微分对 | ||
- | 文本和绘图设置允许您为 | ||
- | 比如文本字符的宽度、高度和厚度,以及图形段的厚度(比如一条线或一条弧)。 | ||
- | |||
- | |||
- | I find the defaults in Figure 9.108 appropriate for most boards. | ||
- | The Default Pad Properties is fairly involved, but you only need a few options tweaked in relation to setting defaults (Figure 9.109). | ||
- | In the General tab, the pad type offers four choices: | ||
- | 1. Through-hole, best for using with through-hole components. This | ||
- | option creates a hole that is internally plated, with pads on either side so that components can be soldered. | ||
- | 2. SMD, suitable for SMD components. An SMD pad does not contain a hole. | ||
- | 3. Connector, which is similar to the SMD type, but is round and typically used as a contact for probes | ||
- | 4. NPTH, Mechanical, which is a non-plated through hole pad, suitable for creating mounting holes. | ||
- | If you choose 'Through-hole' as your default, you will also be able to specify the hole shape, as either oval or circular, and for each type, the exact dimensions. | ||
- | In the Local Clearance and Settings tab you can specify minimum clearances (Figure 9.110). I prefer to keep the values there at 0 so that the footprints in my projects inherit these values from their parent footprints. | ||
- | The Pads Mask Clearance window (Figure 9.111) allows you to control the pad mask clearance. The mask is the thin layer of non-conductive materials that covers the front and back of the board and also prevents solder from creating bridges between pads. The values you use here control how much of the pad will be covered with the masking material. If you cover too much, you will decrease the risk of solder bridges, but you will make soldering harder since there will be less of the pad exposed. | ||
- | Finally, the Differential Pair Dimensions allow you to control how close together will be drawn traces that belong to the same pair, and how wide each trace should be. | ||
- | |||
- | Place | ||
- | In Figure 9.113 you can see the contents of the Place menu. | ||
- | In the Place menu, you will find the same tools as in the right toolbar. Let’s not spend any more time here and move straight to the Route menu. | ||
- | |||
- | Route | ||
- | In Figure 9.114 you can see the contents of the Route menu. | ||
- | With the Single Track option, you can create regular tracks and vias. It is the option you will use most often. The rest of the tools in the Route menu are useful in advanced layouts that involve things such as high-frequency digital busses or analog circuits where the radio properties of the tracks must be taken into account. | ||
- | Let’s have a quick look at each one: | ||
- | 1. Single Track, allows you to create single tracks and vias. You have already used this tool in our simple LED and resistor project. | ||
- | 2. Differential Pair, allows you to route two tracks at the same time. KiCad identifies tracks that should be routed together based on the ending of their net names. In the current version 5, two tracks can be identified as a pair if their net names end with '+' and '-' respectively, and their start pads are adjacent to each other. While you are drawing the paired tracks, you can also create vias, for both at the same time. | ||
- | 3. Tune Track Length, allows you to adjust the exact length of a single track. This is useful if you want to control precisely the signal propagation time. | ||
- | 4. Tune Differential Pair Length, which is a function similar to Tune Track Length, but for a pair of tracks ('differential pair') at the same time. | ||
- | 5. Tune Differential Pair Skew/Phase, allows you to precisely control the clock skew of differential pairs, another consideration in high- frequency digital electronics design. Clock skew is a phenomenon in which the same clock signal arrives at slightly different times to its destination. The effect of this is that different parts of the circuit can end up operating at a slight clock offset, which is not desirable. Learn more about clock skew on Wikipedia. | ||
- | For example, we can use Differential Pairing for tracks that involve serial communications, such as the TX and RX tracks in a UART circuit, or the MISO and MOSI tracks in an SPI circuit. You can learn more about differential pairs in the recipe titled '44. How to use differential pairs'. | ||
- | |||
- | Interactive Routing | ||
- | Interactive routing is one of the most important features of Pcbnew. It makes drawing tracks quick and efficient. | ||
- | It helps you create tracks while avoiding items in the layout that can’t be moved, or moving them (the term is 'shove') if they are movable. | ||
- | Let’s do an experiment with Interactive routing. Open the simple LED and resistor layout, and delete the track that connects pad 2 of the LED and pad 1 of the resistor. In Figure 9.115, I have deleted the track. To make the layout easier to read, I have disabled the front and back silkscreen layers by unchecking F.SilkS and B.SilkS in the Layer Manager. | ||
- | |||
- | The ratsnest line between the LED and resistor is telling us that this track must be implemented. Type the 'X' hotkey to enter the track drawing mode. Place your mouse cursor in the middle of pad 2 of the LED. Move your mouse towards the screw terminal footprint, and notice how the track that the router leaves behind does not intersect any other tracks and goes around pads. Try to finish the drawing by double-clicking on pad 1 of the resistor. You can see my, admittedly terrible, design in Figure 9.116. | ||
- | |||
- | In Figure 9.116, I have highlighted the new net using the 'Highlight Net' button in the right toolbar. Of course, this new net is a very poor design since it is much longer than necessary, with a lot of corners. In PCB design, we aim to create tracks that are as short as possible, with as few corners as possible. More about PCB design principles later. | ||
- | The point of this example is that as I was moving my mouse pointer through a particular path, the Interactive Router was able to find a way to place the track without violating any of the design rules. | ||
- | You have fine control over the designer through the context menu Figure 9.117. | ||
- | |||
- | You can change these setting at any time, even during the drawing of a track. I usually set the Mode to 'Walk around', which produces a result similar to the one you see in Figure 9.116. As long as you choose a sensible path with your mouse, the interactive router will produce a sensible track. You can also try out the Shove mode. With Shove mode on, the interactive router will push over any items that are not explicitly fixed on the layout. You can have footprints on a fixed position by locking them through their properties and then allow for existing tracks and vias to be moved by the router as needed for laying new tracks. It is work spending some time to get used to this feature, as it is powerful and it will make your work with KiCad much more efficient in comparison to drawing in Default mode without Interactive Routing. | ||
- | In Figure 9.117 I have selected the option 'interactive drag' for the mouse drag behaviour. This allows me to use the 'G' hotkey to drag a track to a new position without breaking it (which is the 'move' operation). Beware that you can drag a track by clicking on it to select it and then dragging to move it. The ‘G’ hotkey is a shortcut meant to save you one click. This way I can re-arrange a track that I or the Interactive Router created, without having to repair broken connections. When using the 'Move' method, the typical result is that a single segment of a track is moved, and its connection to the rest of the net is broken, which needs to be repaired. | ||
- | Another powerful feature of the Interactive Router is the ability to redefine a segment of the track or the full track without having to manually delete the original. You simply type 'X' to start the track drawing process, and you draw the start and end of the new track or track segment. When you double-click to finish the drawing process, the Interactive Router will automatically remove the old track or track segment, as it is now redundant. | ||
- | Let’s use this feature to repair my awful track from Figure 9.116. Type 'X' and click on pad 2 of the LED to start a new track. You can also start the drawing at another position of the existing track is you want to redefine a segment of the track instead of the complete track (Figure 9.118). | ||
- | |||
- | Then, move your mouse on pad 1 of the resistor and double-click to complete the drawing. The new track is created, and the old track is automatically deleted (Figure 9.119). | ||
- | |||
- | It is worth spending some time here to get used to these capabilities of the Interactive Router. We will be using it extensively in the projects that will follow. | ||
- | Inspect | ||
- | The Inspect menu (Figure 9.120) includes functions for looking into nets, measuring distances on the sheet, and launching the design rules checker. You can do the latter two by using buttons in the top and right toolbars.、 | ||
- | |||
- | The List Nets options give you a list of the nets that are present in the PCB. In Figure 9.121, you can see the Nets window. You can type in the name of the net you want to inspect in the filter box or click on the net row. In Pcbnew, whichever net you select will be highlighted. | ||
- | |||
- | In Figure 9.122 you can see the GND net that I selected in Figure 9.121, highlighted with a high-contrast colour. This makes it easy to see how the selected net is routed. | ||
- | |||
- | With the Measure tool, you can measure distances on your board (Figure 9.123). Notice that there is a keyboard shortcut for this tool. Just click to start measuring distance and angle, and click again to end. You can use this | ||
- | tool by clicking on the Measure tool button from the right toolbar ( ). | ||
- | |||
- | Finally, you can start the design rules check by clicking on the Design Rules Checker option in the Inspect menu, or by clicking on the bug button from the top toolbar ( ). Either way, the DRC window will come up (Figure 9.124). | ||
- | |||
- | The DRC tool will check for problems in your PCB, such as unconnected nets, or traces that are too close to other traces. You will become very familiar with this essential tool as you practice working on the projects in this book. | ||
- | Tools | ||
- | All but one of the items in the Tools menu are available in the top toolbar. You can see the Tools menu in Figure 9.125. | ||
- | |||
- | Here is a summary of the items in the Tools menu. | ||
- | 1. Load Netlist, allows you to import the Netlist file from | ||
- | Eeschema. | ||
- | 2. Update PCB from Schematic is an alternative to the Netlist. If | ||
- | you make changes to the schematic after you begin work in Pcbnew (perhaps you have added a new symbol, or fixed the wiring), you can choose the Update function to automatically annotate the symbols, create the new netlist, | ||
- | |||
- | and import it into Pcbnew. I am very used to working with the Netlist directly, so I don’t use the Update function, however, I suggest you give it a go as it can speed up your work. | ||
- | 3. Set Layer Pair, is useful in boards with 4 or more layers. It allows you to choose which layer should be connected when you create a via. | ||
- | 4. Update Footprints from Library, will check for updated versions of the footprints that exist in your layout, and apply them. This saves you doing this work manually, as was the case with older versions of KiCad. | ||
- | 5. External Plugins allows you to extend the capabilities of KiCad through Python scripts. | ||
- | I’d like to take a closer look at the Set Layer Pair option. | ||
- | Let’s start with the Layer Pairs option. When you work with PCBs that contain more than 2 layers, say 4, or more, you can configure which of these layers should be considered pairs when you create vias. You can configure the Layer Pairs using the Select Copper Layer Pair window. When you are working on a 2-layer board, the Select Copper Layer Pair window looks like the example in Figure 9.126. There’s not much to do here, and the only option is to pair the top and bottom layers. Now, when you create a via, a track from the top layer will continue to the bottom layer, and vice versa. The 'x' marks the selected layer. | ||
- | |||
- | Change your board configuration so that it is a four-layer board. You can do that through the Design Rules menu (we will look at this in more detail in the next segment). Bring up the Layers Setup window, and change the number of layers to 4 (Figure 9.127). | ||
- | |||
- | Now open the Select Copper Layer Pair window again. It will look like the example in Figure 9.128. | ||
- | |||
- | In this example, I have set the pairs to be the front copper and the first inner copper layers. With this configuration, when I create a via, a track that starts in the top copper layer will continue in the first inner copper layer, and vice-versa. | ||
- | Please switch your board back to a two-layer configuration now before continuing. | ||
- | |||
- | Preferences | ||
- | Through the Preferences menu, you can control various aspect of the operation of Pcbnew (Figure 9.129). | ||
- | |||
- | You will be using most of the items in the Preferences menu as you work through the projects in this book, but following is a summary: | ||
- | 1. Manage Footprint Libraries Wizard, allows you to import footprint libraries. Once a new library is imported, you can use its footprints in your layout. You will learn how to use this tool in a later project in this book. There is also a recipe that explains how to do this; look for the one titled '21. Adding a footprint library in Pcbnew'. | ||
- | 2. Configure Paths, allows you to configure the locations of symbol, footprint, and 3D shape libraries. You can also access the path configuration window from the main KiCad window. Look at the Kicad documentation for details on the roles of the environment variables and the paths that they point to.7 | ||
- | 3. Add 3D Shapes Libraries Wizard, allows you to download 3D shapes from KiCad’s own repository and 3rd party repositories that are used in Pcbnew’s 3D Preview. You can learn how to do this by reading the recipe titled '55. How to install 3D shapes'. | ||
- | 4. General settings, allow you to control a variety of aspect of Pcbnew’s operation, such as the frequency of the autosave function, the measurement units and type of coordinate system used. | ||
- | 5. Display options, allow you to control Pcbnew operations details such as the use of accelerated graphics, the grid style and how net names are displayed. | ||
- | 6. Set Language, allows you to change the language used in the Pcbnew user interface. | ||
- | |||
- | 7. Hotkeys Options, allows you to customise the various hotkeys, as you learned earlier. | ||
- | 8. Save and Load project File allows you to save the .pro file that contains information about the project (but not the layout and schematic files, since that information is stored as individual files). | ||
- | 9. There are recipes that cover the usage of the libraries wizard and the 3D shapes wizard. In the next few pages, you'll take a closer look at some of the other options in the Preferences menu. | ||
- | General | ||
- | Through the General Setting window (Figure 9.130), you can configure much of the behaviour of Pcbnew. | ||
- | Here, you can control the drawing behavior of Pcbnew. For example, you can make tracks and pads 'magnetic' so that as you draw a new track, it will 'stick' to a pad when you mouse your mouse close enough, ensuring an electrical connection. | ||
- | You can control autosave, select your preferred coordinate system and unit of measurement, the shape of the course, and much more. | ||
- | I find that the default settings work well and rarely make any customisations here. | ||
- | Display | ||
- | Similarly to the General Settings window, the Display Options window (Figure 9.131) allows you to control the graphical attributes of Pcbnew. | ||
- | |||
- | For example, you can choose if you would like to show pad numbers and footprint outlines, net names, and track clearances. | ||
- | Again, the default settings are reasonable and I prefer not to make any modification to the Display options. | ||
- | Language | ||
- | The Language option allows you to choose one of 19 languages available for KiCad’s user interface. Whichever language you choose, must also be supported by the locale of your operating system (Figure 9.132). | ||
- | |||
- | Hotkeys | ||
- | You have learned about the Hotkeys options in earlier segments of this book. You know that you can show the current hotkeys by selecting Preferences, Hotkeys, and List Current Keys and that you can set up your own hotkeys through Preferences, Hotkeys and Edit Hotkeys. | ||
- | You can also import and export hotkeys from the same menu item, which is a good way to ensure that you have the same settings across the computers where you use KiCad. | ||
行 313: | 行 103: | ||
<WRAP half column> | <WRAP half column> | ||
- | 下一节:[[addpart2kicadsch|第20节:添加一个电容到已经设计好的原理图中]] | + | 下一节:[[addpart2kicadsch|第20节:添加一个开关到已经设计好的原理图中]] |
</WRAP> | </WRAP> | ||
</WRAP> | </WRAP> | ||