JLCPCB KiCad PNP Scripts

Is anybody familiar with this procedure? Did you have any issues with JLC or the finished product?

There is also another thread here that employs a different technique.

Has any progress been made with integration? Is it easier to generate a file and order a board? Are there any other tutorials or scripts I should investigate?

I wonder if they couldn’t afford a licence for a newer KiCad version.


Well if KiCads own tutorials are out of date then we should not be surprised that tutorials by third parties might also have a chance to be outdated. (The main information of the tutorial is still correct, but the screenshots are indeed slightly of date. I updated mine for a similar tutorial just last week: How to create a bill of materials (BOM)?)

1 Like

I ordered a board recently through JLCPCB without any real problem. I used this tool (the link is my own fork).

Generating the BOM worked with no real issues. I just set “LCSC Part” and “JLCPCB BOM” properties for each part as I desired. The generated file was accepted by JLCPCB as expected.

As for the CPL file, I don’t believe that the rotation issue (as discussed in the thread you linked) has been solved universally.

Personally I like to avoid manual manipulation, and I also like the schematic be the source of truth for a project. To this end I forked the above repository and modified the CPL geneation script to support rotation based upon a part property called “JLCPCB Rotation”.

Using this modified script I just had to run through the JLCPCB process twice:

  1. Upload a BOM/CPL without ‘JLCPCB rotation’ set on any components. Here all components should be present and the centroid correct, just rotation may be off. I went through each BOM item, noted down the rotation, and set my ‘JLCPCB rotation’ property to the rotation in degrees that was required.
  2. Regenerate CPL (and BOM too for good measure, but this should be unchanged), and verify that all components were placed correctly.

I used KiField for all of the part property manipulation.

I believe that there are several scripts out there to achieve this, and the one I used might not be the best, but it let me manufacture a board fairly painlessly.

If you wanted some files you could use for a dummy run out of the process, I do have the design files for my board (including the BOM and CPL files which can be uploaded to JLCPCB) on github (but with no documentation as of yet!). Just upload, manila_ice-jlc-bom.csv, and manila_ice-jlc-cpl-top.csv from the hw/outputs folder.

I had no issues with JLC or the finished product. I was actually very impressed with the quality, both of PCB and of SMT soldering. The only thing that isn’t made clear (but I did know ahead of time) is that they drill their own fiducials in your board (note the drill holes in the far top left/bottom right corners of my PCB)


Here is a photo of my board for context (I couldn’t put it in the original post as I was only allowed two links!)


Thinking out loud, this seems like a perfect place for an Action script so that people can export the manufacturing data (BOM, PNP, etc) for a particular supplier. Between JLCPCB, Pcbway and a few others, this could be really handy!

I think there have been some plans for better output management natively. But it’s not in the roadmap.

Some time ago there was a discussion about
, Kicad output it assembly position file with one standard and JLCPCB use other.
Practical saying, some elements present a 90 degree rotation. Last time that I used, I manually edit the position file.

About the component list / BOM I added the LCSC cost column at KiCost (New KiCost release), the components distributor used by Jlcpcb.

I totally agree, manual file manipulation create a more human interference factor to the project. One that definitely should be avoided.

1 Like

My operating system is Linux Mint and I never found the root folder for KiCad. I have a similar file in DipTrace and that file helped me familiarize myself with the JLCPCB SMT service.

I’m going to try and do things manually and see what happens. If I can set my grid origin correctly, it shouldn’t be too much trouble.

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