Sie sind auf Seite 1von 33

KiCAD Tutorial

Intro
The tutorial was adapted basing on the KiCAD tutorial from teho Labs (http://teholabs.com) with extra snapshots which can help students to easier carry out tasks. Students are still recommended to read the original tutorials from the following link http://teholabs.com/knowledge/kicad.html KiCAD is free, complete, has lots of footprints built in, and no restrictions on how you can use the designs you produce with it (even for commercial purposes). It integrates with a free to use very nice autorouter for parts of the circuit that arent signal critical. It is GPL so it will always be free. In this tutorial students will go through steps to produce layout of a given schematic. KiCAD has been installed on all computers in the lab. KiCAD is not a single tool alone but a suite of different software which takes care of different tasks in PCB design process: eeSchema - a schematic program CVpcb - a program linking schematics to footprints PCBnew - a PCB layout tool GerbView - a gerber viewer Bitmap2Component - a program for converting bitmaps for use on PCBs etc.

The tutorial contains detailed steps for each single process. Texts and snapshots should be followed in order to get the correct results.

Tutorial Steps
Part 1 Preparation and Schematic Capture
1. Create a folder name PCB lab on your Desktop 2. Inside PCB lab, create three sub folders libraries, modules and outputs 3. Launch KiCAD. We will see the main GUI of the program as following

4. Create a new project by selecting File -> New and give it a name breadPower 5. First we need to complete the schematic capture by selecting the first tool eeSchema

Hit OK to ignore the warning

6. Next we are starting to build the schematic. A PCB breadboard power supply circuit will be built

The circuit contains the following components: Component Barrel Jack Diode Capacitors 3.3V LDO Quantity 1 1 2 1 Type PJ-202A Generic diode Generic cap NCV551SN33T1G

7. For above components, we do not have an available part for the LDO hence we will create one. A very convenient way to create a box is use the online built in tool at the link. Open the link

http://kicad.rohrbacher.net/quicklib.php
8. Specify the component name (NCP511) and Layout Style (DIL -5) as shown in the following figure. Then press Assign Pins

More information about the LDO can be found in the datasheet as following http://www.onsemi.com/pub_link/Collateral/NCP551-D.PDF

9. Name pins accordingly to the datasheet and then set the types for these Pin Name 1 Vin 2 GND 3 En 4 N/C 5 Vout

10. Click Preview, a JPG image of how the box looks like will be generated. Review the file

11. Click Build Library Component and then save the component inside the folder PCB Lab/ libraries Note, you can later create more components and append these into the above library

12. Next is to add the customised library into the project. From KiCAD window click preference > library. Click on Add and browse to the library you just saved. The library should appear at the bottom of the library list. Then click OK and then choose to save the project

13. Now is time to place components on the workplace. Click place -> component, select by browser. Select the NCP551 that created, then press the Insert button

14. Place the component at the middle of the screen. Press Home key to fit the full view

Note You can use shortcut key a instead of selecting Placing components command (All tools have a set of shortcut keys). Use m key to move components 15. Add two capacitors using the same steps. Pick up CP1 for polarised capacitor

16. Add the component CONN_3 symbol for the barrel jack

17. Add the component CONN_2 symbol for the output

18. Add the component DIODE for the diode

19. Next is to add the ground symbol. Click place -> power <P>. (Or we can use shortcut p). Type in GND and then place two on the schematic

20. Move the components and arrange them as shown following

21. Complete the connections by clicking on place -> wire <W>. (Or we can use shortcut w)

In the above figure, we missed out two things: small X (indicate unconnected pin) and VDD net.

22. Click place -> no contact flag to add the X to the N/C pin 23. Click place -> label <L> to add labels. Type in VDD and then carefully place them on top of the net (If you still see the small square, that means the net is still left unconnected to the node of the circuit)

24. Add values for components Move the cursor over of two capacitors and then press v. Enter the capacitance value of 100uF

25. Add annotations to the schematic. Select Annotation button on the top bar and then press Annotation to accept default settings and then Close. Each component should have an unique label now

26. Save the schematic 27. Optional You can perform ERC check if required. Select ERC button from the top bar

Press Test Erc .With the above schematic, you should expect to see two following errors. They are due to the mismatch of signal direction, which are not so important in our case so we can ignore

28. Final step for schematic capture is to generate netlist. Click the Generate netlist button and then Netlist. Save the file

29. Close eeSchema

Part 2 Footprints Assignment


In this section, we will use another tool in KiCAD suite to assign footprints for components from the schematic 1. From the KiCAD window select the CvPcb tool

Ignore the warning. Press OK

2. The original window should look like following, where symbols are at the left and possible footprints at the right. Turn off the filter to display the full list

3. Assign footprints for all the components as following. To assign for one component, first select it from the left list and then pick up the suitable footprint from the right list, then double click to assign

Among these footprints, the footprint for the Barrel Jack is not available yet, for the time being we assign it to a normal 3-pin connector (SIL-3). In the next part, we are going to build a customised footprint for this component

Part 3 Footprints Generation


In this part we are going to create footprint for the barrel jack. Another tool from KiCAD suite will be used 1. Launch PCB editor

Ignore the warning message. Press OK

2. Open module editor from the top bar

3. Select New Module

Name the module barrelJack and then press OK

4. Select Add pads and then place 3 pads on the module

5. Change the unit from mm to inches from the left bar

If you are more comfortable with mm then ignore this step 6. Right click on the pad 1 and then click edit pad <E>. Then change the properties of the Pad as shown in the following figure

7. Change the properties of the other two pads following above steps with Pad 2 Pad 3 Pad drill 0.13 0.13 Shape size 0.16 0.16 Pos X -0.1 0.1 Pos Y 0.09 0 If everything is ok, We should expect to see the following module

Note the positions of pads are well described in datasheet For any component, please refer to its datasheet for pin layout 8. Add a line around the part

9. Move and rotate the labels to reasonable places

10. Save it to the new library. Click file -> save module to the new library. Save it inside the folder PCB lab/modules

In the future we can add other parts into this module 11. Close the Module Editor

Part 2-2 Update the footprint for Barrel Jack


1. Click Preference -> Libraries and add the new module library you just made. Click OK and then save the project

2. Open CvPcb again. Now you can assign footprint for the Barrel Jack from the list at the right

3. Save the netlist and then close the cvPcb. Till now we have done all the preparation steps for layout

Part 4 Layout Design


1. Open PCBnew from KiCAD window

2. Click on Read netlist button

Click on Read Current Netlist

And then click on Close 3. Select the footprint mode

4. Right click on the centre of the sheet and then select Glob Move and Place -> Move all modules. This will help to move all the footprints to the centre

5. Use m and r to move and rotate modules. Try to arrange components as following

6. Select the PCB_Edges layer and then line tool, and then draw a box around the layout

7. Next is to define some design rules. Click on design rules -> design rules

Default design rules can be seen like clearance, track width, via etc. If you have your own preferred design rules you can edit these accordingly.

8. In this lab, we assume that LDO is on different class where different design rules will be applied for this. Hence, select Add to create a new class, named it power

Change the track width from 0.008 to 0.024, and then add all the nets to this class using the arrows (except GND still belongs to Default class)

9. For this tutorial, we are going to build two layer board with the back plane only for GND. To connect GND from the front to back we need a via. Hence firstly we need to create this via a. Select the Front layer

b. Select Add tracks and vias

c. Draw a small line connected to pin 2 of NCP551 (GND pin)

d. Press v to change the layer from Front to back, then double click to finish. A via has been created (grey node)

From here you can manually connect all the pins together or use Auto-routing as well Autorouting 1. The autorouter used is a Java-based app developed separately with the suite. To launch the autorouter select Autorouting button from the top bar

2. A new window pops up as following. Click export a Spectra Design (*.dsn) File and then save the file

3. Next click Launch FreeRouter via Java Web start to start the software

4. Select Open Your Own Design

Press OK to allow the software run

and then browse to the DSN file saved earlier

The GUI of the software looks like following

5. Press Autorouter to start the auto routing. Since this is a simple design, we will receive the following result very quick

6. Click file export session and save it with the extension .ses

We dont need to save rules so press No in this case

7. Switch back to PCBnew window. Click on Import .ses button and then browse to the file earlier. Ignore all the warning boxes and close the autorouter box. The following results will be shown

8. Next we can add a zone to fill the back plane with GND layer. Select back as the layer and then choose the add filled zone tool

Click inside the PCB edges boundary, a dialog will pop up. Leave everything as default and select the node GND and then press OK Next is to draw a box and double click to finish at the corner we started in

9. Right click inside the zone and select Fill or Refill all Zones

10. Save and then export it as gerbers (layer) files. Click File -> Plot Your dialog box should look like this: 11. You are DONE! 12. You should review your gerbers with gerbv or gerbview but thats it. Zip the files and send them off to a PCB fab house.

End of the tutorial

Das könnte Ihnen auch gefallen