Bird
0
0
PCB Designbi_tool~15 mins

Drill file generation in PCB Design - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a PCB design engineer at an electronics manufacturing company.
📋 Request: Your manager wants you to generate drill files for a new printed circuit board design to send to the fabrication house.
📊 Data: You have the PCB layout data including the coordinates and sizes of all drill holes for vias and component leads.
🎯 Deliverable: You need to produce a complete drill file in the standard Excellon format that lists all drill hole locations and sizes.
Progress0 / 7 steps
Sample Data
Hole IDX Coordinate (mm)Y Coordinate (mm)Diameter (mm)Type
H110.015.00.8Via
H220.015.01.0Component Lead
H330.025.00.8Via
H440.035.01.2Component Lead
H550.045.00.8Via
H660.055.01.0Component Lead
H770.065.00.8Via
H880.075.01.2Component Lead
1
Step 1: Organize the drill holes by diameter to group similar drill sizes together.
Sort the sample data by 'Diameter (mm)' column in ascending order.
Expected Result
Holes grouped as 0.8 mm, 1.0 mm, and 1.2 mm diameters.
2
Step 2: Assign a tool number to each unique drill diameter for the drill file header.
Map 0.8 mm to T01, 1.0 mm to T02, 1.2 mm to T03.
Expected Result
Tool list: T01=0.8 mm, T02=1.0 mm, T03=1.2 mm.
3
Step 3: Format the drill hole coordinates and tool assignments into Excellon drill file commands.
For each hole, write: 'X' + X coordinate in mils + 'Y' + Y coordinate in mils + 'T' + tool number. Use 1 mm = 39.37 mils.
Expected Result
Lines like 'X393Y591T01' for hole H1 at (10.0 mm, 15.0 mm) with 0.8 mm drill.
4
Step 4: Create the drill file header with units, tool definitions, and start commands.
Write header lines: 'M48', 'INCH', tool definitions (e.g., 'T01C0.0315'), and '%' to start data.
Expected Result
Header with correct units and tool sizes in inches.
5
Step 5: Add the drill hole commands from step 3 under the header.
List all drill hole commands sequentially.
Expected Result
Drill commands for all holes listed under header.
6
Step 6: Add the drill file footer to end the file properly.
Write 'M30' to indicate end of program.
Expected Result
Drill file ends with 'M30'.
7
Step 7: Verify the drill file by checking coordinates and tool assignments match the sample data.
Cross-check each hole's coordinates and tool number with original data.
Expected Result
All holes correctly represented with proper tool numbers and coordinates.
Final Result
Drill File Preview:

M48
INCH
T01C0.0315
T02C0.0394
T03C0.0472
%
X394Y591T01
X787Y591T02
X1181Y984T01
X1575Y1378T03
X1969Y1772T01
X2362Y2165T02
X2756Y2559T01
X3150Y2953T03
M30
Drill holes are grouped by size for efficient tool changes.
Coordinates converted from millimeters to mils for Excellon format.
Drill file includes proper header, tool definitions, hole locations, and footer.
Bonus Challenge

Create a drill map visualization showing hole locations color-coded by drill size.

Show Hint
Use a simple scatter plot with X and Y coordinates, and assign colors based on diameter.