Parts Management, BOMs, and Ordering Material with KiCad
For all but non-trivial projects, a streamlined process of specifying, managing and ordering the part for assembling a PCB board is essential. In particular boards with SMT components often requires the very exact part that was used for drawing the footprint. On this page, we describe a simple yet efficient process for this.
Step 1: Add respective Meta-Data to Parts in KiCad
The first you have to do is adding part meta-data to your project right in KiCad. This is less work when done during the design in passing, but can also be done after the schematic or PCB has been completed.
You need to add additional fields to the components via Kicad -> Preferences -> Template Field Names. Warning: Changing the name of an existing field will delete all existing data for that field.
- MFN -Manufacturer Name (like "Intel")
- MFP - Manufacturer Part Number, or MPN
- Mouser Part Number
- Mouser Part Link
- Alternative Source Name
- Alternative Source Part Number
- Package ID
- Source - use "ANY" for any supplier, or "SPEC" for exactly that source. Helpful if you want to outsource the production.
- Critical - Indicates whether the exact match of this part is critical
You must populate at least the MFN and MFP fields, but I recommend to fill them all, including the Datasheet link that Kicad predefines. Best practice is to fill them all while specifying the design and prior to doing the PCB layout.
Step 2: Export and Convert the Bill of Materials (BOM)
Now, generate the XML file for the BOM: Kicad -> Tools -> Generate Bill of Materials.
This will create a file
in your project folder.
and install the required Pandas library:
pip install pandas
Make sure you are running Python 3.x.
Since the script will reside in another folder, it is useful to add an alias for the following command. Put it in your .bash configuration:
alias bom='python ~/daten/<path>/kicad-utilities/bom.py'
Then, generate an Excel file for your project
You have to specify the name of the field that holds the unique part number using the "--mpn" parameter if it is not "mpn":
bom --mpn MFP <your-project>.xml
This will create an MS Excel file
in your project folder.
You can format and clean-up that file, e.g. by removing parts that should not be ordered.
The script combines equivalent components into one row with the correct quantity on the basis of the manufacturer part number.
Step 3: Import BOM into Mouser
mouser.com and many other distributors allow importing and sharing BOMs.
Go to http://www.mouser.de/servicesandtools/ and click on NEW! BOM Tool and select and upload the Excel file.
Now you need to tell Mouser which column should be used for the quantity and the Mouser or Manufacturer Part Number. If you populated a Mouser number in Kicad, you should use that; otherwise Mouser has to guess the correct item.
Hint: Use the field ref as the Customer Part No. equivalent. Mouser will then print the component reference(s) for your parts directly on the invoice etc. and often even on the labels attached to individual part bags. This will ease your life a lot when assembling your boards.
Then, finish the import.
You can then order multiples of these BOMs by directly adding them to your shopping cart, and you can share the URI of the BOM with others, e.g. as part of the project description.
How cool is that?
Optional: Price Comparison with Octopart
In a very similar fashion, https://octopart.com/ allows you to upload the very same Excel file and get price information from all major distributors.