Fab Academy 2026  ·  Week 08

Electronic
Production

This week I learned how to design, prepare and fabricate a PCB — from digital circuit design in Fusion 360, through Gerber file generation and toolpath creation, to milling, soldering and testing a real embedded microcontroller board.

PCB Milling Roland MDX-540 Fusion 360 FlatCAM Gerber Files XIAO ESP32 SMD
Roland Modela Pro II MDX-540 Fabricated PCB 3D PCB Design

Group Assignment

  1. Characterize the design rules for in-house PCB production (engraving and cutting)
  2. Submit a PCB design to a board house

Individual Assignment

  1. Make and test an embedded microcontroller system that you designed

Tools Used

  • Roland Modela Pro II MDX-540
  • Autodesk Fusion 360
  • FlatCAM · Mods Project
  • NC Viewer · VPanel
01
Equipment

CNC Milling Machine & Tools

🏭 Roland Modela Pro II MDX-540

At Fab Lab Ulima we use the Roland Modela Pro II MDX-540, a precision CNC milling machine used for rapid prototyping through subtractive manufacturing processes. Subtractive manufacturing works by removing material from a solid surface using cutting tools, following paths generated by digital fabrication software.

Roland Modela Pro II MDX-540

The machine allows us to:

🔌 Engrave Copper Traces

Precision engraving of PCB circuit traces on copper-clad boards.

🧱 Manufacture Molds

Create molds and 3D structures for casting and prototyping.

✂️ High Precision Cutting

Perform high precision cutting operations for board outlines and complex geometries.

🔧 Milling Tools

Different milling tools are used depending on the type of operation during the PCB fabrication process.

V-Bit Milling Tool

Mainly used to engrave the copper traces of the circuit. It has a V-shaped tip with an angle that commonly varies between 30° and 40°.

The cutting width depends on the depth of the tool in the Z axis — the deeper the tool penetrates, the wider the engraved trace. Correct Z calibration is critical.

Flat End Mill

Used to cut the external contour of the PCB, allowing the board to be separated from the base material after the traces are engraved.

V-Bit Milling Tool Flat End Mill
Important: Because the V-bit cutting width depends on Z depth, correct calibration is essential. Even a small error in Z will change the trace width and can break or short the circuit.

🪵 PCB Materials

Different materials can be used to fabricate printed circuit boards, each with different mechanical and thermal properties.

MaterialCodePropertiesBest For
FiberglassFR4 High mechanical resistance, good structural stability, high durability Professional boards — harder to machine, more tool wear
Phenolic PaperFR1 Easy to machine, less tool wear, clean copper engraving ✅ Fab Lab rapid prototyping — widely used
Bakelite Easy to machine, less resistant, can break, may not be uniform thickness Simple prototypes with caution
Ceramic PCB High heat resistance, brittle High-temperature applications (soldering iron, hot air gun)

💻 CAM Software

FlatCAM

CAM software that converts Gerber files into CNC toolpaths. Used to generate engraving paths for PCB traces and prepare files for CNC machining.

  • Convert Gerber → CNC toolpaths
  • Generate isolation routing
  • Configure milling parameters
Mods Project

Platform commonly used in Fab Labs to generate machine code and toolpaths. Includes a V-Bit Offset Calculator to determine correct cutting width based on tool angle and Z depth.

  • Generate engraving & cutting paths
  • Configure basic machining parameters
  • V-Bit offset calculation
02
Group Assignment

PCB Machining Process

For this process, we used the Roland Modela Pro MDX-540 to machine the PCB following a precise step-by-step workflow to ensure accurate engraving and clean board cutting.

Roland Modela Pro MDX-540

⚙️ Step-by-Step Process

1

Cleaning and Preparation

Clean the workspace with alcohol and remove any debris. Prepare the copper board by adding double-sided tape to keep it flat and fixed to the sacrificial layer.

2

Placing the Board

Place the board on the sacrificial layer, ensuring it is well aligned and as flat as possible to guarantee uniform engraving depth across the entire surface.

3

Calibration

Set the origin considering the first quadrant (bottom to top, left to right). The control lets you move the X and Z axes to define the origin. For the Z-axis, use the Z0 SENSE option to adjust the tool height correctly.

Machine Keypad Controller Z-axis Calibration
4

Machining Process

Two settings are used: engraving and cutting. First, run the engraving G-code to trace the copper paths, and then run the cutting G-code to separate the board. This order avoids movement and loss of precision.

5

Running the Job — VPanel

Open VPanel for Modela Pro II on the computer, select the G-code file, and start the machine. Monitor the process until completion.

VPanel for Modela Pro II
6

Final Step

Once machining is complete, carefully remove the PCB from the bed using a spatula, being careful not to bend or damage the board.

03
Individual Assignment

PCB Redesign

From Week 6 to Week 8

During Week 6, I designed my first PCB — but it wasn't good enough. For the Week 8 assignment, I decided to completely redesign the board. In the first version, I integrated many components directly on the PCB. After analyzing the circuit more carefully, I realized that several of these components could instead be connected using available free pins through headers.

Including them directly on the board was unnecessary and caused copper traces to cross each other, which could lead to fabrication problems during the milling process.

→ Go to Week 6: Electronics Design

Before & After

Before — Version 1 (Week 6)
Original schematic - Week 6
After — Redesigned (Week 8)
Redesigned schematic - Week 8
To improve the design, I simplified the circuit and reorganized the components, keeping only the essential elements on the PCB: a power button and status indicator LEDs. The rest of the modules are connected through headers.

🗺️ Component Mapping

To redesign the PCB, I analyzed all the components and classified them according to their type and signal. The microcontroller used is the XIAO ESP32.

⚡ Digital Sensors +

These sensors use digital pins, which operate with HIGH/LOW signals.

SensorQtyFunctionPin
IR / Proximity Sensor (HC-SR501)1Detect hand presence to activate the dispenserD6
Optical sensors (per compartment)3Detect stock level in each compartmentDigital header
Power On/Off Button1Turn the device on or offD7
Motor Encoder1Count the position of the dispensing mechanismDigital header
📊 Analog Sensors +

Analog sensors use ADC pins, which read variable signals.

SensorQtyFunctionPin
Load Cell (HX711)1Measure stock weight in one compartmentA0 (Analog header)
⚙️ Actuators / Motors +

These components generate the mechanical movement of the system.

ComponentQtySignal TypePin
Servo Motors3Digital PWMD9, D10
DC Motor1Digital (motor driver L298N or DRV8833)External driver
💡 Outputs / Displays +

These components provide visual feedback to the user.

ComponentQtyInterfacePin
LCD Display1I2C (SDA / SCL)SDA, SCL
LED Strip (WS2812B)1Digital data signalDigital header
Status LED1DigitalD8
🔌 PCB Header Connections +

The PCB includes several headers to simplify external connections.

HeaderConnectorPins
ButtonDirect connectionD7 + 1kΩ resistor + GND
Status LEDDirect connectionD8 + 330Ω resistor + GND
5V Power1×35V, 5V, 5V
GND1×3GND, GND, GND
3.3V Power1×33.3V, 3.3V, 3.3V
Analog Pins1×4A0, A1, A2, A3
Digital Header 11×5SDA, SCL, D6, 3.3V, GND
Digital Header 21×4D9, D10, 3.3V, GND

Pin Requirement Summary

Digital Pins

4–5 pins required for sensors, button, and LED.

Analog Pins (ADC)

1 pin for the load cell (HX711).

PWM Pins

2 pins for servo motor control.

I2C (SDA / SCL)

2 pins for LCD display communication.

🖥️ PCB Design Views

Schematic Design
2D PCB Layout 3D PCB Preview

🔧 Creating SMD Components in Fusion 360

The same procedure was followed to create three SMD pin connectors: 1×3, 1×4 and 1×6. Each one went through the same four steps described below.

1

Configure Component Properties

The component editor opens where the Name and Prefix fields are filled in on the right panel. The Añadir símbolo button is pressed to link an existing symbol and Nueva huella to create the footprint.

Step 1 - Component properties
2

Verify Symbol and Associate the Footprint

The left panel shows the component structure in three levels: component, symbol and footprint. Each part can be edited separately by clicking on it.

Step 2 - Symbol and footprint structure
3

Edit the Footprint in the Footprint Editor

Fusion 360 automatically switches to the HUELLA tab, where the 6 SMD pads are visible, numbered 1 to 6, vertically aligned on the top copper layer.

Step 3 - Footprint editor with SMD pads
4

Link Pins to Pads

The Connect 1X06SMD window opens showing three columns: Pin, Platform and Connection. The Conectar button is pressed six times — once per pin — to complete the mapping. Finally Aceptar is pressed and the component is ready to use in the PCB design.

Step 4 - Connect pins to pads

📁 Exporting Gerber Files from Fusion 360

In Autodesk Fusion 360, go to the Manufacture tab and select the CAM Processor. From there, click on "Generate Gerber Files".

Gerber export step 1 Gerber export step 2

Save the files in an empty folder. Automatically, all the necessary files are generated. The most important ones are:

Top Copper (.gbr)

Used for engraving the traces — contains all the circuit paths to be milled into the copper layer.

Profile (.gbr)

Used for cutting the board outline — defines the external contour that separates the PCB from the base material.

⚙️ Generating Toolpaths with FlatCAM

Since the PCB design was created in Autodesk Fusion 360, the files were exported as Gerber files. For the individual assignment, I used FlatCAM to generate the G-code for the CNC milling machine.

FlatCAM interface
📋 FlatCAM Step-by-Step Process +
  1. Import the .gbr (Gerber) file into FlatCAM.
  2. Move the Gerber design to the center axis. FlatCAM center axis
  3. Generate the isolation routing for the copper traces.
  4. Configure the milling parameters: tool diameter, tip angle, and spindle speed.
  5. Generate the CNC object after the routing is created.
  6. Export the final G-code for the machine.
In FlatCAM, the routing is generated first, and then the CNC object is created from it. After setting all parameters, the final CNC code is exported.
PCB design in FlatCAM
⚠️ Before sending the file to the machine, I modified the G-code to remove the tool change (T) commands, since our milling machine does not support automatic tool changing.
G-code editing

Then, I simulated the G-code using NC Viewer at ncviewer.com, which allowed me to visualize the cutting layers and verify that there were no extra paths or unwanted dots in the design.

NC Viewer G-code simulation
04
Fabrication & Testing

Milling, Soldering & Programming

🧪 Fabrication Tests

Test 1 — Ceramic Board

In the ceramic test, the traces ended up being too thin. This happened because we used a very sharp milling bit, and during the Z-axis calibration, since the material is brittle, the tool went slightly deeper than expected and removed more material from the traces. Because of this, some of the paths became too narrow, which could affect the connectivity of the circuit.

Fabrication Test 1 - Ceramic
Test 2 — Fiberglass Board

The fiberglass test had a better finish with cleaner, more consistent trace widths.

Fabrication Test 2 - Fiberglass
❌ Test 1 — Ceramic

Traces too thin due to brittle material and deeper-than-expected Z penetration.

✅ Test 2 — Fiberglass

Better finish with consistent trace widths and clean copper engraving.

🔥 Soldering

After milling, the components were soldered onto the board.

Soldering Materials Component Inventory

🔬 PCB Testing

I used a multimeter to check the continuity of the traces and verify that the soldering was done correctly before uploading and testing the programming code from Week 4.

Multimeter PCB Testing

💻 Programming

The following code was uploaded to the board to test the basic LED + button functionality:

Arduino / C++
// Pin definitions
#define LED_PIN  8   // D8 = GPIO8
#define BTN_PIN  9   // D9 = GPIO9

bool ledState = false;      // Current LED state
bool lastBtnState = HIGH;   // Last button state

void setup() {
  pinMode(LED_PIN, OUTPUT);
  pinMode(BTN_PIN, INPUT);
  digitalWrite(LED_PIN, LOW);
}

void loop() {
  bool currentBtnState = digitalRead(BTN_PIN);

  // Detect falling edge (button PRESS)
  if (lastBtnState == HIGH && currentBtnState == LOW) {
    ledState = !ledState;                    // Toggle state
    digitalWrite(LED_PIN, ledState);
    delay(50);  // Debounce
  }

  lastBtnState = currentBtnState;
}
Logic: Each time the button is pressed (falling edge detected), the LED toggles its state. A 50ms delay is added as debounce protection. The microcontroller used is the XIAO ESP32.
05
Downloads

Design Files

Get in Touch