What is a Centroid File?

Call it what you may, but surface mount assembly robots need a magic file to determine where to place your components and how to orient them. We call it a centroid. What is a centroid file and why is it important to your PCB assembler?

Many assemblers use automated equipment to place surface mount components on PCBs. One of the tools we use to rapidly program these machines is the centroid file (aka insertion, pick-and-place or XY file).

Some CAD packages automatically generate this file, some will not. Sometimes you may simply need to modify the file, and some assemblers can make minor changes to the file or create it for you for a small fee.

Ultimately, the centroid file describes the position and orientation of all surface mount components on the PCB. A centroid file includes: the reference designator, X and Y position, rotation and the side of board (top or bottom). Only SMT parts should be listed in the centroid file the basic format for the centroid file is a comma delimited (.csv) file with data in the following order: RefDes, Layer, LocationX, LocationY, Rotation.

Here’s a breakdown of the data:

RefDes
The reference designator that matches your BOM and PCB markation.

Layer
Either the word “top” or “bottom.” This is not necessarily the CAD layer designator. Just “top” for a part located on the top of the board and “bottom” for parts on the bottom side of the board. Top is often referred to as the component side and bottom the solder side by assemblers and fabricators.

Location
The “LocationX” and “LocationY” values describe the part’s offset from the board origin. The location values require that the part origin be centered in the part. The board XY origin of 0,0 is in the lower left corner of the board. The 0,0 origin for the bottom of the board is in the lower left corner, looking at the top of the board, though the board. Preferred units are in inches (0.0000″).

Rotation
Rotation goes counterclockwise for all parts on top and clockwise for parts on the bottom. In both cases, this is from the perspective of looking at the top of the board. For bottom side parts, it is looking through the board, still from the perspective of looking at the top of the board.