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.

Centroid/XYRLS/Pick-and-Place

Call it what you may, but surface mount assembly robots need this magic file to determine where to place your components and how to orient them. We call it a centroid. Others may call it something else, but it’s all basically the same. In our case, the basic format is comma delimited, in mils:

Ref designator,     Layer,     LocationX,     LocationY,     Rotation
C1 ,                       Top ,           0.5750  ,       2.1000  ,           90

That’s not too difficult. Most CAD programs will automatically create this file for you. Eagle doesn’t natively, but we have a ULP to do it for you in Eagle (downloaded here). Again, no problems here. Mostly…

I say mostly because, at this point, you are at the mercy of the person who created the CAD library part. Provided they center the origin and follow the IPC for orientation, everything should come out just fine. Unfortunately, we do find parts that don’t follow those rules. We’ll do our best to catch and correct such things here, but for maximum reliability, check you library components to make sure. We find the problem crops up most commonly with passives.

IPC says that zero orientation for two pin passives is horizontal, with pin one on the left. For polarized capacitors, pin one is (+). For diodes, pin one is the cathode. They note that pin one is always the polarity mark pin or cathode. Pin one is also on the left for resistors, inductors and non-polarized capacitors, but left vs. right doesn’t matter so much with non-polarized things. The most common orientation error we see is to have the “zero rotation” 270 degrees off from the IPC standard.

Every now and then we’ll find that someone assumes that since usually the anode on a diode tends to be on the positive side, that the anode should be pin one. Nope. Nope. Nope.

Duane Benson
Is it pulling electrons of pushing holes?

http://blog.screamingcircuits.com/