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)
⚠️ Safety Note — FR4 Fiberglass Particles: FR4 is a fiberglass-reinforced material that generates hazardous dust when milled. Inhaling FR4 particles can cause respiratory damage and other health issues. FR4 should only be machined on CNC equipment specifically equipped with proper dust collection and ventilation systems. The Roland Modela Pro II MDX-540 is not designed for FR4 machining, so all our PCB fabrication uses FR1 (Phenolic Paper) instead, which is safe to machine on this equipment.

💻 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 FR1 (Phenolic Paper) PCB boards 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.

Sacar placa
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.

📁 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

🛠️ Material & Equipment Used

For this individual assignment, I fabricated the PCB using the following specifications:

📋 PCB Material

FR1 (Phenolic Paper) — A safe, easy-to-machine material suitable for rapid prototyping on lab equipment.

🏭 Milling Machine

Roland Modela Pro II MDX-540 — Precision CNC milling machine at Fab Lab ULima, optimized for FR1 and other soft materials.

FR1 was chosen over FR4 because our Roland machine is specifically designed for safer materials. FR1 produces clean traces, requires minimal tool wear, and poses no health hazards during machining.

🏭 Milling the PCB

The PCB milling process consists of two main steps: engraving the copper traces and cutting the board outline. Both operations were performed on FR1 (Phenolic Paper) using the Roland Modela Pro II MDX-540 using the G-code files generated in FlatCAM.

1

Board Preparation & Setup

Clean the FR4 copper board with alcohol and secure it to the sacrificial layer using double-sided tape. Ensure the board is flat and well-aligned on the machine bed.

Board setup on machine
2

Machine Calibration

Set the X and Y origin at the corner of the board. Use the Z0 SENSE function to calibrate the Z-axis height accurately — this is critical for consistent trace width during engraving.

Z-axis calibration
3

Engraving the Traces

Load the engraving G-code (copper top layer) into VPanel and start the machine. The V-bit tool traces all circuit paths into the copper, creating isolated signal lines. This step took approximately 15–20 minutes.

FlatCAM isolation routing preview
4

Cutting the Board Outline

After engraving completes, load the cutting G-code (profile/outline) and run the flat end mill tool. This separates the PCB from the sacrificial layer, creating clean edges.

5

Removing the Board

Once milling is complete, carefully remove the board using a spatula, being careful not to bend or damage the freshly milled traces.

Milled board detail
Key Learning: The precision of this process depends heavily on proper Z-calibration. Even a 0.1mm error can affect trace width significantly.

🧪 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 — FR1 (Phenolic) Board

Better finish with consistent trace widths and clean copper engraving.

Material Consistency: Test 2 and the final production board were fabricated on FR1 (Phenolic Paper) using the Roland MDX-540 for optimal safety and quality.

🔥 Soldering & Assembly

After successfully milling the PCB, the next step was to populate the board with components and solder them securely. All components were soldered by hand using a traditional soldering iron.

Components Soldered
  • XIAO ESP32-C3 microcontroller
  • Power button with pull-down resistor (10kΩ)
  • Status LED with current-limiting resistor (330Ω)
  • Decoupling capacitor (100µF) for stable power supply
  • Multiple header connectors (1×3, 1×4, 1×5, 1×6) for external sensors and modules
Soldering Technique

Each component pad was heated with the soldering iron tip, and solder was applied to create a strong mechanical and electrical bond. Care was taken to:

  • Avoid cold solder joints (which break easily)
  • Keep solder away from adjacent traces to prevent shorts
  • Ensure proper heat distribution to avoid damaging components
  • Completed PCB with soldered components
Hero Shot — Completed Board
Completed PCB with soldered components

The final soldered board features all essential components neatly arranged and securely attached. The headers are clearly visible and ready to accept external sensor modules.

🧪 PCB Testing & Verification

Before uploading code, the board was tested to ensure all solder joints were good and there were no shorts or broken connections.

Continuity Testing

A multimeter was used to check continuity of critical traces and verify proper electrical connections between components.

Multimeter PCB testing
Test Results: All traces showed proper continuity. No shorts were detected. The board was ready for programming.

💻 Programming & Functionality Testing

The following code was uploaded to the board to test the basic LED + sensor functionality. The code reads a distance sensor and controls the onboard LED.

Arduino / C++
#include <Adafruit_TinyUSB.h>

// HC-SR04 Ultrasonic Sensor Pins
const int TRIG = D9;
const int ECHO = D10;

// Onboard Status LED
const int MY_LED = 8;

void setup() {
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
  pinMode(MY_LED, OUTPUT);
  digitalWrite(MY_LED, LOW);  // LED off at startup
}

void loop() {
  // Trigger ultrasonic pulse
  digitalWrite(TRIG, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG, LOW);

  // Measure echo time
  long duration = pulseIn(ECHO, HIGH);
  float distanceCM = (duration * 0.034) / 2;

  // LED logic: ON if object detected close
  if (distanceCM < 10) {
    digitalWrite(MY_LED, HIGH);  // Hand close — LED ON
  } else {
    digitalWrite(MY_LED, LOW);   // No detection — LED OFF
  }

  delay(100);
}
Functionality Results

✅ Board is fully functional! The LED responds correctly to object proximity:

  • When an object (hand) is brought within 10cm, the LED illuminates
  • When the object moves away, the LED turns off
  • Response time is immediate with no latency
Video Demonstration

Below is a video showing the completed board with the status LED responding to proximity sensor input:

05

Get in Touch