**这是本文档旧的修订版!**

1. KiCad介绍

KiCad是一种免费、开源的EDA设计工具,它能够创建电路原理图并进行PCB布局布线,它具有一个集成化的开发环境,在其之下KiCad包含了如下非常精致、独立的软件工具。

程序名字 描述 文件扩展名
KiCad 项目管理

The Python script presented here is a very powerful tool for manipulating both pin numbers and pin labels. Mind, however, that all its power comes for the arcane and yet amazingly useful Regular Expression syntax: http://gskinner.com/RegExr/.

8. Make component footprints

Unlike other EDA software tools, which have one type of library that contains both the schematic symbol and the footprint variations, KiCad .lib files contain schematic symbols and .kicadmod files contain footprints. Cvpcb is used to map footprints to symbols. As for .lib files, .kicadmod library files are text files that can contain anything from one to several parts. There is an extensive footprint library with KiCad, however on occasion you might find that the footprint you need is not in the KiCad library. Here are the steps for creating a new PCB footprint in KiCad: 8.1. Using Footprint Editor From the KiCad project manager start the Pcbnew tool. Click on the Open Footprint Editor icon editmodulepng on the top toolbar. This will open the Footprint Editor. We are going to save the new footprint MYCONN3 in the new footprint library myfootprint. Create a new folder myfootprint.pretty in the tutorial1/ project folder. Click on the Preferences → Footprint Libraries Manager and press Append Library button. In the table, enter “myfootprint” as Nickname, enter “${KIPRJMOD}/myfootprint.pretty” as Library Path and enter “KiCad” as Plugin Type. Press OK to close the PCB Library Tables window. Click on the Select active library icon openlibrarypng on the top toolbar. Select the myfootprint library. Click on the New Footprint icon newfootprintpng on the top toolbar. Type MYCONN3 as the footprint name. In the middle of the screen the MYCONN3 label will appear. Under the label you can see the REF* label. Right click on MYCONN3 and move it above REF. Right click on REF_*, select Edit Text and rename it to SMD. Set the Display value to Invisible. Select the Add Pads icon padpng on the right toolbar. Click on the working sheet to place the pad. Right click on the new pad and click Edit Pad. You can also use [e]. Pad Properties Set the Pad Num to 1, Pad Shape to Rect, Pad Type to SMD, Shape Size X to 0.4, and Shape Size Y to 0.8. Click OK. Click on Add Pads again and place two more pads. If you want to change the grid size, Right click → Grid Select. Be sure to select the appropriate grid size before laying down the components. Move the MYCONN3 label and the SMD label out of the way so that it looks like the image shown above. When placing pads it is often necessary to measure relative distances. Place the cursor where you want the relative coordinate point (0,0) to be and press the space bar. While moving the cursor around, you will see a relative indication of the position of the cursor at the bottom of the page. Press the space bar at any time to set the new origin. Now add a footprint contour. Click on the Add graphic line or polygon button addpolygonpng in the right toolbar. Draw an outline of the connector around the component. Click on the Save Footprint in Active Library icon savelibrarypng on the top toolbar, using the default name MYCONN3. ====== 9. Note about portability of KiCad project files ====== What files do you need to send to someone so that they can fully load and use your KiCad project? When you have a KiCad project to share with somebody, it is important that the schematic file .sch, the board file .kicadpcb, the project file .pro and the netlist file .net, are sent together with both the schematic parts file .lib and the footprints file .kicadmod. Only this way will people have total freedom to modify the schematic and the board. With KiCad schematics, people need the .lib files that contain the symbols. Those library files need to be loaded in the Eeschema preferences. On the other hand, with boards (.kicadpcb files), footprints can be stored inside the .kicadpcb file. You can send someone a .kicadpcb file and nothing else, and they would still be able to look at and edit the board. However, when they want to load components from a netlist, the footprint libraries (.kicadmod files) need to be present and loaded in the Pcbnew preferences just as for schematics. Also, it is necessary to load the .kicadmod files in the preferences of Pcbnew in order for those footprints to show up in Cvpcb. If someone sends you a .kicadpcb file with footprints you would like to use in another board, you can open the Footprint Editor, load a footprint from the current board, and save or export it into another footprint library. You can also export all the footprints from a .kicadpcb file at once via Pcbnew → File → Archive → Footprints → Create footprint archive, which will create a new .kicadmod file with all the board’s footprints. Bottom line, if the PCB is the only thing you want to distribute, then the board file .kicadpcb is enough. However, if you want to give people the full ability to use and modify your schematic, its components and the PCB, it is highly recommended that you zip and send the following project directory: tutorial1/ |– tutorial1.pro |– tutorial1.sch |– tutorial1.kicadpcb |– tutorial1.net |– library/ | |– myLib.lib | |– myOwnLib.lib | -- myQuickLib.lib | |– myfootprint.pretty/ | -- MYCONN3.kicad_mod | -- gerber/ |– … -- … ====== 10. More about KiCad documentation ====== This has been a quick guide on most of the features in KiCad. For more detailed instructions consult the help files which you can access through each KiCad module. Click on Help → Manual. KiCad comes with a pretty good set of multi-language manuals for all its four software components. The English version of all KiCad manuals are distributed with KiCad. In addition to its manuals, KiCad is distributed with this tutorial, which has been translated into other languages. All the different versions of this tutorial are distributed free of charge with all recent versions of KiCad. This tutorial as well as the manuals should be packaged with your version of KiCad on your given platform. For example, on Linux the typical locations are in the following directories, depending on your exact distribution: /usr/share/doc/kicad/help/en/ /usr/local/share/doc/kicad/help/en On Windows it is in: <installation directory>/share/doc/kicad/help/en On OS X: /Library/Application Support/kicad/help/en ===== 10.1. KiCad documentation on the Web ===== Latest KiCad documentations are available in multiple languages on the Web. http://kicad-pcb.org/help/documentation/