What MakeDigikeyBoM is
MakeDigikeyBom (GitHub location) takes the components that are part of a PCB schematic made in Kicad’s eeSchema and creates a CSV file that has the digikey part number information for quantities where the minimum order is 1. This CSV file can then be loaded into an app like Google spreadsheets. Here is a the Google spreadsheet that originated from the GrowChamberSensorPuck project (GitHub location):
I use the Eclipse/PyDev IDE exclusively to run makedigikeyBOM.py. Yah…This is ugly compared with running python from the command line. I do this because my skills in python are at an advanced beginer’s level (at best 🙂 ). I take advantage of the extensive features such as debugging, setting up input, adding tasks… this IDE offers.
When it comes to Python, I’m just not ready to take my floaties off.
Steps to Get to the BoM CSV
- Get the Jellybean parts csv file ready. The Jellybean parts contains categories of parts (like R for resistors, C for capacitors….) that are referenced within a component’s PN in eeSchema (see the example under the next step where the R5 component’s PN=R). I start with this jellybean parts file. I download this jellybean parts file as a CSV file as a start. I then renamed it JBParts.csv (just a simple name)…More jellybean parts can be added (or removed).
- Run bom2csv (discussed here) to create the XML file. The XML file will have the filename of the Kicad project. For example, the Kicad project I used was GrowChamberSensorPuck (GitHub location). This means the bom2csv’s output XML filename will be GrowChamberSensorPuck.xml. The created file contains an XML tree for each component. The important fields are the ref, value, and PN fields. These must be filled for each component in eeSchema. The images below point out part numbers can be either Jellybean parts, manufacturer part numbers, or X (for exclude this component from the BoM).
- Set the variables up within the Eclipse/PyDev environment. As I noted in this post, there are three important user inputs:
- The full name of the bom2csv file. In my current example, the full name I will use:
- The full name to the jellybean parts file. I will use: /Users/margaret/Documents/LettuceBuddyHW/LadyBugHydro/TheHerbSpa/GitHub/Kicad/JBParts.csv
- The file folder where the MadeDigikeyBOM.csv will be written. I will use: /Users/margaret/Documents/LettuceBuddyHW/LadyBugHydro/TheHerbSpa/GitHub/Kicad/
To set the variables up, I’ll go into the debug/run configurations within the Eclipse/PyDev IDE:
Then I run MakeDigikeyBOM from within Eclipse. This creates the MadeDigikeyBOM.csv which I then import into a Google spreadsheet.
Well…MakeDigikeyBOM works for now… As I continue to use this BoM creation tool, I am sure I’ll come back to evolving the code and documentation. For now, if you are interested, look at the code at this GitHub location. I tried to document the code with ample information to know the intent of each section.