How to create a bill of materials (BOM)?

There are two options in KiCad to create a BOM. Either from the schematic or pcb side.
Creating a BOM via pcb_new is very simple but also limited in its capabilities (The pcb knows only about the reference, value and footprint assigned to a symbol.)
Creating a BOM via eeschema is a bit more complex to setup but can do a lot more. Most notably eeschema can include much more information for each symbol (one can add additional fields to symbols.)

Creating a BOM from pcb_new

Use File -> Fabrication output -> BOM
select the location and file name and your BOM will be created.

The BOM will include the references, values and footprint fields. It is grouped by value.

pcb_new also has a pyhton api so it is possible to write more powerful BOM plugins that way but it will always be limited by the information available to pcb_new. (For an example see the section User plugins below)

Creating a BOM from within EEschema

Every symbol placed in the schematic can have a number of fields (or attributes). By default, these are the value, footprint and datasheet fields but one can also include more information like for example order information. These fields can be added at schematic design time, or they can already be set in the symbol library. See Tutorial: How to make a symbol (KiCad v5.1.x) section Adding user fields for better BOM output

Simple option via the symbol field dialog

Open the symbol field dialog from eeschemas tool menu. You will be presented with a table view of all symbols fields in your schematic. Use the group by and visibility boxes to tailer the BOM to your liking. Leftclick on the top left cell and shift left click on the bottom right cell to mark everything. Use crtl+c to copy the table. Open any spreadsheet program (libre office calc as an example) and use crtl+v to paste your BOM. You can also paste it into any text editor to get a csv file.

Using BOM scripts

EEschema uses a plugin system to create the BOM. KiCad comes with a few default plugins but there are many useful plugins build by the community which give better (more powerful) results.

So lets show you how to get one of KiCads BOM plugins setup. The plugin used in this tutorial will generate a html page (readable with your webbrowser)

First start the bom dialog either from the top toolbar or from tools -> generate bill of materials

You will get this dialog. For me it was empty when i first ran it, if there is already a plugin setup then you can try and run it to see what happens.

To add a plugin us the “Add Plugin” button (highlighted in the screenshot above).
A file browser should open.
Navigate to the location of your BOM script. The scripts supplied with kicad can be found here:

  • windows: C:\Program Files\KiCad\bin\scripting\plugins\ or C:\Program Files (x86)\KiCad\bin\scripting\plugins\
  • linux (ubuntu 16.04): /usr/share/kicad/plugins/

Select the bom_html_grouped_by_value.py file (double click the file name)

A popup will appear asking you to enter a nickname for the script. In most cases the default value (equal to script file name) will work. If however there is already a script with the same name then you will need to select a different name.
enter-nickname

After that kicad will have added the plugin to your bom dialog.

This would already work but the output file will miss the file extension. This means double clicking would not open the web-browser. So lets add the correct file extension to the command definition:

After that you should be able to click the “Generate” button to get a simple BOM in html format.

You might want to add some of the other scripts as well and check if one of them suits your needs better than this one.

Useful user plugins

The kicad default BOM generators are quite limited. Luckily the community has made some very powerful plugins.

12 Likes