Wrong components alignment for JLCPCB (no clue if due to KiCad or due to script)

Since always, I got this issue wit JLCPCB about the component alignment, when it comes for Diodes, Transistors and ICs

I have not clue if this is due KiCAD or due the Export Plugin.
So I opened also an issue here:

In facts, I get always misalignemnts like this:

Or, in case of Transistors and ICs, it’s rotation angle that’s wrong.

Ok, JLC corrects these issues by hands, and now I got the use to pre-edit the CPL file to rotate things by hands. Of course Diodes Alignement is more complex (too many try-and-error).

By KiCAD (internally) the components are placed correctly:
Just the output seems having this issue.

1 Like

Known problem unfortunately:

1 Like

…with the plugin or Kicad or both? I found similar issues with my first two board orders with JLC. Although I did not notice the offset with the diodes I used, almost all of the rotations were off for anything with polarity and the IC’s Technically the non-polarity parts could be rotated wrong but who would care for symetrical parts?

If I recall correctly this is because there are two ways of determining part rotation. One is an actual standard which I can’t recall the name of and the other is using the tape and reel information from the manufacturer. The latter is used by JLC while the former is used by Kicad.

In previous orders with Macrofab I did not have this issue. Its possible there were issues with PCBWay orders but they may have corrected them without telling me.

So I had a look at the export plugin script and noticed it processes fields for offset and rotation. I modified the script slightly in a coupIe of ways inclusing using my preferred fieled names. I then used the JLC interactive placement tool and noted the rotation required for each part. I then went back to my schematic and entered these rotations for each and every part. I then uploaded the design again and voila! all the parts were orientated correctly.

Even though JLC uses a different standard then Kicad I believe the part rotation is repeatable and predictable. One could just look at the tape and reel information for a new part and compare it to the required rotation for a known part. And then build a personal library of JLC parts with this information including JLC part numbers already populated.

Lastly after all this all the parts were offset from the boards by a significant distance. I just let JLC do the correction for this. That may have been my fault due to incorrect placement of the drill/plot origin. I don’t fully understand if/why it matter where this is on the board.

I just realized that the components you are using are though hole. I’m going to just assume you have reasons. But it occurs to me that the offset could be due to this fact. Again JLC may have its own ideas about the diode tape and reel.

1 Like

Made a few boards with JLCPCB. Exported directly from KiCAD without any plugins or scripts. No problems whatsoever (except one connector which they didn’t have 3D model, so I guessed wrong orientation, but they spotted it and fixed).

Yeah I thought about trying that to see the difference but didn’t. When I submit the next board revision I’ll try that. But I like the plugin and I really like JLC so far. I’ve been toying with the idea of writing an article and posting it on Linkedin about my experience with JLC and Kicad.

Another thing about the plugin is that it unintuitively (or not depending on your point of view) uses the settings from the gerber and drill/plot windows. So you must check these before using the plugin to export the production files.

Yes in agreement with my collaborator we decided to leave the diodes as THT instead of as SMD. It’s a kit that it will be distributed to ppl that like to assemble stuff but they are not so familiar with SMD ad these components, are under risk of some failure for bad use.
Hence they are easier to be replaced by these ppl.

yes I know what JLCPCB will correct them manually (they do very well), although I’m still wondering why the plugin/KiCad cannot be already aligned.
In one of your posts you mentioned PCBWay, but for them another different script is used.
The one mentioned by me, is the one used for JLCPCB only, and I use it very intensively.

I do not (or have not yet) used a script for PCBWay. If you want to use THT that’s fine. My point was there may be standards issues with THT resistor reels as there are with SMT. Since I only do low volume production (< 100) at a time) I usually solder my own connectors and other THT parts. Well I have somebody local do it for me.

Also, consider this. Resistor leads are very long and cut to length and formed before placement (see below). In case you haven’t noticed the resistor (and other similar) footprints in Kicad come in different lead spacing pitches. How exactly is that supposed to be communicated to the manufacturer? I suppose they could automatically parse the position file and figure it out. Then transfer that information to the lead forming machine. [EDIT] Thats probably wrong. It could be figured our from the footprint name in some cases but if I had to guess they measure it from the gerbers.

Essentially you have to figure out he quirks of each manufacturer and create your own workflow that is repeatable and predictable.

Though this does beg the question of hand assembly vs automatic placement for THT. From what I understand JLC hand solders all THT. No wave or selective soldering. So what about the placement?

I’ve toured a local PCBA factory. Yes they still exist in Nort America. Are very expensive. But have their uses. First the resistors need to be lead formed and trimmed to the correct length. There are machines for that. After that I’m don’t remember about their pick n place. If I had to guess I would say they hand soldered. Can the modern pick n place SMT machines handle THT? Even if they can for low volume assembly its probably cheaper for JLC to do it all mostly by hand. Don’t forget they charge extra for THT amongst almost everything else not “basic” for good reason.

As for wave soldering THT I could be wrong but I believe selective soldering is preferred now. BTW its a marvel to see in action. Imagine automatic soldering THT connectors on an already populated double sided SMT board.

So machine cost and setup is probably another reason why they do all THT by hand. Especially considering most parts are available in SMT. I do prefer THT for mechanical stability though.

I used to design telephones to be made with a single sided THT production line, using Panasert machines. This required slightly larger holes than you would expect and relatively long leads before the bend, much greater pitch than the OP posts.

Yes on the plugin GitHub page they suggested to try the direct output form KiCad.
And ok, it’s not the plugin, but I think it’s just the way you told: the different references by JLC.
In the screenshot the misalignments.

Did you try using a different plugin for exporting to JLCPCB?
This seems to be the most used: GitHub - Bouni/kicad-jlcpcb-tools: Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.


Alternatively try this JLCPCB tool which uses the same component orientation database as the plugin:

Thank you for the hint.

i will try them. i was not aware because they aren’t into the list of the available plugins into the plugin manager. If effective, they should be available one day soon.

EDIT: the first one is fantastic because there is also the link to the database of JLCPCB for the catalogue and names/order the file sin more proper way. At the moment the orientation of the components still wrong. BUT diodes. Those are placed ok:


First plugin the winner.
For who doesn’t know, because into the read.MD file is not clearly expressed, once activated, click on ROTATATION then click on UPDATE … magically it works!

Thank you you have made my day :slight_smile:


I encountered a similar problem, wrong orientation or wrong position (component shifted).

In my case, nothing was wrong with the software. The component footprint in the KiCad library used a different origin and/or a different orientation than the component in the JLCPCB library.

I adjusted my footprint to match the JLCPCB library, no more problem.

1 Like

The above plugin suggestd, adjusts the parameters without the need to edit each time the CSV and remembering what’s the offset for ICs and transistors and also to try to move diodes :slight_smile: just one button and it does the job.

1 Like

I don’t understand all that fuss about the orientations with JLCPCB.
I have ordered countless PCBAs with JLC, never bothered to fix the rotations and every single PCB came out fine. You just have to make sure to have a proper polarity mark (pin 1, cathode, +) on the PCB and they’ll fix it.
Why bother with modifying orientation or placement shift yourself? Did anyone ever receive an incorrectly assembled PCBA?

The underlying problem is (as I understand it) that there is no standard for specifying placement or orientation of a component and for that reason every assembler does this manually. With JLC the 0° orientation is the way the component sits in the tape, which is completely random.


Well not quite, it has to be consistent for a particular part number which is why their preview can show it, right or wrong.

It’s true that JLCPCB will probably take responsibility and fix the orientation. However if they get it wrong they will probably have to redo the job (and not tell you) so there may be an additional delay which you may not notice if you are using cheap shipping. Or there may be another round of emailing with you to confirm.

Of course this is why we have so many standards: to make life interesting. :rofl:


I have read that KiCad and JLCPCB manufacturing are inherently incompatible because of different standards used to represent part positioning and orientation. This explains why my parts look like this in their viewer.

Is there any easy solution with this in KiCad 7 that I am not aware of? I’m using KiCad 7.0.7 currently.

I moved your post to this thread because it’s a known issue and you can see some solutions above. For example there is at least one plugin that allows you to correct the orientation and then remembers the correction for future use with that part number.