Generate Kicad BOM for JLCPCB
KiCAD BOM for JLCPCB
Ordering a PCBA from JLCPCB is very easy. All you need is two things: a component placement file and a BOM file. JLCPCB expects both of these files to be in a certain format of CSV.
Kicad also the ability to create these files. It. It blue 42 tag. Insert image of keycad PCB file menu fabrication outputs hut In KiCAD open up your PCB editor and go to file. Fabrication outputs, component placement and I use all the defaults here and click generate position file.
Blue 42 tag Insert image of Generate Position file widget hut
Similarly, you can select Fabrication Outputs BOM and this does not have any options. It just prompts you to select the output file.
Let's look at both of these files.
It it 42 tag screenshot keycad Placement File Original it
Once you go into JLCPCB and start an order, you give them your Gerber files. Then if you select for a PCBA order, you will then go to select or provide the BOM and placement materials section.
JLC requires the component placement to have a certain header. It is simply in this case just to change the names of the header cells. Otherwise the file is compatible. So this is fine. Blue 42 Insert Screenshot JLC Component Placement Required Format it it
blue 42 Insert Screenshot JLC BOM or Wired format it 42
So as you can see here, the KiCAD BOM schema is not going to work and the component placement CSV is almost there. Just needs a slight modification.
So I decided to create a script to do this because there was no way I would ever be willing to do this manually as this task will be repeated every time I need to order a PCBA. Also, I understood that the script would be very straightforward to write, particularly because of my favorite feature that KiCAD has, which is a s-expression format. I have been doing a lot of little projects involving reading the KiCAD file data and extracting information from it as well as inserting things back into them. The idea in this case is very simple. You take a PCB and get every single footprint on the PCB. Each footprint will contain a value which will be associated to a JLCPCB component. Then it is simply a matter of producing the output CSV
There is one thing that you always will have to do of course, which is to identify the components to be placed on your board. To support this, I introduce another CSV file called the Parts file. This is a very short and simple file which just associates JLCPCB part numbers with values.
The script I came up with is very obvious to use. Here is an example of command line it
blue 42 insert screenshot no copy paste not available yet.
The command line just takes the path to the PCB file and the path to the parts file. It will put the resulting BOM for JLC PCB in the file called output CSV and this file is ready to be uploaded to JLCPCB.