Friday, 16 May 2025

Synthesizer Extra's No.6: HOW TO MAKE PCB's USING KICAD 9.0

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.


Go to the top left FILE section and click on 'New Project'. Choose a name for your project and confirm.
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. Actually, it's called the 'Symbol Library' and components are called symbols.


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. 
You can make your own symbols in the symbol editor if there are for instance rare vintage components that you can't find, you can draw it yourself and assign it electrical characteristics. But I'm not going into that here. In this tutorial I will keep calling them components.

CHOOSING A FOOTPRINT.
Each component needs a footprint assigned to it so the PCB editor knows how big it is and where the solder-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 name 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 for which components they were made. You don't have to choose the exact same component name to get a usable footprint. You can assign any footprint to any component, as long as they have the same number of pins. Once you found a footprint you like, save it in your own library so you can quickly find it again. You can edit any footprint 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.
You can give it bigger pads for instance. There you can also make your own footprints from scratch.
You can create your own footprint library 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. You can not save an alterred footprint back into its original folder because they are 'read only'.



Above is the footprint I use for resistors. 
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 selecting it and 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.


START DRAWING
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.
Press 'R' to rotate a 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 +12V and attach it to the plus line. Choose the GND symbol for ground and for instance the -12V for the negative voltage rail. 
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 after components that are connected to 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 when you used the same symbol.
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.

MAKE SURE YOUR SCHEMATIC HAS NO ERRORS IN IT BECAUSE THOSE ERRORS WILL BE CARRIED OVER TO THE PCB LATER.
Pay special attention to the power connections of any opamps in your schematic! I went wrong there many times and had components connected to the wrong polarization.

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. 
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.4 or 0.5mm and leave the rest as it is.
Sometimes when checking a PCB for mistakes you will get a warning that there is a problem 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. 

IMPORTING THE COMPONENTS TO THE PCB
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 position as they have 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.
You'll see a thin line that connects the component to other components. Sometimes, when you drag a component around, those connections will jump between different points. Those are usually the power and ground pads and the software chooses the shortest connection.
The Ratsnest:

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 cross-talk and noise.
If you can't lay a track because the way is blocked by other tracks, attach a 'via' to move to the other side of the board and continue the track there. To place a Via, right click on the active track as you're laying it and choose 'place through via'. Make sure there is no track sticking out in front of the via. That can become an unconnected track later and you'll have to find it and delete it. Before planting the Via in its place I always shake the mouse a little to get rid of bits of track sticking out where I don't want them.
TIP: Leave all the connections marked 'GROUND' unconnected. We're going to use a groundplane to connect all those together at once, later.

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. Use the mouse wheel to zoom right in on the corners. When the outline is completed, 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.
You need to be aware that there will be places where the groundplane can't reach because it is blocked by tracks from all sides. In that case you'll have to connect those grounds together with a track and make sure the track reaches a ground pad that is covered by the groundplane. An indicator that such a problem occured is when you get an error without explanation. 

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 solderpads or the yellow lines around the components. That will give problems in production with the soldermask overlapping the silkscreen or text overlapping 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.


ADDING LOGOs OR IMAGES TO YOUR PCB.
To add an image to your PCB first measure the space on the PCB where the image will sit in mm. 
Now click in the main start menu on the Image Converter.
Click on 'Load Source Image' at the top right.
Load your image and set the output size to the size you measured.
Choose Footprint Layer F.Silkscreen
Click 'export to clipboard'
Now go back to the PCB editor and click <CTRL + V>. The image appears and you can drag it in place.
You'll see a G*** watermark over your image. Just click on it and delete it.
To place an image on the backside of the PCB just press 'F' on your keyboard.

And that's how that works. 

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. Make sure 'Subtrackt soldermask from silkscreen' is checked on. 


Now at the top, fill in the destination folder for your files. Click on the folder symbol and go into your project folder and make a folder with the name of the project followed by 'gerbers', or something like that. You can give it any name you want.
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:


Leave everything as it is in the picture above and click on 'Generate'. Then click 'close'.

You will know when you checked something on that you shouldn't have, because JLCPCB won't accept it. You'll get an 'Parameter Exception' error message when uploading the Gerbers to their website.

Your production folder will now contain 14 files.


Select all these files with CTRL + A and the right-click and put them all in a ZIP file.

ORDERING YOUR PCB's
After you finished your first projects you will be tempted to order the PCB's rightaway. Don't do that just yet. Sleep over it until the next day and then before you order, check your schematic for errors. Believe me I speak from experience. I thought I had been so thorough in checking but when I started out I spent more than €200 on PCB's that could go straight in the bin because they contained hidden errors.
You need a clear head for this and the mistakes will jump out at you. This saves you money and disappointment. If you have discovered errors you need to fix them in the schematic first. Then save the schematic and go to the PCB editor and import the changes from the schematic. Now you must also make the changes in the PCB design en run the DCR checker.
Naturally, if you corrected errors you must make new Gerber files before ordering your PCB's. Delete all the faulty Gerbers before you make new ones to prevent mistakes,

When everything is fine you can go to the JLCPCB website and drag that Gerber 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 € 2,- for 5 PCB's). 5 PCB's is the minimum you must order. You can choose between a few colours like purple, yellow, red, blue and green. An other colour does cost a little extra though and it takes 2 more days to produce,
If you choose green boards and use the most cost effective shipping (€1,50) your boards will cost about €0,85 a piece for a minimum of 5 provided they are smaller than 10 x 10 CM. The cheapest shipping option is 'Global Standard Direct Line' which takes 12 to 16 businessdays.


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 :)  (The schematic on one PC screen and KiCad on the other.) 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.

FIRST TRY THIS.
With most errors, it's just a matter of updating from the schematic, so in the PCB editor click 'update changes from schematic' even if you haven't made any changes. Now open the DRC checker and click detele all markers and run the checker again. Errors and warnings that show up now will have a valid reason for why they are there.

INPUT POWER PIN NOT DRIVEN BY ANY OUTPUT POWER PINS:
The input of a component that needs a connection to the powerrails seems not to be connected to any power rails. 
If you are sure your schematic is solid and faultless, you can simply ignore this warning.

"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 moving a component and reattaching the tracks. Anyway, to solve this, go to TOOLS > 'Clean up tracks and vias'. If that doesn't work, pull the component out of the board and check underneath for bits of track. Delete them and the track that attached to the component so everything is clean and then put the component back in and reattach the tracks.
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.

NO ERROR WARNING BUT THERE'S STILL A RED CIRCLE when I do the DRC.
If, like me, you connect all the grounds together by using groundplanes (fill zones) for the front and back layers then you can get this error. There's no error message but after the test the error circle stays red with a number or errors listed. This usually means that there are connections to ground that can't be made because the fill zone can't reach that component. The component is shielded by tracks. In this case you have to unfill the board and connect those grounds together with tracks. 
It can also be an other track. When you see the red circle with a number inside and no warning text this means there a track you've forgotten to connect. Go over the board and look for unconnected components.

MISSING FOOTPRINT and EXTRA FOOTPRINT for the same component(s).
I'm not sure what causes this but it happened to me and I went back into the schematic, right clicked on the component the warning applied to and, opened 'Properties' and just clicked on the same footprint I had already chosen for it. Then I updated the PCB from Schematic and the problem was gone.

TIP: If you want to delete all tracks and start again you can do so by going to  EDIT > Global Deletions. There you can check what you want to delete and then it will be deleted for the whole PCB.

HAVE YOU EVER WONDERED HOW THOSE PCBs ARE MADE IN CHINA??
Watch this:



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!


4 comments:

  1. "Once you downloaded KiCad and succesfully installed it on your Mac or Windows 10 or 11 PC..." Or Linux!

    ReplyDelete
    Replies
    1. Ah good point. How could I forget Linux :) I'll add it thanks!

      Delete
  2. Dangit, this is a sad day to learn Eddy’s Stripboard masterpieces “may” have come to an end :(
    You’ve provided the world’s needy benchmen with all the building blocks and then some to build some fabulous systems out here.
    Thank you for all of that my friend🙌

    ReplyDelete
    Replies
    1. Haha thank you! Well there are some 70 projects to choose from and future projects will include a PCB service so people can buy the PCB's for a small fee. But yes, it's sort of the end of an era. :)

      Delete

Note: comments are moderated and do not appear straightaway. Your first comment is not allowed to contain any links.