kicad tutorial

38
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 aren’t 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

Upload: joseph-smith

Post on 08-Nov-2014

234 views

Category:

Documents


8 download

DESCRIPTION

KiCad tutorial

TRANSCRIPT

Page 1: KiCAD Tutorial

KiCAD Tutorial

IntroThe 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 aren’t 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 Capture1. Create a folder name PCB lab on your Desktop2. Inside PCB lab, create three sub folders libraries, modules and outputs3. Launch KiCAD. We will see the main GUI of the program as following

Page 2: KiCAD Tutorial

4. Create a new project by selecting File -> New and give it a name – breadPower5. 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

Page 3: KiCAD Tutorial

The circuit contains the following components:

Component Quantity TypeBarrel Jack 1 PJ-202A

Diode 1 Generic diodeCapacitors 2 Generic cap3.3V LDO 1 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

Page 4: KiCAD Tutorial

Pin Name1 Vin2 GND3 En4 N/C5 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

Page 5: KiCAD Tutorial

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

Page 6: KiCAD Tutorial

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

Page 7: KiCAD Tutorial

16. Add the component CONN_3 symbol for the barrel jack

17. Add the component CONN_2 symbol for the output

Page 8: KiCAD Tutorial

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

Page 9: KiCAD Tutorial

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 pin23. 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)

Page 10: KiCAD Tutorial

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

Page 11: KiCAD Tutorial

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

Page 12: KiCAD Tutorial

29. Close eeSchema

Part 2 – Footprints AssignmentIn 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

Page 13: KiCAD Tutorial

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

Page 14: KiCAD Tutorial

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

Page 15: KiCAD Tutorial

2. Open module editor from the top bar

3. Select New Module

Name the module barrelJack and then press OK

Page 16: KiCAD Tutorial

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

.

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

Page 17: KiCAD Tutorial

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 3Pad drill 0.13 0.13Shape size 0.16 0.16Pos X -0.1 0.1Pos Y 0.09 0

If everything is ok, We should expect to see the following module

Page 18: KiCAD Tutorial

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

Page 19: KiCAD Tutorial

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

Page 20: KiCAD Tutorial

Part 2-2 – Update the footprint for Barrel Jack1. 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

Page 21: KiCAD Tutorial

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

Part 4 – Layout Design1. Open PCBnew from KiCAD window

2. Click on Read netlist button

Click on Read Current Netlist

Page 22: KiCAD Tutorial

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

Page 23: KiCAD Tutorial

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

Page 24: KiCAD Tutorial

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.

Page 25: KiCAD Tutorial

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 viaa. Select the Front layer

Page 26: KiCAD Tutorial

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)

Page 27: KiCAD Tutorial

From here you can manually connect all the pins together or use Auto-routing as well

Autorouting1. 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

Page 28: KiCAD Tutorial

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

4. Select Open Your Own Design

Page 29: KiCAD Tutorial

Press OK to allow the software run

and then browse to the DSN file saved earlier

The GUI of the software looks like following

Page 30: KiCAD Tutorial

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

Page 31: KiCAD Tutorial

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

We don’t 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

Page 32: KiCAD Tutorial

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

Page 33: KiCAD Tutorial

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 that’s it. Zip the files and send

them off to a PCB fab house.

End of the tutorial