FAQ
What is a centroid file in PCB assembly?
A centroid file defines the X/Y position, rotation angle, and part height of every component on a pcb for automated pick-and-place. It is derived from the cad data and exported as a text or excel file.
How do I generate a centroid file?
Most e-cad tools like Altium, KiCad, and Eagle export centroid data directly. The file lists each component reference designator paired with its X/Y center, rotation in degrees, and surface mount or through-hole designation.
What format does a centroid file use?
Standard centroid formats include IPC-7351B ascii, CSV with column headers, and proprietary formats from assembly software. The file must specify part height, rotation, and placement side for each component.
Why is centroid accuracy important for SMT assembly?
Accurate centroid data directly impacts pick-and-place accuracy. Even a 0.1mm offset on a 0402 resistor or bga component can cause misplacement, bridging, or tombstoning during reflow.
Can I manually edit a centroid file?
Manual edits are possible for small adjustments but carry risk of introducing errors. It is safer to regenerate centroid files from the original cad design after any schematic or layout change.
A centroid file (also called a pick-and-place file, XY file, or insertion file) is the machine-readable list that tells an SMT line where each component goes on the PCB. For every reference designator it gives the X and Y coordinates of the part's center, its rotation, and whether it sits on the top or bottom side. The pick-and-place machine reads it together with the BOM: the BOM says what part to load, the centroid file says where and in which orientation to place it.
What does a centroid file contain?
| Column | Example | What to check |
|---|---|---|
| Reference designator | R12, U3, C101 | Matches the BOM exactly, including DNP parts |
| X / Y location | 25.40, 13.97 | Measured from the same origin as the Gerber files |
| Rotation | 0, 90, 180, 270 | Uses one convention; polarized parts agree with the assembly drawing |
| Side / layer | Top, Bottom | Bottom-side coordinates follow the CAD tool's mirroring rule |
| Units | mm or mil | Stated in the header or file name |
| Package / value (optional) | 0402, SOT-23, 10k | Helps the assembler catch library mismatches |
If a term in the file or your CAD export is unclear, the PCB terminology glossary covers the common assembly data names. For the complete assembly workflow from design to packed boards, see the turnkey assembly page.
Highlights
- What a centroid file is and which columns the assembler needs.
- How to verify it and what to log as evidence.
- Common failure modes and fastest checks.
- How it pairs with the BOM, Gerbers, and assembly drawing.
Why Do Centroid Files Cause Assembly Problems?
When APTPCB (APTPCB PCB Factory) receives a design, the engineering team often finds discrepancies between the visual silkscreen and the digital centroid data. If a diode is defined as 0 degrees in the file but the reel feeds it at 90 degrees, the machine will place it incorrectly unless a technician manually intervenes. As board density increases and components shrink to 0201 or 01005 sizes, there is no room for manual correction. The file must be perfect to maintain high-speed throughput and avoid costly rework.
How a Centroid File Works on the SMT Line
The centroid file relies on a few core data points to function correctly within the manufacturing line. Understanding these mechanisms helps designers generate files that require less "cleaning" by the assembly house.
- Coordinate Reference System: The file uses a global origin point (0,0), usually the bottom-left corner of the PCB or a specific fiducial marker. All component locations are relative to this point. If the origin in the centroid file does not match the origin in the Gerber files, the machine will attempt to place parts in empty space.
- Rotation and Polarity: Rotation is typically expressed in degrees counter-clockwise. The complexity arises because "0 degrees" is relative to the component's library creation. Advanced SMT assembly lines use machine vision to verify polarity, but the initial data must be close to accurate to prevent setup errors.
- Side Designation: The file must explicitly state whether a component is on the Top or Bottom layer. This allows the split of the assembly process into two distinct reflow passes.
- Fiducial Alignment: While not always listed as a component, the coordinates of fiducial markers are essential. The machine uses these optical targets to calculate the offset and skew of the physical board compared to the digital file.
How the Centroid File Relates to the BOM, Gerbers, and Stencil
Centroid data does not exist in a vacuum; it is part of a larger data ecosystem that drives the entire turnkey assembly process.
When a project moves from design to manufacturing, the centroid file is paired with the BOM. The BOM provides the "what" (manufacturer part number), while the centroid file provides the "where." If these two documents do not match perfectly—for example, if the BOM lists R1 but the centroid file omits it—the line stops.
Furthermore, the centroid file interacts directly with stencil design. The center points help define where solder paste deposits should be centered, although the stencil apertures are derived from the paste layer Gerbers. In modern workflows utilizing DFM guidelines, engineers verify the centroid data against the paste layer to ensure that the component center actually aligns with the solder pads, preventing "tombstoning" during reflow.
Centroid File Formats: CSV vs ODB++ vs IPC-2581
Engineers often face a choice in how they deliver this data: simple CSV/Text files, legacy formats, or intelligent databases like ODB++. While simple text files are human-readable and easy to edit, they lack context. Intelligent formats carry more data but require compatible software on the manufacturer's side.
The following table outlines the trade-offs between different methods of generating and supplying centroid data.
Decision Matrix: Technical Choice → Practical Outcome
| Technical choice | Direct impact |
|---|---|
| Standard CSV / ASCII File | Universally compatible but requires manual verification of rotation and units (mm vs mils). |
| ODB++ / IPC-2581 | Integrates geometry and netlist; reduces rotation errors but requires specific CAD export tools. |
| Gerber X3 (with Component Data) | Embeds centroid info into the Gerber file itself, simplifying file management but less common in older machines. |
| Manual Excel Creation | High risk of human error; only recommended for very simple prototypes or repairs. |
How to Check a Centroid File Before Sending It
The accuracy of the centroid file directly influences the reliability of the final PCBA. If the coordinates are slightly off, the machine might place a component 0.1mm off-pad. During reflow, the surface tension of the solder might pull it back into place (self-alignment), but for fine-pitch components like BGAs or 0201 passives, this offset leads to bridging or open circuits.
Key Verification Steps
To ensure high reliability, APTPCB recommends verifying the following pillars before submission:
| Feature | Verification Criteria | Why it Matters |
|---|---|---|
| Origin Point | Must match Gerber origin (0,0) | Prevents global offset of all parts. |
| Rotation | Check polar components (Diodes, ICs) | Prevents reversed polarity and immediate failure. |
| Units | Explicitly stated (mm or mil) | Prevents scaling errors (25.4x size difference). |
| Designators | Match BOM exactly | Ensures the right part goes to the right spot. |
For high-power or thermal applications, precise placement is even more critical. A power MOSFET placed slightly off-center on a thermal pad may have reduced heat transfer efficiency, leading to premature failure. Similarly, in high-speed designs the exact position of decoupling capacitors relative to the IC pins affects signal and power integrity.
Where Centroid Data Is Heading
The industry is moving away from "dumb" coordinate lists toward intelligent data exchange. The goal is to eliminate the ambiguity of component rotation and package definitions. As automation increases, the centroid file is evolving from a static text file into a dynamic digital twin component.
5-Year Performance Trajectory (Illustrative)
| Performance metric | Today (typical) | 5-year direction | Why it matters |
|---|---|---|---|
| Rotation Standardization | Manual verification required | AI-driven auto-correction | Eliminates polarity errors and setup downtime. |
| File Format | CSV / ASCII / Excel | IPC-2581 / ODB++ Standard | Single-file intelligence reduces version conflicts. |
| Machine Integration | Offline programming | Real-time cloud sync | Allows instant adjustments across global factories. |
What to Send With Your Centroid File for an Assembly Quote
When you are ready to move from design to assembly, providing a complete data package is the best way to ensure a smooth launch. A clear centroid file prevents the "engineering query" emails that delay projects by days.
Checklist for a Perfect Assembly Quote:
- Centroid File: CSV or ASCII format, including RefDes, Layer, Location X, Location Y, and Rotation.
- BOM: Excel format with Manufacturer Part Numbers (MPN) and quantities.
- Gerber Files: RS-274X format, including all copper, solder mask, and silkscreen layers.
- Assembly Drawings: PDF showing component polarity marks and special assembly instructions.
- Fiducial Data: Ensure fiducials are included in the copper layers and not masked over.
- Panelization: If supplying a panel, ensure the centroid file coordinates reference the panel origin or include step-and-repeat instructions.
- Special Requirements: Note any parts that require selective soldering, through-hole insertion, or manual placement. These are excluded from the pick-and-place program and handled in a separate step.
Conclusion
A centroid file is a short text file, but it directly drives the machines that build your board. Getting its origin, rotation, side, and designators right is one of the cheapest ways to avoid setup delays and misplaced parts. While often overlooked, the quality of this data directly correlates to the yield and speed of the assembly line.
By ensuring your centroid files are accurate, consistent, and properly formatted, you enable manufacturing partners like APTPCB to deliver high-quality assemblies without unnecessary delays. Whether you are prototyping a new IoT device or scaling up production for automotive electronics, clean data is the foundation of successful manufacturing.
Frequently Asked Questions
What is a centroid file in PCB assembly?
A centroid file (also called a pick-and-place or XY file) tells the SMT machine where each component goes on the board: its X and Y center coordinates, rotation angle, and whether it mounts on the top or bottom side.
What columns must a centroid file contain?
The essential columns are reference designator, X location, Y location, rotation, and layer (Top/Bottom). Optional but recommended columns include package type, units (mm or mil), and component value.
What is the most common centroid file error?
Origin mismatch is the most common error: the centroid file origin does not match the Gerber origin. This causes every component to be placed with a global offset.
How does rotation convention affect centroid accuracy?
Rotation convention varies between CAD tools. Some use counter-clockwise positive, others clockwise. Always verify which convention your assembler expects and test with a known-good sample before production.
What format should a centroid file use?
CSV or ASCII text formats are universally accepted. ODB++ and IPC-2581 can also carry centroid data. Avoid Excel-only formats that may lose leading zeros in reference designators.
