A short introduction to KiCad 9.0 and step by step guide to making PCB's in KiCad. I go through the steps with you and tell you my learning experience.
For some time now I've been watching how many of my website followers have been producing awesome PCB's from the schematics I posted instead of doing them on stripboard. Last week I decided the time had finally come for me to really get to grips with KiCad because I really wanted to be able to do that too. I had tried KiCad before and I also tried EasyEDA but found both sort of overwhelming. There's so much coming at you that it can seem impossible to get through but that's not true. You just have to know where to start. In this article I will try to explain how I learned KiCad in less than a week. I was advised to go with KiCad over EasyEDA and I'm glad I listened ^___^
Sadly, now I know how to make PCB's this will probably mean the end for the stripboard projects. Naturally, what's on this website will stay here and it will remain free for everyone to use but new projects will now be made with PCB's. More on this later.
First step: what is KiCad?
It's a free software that you can download from here. (The name KiCad actually comes from the first letters of a company of Jean-Pierre Charras' friend "Ki", being combined with Cad which stands for Computer Aided Design. It was created in 1992 by Jean-Pierre Charras.)
The software consists of two destinct steps. In the first one you're going to draw a schematic and in the second step you're going to turn that schematic into a PCB design.
Once you downloaded KiCad and successfully installed it on your Mac or Windows 10 or 11 PC or your LINUX PC you can open it.
You'll be presented with a small start screen that shows all the options.
In the screen shown above there will now appear a project file with a schematic symbol and a PCB symbol. Click on the one with the schematic symbol in front of it. You can see my last project in this screen was the TB303 filter.
DRAWING A SCHEMATIC
Now you need to draw a schematic.
In the Schematic editor, go to 'FILE' and choose page settings. Here you can fill in all the data that will appear in that little text box at the bottom right of the schematic drawing.
One more step before you can start drawing. We're going to import all the different components that we're going to need in our schematic like the transistors, the chips, the resistors etc.
To do that you click on the little opamp symbol on the right, 3rd from the top. Now the component library opens up.
You can search in this library for anything you need. If the specific part you need isn't available, just choose a part that looks the same and has the same pinout. For instance, for the TB303 filter I needed 2SC945 transistors but they're not listed. So I chose the 2SC1815 which has the same pinout and was available. This is not simulation software so that doesn't matter as long as the pinout is the same!
Drag your components somewhere into the drawing.
CHOOSING A FOOTPRINT.
Each component needs a footprint assigned to it so the PCB editor knows how big it is and where the soldering pads need to go.
To do this click on your component until it lights up blue. Now it's selected, type 'E' on your keyboard or 'right-click' and go to 'PROPERTIES'. Now a pop-up appears where you can change the value of the component, the designator and there's also a field called 'Footprint'. It's probably empty. Click on it and you'll see three little books appear at the right of the footprints field, with one book leaning against two others. That's the symbol for the footprint library.
Click on the little books. Now the Footprint library opens.
Look for your component and find the footprint with the dimensions you want. This is going to be a bit of a task in the beginning because there's a lot to choose from. Most footprints have PDF datasheets attached to them that you can click and see what the component looks like. You don't have to choose the exact same component you plan on using on your PCB just as long as the footprint fits. This software is not going to simulate the working of your PCB anyway.
Above is the footprint I use for resistors. You can also make your own footprints or alter the footprints you find in the library and give them bigger pads etc.
You need to assign a footprint to one component first and then, when drawing the schematic, when you need more of them you just duplicate the first one by clicking CTRL + D. That way all the changes you made and the footprint you chose will be duplicated with the component and you don't have to set one for every little component in your schematic. This saves a lot of work.
You can only make changes to footprints in the footprint editor, which is the symbol that looks like a DIP6 chip with blue blocks on the legs in the top middle of the page.
When you made changes to a footprint save them in your own personal footprint library which you can create by right clicking in the Footprint Editor, on the footprint name. A pop-up will appear where you can give it a new name and save it and at the bottom left is a button called new library. Click that to make your own library that will appear in the list in alphabetical order, depending on the name you gave it.
When you imported all your components and gave them all footprints you can start drawing. Place the components where you want them and connect them together with the wire tool which is the thin line symbol on the right, 4th from the top. Use CTRL+D to duplicate any component if you need more of them. Like I mentioned before, this will save you having to enter a footprint for every component you use, because it will be duplicated with the component.
ABOUT THE POWER SECTION
Now you need to add a little drawing of the power input to your circuit, separate from the main schematic. You need to select a connector with 2 pins (for + and GND) or 3 pins (for + GND and -) or a Eurorack connector or something else and choose a footprint for it. Click on the 'GROUND' symbol (the one with one vertical and 3 horizontal lines under it, you know) on the right and choose for instance the VCC or the +12V and attach it to the plus line. Do the same for ground and negative voltage. Now go to the ground symbol again and choose the PWR_FLAG symbol and connect a power flag to each of your power lines. +, gnd and -. They must be connected right to the wire that comes out of the power input connector. They may not be connected to wires that are connected to wires from the power input connector. They must be directly connected to the input. That way the software knows were the power comes from. You don't have to connect this part to the rest of the schematic. When you use, for instance, +12V symbols anywhere in the schematic, the software will know it connects to the power input section.
If you use a voltage regulator on the board for instance for an extra +5V powerrails, you don't have to connect a power flag to that +5V line. It's only for power that comes into the board from outside.
When you completed your drawing you need to check it for mistakes. You do that by clicking on the Electrical Rules Checker. That's the 6th symbol from the right on the top menu bar. The one that looks like a list with a red circle with a check mark in it.
ANNOTATING YOUR SCHEMATIC
Every schematic needs to be annotated to make sure every component has a name the PCB editor understands. It puts a 1 after the name of potmeters and in and outputs. If there are sub circuits that work independently of eachother they will be assigned different numbers to tell them apart.
To annotate a schematic, go to the TOOLS menu and click on 'Annotate Schematic'. You must also do this after you changed the footprint of a component for an other one, to update the schematic.
After the schematic is finished and has zero errors you can go over to the PCB editor to turn it into a PCB design. Don't forget to save it of course.
THE PCB EDITOR
Click on the symbol for the PCB editor and let's get designing.
First we're going to go the FILE > 'Page Settings' and again fill in the data for under in the text box of the drawing. It's good practise to do this although not really necessary. If you clicked 'Export to other sheets' in the schematic editor page settings, everything will be there already, copied from the schematic drawing.
Now, in the FILE menu, click on Board Settings. Here you can input a ton of things that you want your PCB to comply with. Forget all that for now. I just want you to click on 'Design Rule Constraints'.
Here you can set the minimum track width and other parameters that influence the copper on the board. I only really change the minimum track width to 0.4mm and leave the rest as it is.
Sometimes when checking a PCB for mistakes you will get a warning there is a problems with the thermal connection of a ground pad. If you set 'Minimum Thermal Relief Spoke Count' to 1 those warnings will go away.
Now, the moment of truth.
Click on 'Update PCB from Schematic' (the middle symbol of the three shown above) or click F8 to import all your components into the PCB Editor.
You now see all your component outlines in a small space. This is called the rats nest.
Now you need to pull all this out with your mouse and start placing the components on the field in somewhat the same way as they appear on the schematic. This way you get the shortest tracks between them. Pull it all out and use as many space as you want. When you have everything ordered you can start placing the components closer together and build up a nice compact PCB layout with the shortest tracks possible. You will see what is connected to what when you drag the components around.
Once you got all this done you can start drawing the traces between the components by hand. There is a plugin that you can install, that will do it automatically, but I want you to do it by hand. This works much better. You must choose the F.Cu layer to draw on the front of the board and you must click on the B.Cu layer to draw on the back side. It is good practise to draw as many of the horizontal tracks on one layer while drawing the vertical tracks on the other layer. This prevents crosstalk and noise.
TIP: Leave all the connections marked 'GROUND' unconnected. We're going to use a groundplane to connect all those together at once.
AFTER THE TRACKS ARE DONE.
Okay, so you have your first PCB set up. Now you need to define the edge of the board. Select the 'Edge Cuts' layer for that. Now choose the 'Draw Rectangles' tool and draw a square around your board. Leave a few millimeters between the outline and the outer components.
Once you have this done you can choose to round off the corners. For that, right click on the outline of the board and choose 'Shape Modification' from the menu. You can enter the radius of the curves in millimeters. You can also add mounting holes in the corners with the circle tool.
In between all these steps, regularly check your progress with the 'Design Rules Checker'. It will tell you what's wrong with the board. If you don't understand a certain mistake that is listed, just Google it. Many have gone before you and there are solutions to be found for all the possible mistakes you can make.
Checking for mistakes is called running the DRC but I always call it 'Run DMC' after the rappers :)
Oh, very droll sir!
ADDING GROUNDPLANES.
One more step is to add groundplanes to fill up the board with copper and connect all the ground points together. Click on the B.Cu layer and now click the 'Draw Fill Zones' symbol or click CTRL+SHIFT+Z.
Take that tool and draw an outline around the board just like the edge cuts outline. When the outline is completes go to EDIT > Fil All Zones or click 'B' to fill in the backside. Now select the F.Cu layer and repeat the proces for the front layer.
Again do the Run DMC, I mean run the DRC to check for errors. The warnings are not vital but the errors need to be fixed before a PCB can be made. But you'll learn soon enough how to fix the warnings too. Google is a great help for this.
ADDING TEXT.
You will see that the Silkscreen text next to the components (the one in yellow) only shows the designators. It's handy to put the values in too. You could double click on the designators and change them to values but then you'll get a lot of double designator warnings and should you make any changes to the board after that, all your text will flip back to designators and you can start all over again. No, it's better to click on the F.Silkscreen layer and use the TEXT tool to put the values next to the components. Make sure your text doesn't touch any of the open area around the solderpads. That will give problems in production with the soldermask overlapping the silkscreen.
You can see what your finished board will look like by clicking on the 3D viewer or clicking 'ALT + 3'. This will even work if you haven't drawn the outline of the board yet.
MAKING THE GERBER FILES.
Now all you need to do is make the files necessary for production of the PCB's.
First do a final check and make sure your design is faultless. A few warnings will probably remain in the beginning but they are not crucial but 'errors' must be seen to and repaired.
A common problem will be that you need to move a component a little. To do that you must first go to Edit and choose 'Unfill All Zones'. Then you need to click on all the tracks connected to that component and delete them. Then move the component to its new place and reconnect the tracks. Then refill the zones by clicking 'Refil Zones' and then checking the Run DMC eurrh run the DRC.
Okay, now we want them files, hand them over!
Click on 'FILE > Fabrication Outputs' and choose Gerbers.
You can leave all the settings at their defaults, at least if you order your PCB's at JLCPCB which I recommend.
Now click on 'Plot' at the bottom and your folder will be filled up with Gerber files. But we also need to make the drill files so click in that same field on 'Generate Drill Files...'. A new pop-up will appear:
Your production folder will now contain 14 files.
Select all these files and put them all in a ZIP file.
ORDERING YOUR PCB's
Now you can go to the JLCPCB website and drag that ZIP file into the box 'Add Gerber File' and you will instantly see you design appear on their website with how much it'll cost you (usually € 10 for 5 PCB's). You can choose between a few colours like purple, yellow, red, blue and green. An other colour doesn't cost anything extra.
An there you have it. Now you can make PCB's. I found the proces quite addictive and for the last week I've been doing nothing but sit behind my two PC's making PCB's :) Dispite it being beautiful spring weather outside. I love it! I've already ordered two filter designs and the last one, the TB303 had zero errors and zero warnings and I've only been doing this for a week!!
Make at least 4 test projects before you start thinking of ordering PCB's. I've invested a full week in learning. I spent at least 10 hours a day on this because when I set my teeth into a new project I simply can't stop until I understand it. You'll need to be determined to learn this and then you will see quite soon that it is really not that difficult.
If you have any questions about this proces I'd prefer you this time to post them in the Facebook group first. You'll get answers sooner because a lot of the group use KiCad.
SOME COMMON WARNINGS AND THEIR SOLUTIONS:
Here I will list warnings, and errors and their solutions. I'll add to the list as I come across more.
I've had many different problems to solve already but I forgot to write them all down but here's one I came across last time I used KiCad.
"TRACK HAS UNCONNECTED END" warning. This is a warning not an error meaning that if you order your PCB with this issue unresolved, you'll probably still be okay.
This warning comes up when there are little bits of track underneath an other track, maybe from clicking to fast when laying the track. Anyway, to solve this, go to TOOLS > 'Clean up tracks and vias'.
Now check the Run DMC thing again and your problems will probably be gone. If not, go to that track, delete it and draw it in again.
And that's it for this tutorial. I hope it was helpful for you.
If you like this content and would like to contribute to future projects and the upkeep of the website with all this free knowledge, you can buy me a coffee. There's a button for that underneath the main menu. Or you can use this PAYPAL.ME link and cut out the middle man. It's very much appreciated!
Thank you and happy building!
"Once you downloaded KiCad and succesfully installed it on your Mac or Windows 10 or 11 PC..." Or Linux!
ReplyDeleteAh good point. How could I forget Linux :) I'll add it thanks!
Delete