Creating a useful BOM?

Just started using KiCad and coming up to speed. Everything was going quite well as I work my way through eeschema, PCBnew, component symbol editor, foot print editors etc etc.

Today I wanted further my learning journey and generate a BOM. I was gob smacked with what I experienced. Really surprised how poorly implemented the BOM generation is.

Having researched many threads on the forum how confusing and complicated it is to generate one. Very surprised how far behind the BOM generation is with respect to the sophistication of the rest of KiCad.

Is the BOM generation likely to be brought up to some form of usefulness anytime soon?

Is there a go to tutorial that steps out a procedure to enable a basic but useful BOM?

I agree the BOM tools are really a bit strange. The interface is not really made with users in mind. It shows things that a user would not expect to need. (It would really help if by default a simple plugin would be there already pre configurated)

To help you further we would need a bit of information from you.
What is your kicad version? What operating system?
How should the generated BOM look like? (Do you even care?)
What information do you want to be included? (Just the default [= reference, value and footprint] or more?)
Do you want to use the resulting BOM in a program similar to excel? Or are you only interested in printing a nice looking list? (Or something else entirely)
Do you want to manage multiple variants of your pcb? (Manage if some specific part is placed depending on the chosen variant)

To help you further we would need a bit of information from you.

Thanks Rene appreciate your help again!

What is your kicad version?
Version 5.0 (this is the only version I have used, just started the journey. I used Protel many moons ago, just a hobby now that I am retired)

What operating system?
Windows 10

How should the generated BOM look like? (Do you even care?)
What information do you want to be included? (Just the default [= reference, value and footprint] or more?)
Just a basic BOM as you suggest…reference, value and footprint is fine. Just for reference when you build the board

Do you want to use the resulting BOM in a program similar to excel?
No just a hard copy print as I said above to aid in assembly.

Or are you only interested in printing a nice looking list? (Or something else entirely)
Just printing…

Do you want to manage multiple variants of your pcb? (Manage if some specific part is placed depending on the chosen variant)
No I don’t see that as a requirement.

I agree there should be a default setup embedded in KiCad so it enables at the very minimum a basic BOM without what appears to be for people like myself who are not into python scripting headache of getting a basic BOM output.

I think this might be a case of the design team becoming to close to the design and assuming that users will be comfortable with what appears to be a complicated process to get a basic outcome.

Thanks again I appreciate for your willingness to help. .

Nah, it’s rather they have bigger fish to catch at the moment and this registers at best periphery for them, esp as EEschema needs to be overhauled anyway, while so far they have mostly worked to get PCBnew up to scratch. :slightly_smiling_face:

So lets show you how to get the simplest bom plugin setup. This plugin 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, if there is already a plugin “installed” then you can try and run it to see what happens.
01_1

To add a plugin us the “Add Plugin” button.
A file browser should open. I hope the path is the same for you as it was for me (I used windows 7 to test this) For me the path was C:\Program Files\KiCad\bin\scripting\plugins
Select the bom_html_grouped_by_value.py file (double click the file name)

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 file browser. So lets add it to the command definition:

After that you should be able to click the “Generate” button to get a simple BOM in html format. maybe add some of the other plugins as well and see which one gives you the output you want.

3 Likes

@Fleetz, yes. Really useful BOM are made by user scripts as @Rene_Poschl exampled.
Two more useful BOM tool:

  1. https://pypi.org/project/kicost/ (https://github.com/xesscorp/KiCost) Helps you to generate a XLXS cost BOM spreadsheet using the distributors web data;
  2. https://github.com/openscopeproject/InteractiveHtmlBom. Create a visual placement BOM (example here https://openscopeproject.org/InteractiveHtmlBomDemo/2/ibom.html).

Both made on Python by the users of KiCad.

3 Likes

Thank you very much Rene, appreciated.

I will try this out tomorrow, I have been at it 10 hours today and my brain is fried. You instructions are well documented and easy to follow so I should be good to go.

Will let you know how I go.

Regards,
Ian

Thank you, will looking into these after I get the basic BOM Rene’s suggesting up and going.

Hi Rene,

This has been extremely helpful thank you.

I have been able generate a basic BOM which is all I require. The only thing different I experienced is that when it generated the file it did not generate a .html file extension? If I compare your last image it clearly shows yours generates the .html extension however if you have a look at mine it doesn’t.

No big deal as its easy enough to add the extension and it works fine it opens in Google Chrome and I can print it from there or copy and paste it into Word.

no%20HTML%20ext_LI

Thank you so much for taking the time to detail the procedure.

Kind regards,

Ian

I think you just missed / skipped over this bit, in his post.

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

2 Likes

Thank you for pointing this out. Yes I overlooked this step, apologies to Rene.

Once I added the .html or .csv extensions as describe it works a treat.

Thanks again

Ian

re: useful BOM. I need a bill of materials that has all matching parts collected together showing quantity, assigned reference designators, and manufacturer and manufacturer part number. It would be preferred to have them grouped by type, i.e., caps, resistors, connectors, transistors, diodes, and so forth. Right now I get the BOM from KiCad as a single component per line and manually edit it in a spreadsheet. I have used the group by item choice in KiCad but stopped doing so when the reference designators would get truncated with ellipsis.

@jhof Are you using the Symbol Field editor in Escheema?

I don’t know if the developers realize how well suited this utility is for becoming an in-program BOM generator in the future.

At the moment it seems like sorting is done with the RefDes and Value. However, items such as U1 or U2 do not necessarily require a “Value” entry; that then gets shoved into PcbNew.

If the Symbol Field editor in Escheema could handle this issue then it would be likely that I would not need any of the plug-ins mentioned above. However, a nice feature to add would be the ability to take a CSV file and import the data from it into the Symbol Field editor; this would probably eliminate most needs for any external plug-ins for BOM management.

1 Like

From the last section of this FAQ entry https://forum.kicad.info/t/how-to-create-a-bill-of-materials-bom/12346:

This tools of course require you to have this information already in the schematic. KiCost is a tool that can help with managing all of this information:

Another useful tool is the field editor already mentioned by @Sprig

1 Like

@Fleetz, don’t be afraid to learn some python either, you will find it is easy to learn and used all over the place to customize and remote control software. I believe KiCAD 5 uses Python 2.7.14, tutorial here: https://docs.python.org/release/2.7.14/tutorial/index.html

You might find this older thread (2016) on BOM conversion informative as well: New BOM tool available.

ALSO: Note that digikey has a library setup that is what I believe you are calling “atomic” I might say it is “monotonic” in the mathematical sense, i.e. there is one symbol and it has one footprint, if you need a different footprint you must use a different symbol. Its on github: https://github.com/digikey/digikey-kicad-library/blob/master/README.md

Thanks for the pointer to Python.I will look into this a little further down the road. My learning curve is steep enough at the moment, my 62yo brain is stretched ATM! (; Been 20 odd years since I have done schematic and PCB layout, back then was using Protel.

Looking at the bug list the developers will have their work cut out keeping up with them. I suspect refining the BOM outputs is low man on the totem pole. In the meantime I have enough to get me out of trouble.

Thanks for all the help…

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.