You are not Logged In! |
Public:KiCad
See PCB Design for design basics & guidelines. See GitHub for setting up the files you're going to work with.
KiCad is the e-cad (electrical computer aided design) program we use exclusively since 2018. It is an open-source project and is constantly improving and growing in capabilities. It has many advantages for a distributed long-term student project including that it is free/open-source, has human readable files, and is scriptable with python. On this page you will find info on getting your KiCad Install Setup for use on Illini Solar Car.
If you have any trouble with this set-up you can get help on elec-cad. Please update these instructions if you find ways they can be better!
Images may Differ | |
Minor versions of KiCad v5 have had many cosmetic updates, the images below may look a bit different than what you see. |
Use the Template for New Designs | |
You must start your projects from the template or they will not be accepted! If you have started without the template you should create a new project from the template and copy your schematics into that (Note: you must add your old project schematics as a hierarchical sheet to copy from it). You can ask for help with this on elec-cad |
First Time Setup
A video tutorial for downloading and setting up KiCad as well as cloning the PCB repository can be found in the first video of Rahul's KiCad tutorials playlist.
Install and Run
- Download the latest 5.1.12 version of KiCad for your operating system
- v5.1.12 Windows direct download
- v5.1.12 MacOS direct download
- Some OS's have special instuctions - follow them.
- Note that KiCad has historically had stability issues on OSX / MacOS. If you have access to Windows or Linux those are recommended.
- KiCad is available on many Linux package managers - make sure you do not get the nightly version.
- Otherwise KiCad installs like any other program
- As you go through the install wizard you can use the default options
- You can optionally deselect the Help article languages you don't want, as well as deselect the Demonstration projects, since we have completed projects for you to look at already
- Enjoy, and check this wiki as well as the KiCad help resources before asking about issues on elec-cad
Library Setup
Note: This applies to KiCad v5 projects on GitHub since PCB#62.This should cover most projects, and all new projects. But if you need to view older projects please update them following the instructions at Upgrading a project from KiCad 4 to KiCad 5
Our libraries, as well as KiCad's own schematic symbol libraries, have now been moved to a submodule of the main repo. Make sure you've followed the GitHub directions in order to get those libraries on your machine. They are in the Libraries folder of the PCB repository. If you first open a schematic in KiCad, without setting this up, you'll probably see a lot of question marks (?) all around the schematic. To fix this follow the below instructions.
To setup the Libraries in General we need to let KiCad know where they are! To prevent our set-up from Interfering with your outside usage of KiCad we use ISC specific Environment Variables.
- Open KiCad. Start these Instructions from the home screen
- Click on Preferences --> Configure Paths...
- Add a new path (press "Add") with the name
ISC_SYMBOL_DIR
and insert the path to the Libraries in your repo:PathOnYourComputer\PCB\Libraries
This should be all you need! Our libraries are now managed using project specific libraries specified by the library tables in the project (provided with the template project)
Starting a Project
- Create a checkout a branch for your project in the PCB Repo (See GitHub/PCB for specific guidelines)
git checkout -b <branch>
- If you need to make new symbols or footprints you also need to create a branch in the Libraries repo. If you are unsure, you can always do this later when the need arises. (See GitHub/Libraries for more info)
- Copy the latest template from the Dev Folder to the location where your project will live
- Rename your project following the naming conventions - you will need to rename the folder and every named file manually.
- Do not rename the
.kicad_wks
file or others files not named for the template - otherwise your settings and/or libraries may not be set-up right
- Do not rename the
- Make an initial commit to the PCB Repo to create your branch on Github. (Use
git push --set-upstream origin <branch>
for the first push)- Remember that when working with Submodules you need to commit to the submoduled repo (Libraries in this case) first. See Github to learn more about submodules
Now you are good to go working on your project! Make sure to follow the Schematic Conventions and Layout Standards.
Viewing Old Projects
Some projects you may want to view, such as previous board version, may be made with an older software. To view them you'll need to do a bit of work using the instructions linked below:
- For KiCad v4 Projects - follow the instructions at Upgrading a project from KiCad 4 to KiCad 5
- For KiCad v5 Projects not using the
ISC_SYMBOL_DIR
Environment Variable (Note: these should have all been fixed with a script, so hopefully you don't find any)- Replace the
sym-lib-table
andfp-lib-table
with the ones from the current template. Then open the files to double check it all looks right - Please open a PR with the fix on Github
- Replace the
- For Diptrace files you will need to install Diptrace to view. See Electrical Software Instructions for info on activation and install.
- For KiCad Projects without library tables (we originally used Global Libraries)
- You should be able to just copy the tables from the template - but if you have issues you can follow the old library set-up (used before PCB#62)
General
- Click on Preferences --> Configure Paths...
- Change
KICAD_SYMBOL_DIR
(click on it and then "Edit") to the path of the Libraries folder- The Libraries folder should be
<ISC folder>\PCB\Libraries
- The Libraries folder should be
Schematic Symbols Assumes you have eeschema open
- If in Project window, otherwise go to next step. Click on Tools --> Edit Schematic Symbols...
- If this is the first time you've run eeschema (or possibly after an update), it will ask you to "Configure Global Symbol Library Table". Stick with the default and click Ok
- If you get a whole bunch of errors, then hold the ESC key until they're done. At least you know you're in the right place to fix those!
- Skip #1 to go here if you have a schematic open. Click on Preferences --> Manage Symbol Libraries...
- Make sure you are on the Global Libraries tab of the popup box
- Select all (ctrl+A or cmd+A) the libraries that are there by default and remove them
- Then click on Browse Libraries... --> navigate to the folder called schematic in the Libraries folder in our repo --> select all --> Click ''Open''
- These are the custom ones we've made for solar car parts.
- Make sure you add these first; we override some of the default library symbols
- AGAIN click Browse Libraries... --> navigate to the folder called schematic_kicad in the Libraries folder --> select all --> Click Open
Layout Footprints Assumes you have Pcbnew open
- Click on Preferences --> Manage Footprint Libraries...
- Make sure you are on the Global Libraries tab of the popup box
- Click Browse Libraries...
- Navigate to the Libraries folder inside the PCB repo
- Inside the Libraries folder is a folder called layout.pretty
- KiCad uses the .pretty extension on folder names to delineate footprint libraries
- Select the layout.pretty folder and click OK
- In the list of libraries (probably at the bottom) you should now see one called "layout"
- Click OK again to exit the library manager
Bill of Materials
The Bill of Materials (BOM) is the list of parts you need in order to fully assemble the board. Since all this info is in KiCad, we just have to get it out in a format that is useful for what we are doing with it!
Before you begin, you need to make sure that all of your parts have the required information as specified in the Schematic Conventions.
Our BOM Methods need improvement | |
Note that we don't have a great BOM system as of now. Currently, there is a lot of manual work to make sure to get it right. If you want to work on this, you can make this better with Python Scripts/Plugins and/or GitHub Actions! |
The Tools -> Edit Symbol Fields table can act as a BOM Previewer within KiCad to view all of your parts and their info. You can also mass edit things (such as applying part numbers to a bunch of the same part)
See the KiCad/BOM page for info on how to export the BOM for different usages!
Export for Manufacturing
To manufacture your files you simply need to export the needed files. That is, the Gerber X2 Files for each relevant layer and the drill file for the board outline and holes (such as mounting). You will do this using KiCad Plot functionality.
- You can follow this tutorial to export the files for your board.
- Make sure the drill file is exported in millimeters, not mils or inches. Otherwise the Bay Area Circuits DFM will round and possible fail your board due to rounding.
- Compress all of the files into a .zip file. This .zip is what will be sent to the manufacturer and what goes on Git. Do not upload the individual files. This .zip should be inside your project folder
- Once you have this .zip you can run the DFM report to make sure that passes
- When the Board Run is ready the DFM report and zip file will be sent in.
- For assembly you will also need the Bill of Materials (above) in Partsbox
Plugins
KiCad makes it really easy to integrate 3rd party plugins in KiCad. A plugin is essentially just a python script that you can run from inside KiCad so it has access to what you are currently working on. You can find KiCad plugins online from many sources to do all sorts of things. Additionally, we may also develop some of our own.
Installing Plugins is easy, just place the plugin files in their own folder in the KiCad Plugins folder. This differs by OS:
- Windows:
%APPDATA%\kicad\scripting\plugins
- Linux:
/usr/share/kicad/scripting/plugins/
- Mac:
~/Library/Application Support/kicad/scripting/plugins
If you have KiCad open you can add the Plugin by going to Tools -> External Plugins -> Refresh
although some may need a full restart of KiCad
Some useful Plugins, we recommend that everyone install HTML BOM - install others as needed:
- Interactive HTML BOM, useful for helping you while building a board. See KiCad/BOM for more info
- RF Tools: Includes several tools, not only useful for RF, including Curved Traces, Track Length Matching, Via Fencing
- Teardrops : makes teardrops into vias and/or pads which increases the inferface between the trace and the via/pad. Most useful to reduce mechanical/thermal strain and thus prevent cracking traces
- Via Stitching and Circular Zones: Stitch together copper areas with vias more easily and create round copper zones
Useful Links
Shawn Hymel's Tutorials - videos for every step of PCB design and manufacture
KiCad's own website - videos, example PCBs, and textual tutorials can be found under "learning resources"
"Make Your First Board" - great tutorial for visual learners
Rahul's tutorial videos - Created during Electrical Onboarding 2020, great guide for getting started with the team
| ||||||||||||||||||||||||||||||||||||||||