New BOM tool available

I just wrote a small tool to process bills of materials from KiCAD. If the part information is in the schematic,

KiCAD BOM to CSV converter

This is a Python 3 program to convert KiCAD Bills of Materials to a CSV format suitable
for uploading to major part distributors including Digi-Key and Mouser.

Usage

To use this program, each item in a KiCAD schematic needs some additional information for ordering.
The suggested information is:

Mfgr        Manufacturer (TI, etc.)
Part        Manufacturer part number
Vendor      Vendor name (Mouser, etc.)
Vendorpart  Vendor's part number

You can use any names; they just have to be consistent.

Use the BOM icon button in KiCADā€™s schematic editor to generate a BOM file with
an XML suffix. No filters are required.

Run the program as follows:

python3 kicadbomtovendor.py  --split Vendor BOMFILE.xml 

This will generate one .csv file for each different value of ā€œVendorā€. The files are
generated in the same directory as the XML input file.

The output .csv files contain column headers and one line for each part. Multiple
instances of the same part are combined into one line, with the quantity column updated
appropriately. The ā€œREFā€ column will contain all the schematic instances using that
part number.

These files are acceptable to the BOM uploaders for both DigiKey and Mouser.
Once uploaded, the parts can be ordered.

1 Like

(And now I find out about kicad2bom.)

Ah, well, no problem with that. I predict that at some point in the future, KiCad will have as many BOM utilities as it has users. :slight_smile:

3 Likes

@John-Nagle Did you try my plugin :wink:

You can make your own templates That control what data and file type you want. :grin:

@devbisme true

I look forward to the day when itā€™s decided upon a specific BOM tool thatā€™s integrated into KiCad. Preferrably I would like to see something where you manipulate rows, columns and specific rev/author/company/fields in a live viewer before you export it to your preferred format. Hopefully this tool can also let you remove or edit details for parts, and you can save a ā€œBOM configā€ file for each project to remember which order you want your columns and fields, which parts to exclude and so on.

you may have a look at


1 Like

Not sure if Iā€™ve seen/tried that. And Iā€™ve searched for BOM tools many timesā€¦

Will try it on a current project, thank you.

There is also some discussion on that plugin at the forum
ā€¦

Eeschema should probably have standard fields for parts like ā€œManufacturerā€, ā€œManufacturer part numberā€, ā€œVendorā€ and ā€œVendor part numberā€. Those are the four data items you need to order parts.

Just adding those four fields as built-in names would help. This would standardize the field names used for components. Then BOM output programs would have standard data fields to work from. Right now, thereā€™s only a standard ā€œDatasheetā€ field.

Open EEschemaā€¦ and add the fields you want - Thank [deity of you choice] they didnā€™t push anything onto the users and weā€™re free to do what we want - not all people want those field definitions how you might find them useful.

ProTip: make the Default Value ā€˜_ā€™ or somethingā€¦ NOT nothing, as otherwise they wonā€™t make it into the libraries and also not into the schematic.

Any NEW symbol you create from here on will have those fields (if Default is NOT empty).
Any symbol you edit will have those fields (if Default is NOT empty).
This will not (95% certain, too lazy to test right now) ā€˜createā€™ those fields on-the-fly for existing schematics and/or symbol libraries.
You would expect any symbol that doesnā€™t come with these fields getā€™s them when it is loaded into a schematic with these settingsā€¦ but that is not a given, as different people might have set up their symbol libs with different pre-defined fields (symbols from different libs with clashing field definitions) into one schematic.
KiCAD keeps those fields separate afaik, but no idea what the BOM tools make out of this reallyā€¦

To make a long story shortā€¦ as soon as you get to this point itā€™s better to use your own local libraries and run them atomic with symbols/footprints pre-linked and all fields filled in, so you essentially have 1 symbol for 1 part you do use in your schematic/layout.
Just search ā€œatomic partā€ on this forum and you find enough examples to hook onto for how to do this.

2 Likes

Thatā€™s such an open-source answer - donā€™t standardize, dump the problem on the user.

The electronics parts industry runs on four fields. If those have standardized names, tools can use them, and parts libraries can be set up to use them in a standard way.

KiCAD and the Open Parts Library should be consistent about this.

https://octopart.com/common-parts-library

1 Like

Are you sure you know what youā€™re asking there John?

So far KiCAD consists off a collection of symbols for a LOT of components and leaves it to the user to link them up with footprints of his/her choice.
You can mix and match where you see fit.

Any partnumber/datasheet/etc that would be defined by the symbol would also necessitate that the KiCAD librarians would need to create libraries for a lot more parts (some symbols stay for 10 or more packaging variants/part numbers) and would also need to pre-link the footprints.

I and a lot of others do this with our OWN private libs - defining atomic parts. Itā€™s a lot of work and I wouldnā€™t want to lay the necessary quality control onto anyone else. YMMV.
Thatā€™s why I said, KiCAD gives you a choice - itā€™s serving the beginner/hobbyist as well as the more advanced/professional user.
But KiCAD wonā€™t be able to do the necessary legwork to convert all current libraries that are into what you want - atomic parts.
If at all, KiCAD, at some point in the future will provide better tools to manage atomic part libraries, but thatā€™s it.

For example this thread deals with it (there are others too, but canā€™t find them right now).

1 Like