How to export kicad PCB to gerber files

Posted by

What are Gerber Files and Why Do You Need Them?

Gerber files are the standard file format used in the printed circuit board (PCB) industry for manufacturing. They contain all the necessary information for fabricating a PCB, including the copper layers, solder mask, silkscreen, and drill data. When you design a PCB using KiCad, you need to generate Gerber files to send to a PCB manufacturer for production.

Gerber File Types

There are several types of Gerber files, each representing a different layer or aspect of the PCB:

File Extension Description
.GTL Top copper layer
.GBL Bottom copper layer
.GTS Top solder mask
.GBS Bottom solder mask
.GTO Top silkscreen
.GBO Bottom silkscreen
.TXT Drill data
.GKO Board outline

Step-by-Step Guide to Exporting Gerber Files in KiCad

Follow these steps to generate Gerber files from your KiCad PCB design:

Step 1: Open the PCB Layout Editor

  1. Open your KiCad project and navigate to the PCB layout editor by double-clicking on the .kicad_pcb file in the project tree.

Step 2: Run DRC (Design Rule Check)

  1. Before generating Gerber files, it’s essential to run a Design Rule Check (DRC) to ensure your PCB design adheres to the manufacturer’s specifications and design rules.
  2. In the PCB layout editor, click on the “Run DRC” button in the top toolbar or go to “Tools” > “DRC…”.
  3. Configure the DRC settings according to your manufacturer’s requirements and click “Run DRC”.
  4. If any errors or warnings are found, address them before proceeding.

Step 3: Open the Plot Dialog

  1. In the PCB layout editor, click on “File” > “Plot…” to open the plot dialog.

Step 4: Configure the Plot Settings

  1. In the plot dialog, set the “Output directory” to a location where you want to save the Gerber files.
  2. Under “Plot format”, select “Gerber”.
  3. In the “General Options” tab, ensure that “Plot border and title block” is unchecked and “Exclude PCB Edge layer from other layers” is checked.
  4. In the “Layers” tab, select the layers you want to include in the Gerber files. Typically, you’ll need to include the following layers:
  5. F.Cu (Top copper)
  6. B.Cu (Bottom copper)
  7. F.SilkS (Top silkscreen)
  8. B.SilkS (Bottom silkscreen)
  9. F.Mask (Top solder mask)
  10. B.Mask (Bottom solder mask)
  11. Edge.Cuts (Board outline)
  12. Click on “Plot” to generate the Gerber files.

Step 5: Generate Drill Files

  1. In the plot dialog, click on the “Generate Drill Files…” button.
  2. In the drill file dialog, set the “Output directory” to the same location where you saved the Gerber files.
  3. Under “Drill Units”, select “Inches” or “Millimeters” according to your manufacturer’s requirements.
  4. Click on “Generate Drill File” to create the drill files.

Step 6: Review and Verify the Gerber Files

  1. After generating the Gerber and drill files, it’s crucial to review and verify them before sending them to the manufacturer.
  2. Open the Gerber files using a Gerber viewer, such as gerbv or the online viewer provided by your PCB manufacturer.
  3. Check each layer for any errors, missing features, or incorrect dimensions.
  4. Ensure that the drill files align properly with the copper layers.

Tips for Successful Gerber File Generation

  • Always run a DRC before generating Gerber files to catch any design issues early.
  • Double-check your manufacturer’s requirements for Gerber file format, units, and layer specifications.
  • Use a consistent naming convention for your Gerber files to avoid confusion.
  • Verify your Gerber files using a reliable Gerber viewer before submitting them for production.
  • Include a README file with your Gerber files, providing any additional information or special instructions for the manufacturer.

Frequently Asked Questions (FAQ)

  1. Q: What if I encounter errors while running DRC in KiCad?
    A: If you encounter DRC errors, it means there are design issues that need to be resolved before generating Gerber files. Review the error messages, locate the problematic areas in your PCB layout, and make the necessary corrections. Common issues include incorrect clearances, overlapping traces, or missing connections.

  2. Q: Can I include custom layers in my Gerber files?
    A: Yes, KiCad allows you to include custom layers in your Gerber files. In the plot dialog, you can select any additional layers you’ve created in your PCB design. However, make sure to communicate with your manufacturer about any custom layers to ensure they can accommodate them in their fabrication process.

  3. Q: What should I do if my manufacturer requires specific Gerber file settings?
    A: If your PCB manufacturer has specific requirements for Gerber file settings, such as file format, units, or layer specifications, make sure to follow their guidelines closely. Consult their documentation or reach out to their support team for clarification if needed. Adhering to their requirements will help ensure a smooth and accurate manufacturing process.

  4. Q: How can I check if my Gerber files are correctly generated?
    A: To verify the correctness of your Gerber files, you can use a Gerber viewer tool. There are several free and commercial Gerber viewers available, such as gerbv, GerberLogix, or the online viewers provided by PCB manufacturers. These tools allow you to visualize each layer of your PCB and check for any discrepancies or errors.

  5. Q: What should I include in the README file with my Gerber files?
    A: When submitting Gerber files to a PCB manufacturer, it’s helpful to include a README file that provides additional information and instructions. In the README file, you can specify:

  6. The PCB dimensions and thickness
  7. The desired solder mask and silkscreen colors
  8. Any special requirements or notes for the manufacturer
  9. Your contact information in case they need to reach out for clarification

Including a README file helps ensure clear communication with the manufacturer and reduces the chances of misunderstandings or delays in the production process.

Conclusion

Exporting Gerber files from your KiCad PCB design is a crucial step in the PCB fabrication process. By following the step-by-step guide provided in this article, you can generate accurate and complete Gerber files that meet your manufacturer’s requirements. Remember to run a DRC before generating the files, select the appropriate layers, and verify the files using a Gerber viewer. Additionally, consider the tips and frequently asked questions discussed to ensure a smooth and successful PCB manufacturing experience. With properly generated Gerber files, you can confidently send your PCB design to the manufacturer and bring your electronic projects to life.

Leave a Reply

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

Categories

Tag Cloud

There’s no content to show here yet.