KiCad入門教程

本文翻譯自:teholabs.com/knowledge/

是一篇Kicad的入門文章,說實話,我並不喜歡這個軟體,雖然我之前只用過protel,但是誰讓這個kicad是開源免費的呢?

雖然這篇文章是被kicad列為「入門文章」中的一員,但是我總感覺這篇文章太老了,好像有地方不太對的說。請用最多半個小時的事件看這篇文章,大概就夠了,不用花太長時間。翻譯成中文只是為了讓某些和我一樣英文不太好的能更快的看完此文。

水平有限有的地方實在是不知道是啥意思,只能猜了,見到有你不理解得地方請一定查看原文並評論告知我進行修改。

不過,我感覺並沒有人會看到這篇翻譯……

馬丹,紙糊又把圖片給弄沒了,我直接上傳md文件吧,看我外鏈裡面的內容吧,如果你沒有markdown閱讀器並且您看不慣堅果雲對於markdown文件的顯示的話,可以選擇使用下載html文件使用瀏覽器查看,不知道為啥typora生成pdf的功能並不能用,所以並沒有pdf格式的文件,這應該是最好閱讀格式了,可惜了,不過反正也沒人看……

markdown:jianguoyun.com/p/DaiPDd

html: jianguoyun.com/p/DQICMh

開始:

We are often asked what tools we use. We like to stick to free tools here at teho Labs. There are two good reasons to do this: one a large user base for GPL software helps insure it remains actively maintained, and two it saves a lot of money which keeps overheads low.

使用GPL的開源軟體的好處:1、使得開源軟體保持開發的活躍度。2、降低企業成本。

For the hobby community or small business there are essentially 3 choices for PCB layout: Eagle, gEDA and KiCad.

對於PCB愛好者和小商業硬體來說,通常來說有三個比較好的PCB製作的軟體可以來選擇:eagle,gEDA,KiCad。

While Eagle is certainly the most popular with people starting out we don』t think it is the best choice. Why you shouldn』t use Eagle? Eagle is fine for what it does. Cadsoft is nice to give away a free version for hobby use, but their license is non-commercial. What that means is you aren』t supposed to make things you are going to sell with it. That might sound fine if you are just starting out with PCBs, you might only want them for your own projects, but one day you might have a bright idea that you do want to sell something you made and then you are trapped. You won』t want to learn a new package and you won』t want to remake all your custom parts, so you will pay perhaps even 750 dollars to get what you need, it isn』t a good deal. What is more Eagle isn』t even a great CAD tool, the free version is restricted in many ways, as is the cheap light version.

雖然Eagle是大多數人的選擇,但是我們並不認為這是個最好的選擇。為什麼呢?雖然Eagle做的挺好的。但是它的開發商Cadsoft只是允許使用這個軟體創建用來『娛樂』的硬體,並不能用於商業用途。這意味著我們不能創作一個硬體拿去銷售。如果你只是剛開始入門學習製作PCB,或者只是做你自己的個人項目,這其實也不重要,但是如果你有一天有了一個好點子想去銷售這些東西,這就不行了。你不會想重新學一個新的軟體,也不想重新繪製你的板子,這個時候你就需要支付750美刀了,這不是一個好的交♂易。 然而Eagle也並不是一個最好的CAD軟體,免費的版本有著很多的限制,雖然它的體積很小吧。

Your other options are gEDA and KiCAD. gEDA is really a big electrical design tool suite that happens to do PCBs as such it isn』t all that integrated, this makes it harder to use than KiCAD.

你還可以使用gEDA或者KiCad。gEDA是一個非常大的電氣設計的軟體套裝,順便能畫PCB板,所以它整合的並不太好,這就導致了它使用起來比KiCad難用一點。

KiCAD is free, complete, has lots of footprints built in, and no restrictions on how you can use the designs you produce with it. It integrates with a free to use very nice autorouter for parts of the circuit that aren』t signal critical. It is GPL so it will always be free.

KiCad是一款免費、完整的軟體包括了一些列的元器件封裝,並且對於你的設計產品沒有任何的限制。它整合了一個免費的並且表現比較好的自動布元器件的工具(不是自動布線)(譯者註:WTF?這會啥意思?)。它還是GPL協議的,所以它總是有免費的版本可以用。

In this tutorial you will learn how to make a part, footprint, schematics and PCB layout. All of these skills are essential though it does make the tutorial a lot longer than it would be otherwise. We cover many items you will have to do only once as well. If you can get through the tutorial you will know enough KiCAD to start making lovely PCBs.

在這篇入門文章中你會學到如何製作原理圖元件、元件封裝、原理圖設計和PCB布局。所有的這些技巧都是必須的,這就使得這篇文章稍微有點長。這篇文章包含了你將會不得不做的一些設計部分。如果你能通讀完這篇文章你將會能夠製作很好的PCB板了。

For Eagle users it should be noted KiCAD is setup logically differently in that parts are not so closely linked with footprints. We find this a great feature for parts with multiple packages, some people find it annoying. We will show how it can be useful along the way.

對於Eagle用戶來說需要注意的一點是,KiCad剛開始使用時設計元器件和元器件封裝是邏輯上不同的事情。我們覺著這對於不同的包中獲取元器件來說是個很好的特性,但是對於某些人來說這或許有點煩人。我們將會在下文中展示這是很有用的。

First you』ll need KiCAD you can grab it here: http://www.kicad-pcb.org We will assume you are using Windows but on other platforms this should be nearly the same. Once you have downloaded it you can just install it on your system with the defaults.

你可以從 這裡下載這個軟體。在本文中我們假設你使用的是windows,但是實際上別的平台也差不多。下載安裝的過程保持默認就行。

The main KiCad window consists of 5 buttons. In order left to right the sub programs are:

KiCad的window中包含了五個按鈕,從左到右依次是:

  • eeSchema - a schematic program 設計原理圖的
  • CVpcb - a program linking schematics to footprints 將原理圖和元器件封裝連在一塊的
  • PCBnew - a PCB layout tool 設計PCB布局的工具
  • GerbView - a gerber viewer 一款查看gerber格式文件的工具
  • Bitmap2Component - a program for converting bitmaps for use on PCBs etc. 一款能把點陣圖轉化成能在PCB板中使用的一個工具

We like gerbv more than GerbView, and Bitmap2Component isn』t essential so we will just do the first 3.

我們喜歡使用gerbv而不是gerbview,而且bitmap2component也並不是必須的,所以我們只會用到前面三個工具。

In this tutorial we will make a simple PCB breadboard power supply including exporting gerbers for fabrication.

在這篇文章中我們將製作一個簡單的麵包板電源的PCB,並包括導出gerber文件去用於印刷製作這方面的內容。(譯者註:什麼叫做PCB breadboard supply……)

The first step is to make a new project. Click file -> new and give it a name. Note there are buttons for many of these things but we will generally use menus to avoid millions of screenshots. Let』s call the project 「breadPower」.

第一步是創建一個新工程。點擊file->new 並且指定文件名。注意這裡有很多的按鈕你可以使用,但是在本文中我們主要使用菜單,主要是為了少截一點圖。開始吧。

First we need to decide what parts we need. We will need a barrel jack, a diode, 2 capacitors and a 3.3 V LDO for this project.

首先我們需要想想到底需要什麼元器件呢?我們需要做一個barrel插頭(譯者註:不知道如何形容,電源插座?),一個二極體,兩個電容和一個3.3v的LDO。

We have selected PJ-202A for the barrel jack (the standard jack at SparkFun but also available for less from Digikey and no doubt others), NCV551SN33T1G for the LDO, we will assume generic though hole diodes and electrolytic capacitors for the rest.

我們打算使用PJ-202A作為barrel插頭(是一款來自SparkFUn的標準的插頭,但是我們還可以從digikey這個網站上買到更便宜的,注意不要買錯了)(譯者註:我感覺原作者肯定不是這個意思),還需要NCV551SN33T1G ——一個線性穩壓器,並且我們使用最一般的過孔二極體和電解電容。

Let』s get started. Click on eeSchema. You may get a box saying the file doesn』t exist, that just click OK. Let』s dive right in and make some parts. We could do this with the library editor but there is an easier way online: kicad.rohrbacher.net/qu We actually only need to make 1 part: the voltage regulator. Taking a look at the datasheet it is a 5 pin part with a counter clockwise pin numbering. onsemi.com/pub_link/Col

開始吧。點擊eeSchema,進去之後我們先做一些原器件,雖然我們可以使用它的元器件庫編輯器進行製作,但是這裡有一個比較簡單的方法在線製作元器件 kicad.rohrbacher.net/qu,我們只需要製作一個部分即可:電壓調節器。看一看這個五角的元器件的datasheet吧。onsemi.com/pub_link/Col

Change component name to NCP551. We want 「DIL」 and N = 5. Click on assign pins.

把元器件的名字改成NCP551。我們需要『DIL』並且N=5.點擊assign pins。

The pins 1-5 are: Vin, GND, En(able), N/C, Vout.

這些個依次為:(不翻譯了)

Type those in the boxes. Next change the types to: power in, power in, input, unspecified, power output.

These pin types are just for DRC checking, it is good to assign them but you can just specify everything as bidirectional if you don』t want to bother with it.

這些引腳的屬性設置是為了後續的DRC(譯者註:電氣規則檢查?)能夠通過,你最好能夠設置這些東西,當然了你可以直接把這些都直接設置成bidirectional(譯者註:雙向),這樣你自然是不用被DRC檢查的結果困擾了。

Click the preview button. If you don』t abbreviate Enable as En, it will run into the part label. You can increase the horizontal margin if this matters to you. You also can change the location of these labels in the symbol editor, this tool is just faster for making simple parts.

點擊preview按鈕,當然如果你想在這個網站上修改啥或者在後續的kicad中修改這些東西也是可以的。

Everything looks nice on our preview, click build library component. This will give us a file to save. Let』s rename it on save as 「myParts」 and save it a new directory under our project』s folder called libraries.

當一切看上去比較順眼的時候,點擊build library component按鈕,你就能下載這個庫了。修改這個文件的名字為『myParts』並保存到工程文件夾下的一個新的目錄下,這個新目錄可以叫:libraries。

The library is a text file so when we make additional parts we can append it to the library file we just made, just cut and paste. Parts start with 「DEF」 and end with 「ENDDEF」.

這個庫文件只是一個簡單的文本文件而已你可以自行的添加新的元器件,只需要簡單的複製黏貼即可。元器件的開頭是『DEF』,結尾是『ENDDEF』。

We need to add our new library to the project. Click preference -> library. Then click on the add button and browse to the library you just saved!If you are running KiCAD in Windows 7/Vista, be sure to save the libraries to a folder that doesn』t need administrative privileges (IE not the libraries folder in program files/kicad/).

你需要向你的工程中添加新的庫。點擊preference->library。並點擊添加按鈕選擇你的這個文件,win7和vista用戶需要注意,你別把文件放在需要管理員許可權的文件夾裡面。

You also may define a search path for libraries with this dialog box. You will be asked to save the project when you click ok. Do so.

你也可以定義搜索路徑。記得要保存。

Having added our one symbol we needed we can make our little circuit! Click place -> component, select by browser, 「myParts」, NCP551, then click insert component in schematic . Now click in the schematic somewhere to place the LDO.

開始畫原理圖吧。點擊place->componet,選擇myParts這個庫,並選擇這裡面的NCP551這個元器件,然後點擊確定,然後在原理圖中點擊一下。順便也找個地方放置LDO吧。(譯者註:不知道是不是版本更新的問題,實際的操作和原作者說的不一樣)

In KiCAD most things have shortcuts. 『a』 is the shortcut for placing a component you can see this in the menu system . Right clicking is also vital in KiCAD, you can right click on the part you just placed. See how it says Move you just learned another vital shortcut key.

在這個軟體中,大多數的操作都有快捷鍵,比如「a」鍵可以用來放置元器件。右鍵點擊也是很重要的操作,當你在放置元器件的時候。如果你想移動這個元器件只要按下「m」即可。

Hit 『a』, now type cp1 and hit enter. As you can see CP1 is the name of a polarized capacitor. CP is also polarized, while C is unpolarized. We need to add a diode and a barrel jack.

點擊「a」,現在輸入cp1點擊確定,你就可以看到cp1,這個名字的電容是有極性的。CP是沒有極性的電容。我們再添加二極體和電源插頭吧。

Oh no! Don』t we need another component for the barrel jack? Well maybe. But items that are really nothing more than pins we tend to use the 『conn』 library. Because KiCad lets you link parts to any footprint we don』t have to really make unique symbols for everything! We just need a connector with 3 pins. (We consider this an advantage to KiCAD over the Eagle like approch.) Look for one in the browser under 『conn』. Find it? CONN3. That』s good for input, how about output? CONN2. Last we need a diode, this is under device 『DIODE』. Place these three parts on your schematic.

等一下,我們需要製作另外一個電源插頭的原理圖元件?實際上我們並不需要,我們只需要用一個何時引腳數目的元器件進行替代就行,我們可以使用「conn」元器件庫中的某個元器件。因為kicad允許你把元器件和任意的元器件的封裝聯繫在一塊,我們不需要做一個特殊的電源插座。我們需要一個3個引腳的插頭。我們認為這也是kicad相比於eagle的優勢之處。找找吧,那個「conn」庫下的「conn3」就行。二極體類似。

We need one last thing and that is the ground symbol. Let』s add two of them, you』ll see why in a moment. Click place -> power . (Or as you now see just p). Type in GND and place two on the schematic.

我們最後需要的是「地」。添加兩個吧。點擊place->power或者乾脆按「p」鍵,輸入gnd就能看到了,記得放置兩個。

Now move the parts around till they look something like the screenshot below. You can rotate a component by right clicking and selecting rotate or the 『r』 key!.

你可以使用m鍵進行移動,使用r鍵進行翻轉。

If we look at the http://www.onsemi.com/pub_link/Collateral/NCP551-D.PDF we can see pin 1 is high, pin 2 is GND, and pin 3 is connected to GND when there is no barrel jack in.

如果你看了onsemi.com/pub_link/Col,你可以看到引腳1是接高電平,引腳2是gnd,如果沒有電源插頭插入的話,這個三號引腳其實是連接到地的。

With this info we can wire up the circuit. Click place -> wire (or the icon ). You should end up with the following design seen below:

連線吧。點擊place->wire或者點擊那個圖標或者輸入w鍵。

You should notice two things on my schematic you may not have done a small X and two labels of VDD. If you attached wires delete them. (You can right click, use the del key or the eraser icon). See the X icon? That is the not connected, use it or place -> no contact flag to add the X to the N/C pin.

你看到裡面有一個小x和兩個VDD的標籤,x的標誌可以通過place->no contact進行添加。

Next let』s add the labels. Labels are a good way of making a schematic readable. They tell the program what nodes of the circuit are attached without using wires. This lets you use wire to connect circuit blocks then labels to connect blocks.

添加標籤對於原理圖的可讀性的增加是有益的。這可以告訴程序這兩個節點是連接在一起的,及時這兩個節點之間並沒有到導線的連接。

Place a label and call it VDD on the Vout pin and the pin we will use for our output. Click place -> label . The small square on the label will disappear when it is connected correctly to a node of the circuit.

將VDD放置在Vout引腳處,這個引腳我們用作電源的輸出,點擊place->label,然後輸入名字放在正確的地方即可。

The next step is to add values and annotations to the schematic. Let』s give the capacitors a value, say 100 uF each. To change the value you can just hit 『v』 when you are over the component with the select tool, or you can find it with the right click menu system.

下一步我們添加元器件的值和元器件的編號。我們給電容每一個100uf的值。我們只需要很簡單的輸入「v」即可修改當前滑鼠所在的這個元器件的值。或者右擊修改也行。

The next step is to annotate. The annotate schematic button is this one in the top bar. Pick any options you like the defaults are fine and click 『Annotation』 and then 『Close』. You should now have this:

下一步就是編號了。點擊原文中的那個圖標,選擇一些你想要的多選框,點擊「annotation」然後關閉即可。然後你就會看到這樣的原理圖了

The components now have unique labels. Save your schematic!

現在元器件都是不同的標籤了,保存一下吧。

You could run a DRC check now and eeSchema will try to help you find where you made mistakes connecting inputs to outputs and such. Given the symbols I choose, I get 2 errors, both aren』t real mistakes.

現在你需要進行DRC(電器檢查),eeSchema將會幫你找到你哪裡的輸入輸出有問題。我這裡有兩個問題但是都不是真的錯誤。

The final step in eeSchema is to generate the netlist. To do this: click the generate netlist button , then netlist (in the default PCBnew tab). Save the file.

最後一步是生成netlist。點擊原文中的那個圖標,保存文件即可。

We are done with eeSchema, you can close it. Now we will assign footprints to our components with CVpcb. Click on CVpcb. You may get an error about a library being missing just click okay. Now we see a list of our symbols at the left and possible footprints at the right.

做完了這些,關閉eeSchema吧。現在我們可以給這些原器件分配元器件封裝——使用CVpcb。點擊CVpcb,你會發現有錯誤,但是忽略吧,沒事。現在我們可以看到左側是我們的元器件,所有可能的元器件封裝都在右側。

The default view is filtered, that is a symbol can restrict the options of footprints that should be assigned to it if you know better you can click the 「display full footprint list」 icon. In this case I will do that because I want to use C1V8 as my footprint for the polarized caps.

默認的視圖是被選擇性的篩選過的,如果你想的話,還是可以選擇顯示所有的引腳封裝都顯示這個選項的。圖標是原文中的那個。在這裡我們使用C1V8這個封裝來關聯我們的電解電容。

What is C1V8? I hear you ask. Well there are a set of footprints that come with KiCad that are pretty extensive. To see what they look like the easiest way is to look at the footprints.pdf in the share/modules/footprints_doc directory under where KiCad is installed. If you print this PDF at 100% you can check the footprints against the parts you have!

什麼是C1V8呢?它張什麼樣子?我知道你在想這個問題。在kicad中會有一個以pretty這個後綴結尾的文件夾內有一系列的元器件封裝,為了看這些個元器件的封裝到底長成什麼樣子,你可以看這個元器件或者模塊的文件夾下的footprints.pdf這個文件,如果你能原樣列印的話,你就可以那你的實物和這個圖進行比較了。

Assign the components the following footprints by double clicking the name at right, to get the C1V8 footprint you』ll have to turn off the list filtering, otherwise just use CP4 or whatever you like, it is just axial verse radial part. At this point you should realize we don』t have a footprint for the barrel jack. We will have to make one, for now assign anything you like.

雙擊右側的名字就可以分配元器件封裝了。為了分配C1V8,你需要關閉列表篩選這個選項,否則的話,你還可以使用CP4這個封裝,這是一個沒有極性的電容封裝。在這裡你需要明白我們並沒有一個線程的電源插座的封裝,我們得自己做一個,目前你可以隨便指定一個。

You can get to the first letter of the part by typing it. But then you will need to scroll. Once you are done this click save.

Now open PCBnew! Again just ignore the error and click OK.

打開PCBnew把,在此,請忽略那個錯誤,直接點擊OK即可。

The first thing to do is to fix what we know is wrong: the footprint that is missing.

第一件事情是解決那個錯誤:元器件封裝丟失。(譯者註:就是那個電源插頭的封裝)

Click on the open module editor.

Normally you would now choose a working library, but since we don』t have any libraries of our own yet we won』t. Click on the new module button and call it barrelJack. Next click on add pads and place 3 pads on the module. Right click on the first pad and click edit pad .

選擇你想要保存的那個庫,但是我們還沒有建立那個庫我們先不這麼做。點擊那個創建新模塊的按鈕,並輸入名字「barreljack」。接下來添加焊盤,放置三個就行,右鍵點擊第一個焊盤並修改它的值。

You will see there are both SMD and through hole (standard) options here, this happens to be a though hole component but we mostly find that we make SMD components. The layers at the right can be left as is. However we need to change the hole sizes, and positions of these holes.

你將會看到有SMD和穿孔兩個標準的選項,這個元器件應該是穿孔的而不是默認的SMD的,修改一下就行。右側的部分可以不修改,但是我們需要修改孔的大小以及孔所在的位置

We choose 0.13 and 0.16 for the drill and size respectively. From the datasheet you can figure out the positions or just move the pins around however you want unless you are actually going to make one of these. (For pins 1,2,3 the [x,y] cords should be: [-0.1, -0.12], [-0.1, 0.1], [0.09, 0], though you could offset or rotate the part).

我們將鑽孔的大小設置為0.13,焊盤為0.16。從數據手冊中我們可以知道這些焊盤的位置。

Add a line around your part and move the labels to reasonable places. It should look something like this:

添加外框,調整標籤的位置。

Now we, will save it to a new library. Click file -> save module to new library. Create a new folder called modules in your work folder like you did for the libraries (not in program files) and save it as 『myParts』.

現在我們將這個保存為新的library。點擊file->save module to new library。創建一個以這個模塊名為名的文件夾,比如在這裡把它起名為「mtParts」。(譯者註:實在是看不懂他到底是啥語法)

(譯者註:原理圖元件的庫文件名是以「.lib」結尾,裡面包含了一個或多個元器件的引腳的定義和標籤啥的,主要是為了在原理圖中好看和好連接;元器件封裝的文件夾是以「.pretty」結尾,這個也被叫做元器件封裝庫;具體的每一個元器件封裝是以「.kicad_mod」結尾,但是實際上好像早期版本的kicad的元器件封裝是以「.mod」結尾的,這些是放在那個以pretty結尾的文件夾內的,但是實際上也可以不必遵守這個約定。)

In the future you can add your parts to the 『myParts』 module library you just made.

在以後你就可以添加更多的元器件封裝到「myParts」這個文件夾內了。

(譯者註:或許,作者這裡所說的額module library都是指元器件封裝,所有的part library都是指元器件的原理圖)

Close the module editor.

Close the module editor.

關閉模塊編輯器。

Click preference -> Libraries and add the new module library you just made, you can also add a search path if you wish. Click okay and save the project.

點擊 preference->libraries並添加你之前創建的那個文件,你還可以把它添加到搜索路徑中,點擊ok即可。(譯者註:原文如此,看不懂這是啥意思,及時是想在本工程中添加剛才創建的那個封裝庫也不應該是這個步驟啊,應該是能在preferences中找到footprint libraries manager為project添加相應的pretty或者從footprint libraries wizard中進行設置)

Go back to the module editor and 『select working library』, 『myParts』. Next click load module from working library, list all, barrelJack. Finally, 『save module in working library』. Exit the module editor.

回到模塊編輯器中並「select working library」,「myParts」。點擊「 load module from working library」選擇list all 然後選擇barreljack。最後,「save module in working library」,關掉模塊編輯器。(譯者註:實在是不知道這是在幹嘛,而且list all 有一定的幾率會卡死掉整個程序,因為是從github上下載元器件封裝啥的,會比較卡)

If you have a working library to start with these last extra steps just like adding the library to the path won』t be needed, but for whatever reason the save module to new library process does not make one of the files you need!!! By the action we just took we created it.

如果你已經擁有了working library那麼你就可以直接進行下面的這些步驟了,上面所說的那個添加庫到你的搜索路徑的操作都是非必須的,but for whatever reason the save module to new library process does not make one of the files you need!!!By the action we just took we created it. (譯者註:這都是什麼啊)

Making modules isn』t that hard as you can see. And about 50% of the work we just did we don』t have to do next time because everything will be set up right already.

製作元器件封裝並不是很困難,我們做的50%的工作在下一次我們創建元器件封裝的時候都無需再重複一遍了。

Close PCBnew! (Save the broad on exit).

關閉PCBnew,保存並退出。

Open CVpcb again!

打開CVpcb。

Goto K1 and click on the right hand panel and type 『b』, look there is out barrelJack footprint! Double click it and resave the netlist as before.

點擊到K1並在右側的一欄中輸入「b」,你就會看到剛才創建的那個電源插座的封裝了。雙擊它之後就可以重新生成網路表了。

Open PCBnew! Click on 『read netlist』. The path should be correct for the netlist you just saved with CVpcb, but you can change it if it isn』t. Click read current netlist. The footprints will appear! Click close.

打開PCBnew。點擊載入網路表。

Now click on footprint mode . Next right click in the center of the sheet and select Glob Move and Place -> Move all modules. OK. Now the modules will be where you clicked and spread out.

點擊

Use 『m』 and 『r』 to move and rotate your modules.

After that is done select PCB edges from the layer bar at right and then the line tool . Single click where you want to start drawing the board edge and draw a box around your layout. It should look something like this:

現在右側的部分選擇PCB的邊緣(譯者註:edgecuts)那一層,然後選擇點擊直線工具。點擊一下你打算開始的板子的邊緣部分的起點,然後畫出一個框出來,你板子應該是長成這樣的。

Next we want to define some node classes. Click on design rules -> design rules. Here you see the default clearance, line width, etc for PCB lines. This LDO actually isn』t high enough power to worry about this but we are showing it to you for when it will matter.

接下來我們定義一些節點的配置信息。點擊design rules->design rules。這個時候你會看到 「default clearance」(間距),「line width」(導線寬度)等等一些PCB線的設置信息。實際上LDO的電壓並沒有高到需要我們額外的注意的地步,但是我們將會下面想你展示這個選項是多麼重要(譯者註:電源線的選項)

Let』s add a new class called 『power』 and change the track width to 24 mil from 8. Next add everything but ground to the 『power』 class (select 『default』 at left and 『power』 at right and use the arrows).

我們新加一個「power」類,把24mil的track width改成8.接下來添加除了地之外的所有的東西放在「power」類中(將左側選擇為「default」右側選擇為「power」,然後使用箭頭)(譯者註:我很懷疑這篇文章需不需要發出去 我都不知道他在說什麼)

This is a two layer board and we will use the backside for a GND plane. Select the 『front』 as the layer, and click the track button. You will see the so called ratsnest. Using 『v』 to place vias and change layers you can route the whole board by hand now (you also may change layers by clicking on the layer at right).

這個板子是有兩層的,我們將使用底層作為GND層。選擇「front」層,並點擊track按鈕,你就會看到ratsnest(譯者註:這都是什麼東西)。使用v可以放置vias並改變層,你現在就可以手動調整整個板子了(當然,你還是可以使用滑鼠點擊選擇右面某個層的)

Let』s not route the whole board because I want to show you how to do autorouting also. Since we want to use the back as ground, click on the LDO GND pin and draw the wire out some way type 『v』, then double click to end the line.

我們不會手動布線整個板子,因為我想講解自動布線部分。因為我們想要使用back層做為地層,點擊LDO 的GND的引腳並拖動出一條線,這是按下v鍵並雙擊這條線的末尾。

For a board this simple routing by hand would be quick and easy, however, for board with lots of pins you might want to use an autorouter. You should always route critical traces by hand first though! The autorouter we will use is very nice freerouteing.net router, which will not change any of the traces you put down before you ask it to route.

這個板子自動布線很簡單也很快就布完了,但是,那些很多引腳的而板子我們就會想著要自動布線了。儘管如此,你第一次應該手動布一次。我們這次將使用的是一款非常不錯的自動布線工具,這個工具不會修改你已經手動布好的那些線。

To use this router, click autorouter icon. Click export DSN file and save it. Next click the launch button, you will need java to use this router. The program will launch. Click on open design and browse for the DSN file you just saved.

為了使用這個布線工具,點擊那個自動布線的按鈕。點擊導出DSN文件並保存這個文件。接著點擊開始按鈕,你需要在這之前已經安裝好了java。這個工具將會啟動,點擊「open design」並載入你剛才保存的DSN文件。

(譯者註:我怎麼聽說,現在kicad已經不再使用這個布線工具了?)

This router has some nice features that KiCad doesn』t have built in yet for manual routing as well but we are here for the autorouter. The autorouter has two main steps, first it will route the board and then it will optimize it. Full optimization can take a long time, however, you can stop it at any point after it routes your board. If the pass count to route the board gets above 30 your board probably cannot be autorouted with this router. Spread your components out more or rotate them better and try again. The goal in rotation and position of parts is to lower the number of crossed airlines in the ratsnest.

這個布線工具有著一些很好的特性——這是kicad之前沒有的——針對的是手動布線,當然也能用於咱們在這裡使用的自動布線。自動布線有兩個主要的步驟,第一個是布好線,第二是優化布線。全部優化布線的話會耗費非常長的時間,但是,咱們可以在任何時候停止布線。如果布線次數多於了30次了,或許布線工具沒有這個能力去給你這個板子自動布線了。你這個時候或許可以修改一下元器件的分布或者修改一下元器件的方向,這樣或許又能自動布線了。修改元器件的位置或者方向其實是在降低布線時可能出現的交叉啥的。

Click autorouter to run the autorouter. For this simple board it won』t take very long. This is the result I got:

點擊自動布線,對於簡單的板子來說不會花費多長時間,這裡是結果:

Click file export session and save it with the extension .ses. We never bother to save the rules file.

點擊文件導出並以後綴「.ses」結尾保存文件,我們永遠不會和rules文件衝突了

Back in PCBnew, click on the back import .ses button and select the file you just saved. Click okay to any dialog boxes and close the autorouter box.

回到PCBnew中,導入這個「.ses」文件。

There is one thing we don』t like which the autorouter did and that was to place the trace to the diode on the backside, so I am going to delete those traces and route them myself, using the delete key and the routing tool. Try to do this yourself.

這裡有個問題,我們不太喜歡自動布線對於二極體部分的連線,因為他把這條線放在了後面那層板子上了。所以我們使用「del」鍵刪除自動布線的這條線並自己畫

There all better:

Finally let』s add a zone to fill the back with the GND layer. Select back as the layer and then the zone tool . Click inside your PCB outline just like you were about to start a rectangle just smaller than the outline (in a corner). A dialog box will come up, you may choose to include or exclude pads here what the clearances need to be, etc. We will just leave everything as default and select the GND node and then click okay. Now, draw a box and double click to finish at the corner you started in.

最後我們添加一個GND層的覆銅區。把層切到後面那層,然後使用區域選擇工具,點擊框選你想要的區域進行覆銅,在你PCB的區域內畫一個比你外框稍微小點的區域就行。當你確定之後,會彈出一個選項讓你選擇哪些焊盤被覆銅區連接了、哪些沒有。在這裡我們只需要讓別的東西保持默認就行,只選擇GND,然後選擇OK。現在畫出的了一個區域,雙擊之後結束。

Next right click in zone and select 『Fill or Refill all Zones』.

再右擊這片區域選擇「fill or refill all zones」。

Basically you are done now with the board but if you want to manufacture it we should do a few more things. First, for the barrel jack footprint we designed sticks over the board edge. We want to save cost on the board so it is okay for this to happen but if we turn it in this way the fab house might not cut the board down. So let』s edit the module in place and trim it. Hit 『e』 on the module and select module editor. Redraw the silk outline (erase the old one and put a new one in). Finally choose update module in current board. This changes just the instance in the board you are working on. You may ask why have the longer outline at all, well you don』t have to but for us we find it helps indicate the rotation of these kinds of parts as well as gives us the full size of the part for clearences.

基本上你已經完成了你的板子,但是為了能夠生產印刷出來,你還需要額外做一點微小的工作。首先,對於我們設計電源插座的封裝是沾在板子的邊緣位置的(譯者註:有一部分電源插頭是在板子的外面),我們只是想減少費用而已,但是有時候廠家或許由於這個原因,不把你的板子進行切割了,所以我們需要修改元器件的封裝——縮小一點。按下「e」鍵選擇使用module editor打開,然後重新繪製這個元器件的絲印層的內容(刪掉然後添加新的)。最後我們使用新的封裝更新板子的內容,這個板子就會改變了。你或許會有點疑問了,為啥我們開始的時候畫這麼大的框?我們是可以在剛開始的時候就畫的小一點,但是畫大了能讓我們更容易的推測翻轉對這個元器件進行反轉之類的操作之後的樣子也能讓我們知道該留出多大的空間。

We now have this:

I am quite happy now, though I could change some names and move some labels.

我現在很開心,儘管我還得調整一些名字和一些標籤的位置。

Let』s export it as gerbers for BatchPCB or similar to use, the settings below are for BatchPCB. Click File -> PlotYour dialog box should look like this:

讓咱們看看gerber的設置,下面是BatchPCB的設置,點擊「file->plot」,你就會看到下面這個圖了

We have included the solder paste layer for submission to a stencil maker. But the PCB house will not need it.

我們在這裡也生成了 solder paste layer (譯者註:或許能翻譯為鋼網層?用於焊接貼片原件時漏下去錫膏的)是用來給模型提供商的,對於製作PCB的廠家來說,它並不會看著一層的內容。

Click on plot.

點擊 plot

Now let』s create the drill file, click on generate drillfile, it should look like this:

現在生成鑽孔文件,點擊「generate drillfile」,就應該長成這個樣子。

Click ok and save the drl file.

保存即可

You are DONE!

終於完了!

You should review your gerbers with gerbv or gerbview but that』s it. Zip the files and send them off to a PCB fab house.

你應該使用gerbv或者gerbview查看你的gerber文件。壓縮並發送給你的PCB印刷廠吧。

We know that seems like a lot, and truthfully it is, but you just did all the hard setup stuff, and almost all of the common tasks for a low frequency 2-layer PCB.

我們知道這篇文章或許有點長了,而且事實好像也是這樣,但是你已經經歷了最難的開始的部分了,你現在可以完成大多數的二層板自的設計了。

For more useful info be sure to check out our docs section.


推薦閱讀:

鎚子手機 Smartisan T1 的電路板設計 (PCB layout Design) 水平如何?
可以用3d列印來製作pcb嗎?
國內有沒有電子晶元一站式購買網站呢?
電路板的生產應該先找人設計再到廠家生產,還是直接找廠家就行了?
為什麼IC的封裝基本是黑色的?而很少見其他的顏色

TAG:开源软件 | PCB | ProtelDXP |