Drill File-How to Generate

Posted by

What is a Drill File?

A drill file, also known as a drill data file or a NC drill file, is a computer-aided manufacturing (CAM) file format used in printed circuit board (PCB) fabrication. It contains information about the location, size, and type of holes to be drilled in a PCB. The drill file is essential for the PCB manufacturer to accurately create the holes required for components, vias, and mounting points on the board.

The drill file is typically generated by PCB design software, such as Altium Designer, Eagle, or KiCad, as part of the manufacturing output files. These files are then sent to the PCB manufacturer along with other necessary files, such as Gerber files, which contain information about the copper layers, solder mask, and silkscreen.

Drill File Format

Drill files are usually in a plain text format, with a file extension of .drl or .txt. The file consists of a header section and a body section.

Header Section

The header section contains metadata about the drill file, such as:

  • File format version
  • Units (imperial or metric)
  • Number of drill holes
  • Tool list (drill bit sizes and their corresponding tool numbers)

Here’s an example of a drill file header:

M48
;DRILL file {PCB-123-Rev-A.drl} created by PCB Designer
;FORMAT={-:-/ absolute / metric / decimal}
FMAT,2
METRIC,TZ
T1C0.80
T2C1.00
T3C1.20
%

In this example:
M48 indicates the start of the header
;DRILL file {PCB-123-Rev-A.drl} created by PCB Designer is a comment describing the file name and creator
FMAT,2 specifies the file format version
METRIC,TZ indicates that the units are in metric and trailing zeros are kept
T1C0.80, T2C1.00, and T3C1.20 define the tool list, where T1, T2, and T3 are tool numbers, and C0.80, C1.00, and C1.20 are the corresponding drill bit sizes in millimeters
% marks the end of the header section

Body Section

The body section contains the actual drill data, which consists of X and Y coordinates for each hole and the associated tool number. The coordinates are typically in the format X<coordinate>Y<coordinate>, followed by the tool number.

Here’s an example of a drill file body:

X100580Y-80000T1
X110000Y-80000T1
X120000Y-80000T2
X130000Y-80000T3
X140000Y-80000T2
X150000Y-80000T1
M30

In this example:
X100580Y-80000T1 represents a hole at coordinates X=100.58mm and Y=-80.00mm, using tool number 1 (0.80mm drill bit)
M30 indicates the end of the drill file

Generating a Drill File

To generate a drill file, follow these general steps:

  1. Design your PCB using PCB design software, placing components, traces, vias, and mounting holes as needed.

  2. Define the drill sizes for vias and mounting holes in the design software. This is usually done by creating a drill table or specifying the drill sizes in the via and hole properties.

  3. Once the design is complete, use the software’s CAM processor or manufacturing output generation feature to create the drill file. This process typically involves selecting the desired output format (e.g., Excellon or Sieb & Meyer) and specifying the drill file settings, such as units and decimal places.

  4. Review the generated drill file to ensure that it contains the correct information and formatting. You can open the file in a text editor to check the header and body sections.

  5. If necessary, make adjustments to the PCB design or drill file settings and regenerate the file until it meets your requirements.

  6. Package the drill file along with other manufacturing files (e.g., Gerber files) and send them to your PCB manufacturer for fabrication.

It’s important to communicate with your PCB manufacturer to ensure that you provide the drill file in their preferred format and with any additional information they may require.

Common Drill File Formats

There are two main drill file formats used in the PCB industry:

  1. Excellon Format
  2. Sieb & Meyer Format

Excellon Format

The Excellon format, named after the Excellon Automation company, is the most widely used drill file format. It has two sub-formats:

  • Absolute format: Hole coordinates are specified as absolute distances from a reference point (usually the origin).
  • Incremental format: Hole coordinates are specified as relative distances from the previous hole.

The Excellon format uses the following commands:

  • T<number>: Selects the tool number (drill bit size)
  • X<coordinate>Y<coordinate>: Specifies the hole coordinates
  • M00: Ends the program
  • M30: Ends the program (alternative to M00)
  • M48: Starts the header section
  • M95: Ends the header section
  • %: Starts or ends a block of data

Sieb & Meyer Format

The Sieb & Meyer format, named after the German company Sieb & Meyer AG, is less common than the Excellon format but is still used by some PCB manufacturers. It has a simpler structure and does not use a header section.

The Sieb & Meyer format uses the following commands:

  • S<number>: Selects the tool number (drill bit size)
  • X<coordinate>Y<coordinate>: Specifies the hole coordinates
  • E: Ends the program

Best Practices for Generating Drill Files

To ensure that your drill files are accurate and compatible with your PCB manufacturer’s requirements, follow these best practices:

  1. Use consistent units (metric or imperial) throughout your design and drill file.

  2. Adhere to your manufacturer’s minimum drill size requirements and increments. Some manufacturers may have limitations on the smallest drill bit they can use or the increments in which they can change drill sizes.

  3. Avoid using too many different drill sizes in your design, as this can increase the manufacturing cost and lead time. Try to optimize your design to use fewer drill sizes where possible.

  4. Clearly communicate your drill file format and requirements to your PCB manufacturer to avoid any misunderstandings or delays in the fabrication process.

  5. Always review your generated drill files for accuracy and completeness before sending them to your manufacturer. Double-check the hole coordinates, tool list, and file format to ensure they match your design intent.

Frequently Asked Questions (FAQ)

  1. What is the difference between a drill file and a Gerber file?
  2. A drill file contains information about the location, size, and type of holes to be drilled in a PCB, while a Gerber file contains information about the copper layers, solder mask, and silkscreen of a PCB.

  3. Can I use different units (metric and imperial) in the same drill file?

  4. No, it is best to use consistent units throughout your drill file to avoid confusion and potential manufacturing errors.

  5. What should I do if my PCB manufacturer requests a specific drill file format?

  6. If your PCB manufacturer has a preferred drill file format, generate your drill file in that format using your PCB design software. If you are unsure how to do this, consult your software’s documentation or reach out to the manufacturer for guidance.

  7. How do I optimize my drill file for manufacturing?

  8. To optimize your drill file, minimize the number of different drill sizes used in your design, adhere to your manufacturer’s minimum drill size requirements, and ensure that your drill file is accurate and complete before submitting it for fabrication.

  9. What should I include when sending my drill file to a PCB manufacturer?

  10. When sending your drill file to a PCB manufacturer, include all necessary manufacturing files (such as Gerber files), a clear description of your project requirements, and any additional information the manufacturer may need to fabricate your PCB accurately.

Conclusion

Generating accurate and complete drill files is crucial for the successful fabrication of printed circuit boards. By understanding the drill file format, using PCB design software to generate the files, and following best practices, you can ensure that your PCB manufacturer has the necessary information to create the holes in your board accurately.

Remember to communicate clearly with your manufacturer, adhere to their requirements, and review your drill files before submitting them for fabrication. By doing so, you can minimize the risk of manufacturing errors and delays, ultimately leading to a successful PCB project.

File Type Purpose Format
Drill File Contains information about the location, size, and type of holes to be drilled in a PCB Plain text (.drl or .txt)
Gerber File Contains information about the copper layers, solder mask, and silkscreen of a PCB RS-274X (.gbr or .art)

Table 1: Comparison of Drill Files and Gerber Files

Drill File Format Characteristics Advantages Disadvantages
Excellon – Most widely used
– Has header and body sections
– Supports absolute and incremental coordinates
– Compatible with most PCB manufacturers
– Provides more control over drill file settings
– More complex structure
– Requires more setup in PCB design software
Sieb & Meyer – Less common
– Simpler structure without a header section
– Easier to generate and interpret – Less compatible with some PCB manufacturers
– Fewer options for customization

Table 2: Comparison of Excellon and Sieb & Meyer Drill File Formats

Leave a Reply

Your email address will not be published. Required fields are marked *