Contact Us
Blog / The Ultimate PCB Drilling File Guide: From Fundamentals to DFM Mastery

The Ultimate PCB Drilling File Guide: From Fundamentals to DFM Mastery

Posted:05:31 PM November 19, 2025 writer: Robin

In the intricate domain of PCB layout/design, engineers frequently dedicate their efforts to optimizing routing/traces, layer stack-up, and component footprint placement. However, there exists one core output file whose accuracy is the direct determinant of successful board fabrication—that is the PCB Drill File (or NC Drill Data).

To an entry-level professional in electronics manufacturing, this might merely be perceived as a "hole coordinate listing"; yet, for a seasoned DFM engineer, it represents a critical DFM (Design for Manufacturability) factor that directly governs the project's yield rate and cost structure.

This article will demystify the complete technical specifics of the PCB Drill File.

PCB Drilling

What is an NC Drill File?

The drill file, formally termed the NC (Numerical Control) Drill File or colloquially the Excellon Format File, constitutes the CNC instruction set used to command the drilling equipment for precise hole creation. It precisely communicates to the drilling machine: the exact hole location coordinates, the corresponding tool station number (drill bit size), and the operational commands required for the fabrication process. The NC drill file fomat is usually saved with the extensions .drl or .txt.

If you are sending drilling files to the PCB manufacturer, ensure that they include NC Drill format .DRL or .TXT files.


The .drl format for drill file


The .txt format for drill file

How to Export Drill Files?

In the PCB industry, exporting drill files is a crucial step in PCB fabrication. These files, typically in Excellon or NC Drill format (filename extensions are usually .drl or .txt), tell the manufacturing equipment where and how large the holes should be drilled on the board.

The specific export steps depend on the PCB design software (EDA tool) you are using, such as Altium Designer, KiCad, Eagle. Since the drill file output is usually a part of the overall Gerber generation process, we highly recommend reading our full guide for detailed instructions: >Gerber Files for PCBs: Creating, Viewing, and Converting

Drill File vs. Gerber Data: The Key Distinction

File Type Description Manufacturing Function Format Focus
Gerber File Graphical Data: Shapes and boundaries of traces, pads, silkscreen, and solder mask layers. Imaging & Etching: Used by the photoplotter to generate films, guiding the copper foil etching process. RS-274X/X2 (Vector Graphics)
Drill File Positional Data: Precise coordinates and diameters for all holes (PTH, NPTH, vias). Mechanical Drilling: Used by CNC drilling and laser drilling machines to define exact hole locations. Excellon (Numerical Control Instructions)

Summary: The Gerber File defines "where the copper is," while the Drill File defines "where the holes are." Both must share an identical coordinate system to ensure accurate copper-to-hole registration.

The Three Core Elements of a Drill File

A valid NC Drill File must contain the following three critical pieces of information, none can be omitted:

  • Precise Coordinates: The absolute X/Y locations of the holes on the PCB.
  • Tool List (Tool Rack): Defines the finished hole size (FHS) corresponding to each tool number (e.g., T01, T02, etc.).
  • Plating Status: Distinguishes which holes are Plated Through Holes (PTH) and which are Non-Plated Through Holes (NPTH), which is crucial for determining the fabrication process flow.

Essential Hole Types: More Than Just 'Holes'

Holes on a PCB are primarily categorized based on their function and inter-layer connectivity, as follows:

Type Function Fabrication Characteristics
PTH(Plated Through Hole) Allows component leads to pass through, and the barrel is copper-plated to connect multiple circuit layers. Drills through the entire stack-up (Top to Bottom Layer), providing electrical conductivity.
NPTH (Non-Plated Through Hole) Strictly for mechanical purposes (e.g., screw mounting, alignment/tooling pins). The hole barrel is non-conductive. The barrel is free of copper plating; requires clear segregation from PTH data in the drill file.
Through-Hole Via Connects all layers for signal routing and layer transitioning. Penetrates all layers of the PCB substrate.
Blind/Buried Via

Blind Vias: Connects an outer layer to one or more inner layers;

Buried Vias: Connects two or more inner layers.

Classified under High-Density Interconnect (HDI) technology, requires separate drill files and sequential fabrication steps.

Part II: Practical Details of Format and Output

Industry Standard: Excellon Format Analysis

The Excellon Format is a pure text file whose content is a sequence of simple instructions recognizable by a CNC machine tool. Understanding these key commands will help you verify or troubleshoot file errors:

Command/Parameter Meaning (Technical Definition) Example Notes
M48 Header Start M48 The header typically includes critical format definitions and machine parameters.
INCH / METRIC Coordinate Unit Definition METRIC,TZ Must be consistent with the coordinate units used in the Gerber files (e.g., inches or millimeters).
Txx Cxxx.xxx Tool Definition T01C0.800 Defines the actual finished diameter (0.800mm) corresponding to the specified Tool Number (T01).
Txx Tool Selection T01 Instructs the machine to select the tool with the specified index for the subsequent drilling operations.
X/Y Drilling Coordinates X12500 Y08500 The precise X/Y location where the drill hit point is required.
M30 Program End M30 The mandatory command to terminate the NC program sequence.

Critical Output Settings: Precision and Datum

This is the stage where errors are most frequently made and have the most severe consequences when exporting from PCB design software.

A. Coordinate Format and Precision

The format is represented as Integer Digits : Decimal Digits, e.g., 2:4.

  • 2:4 Format: Represents two integer digits and four decimal digits. For example, the coordinate data X00123456 represents an actual location of 1.23456.
  • Format Matching: Your drill file and all associated Gerber files (e.g., copper layers, solder mask layers) must use the exact same format and precision settings. A mismatch will cause all hole positions to be misaligned, leading to the entire batch being scrapped (or a major yield loss).

B. Zero Suppression

Zero suppression is commonly used to reduce file size and maintain compatibility by omitting zeros in the numbers:

  • LZ (Leading Zero Suppression): Suppresses leading zeros (zeros before the integer part).
  • TZ (Trailing Zero Suppression): Suppresses trailing zeros (zeros after the decimal part).
  • Best Practice: Modern CAM systems recommend explicitly including the decimal point (Explicit Decimal) within the file header. This minimizes the risk of precision loss errors caused by zero suppression settings.

Part III: Advanced DFM Considerations

For senior engineers aiming for high-reliability, high-density PCBs, drilling considerations must be integrated into the DFM (Design for Manufacturability) process.

Critical DFM Rules

DFM Rule Definition/Meaning DFM Risk Factor Recommended Value (IPC Class 2)
Minimum Hole Size (Diameter) The smallest diameter that a mechanical drill bit can produce. Diameters that are too small may necessitate more expensive laser drilling (microvias). Mechanical drilling generally ≥0.3mm.
Aspect Ratio (AR) The ratio of board thickness to hole diameter (Board Thickness/ Hole Diameter). An excessively high AR can lead to uneven copper plating on the hole wall, compromising conductive reliability.

Typically recommended ≤ 10:1

Annular Ring (AR) The width of the copper ring between the edge of the pad and the finished hole diameter. Insufficient AR (or drilling misregistration) can cause breakout (drilling off the pad) or pad severance. Recommended ≥0.15mm
Drill-to-Copper Clearance The distance from the edge of the hole to the nearest copper feature (trace/plane). Insufficient clearance can lead to shorts or issues with manufacturing tolerances. Recommended ≥0.2mm(8mil)

Advanced Via Structures: Handling Blind and Buried Vias

In High-Density Interconnect (HDI) or complex multilayer boards, non-through-hole structures are necessary to conserve routing space:

  • Blind Vias: Connect the outermost layer to an adjacent inner layer.
  • Buried Vias: Connect two or more inner layers and are invisible from the outside.

Since these vias require sequential drilling and staged lamination (step-by-step pressing), you cannot include their data with standard through-holes.

  • Manufacturing Requirement: Fabricators mandate a separate, independent drill file for every unique "drilling-lamination" cycle. For example, an 8-layer board might require three separate drill files: L1-L2 (Blind Via), L8-L7 (Blind Via), and L3-L6 (Buried Via).

Strict Separation of PTH and NPTH

Non-Plated Through Hole (NPTH) data must be rigorously separated from Plated Through Hole (PTH) data.

  • Delivery: Typically, you are required to export two independent .drl files, or use the Drill Drawing/Map to explicitly state which Tool Numbers (Txx) correspond to NPTH and which correspond to PTH.
  • Consequence: Incorrect designation can result in mounting holes being copper-plated (preventing screw insertion) or component holes not being plated (resulting in an open circuit).

Summary: Your PCB File Delivery Checklist

To ensure your design transitions smoothly into production, perform a final check against the following list before submitting files to the manufacturer:

  • File Consistency: Verify that the drill file's units, precision format (e.g., 2:4 or 3:3), are perfectly consistent with all Gerber files.
  • File Completeness: Ensure you have exported all necessary layer files (including copper layers, solder mask, and silkscreen) along with at least one NC Drill File.
  • Plating Separation: Confirm that the PTH and NPTH hole data are clearly separated and documented via the Tool List or Drill Map.
  • HDI Special Handling: If the design utilizes blind/buried vias, confirm that independent drill files have been generated for each layer pair.
  • Run DFM Checks: Verify critical parameters like minimum finished hole size, aspect ratio, and annular ring clearance against your selected fabricator's capabilities.

Maximizing the quality of this often-underestimated 'blueprint' is the key to guaranteeing your project's timely and high-yield delivery!

All Files Ready? Get Your Price Online 

 

Tag: pcb drill pcb drill file export drill file create dirll file