Having problems with assembling files

Hello everyone!
I wanna order PCB & PCBA from JLCPCB.
When I generate The BOM & Position files and upload them to the site, components don’t fit in their position.
The gerber files are Ok but assemble files have some problems.
IMG_20230828_142550_466
This is the result from JLCPCB.

Hi Nima, and welcome to the kicad forum.

The first thing I would look at is the board as viewed in the kicad pcb 3d viewer. If the parts are off there, then you need to fix them in the footprint editor’d 3d panel. Though it look like you have two identical caps that have different rotations, so not likely that it is a footprint issue, but verify the 3d in kicad nevertheless.

Are you generating the fab files from an addon or directly in kicad from the menu?

The only issue I run into with jlc is rotation of ICs, which are usually off since the pin-1 def in libraries often does not match the pin-1 on the tape feeder, but assembly houses have been expecting and fixing this problem since the beginning of time. Always specify a verification step with jlc and they will give you the option to correct any rotation problems.

Your problem has offsets, so it is unusual.

From the screenshot I see two problems.
The most obvious is the difference in size of the 3D models, and the other is rotation and offset.

The biggest problem with this stuff is however that there is no real standard for footprint orientation for P&P machines. As far as I know the KLC (KiCad Library Convention) puts “Pin 1” always in the upper left quadrant, as far as possible, and I seem to have read somewhere that JLC uses “whatever is the orientation on the tape”. Using the tape orientation does not work well, because sometimes the same manufacturer can deliver the same part in different orientations. And it gets much worse with “generic parts” such as diodes and LED’s which can be sourced from different manufacturers, and orientation in the tape is not guaranteed at all. And other PCB manufacturers may use other conventions.

Checking what your PCB looks like in KiCad’s own 3D viewer as teletypeguy suggests is a start. There is a JLCpcb plugin for KiCad but I have never used it myself. Maybe that plugin can help with fixing orientation issues.

Unfortunately The project files are not standard and I put 3D bodies in PCB file one by one.
I downloaded the step files from web
The 3D view of that part of PCB and the 3D properties of capacitors is shown below:
IMG_20230828_184742_332

The 3D viewer placement has nothing to do with the position of components at fabs like jlc.
I’m not sure why this was suggested at all as its just confusing you.

What paulvdh added is true. There is no standard convention for position files so JLC’s interpretation may just be disagreeing. This is normal and you often have to just manually fix the positioning.
The fancy online fabs have to do it, but so do the local domestic PCBAs I use. It’s normal.

Use the jlcpcb plugin in the PCM to aid in generating “JLC friendly” position files and other data

1 Like

This is “normal” with the JLPCB online viewer. It can’t be trusted. As has been said many times in other threads, they will fix the rotations for you. Wrong position is weirder, but I suspect the viewer for that, too. In the end they don’t want to try to assemble a board just like that, it would probably cause problems even for their machines, and they can’t sell a faulty assembly to you.

What you should do is to check the footprints you use – are they from the KiCad libraries, or from somewhere else? Are the centers of SMD footprints in the physical center of the component?

I understand that the orogin of each component in pin1,now how can I set it in the center?
Is there any tool?

Origin in pin 1 is meant for THT components only. Even for those I would rather use the geometrical center, but the official KiCad libraries use pin 1. In general, you should use the point used by a pick’n’place machine. For asymmetric components it’s usually in the datasheet.

The center point is the “anchor” point in the footprint editor, it’s the coordinate origin. I don’t see any other way than to set it manually for each library footprint and update the board footprints from the library.

I’m curious…

I see in OP’s posted image of Footprint setting’s there is something I do Not see in mine (and never have) the Scale settings are 1/0000.

I just checked mine and for all selected units (mm, mil, inch) all values are Decimal…

Is there an explanation for 1/0000 ?? Image below is mine… In fact, looks like All of OP’s values are 1/0000

Most probably a localisation setting, / instead of . (decimal point)