差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
kicad电路板布局布线 [2018/10/05 21:28]
gongyu [1. Pcbnew的使用]
kicad电路板布局布线 [2018/10/06 01:00] (当前版本)
gongyu [1. Pcbnew的使用]
行 16: 行 16:
 接下来我们来看看KiCad中的Pcbnew是如何执行这些过程的。 接下来我们来看看KiCad中的Pcbnew是如何执行这些过程的。
 ===== 1. Pcbnew的使用 ===== ===== 1. Pcbnew的使用 =====
-1. 从KiCad项目理处,单击Pcb布局编辑器图标{{:​pcbnew.png|}}。 Pcbnew窗口将打开。 如果您收到错误消息,指出*.kicad_pcb文件不存在并询问您是否要创建它,只需单击是+1. **执行程序** - 从KiCad项目理处,单击//Pcb layout editor//​(PCB布局编辑器图标{{:​pcbnew.png|}}启动Pcbnew窗口。 ​
  
-2. 先输入一些原理图信息。 单击顶部工具栏上的页面设置图标{{:​sheetset.png|}}。 ​将适当的纸张尺寸(A4,​8.5x11等)和标题设置为Tutorial1。+2. **设置页面信息** - 先输入一些原理图信息。 单击顶部工具栏上的//Page setting//​(页面设置图标{{:​sheetset.png|}}。设置//​Page size//(纸张大小)为(A4, 8.5x11等)和title(标题//Tutorial1//
  
-3. 最好将间隙和最小轨道宽度设置PCB制造商要求度。 通常可以将间隙设置为0.25,将最小轨道宽度设置为0.25。 单击设置→设计规则菜单。 如果它尚未显示, 请单击“网络类编辑器”选项卡。 将窗口顶部的“清除”字段更改为0.25,将“轨道宽度”字段更改为0.25,如下所示。 ​这里的测量单位是mm。+3. **设置布局布线规则** - 根据PCB制造商提供的要求,来设间距、最小线一般来讲可以将间距和最小线宽度设置为0.25mm。 单击**Setup**(设置→ **Design Rules**(设计规则菜单来设置各个参数,这里的单位是mm。
 {{ :​design_rules.png |}} {{ :​design_rules.png |}}
  
-4. 单击“全局设计规项卡,将“最小轨道宽度”设置为0.25。 单击“确定”按钮以提交更改并关闭“设计规则编辑器”窗口+4. **导入网表文件** -  ​单击顶部工具栏上的//​Read netlist//​(读入网表)图标 {{:​netlist.png|}}。 如果是从//​Eeschema//​创建的,可以在//​Netlist//​文件字段中择网表文件//​tutorial1.net//​进行读取。 
  
-5. 现在我们将导入网表。 单击顶部工具栏上Read netlist icon {{:netlist.png|}}。 如果是从Eeschema创建,则应在Netlist文件字段选择网表文件tutorial1.net。 单击“读取当前网表”。 然后单击“关闭”按钮+5. **查看并移动基于网表导入的器** - 在页面中应该能够看到原理图中定义了封装所有器件,这些器件都通过称为ratsnest的一组细线连接 - 你可以通过//​Show/​hide board ratsnest//​(显示/​隐藏电路板网络)按钮{{:general_ratsnest.png|}}来查看所有器件之间的连接关系,如果你发现这些细线连接跟电路原理图原本设计的有出入,就要回去查看一下是哪一个地方出了问题
  
-6. 现在应该可以看到所有组件。 选择它们并按照鼠标光标。 +6. **调整器件的位置** - 可以鼠标选中这些器并进行移动,可以将鼠标悬停你要移动的件上并按[m]来移动它们,然后单击要放置它们的位置将其放好可以通过单击选择件然后拖动它。按[r]可以旋转件。
- +
-7. 将组件移动到板的中间。 如有必要可以在移动组件时放大和缩小。 单击鼠标左键。 +
- +
-8. 所有组件都通过称为ratsnest一组细线连接。确保按下显示/​隐藏板鼠标按钮{{:​general_ratsnest.png|}}。通过这种方式,您可以看到ratnest链接所有组。 +
- +
-9. 您可以通过将每个组件悬停在其上并按[m]来移动它们单击要放置它们的位置。或者可以通过单击选择件然后拖动它。按[r]旋转。移动所有组件,直到最小化电线交叉的数量+
 {{ :​gsik_tutorial1_080.png |}} {{ :​gsik_tutorial1_080.png |}}
  
-注意100欧姆电阻的一个引脚如何连接到PIC组件的引脚6。这是用于连接引脚的标记方法的结果。标签通常比实际的电线更受欢迎,因为它们使原理图更加杂乱。 +7. **定义PCB外沿** - 从顶部工具栏的下拉菜单中选择//Edge.Cuts//图层。单击右侧工具栏上的//Add graphic lines//(添加图形线图标{{:​add_dashed_line.png|}}。然后用走线圈定PCB的边缘,记住在绿色边缘和PCB边缘之间留一个小间隙。 
- +{{ :select_edge_cuts.png |}}
-现在我们将定义PCB的边缘。从顶部工具栏的下拉菜单中选择Edge.Cuts图层。单击右侧工具栏上的添加图形线图标{{:​add_dashed_line.png|}}。跟踪电路板边缘,点击每个角落,并记住在绿色边缘和PCB边缘之间留一个小间隙。 +
- +
- +
-Select the Edge.Cuts layer +
- +
-Next, connect up all the wires except GND. In fact, we will connect all GND connections in one go using a ground plane placed on the bottom copper (called B.Cu) of the board. +
- +
-Now we must choose which copper layer we want to work on. Select F.Cu (PgUp) in the drop-down menu on the top toolbar. This is the front top copper layer. +
- +
-接下来,连接除GND之外的所有电线。 事实上,我们将使用放置在电路板底部铜线(称为B.Cu)上的接地层一次连接所有GND连接。 +
- +
-现在我们必须选择我们想要处理的铜层。 在顶部工具栏的下拉菜单中选择F.Cu(PgUp)。 这是前顶部铜层。 +
- +
- +
-Select the Front top copper layer +
- +
-If you decide, for instance, to do a 4 layer PCB instead, go to Setup → Layers Setup and change Copper Layers to 4. In the Layers table you can name layers and decide what they can be used for. Notice that there are very useful presets that can be selected via the Preset Layer Groupings menu. +
- +
-Click on the Route tracks icon  add_tracks_png on the right toolbar. Click on pin 1 of J1 and run a track to pad R2. Double-click to set the point where the track will end. The width of this track will be the default 0.250 mm. You can change the track width from the drop-down menu in the top toolbar. Mind that by default you have only one track width available. +
- +
-例如,如果您决定使用4层PCB,请转到设置→图层设置并将铜图层更改为4.在图层表中,您可以命名图层并确定它们的用途。 请注意,可以通过“预设图层分组”菜单选择非常有用的预设。 +
- +
-单击右侧工具栏上的Route tracks图标{{:add_tracks.png|}}。 单击J1的第1针并运行轨道以填充R2。 双击以设置轨道结束的点。 此轨道的宽度将默认为0.250 mm。 您可以从顶部工具栏的下拉菜单中更改轨道宽度。 请注意,默认情况下,您只有一个可用的轨道宽度。 +
- +
-pcbnew_select_track_width_png +
- +
-If you would like to add more track widths go to: Setup → Design Rules → Global Design Rules tab and at the bottom right of this window add any other width you would like to have available. You can then choose the widths of the track from the drop-down menu while you lay out your board. See the example below (inches). +
- +
-如果要添加更多轨道宽度,请转到:设置→设计规则→全局设计规则选项卡,然后在此窗口的右下角添加您希望可用的任何其他宽度。 然后,您可以在布置电路板时从下拉菜单中选择轨道的宽度。 请参见下面的示例(英寸)。 +
- +
-custom_tracks_width_png +
- +
-Alternatively,​ you can add a Net Class in which you specify a set of options. Go to Setup → Design Rules → Net Classes Editor and add a new class called power. Change the track width from 8 mil (indicated as 0.0080) to 24 mil (indicated as 0.0240). Next, add everything but ground to the power class (select default at left and power at right and use the arrows). +
- +
-If you want to change the grid size, Right click → Grid. Be sure to select the appropriate grid size before or after laying down the components and connecting them together with tracks. +
- +
-Repeat this process until all wires, except pin 3 of J1, are connected. Your board should look like the example below. +
- +
-或者,您可以添加一个Net Class,在其中指定一组选项。 转到设置→设计规则→网络类编辑器,然后添加一个名为power的新类。 将轨道宽度从8密耳(表示为0.0080)更改为24密耳(表示为0.0240)。 接下来,将除地面之外的所有内容添加到功率等级(在左侧选择默认值,在右侧选择电源并使用箭头)。 +
- +
-如果要更改网格大小,请右键单击→网格。 在放下组件并将它们与轨道连接在一起之前或之后,请务必选择合适的网格尺寸。 +
- +
-重复此过程,直到连接除J1的引脚3之外的所有电线。 您的电路板应如下所示。 +
- +
-gsik_tutorial1_090_png +
- +
-Let’s now run a track on the other copper side of the PCB. Select B.Cu in the drop-down menu on the top toolbar. Click on the Route tracks icon  add_tracks_png . Draw a track between pin 3 of J1 and pin 8 of U1. This is actually not necessary since we could do this with the ground plane. Notice how the colour of the track has changed. +
- +
-Go from pin A to pin B by changing layer. It is possible to change the copper plane while you are running a track by placing a via. While you are running a track on the upper copper plane, right click and select Place Via or simply press [v]. This will take you to the bottom layer where you can complete your track. +
- +
-现在让我们在PCB的另一个铜侧上运行轨道。 在顶部工具栏的下拉菜单中选择B.Cu。 单击Route tracks图标{{:​add_tracks.png|}}。 在J1的引脚3和U1的引脚8之间画一条轨道。 这实际上没有必要,因为我们可以用地平面做到这一点。 注意轨道的颜色是如何变化的。 +
- +
-通过更改图层从引脚A转到引脚B. 通过放置通道可以在运行轨道时更改铜平面。 当您在上部铜平面上运行轨道时,右键单击并选择“放置Via”或只需按[v]。 这会将您带到底层,您可以在其中完成曲目。 +
- +
-place_a_via_png +
- +
-When you want to inspect a particular connection you can click on the Highlight net icon  net_highlight_png on the right toolbar. Click on pin 3 of J1. The track itself and all pads connected to it should become highlighted. +
- +
-Now we will make a ground plane that will be connected to all GND pins. Click on the Add filled zones icon  add_zone_png on the right toolbar. We are going to trace a rectangle around the board, so click where you want one of the corners to be. In the dialogue that appears, set Default pad connection to Thermal relief and Outline slope to H,V and 45 deg only and click OK. +
- +
-Trace around the outline of the board by clicking each corner in rotation. Finish your rectangle by clicking the first corner second time. Right click inside the area you have just traced. Click on Zones→'​Fill or Refill All Zones'​. The board should fill in with green and look something like this: +
- +
-如果要检查特定连接,可以单击右侧工具栏上的突出显示网络图标{{:​net_highlight.png|}}。 点击J1的第3针。 轨道本身和连接到它的所有打击垫都应突出显示。+
  
-现在我们将制作一个连接到所有GND引脚的地层。 单击右侧工具栏上的“添加填充区域”图标add_zone_png。 我们将在棋盘周围跟踪个矩形,因此单击您想其中一个角的位置。 ​在出现的对话框中,将默认打击垫连接设置为“热释放”并将“轮廓坡度”设置为仅限H,V和45度,然后单击“确+8. **布线** - 一般来讲我们都会在电路板上通过大面积铺设地平面的方式将所有GND进行连,因此在布线的时候可以先不用考虑GND这个网络上的连线电路板的外表面有两层 - F.Cu(顶层,我们也称为Top Layer)和B.Cu(底层,我们也称为Bottom Layer),两层板般选择在B.Cu层铺设大面积的地平面,因为F.Cu层主用于放元器件如果设计需要用到4层板可以转到//​设置→图层设置//​将铜图层改4. 你可以在图层表中设置需要的图层并对它们的用途做设定。
  
-通过单击旋转中每个角来跟踪板轮廓。 通过第二次击第一个角完成矩形。 右键单击您刚刚跟踪的区域。 单击区域→'​填充或重新填充所有区域'​。 董事会应填写绿色看起来像这样+布线时候我们先从F.Cu开始,在顶部工具栏下拉菜中选择F.Cu(PgUp)如图 
 +{{ :​select_top_copper.png |}}
  
-{{:gsik_tutorial1_100.png| }}+单击右侧工具栏上的//​Route tracks//​(布线)图标{{:add_tracks.png|}}。 单击J1的第1个引脚连线到R2的焊盘,双击鼠标结束连线。 此走线的宽度将默认为0.250mm,你也可以从顶部工具栏的下拉菜单中更改走线的宽度。 默认只有一个走线宽度。 
 +{{ :​pcbnew_select_track_width.png |}} 
 +如果要添加更多走线宽度,可以通过//​设置→设计规则→全局设计规则选项//​卡,在此窗口的右下角添加任何其它你需要的宽度,这样在后面布线的时候你可以根据需要随时从下拉菜单中选择走线的宽度。 请参见下面的示例(单位为英寸)。 
 +{{ :​custom_tracks_width.png |}}
  
-Run the design rules checker by clicking on the Perform design rules check icon  drc_png on the top toolbarClick on Start DRC. There should be no errors. Click on List Unconnected. There should be no unconnected items. Click OK to close the DRC Control dialogue.+你也可以通过添加一个Net Class来设定一组选项。 转到**设置→设计规则→网络类别编辑器**,添加一个名为power的新类别。 将走线的宽度从8mil(表示为0.0080)改为24mil(表示为0.0240)。 接下来将除GND之外的所有网络都添加到Power类别(在左侧选择默认值,在右侧选择电源并使用箭头)。
  
-Save your file by clicking on File → Save. To admire your board in 3D, click on View → 3D Viewer.+重复此过程,直到连接除J1的引脚3之外的所有连线。 电路板应如下所示。 
 +{{ :​gsik_tutorial1_090.png |}}
  
-单击顶部工具栏的执行设计规则检查图标drc_png设计规则检查器。 单击Start DRC。 应该没有错误。 单击List Unconnected列表。 应该没有未连接的项目。 ​单击“确定”关闭“DRC控制”对话框+9. **通过过孔进行跨层走线** - 走线一般都用到2层以上,跨层走线就需要用到**过孔**进行连接,比如在顶层(Top Layer)铜平面上走线时,右键单击并选择//​Place Via//​(放置过孔)或只需按[v],走线就改到了底层铜平面 
 +{{ :​place_a_via.png |}}
  
-单击文件→保存以保存文件。 ​以3D方式欣赏您的电路板单击→3D查看器+10. **高亮网络进行检查** - 如果检查特定连接可以单击右侧工具栏上的高亮网络标{{:​net_highlight.png|}}。 点击J1的第3针,连线本身和连接到它的所有焊盘都会被高亮显示出来
  
-{{:pcbnew_3d_viewer.png| }}+11. **铺设地平面** - 在前面的连线中对所有与GND网络相连的连接都不做处理,最后通过铺设一个覆盖整个PCB板的地平面,再将所有器件上的GND管脚进行连接。具体的做法就是单击右侧工具栏上的//​Add filled zone//​(添加填充区域)图标{{:add_zone.png|}},在电路板上走线画一个矩形框,将会在板子上铺设大面积的铜用作地线的连接,板子铺设之后的效果: 
 +{{ :​gsik_tutorial1_100.png |}}
  
-You can drag your mouse around to rotate the PCB.+12**设计规则检查** - 单击顶部工具栏上的//​Perform design rules check//​(执行设计规则检查)图标{{:​drc.png|}}启动设计规则检查,这个过程非常重要,能够确保你最后的布局、布线符合原理图的设计以及设定的布局布线规则。
  
-Your board is completeTo send it off to a manufacturer you will need to generate all Gerber files.+26**3D查看** - 3D查看是非常重要的一个功能,能够帮助你对自己设计的板子有个空间的概念,有些问题只有通过3D查看才能发现,比如装配方面的冲突等,具体的操作很简单 - 单击View →3D Viewer。 
 +{{ :​pcbnew_3d_viewer.png |}}
 ===== 2. 生成和查看Gerber文件 ===== ===== 2. 生成和查看Gerber文件 =====