Electronics Production

This week focuses on PCB fabrication — milling circuit boards in-house, characterizing the production process, and making and testing a microcontroller development board.

Assignment Requirements

Group Assignment:

Individual Assignment:

Project Documentation

For the individual assignment, I produced a microcontroller development board based on the XIAO ESP32-C6. I took the provided Gerber files, generated the G-code using the Carvera software, milled the board on our Carvera desktop CNC mill, soldered the components, and tested it.

Design to G-Code Workflow

The workflow for producing this board:

  1. Started with the provided Gerber files (F.Cu for copper traces, Edge_Cuts for the board outline)
  2. Imported the Gerber files into the Carvera desktop software (MakerCAM)
  3. Converted the Gerber files to G-code toolpaths for trace isolation and board outline
  4. Exported the final .nc G-code file and sent it to the Carvera for milling

Milling the Board

I milled the board on our Carvera desktop CNC mill. The Carvera software handled the conversion from Gerber to G-code, generating the toolpaths for trace isolation and the board outline cut.

Milling the XIAO ESP32-C6 board on the Carvera

CNC milled XIAO ESP32-C6 development board

CNC milled XIAO ESP32-C6 development board on the Carvera

Design Files

📦 F.Cu Gerber (Traces) 📦 Edge Cuts Gerber (Outline) 📦 G-Code (.nc)

Our lab uses a Carvera desktop CNC mill for in-house PCB production. The workflow for going from KiCad design files to a milled board uses MakerCAM to generate the toolpaths. The process involves three separate toolpaths: one for the copper traces, one for drilling component holes, and one for cutting the board outline.

Phase 1: Project & Stock Setup

  1. Open MakerCAM and select New Project.
  2. On the welcome screen, choose a 3-axis project.
  3. In the Stock Setup panel, click "Edit" and enter the PCB stock dimensions:
    • Material: PCB
    • Length (X): 127 mm
    • Width (Y): 101 mm
    • Height (Z): 1.7 mm

Phase 2: Import Your Design

  1. Go to File → Import → Import PCB (KiCad Gerber & Drill).
  2. Import your three files one by one:
    • Edge_Cuts file (board outline)
    • F.Cu file (copper traces)
    • PTH.drl file (drill holes)

Phase 3: Position & Create Trace Toolpath

Your design may appear off-screen after import — zoom out to find it. Select the entire design (it will become dotted), press M to move, set the anchor to the lower-left corner, and position it at X: 6.000, Y: 6.000 to give clearance from the stock edges.

Important tip: A trace is selected when you see a dotted line. If the line is solid, it is not selected.

For the trace toolpath:

  1. Make only the F.Cu and Edge_Cuts layers visible.
  2. Hold Shift and click both layers to select them.
  3. Hold Shift and click the outermost outline to deselect it (it turns solid) — only the traces and inner outline should remain selected (dotted).
  4. Select the 2D Pocket tool from the toolbar.
  5. Set cutting depth: Start 0.000 mm, End 0.05 mm.
  6. Add tools:
    • Tool 1: 0.8mm corn end mill
    • Tool 2: 0.2mm 30-degree engraving bit (metal)
    Make sure the 0.8mm bit is listed first.
  7. Set path strategy to Parallel.
  8. Click Calculate.

Phase 4: Drill Holes Toolpath

  1. Hide everything except the PTH.drl (drill) layers.
  2. Select the 2D Drilling tool from the toolbar.
  3. Select all visible drill holes.
  4. Set cutting depth: Start 0.000 mm, End 1.7 mm (full board thickness).
  5. Choose the 0.8mm corn bit.
  6. Click Calculate.

Phase 5: Board Outline Toolpath

  1. Hide everything except the Edge_Cuts layer.
  2. Select the 2D Contour tool from the toolbar.
  3. Click the outside line to deselect it — the inside line must remain dotted.
  4. Set cutting depth: Start 0.000 mm, End 1.7 mm.
  5. Choose the 0.8mm corn bit.
  6. Set strategy to Outside.
  7. Scroll to Tabs, select Custom, and click Add — place 3–4 tabs on the board edges to hold it in place during the final cut.
  8. Click Calculate.

Phase 6: Simulate & Export

  1. Click the Preview Toolpaths icon.
  2. Check all three toolpaths (Pocket, Drilling, Contour) and click Preview to watch the simulation.
  3. Close the preview and click the Export icon.
  4. Select all three toolpaths and export as a .nc g-code file.

Reference

📄 MakerCAM Workflow Guide (PDF)

For the week 8 group assignment, our team characterized the design rules for our in-house PCB production process and documented the workflow for sending a PCB to a board house. You can view the full group page here: Week 8 Group Assignment.

My Contributions

My contribution to the group assignment was documenting the MakerCAM workflow for our Carvera desktop CNC mill. I walked through the full process from importing KiCad Gerber and drill files into MakerCAM, setting up stock dimensions, positioning the design, and creating the three toolpaths needed to produce a board: trace isolation, drilling, and board outline. I documented each phase with the specific settings and tool selections so other students in the lab can follow the same workflow.

Useful Links