x Brown

What is a Centroid File and Why You Need to Know

By Duane Benson, Chief Technology Champion at Screaming Circuits

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. So what is a centroid file and why is it important to your PCB assembler?

Many assemblers like those of us at Screaming Circuits use automated equipment to place the surface mount components on your 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 will automatically generate this file and 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.

Part Origin

Make sure your part libraries correctly place the part origin in the center.

Ultimately, the centroid file describes the position and orientation of all of the surface mount components on the PCB. A centroid file includes: the reference designator, X and Y position, rotation and the side of foard (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 pcb fab houses.

Rotation

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
RotationRotation 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.

In the end the goal is simple: PCB assemblers need to place components on the board as accurately as possible. A centroid file can help ensure your project is done right the first time. If your PCB requires any additional information or data requirements, just contact your PCB assembler to learn more about their individual process.