前面我们已经讲解过如何新建一个电阻元器件,那么接下来我们就要新建一个该电阻元器件在现实世界中的映射——封装(Footprint)。打开PADS Layout,执行如下步骤:
1、打开库管理器,选中新建的库ubug_lib,点击“封装”按钮后“新建”按钮变为可点击,如下图所示:

2、点击“新建”按钮进入封装编辑器,点击图形工具按钮,就会显示图形工具栏。常用的工具有焊盘、2D线、文本、禁止区域等,如下图所示:

3、点击焊盘,在弹出的添加端点对话框直接点确定,在原点处放置一个焊盘,如下图所示:



4、双击焊盘(如果选不了焊盘,则在空白处左击,然后再右击,在弹出的菜单中选择“随意选择”),显示“端点特性”,点击“焊盘栈”,显示“管脚的焊盘栈特性”窗口。如下图所示:



在“形状、尺寸、层”中可以选择焊盘的相关层,如果是通孔焊盘(直插器件),则如上图所示,包括贴装面、内层、对面;如果是贴片焊盘(表贴器件),则将内层和对面删除(同时下方的钻孔尺寸为0)。
在“参数”中,可以选择焊盘的形状,大小通过下方的“直径”控制(在矩形时就不是显示“直径”了),如下图所示:

“电镀”打钩,则钻孔有电气属性。
“插槽参数”是指焊盘通孔的形状、方向等参数,比如椭圆形通孔,如下图所示:

5、焊盘参数是需要根据元器件的数据手册来设计的,这里选择的电阻如下所示:

根据电阻的型号,查看电阻的尺寸,这里我们选用M02W,则我们电阻体L为16.5mm(以防万一,取最大),引线的直径d为0.7mm,根据这些我们就知道封装焊盘的过孔至少为0.7mm,两个焊盘直径的距离至少为16.5mm。
6、因为数据手册给出的参数都是以mm为单位的,所以将PADS Layout的单位修改为mm,点击“工具”—>“选项”,在选项对话框中选择常规,在右侧设计单位选择公制,点击确定,如下图所示:


7、修改焊盘的参数,如下图所示:

8、第二个焊盘,也以同样的方式放置,但是这样放置和第一个焊盘的距离不准确。这里我们使用自动放置的方式,选中第一个放置好的焊盘,右击,在弹出的对话框中选择分布和重复..。在弹出的对话框中,选择“线性”,方向选择“右”,数量为1,距离16.5,其余默认,点击确定。如下图所示:



这里需要注意的是焊盘的编号必须要和元器件的引脚编号对应,可以比元器件多但是不能少。修改焊盘编号的方法就是双击焊盘,在弹出的端点特性中可以修改,如下图所示:

9、焊盘设计好之后,就设计形状(就是PCB板上看到的元器件的白色线)。形状通过2D线设计,这个和元器件中一样。封装中的2D线可以放在顶层,也可以放在丝印层。默认是放在顶层的,因为在PCB设计中,顶层的显示优先级高不会被盖住,如果放在丝印层,在PCB设计的时候会被盖住。画好之后如下图所示:

10、点击保存,选择保存的库为ubug_lib,名称为M02W,点击确定,提示是否新建元件类型,选择否,因为我们在前面已经新建好了。如下图所示:


11、点击文件-->退出封装编辑器。如下图所示:

12、在库管理器中点击“元件”,会显示前面新建的电阻元器件RES,点击编辑,如下图所示:

13、在弹出元件信息对话框中,选择PCB封装,库选择ubug_lib,在左侧未分配的封装中,选择M02W,点击分配,则新建的封装M02W显示到右侧分配到电阻元器件。如下图所示:


14、再返回到库管理器中,点击“元件”,选中RES就可以看到上方有图形显示,就是显示新建的封装,如下图所示:

到这里封装新建完成,并成功分配给了电阻元器件,贴片封装也是类似的,区别主要在于焊盘的表贴的,这个在步骤4中有讲解。有任何疑问可以在下方留言。