8. Electronics Production

Overview

This week I'm explaining how I took the KiCad schematic and PCB from Week 4 through the full production pipeline. This week I'll walk through the SVG export, Mods CE toolpath generation, SRM-20 milling, SMD soldering, and functional testing with the velostat pressure sensor and vibration motor.

Group Assignment

  1. Characterize the design rules for your in-house PCB production process: document the settings for your machine./li>
  2. Document the workflow for sending a PCB to a boardhouse
  3. Document your work to the group work page and reflect on your individual page what you learned

Individual Assignment

  1. Make and test a microcontroller development board that you designed

This week I worked on defining my final project idea and started to getting used to the documentation process.

Research

I am currently completing Fabricademy and will continue interating during Fabacademy. My final project in Fabricademy focuses on increasing engagement and understanding of how Labs in university settings can utilize tools, machines, and softwares to create. My final project will require the understanding of coding, 2d and 3d design, 3d print manufacturing, molding and casting, bio engineering, mechatronics, soft robotics, and textile sustainability.

During this week, I focused on completing the design rules charachterisatin independently. This involved milling a test pattern to figure out trace widths and clearances.

SRM-20 Minumum Feature Size

Test pattern: Trace Widths and Clearences

I utilized the pattern for testing widths available on the EasyTrace5000 platform. I was assisted by Ricardo Marques in understanding how to utilize EasyTrace5000 with the SRM-20 and the importance of the trace test.

EasyTrace5000 Image
  1. 0.8mm clearance : clean isolation, wide channel
  2. 0.6mm clearance : clean isolation
  3. 0.4mm clearance : clean isolation, reliable limit
  4. 0.3mm clearance : partial bridge on 2 of 5 runs (inconsistent)
  5. 0.2mm clearance : bridges on every run (not good)

Results:

Below 0.4mm clearence, the SRM-20 can't produce consistently especially towards the edges. Because of this, I chose 0.4mm as the minimum clearence rule in my KiCad's projects before exporting gerbers or SVGs.

Completed Test

Workflow for Sending Files to Mill

  1. In KiCad, under files, choose Fabrication Options.
  2. In Fabrication options, choose the layers: F.CU, B.CU, F.Mask, F.Silkscreen, Edge.Cuts
  3. Make sure that the format is Gerber if exporting to a milling software or Boardhouse and SVG if exporting to MODS CE.
  4. Once saved, I go into my file explorer, put all of the files together in a folder then use 7-Zip on my computer to compress the files
  5. A boardhouse like jlcpcb.com can be utilized to mill the board outside of a fab lab.

Individual Work

What this board does

This board was designed in Week 4 (Embedded Programming) as a direct prototype of the haptic feedback wristband in my final project. The schematic and PCB layout were completed in KiCad at that time. This week is production week and I'll go more in depth about the process of taking those files through milling, stuffing, and functional testing.

Board Function

In the final project this serial link becomes BLE on the XIAO nRF52840. I'm hoping that since there is the same form factor, same pin layout, same firmware logic this crossover will be easy. The MOSFET, flyback diode, and motor connector all carry forward, unchanged.

Bill of Materials

d> d> d>
Component Value/Part Placement Qty
Microcontroller Seeed Studio XIAO RP2040 Through hole surface mounted 1
N-Channel Mosfet AO3400 Soldered 1
Flyback Diode 1N4148W Soldered 1
Resistor 100 ohm Soldered 1
Motor Connector 2 Pin 2.54mm header Soldered 1
DC coreless vibration motor 3V, 1-6V operating, 70mA max in the header 1
Tactile Buttons - Soldered 2
Textile Button (replaces textile buttons, more info below) Velostat, conductive fabric Handmade, soldered 1

Why use Mosfet?

The XIAO RP2040's GPIO pins are rated for 12mA maximum. The vibration motor draws up to 70mA. The AO3400 (gate threshold ~1V, rated 5.7A) lets a 3.3V GPIO signal switch the full motor current without touching the microcontroller's output stage.

MODS CE: Generating Toolpaths

Export SVGs from KiCad

I exported two separate SVG files from File: Plot, format set to SVG, output mode black and white, mirror unchecked. When I milled this board I had not run 0.4mm DRC minimum clearance before plotting. This was an issued when I milled the board because I had to manually clear the copper. This is the lesson from the design rules characterisation I ran earlier this week.

Inkscape Workflow

I like to make changes using Inkscape because this was how I was trained back in 2023.
  1. I opened both SVGs in Inkscape
  2. Then connected the strokes that should be attached but were saved disconnected. Inbetween pads are traces that are strokes in inkscape. I needed to connect the traces fully that were not connected. To do this, I selected the strokes I wanted to combine then I used path then union.
  3. Next I widened the strokes to .300mm instead of .200mm. I did this after testing the traces at .200mm and seeing that they are too thin.
  4. I should have also made sure there was a LOT of space between the pads and traces, because I didn't I had to manually clear an area with an Xacto knife later.
  5. I saved both layers as one SVG the first time because I like to ensure the traces have space between the future edge cut and boarder traces.
  6. I then hid the traces and saved the Edge Cut layer as one SVG separately.
Inkscape Images with wide

Mods CE trace pass settings

In class, Neil mentioned that Chrome works really well with Mods CE. I did try Mods CE first with file explorer and it worked fine but didn't open the simulator every time that I pressed calculate. Because of this, I decided to use Chrome instead and have had more success with the full workflow.

Once inside of Mods CE, I used the menu to choose SRM-20 as my machine and chose 2D PCB milling. I imported the SVG file that has both the traces and edge cuts.

Setting Parameter
Tool Diameter 1/64 flat endmill
Cut Depth .1mm
Max Depth .1mm
Offset Number 4
Speed 4mm/s
X/Y/Z origin 0
Mods CE images

I calculated and made sure to check the simulation for any changes that needed to be made.

I saved the file and used the Roland VPanel for SRM20 to mill the traces and where the edge cuts will lay.

Mods CE outline pass settings

In class, Neil mentioned that Chrome works really well with Mods CE. I did try Mods CE first with file explorer and it worked fine but didn't open the simulator every time that I pressed calculate. Because of this, I decided to use Chrome instead and have had more success with the full workflow.

Once inside of Mods CE, I used the menu to choose SRM-20 as my machine and chose 2D PCB milling. I imported the SVG file that has both the traces and edge cuts.

Setting Parameter
Tool Diameter 1/32 flat endmill
Cut Depth .6mm per pass
Max Depth 1.8mm
Offset Number 1
Speed 2mm/s
X/Y/Z origin 0
Mods CE images

I calculated and made sure to check the simulation for any changes that needed to be made.

I saved the file and used the Roland VPanel for SRM20 to mill edge cuts and seperate the PCB from the rest of the copper board.

More information about Milling

I taped wax to the SRM-20 bed, then pressed my copper on top with two layers of double-sided tape across the full surface. I installed the 1/64" end mill, jogged to the space on the copper I wanted to mill, and set XY and Z zero. For Z zero I used the paper method: lowering until the paper had slight drag resistance when pulled. At 0.1mm cut depth this matters more than any other setting.

Trace Pass Results

The trace pass seemed completed cleanly. All isolation channels appeared consistent across the board.

Milled Traces

Outline Pass and Board Removal

I switched to the 1/32" end mill, re-zeroed Z only (XY untouched in order to ensure I cut it out properly), and ran the outline pass. Board cut through cleanly. I slid a sewing pin after trying a thin spatula (that scraped the PCB) under the edge to remove it without snapping the corners.

Removed Board

Pre Soldering Continuity Check

Before soldering any components I ran a continuity check with my Mastech MS8217 in continuity mode to catch any shorts or breaks while the board was still bare copper and fixable. I found one issue (explained below).

Soldering and Assembly

Surface Prep

I cleaned the copper surface with isopropyl alcohol before soldering. Alcohol wipe first, then flux at each pad immediately before the iron touches it.

Soldering Order

I set the iron to 350

  1. 1N4148W diode
  2. AO3400 MOSFET
  3. 100 ohm Resistor
  4. 2 pin motor connector header (through hole)
  5. Tactile Push Button
  6. Xiao RP2040
  7. Motor
Components on Board

Programming and Testing

Toolchain Setup

I used Arduino IDE with the Raspberry Pi Pico/RP2040/RP2350 by Earle Philhower board package (v5.6.0), installed via Boards Manager using:

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

Board selected: Seeed XIAO RP2040. Port: COM6. I chose Arduino over CircuitPython because my final project runs on the XIAO nRF52840, which requires Arduino for full BLE, SD card, and display library support. I'm making sure to practice now to avoid a toolchain switch later.

Note on code origin:

The initial sketch structure was developed during my Week 4 documentation process and then modified and tested by me on the physical board. I changed the input from a digital button to an analog velostat sensor, inverted the threshold logic after discovering sensor readings decrease under pressure (not increase), and calibrated the threshold through live Serial Monitor testing.

Source Code

  // ─────────────────────────────────────────────────────────────
  // Fab Academy Week 8 — Electronics Production
  // Board: Seeed Studio XIAO RP2040 (custom milled PCB)
  // Input: Velostat fabric pressure sensor on A0
  // Output: DC coreless vibration motor via AO3400 MOSFET on D2
  // Communication: Bidirectional USB serial at 115200 baud
  // ─────────────────────────────────────────────────────────────
   
  const int buttonPin = A0;  // velostat pressure sensor — analog input
  const int motorPin  = D2;  // MOSFET gate — digital output
   
  // Threshold calibrated from live Serial Monitor testing:
  // At rest:  sensor reads 100–200 (high resistance, no pressure)
  // Pressed:  sensor reads as low as 5 (low resistance, pressure applied)
  // Threshold set to 20 — clean separation, ignores accidental contact
  int threshold = 20;
   
  void setup() {
    Serial.begin(115200);
    pinMode(motorPin, OUTPUT);
    digitalWrite(motorPin, LOW);
    Serial.println("Week 8 ready");
  }
   
  void loop() {
    // Read analog pressure value from velostat sensor
    int pressure = analogRead(buttonPin);
    Serial.println(pressure);  // live telemetry for monitoring and calibration
   
    // Pressure DECREASES under compression (velostat behavior)
    // Trigger when value drops below threshold
    if (pressure < threshold) {
      Serial.println("NEXT");   // signal to computer application
      pulseMotor();             // haptic confirmation
      delay(1000);              // prevent repeat triggers while held
    }
   
    // Listen for incoming serial command from computer
    if (Serial.available()) {
      String cmd = Serial.readStringUntil('\n');
      cmd.trim();
      if (cmd == "MOTOR_ON") {
        pulseMotor();
        Serial.println("MOTOR_DONE");  // confirm completion to computer
      }
    }
   
    delay(50);  // 50ms loop tick
  }
   
  // Motor pulse function — fires motor for 500ms
  void pulseMotor() {
    digitalWrite(motorPin, HIGH);
    delay(500);
    digitalWrite(motorPin, LOW);
  }
  
Code in IDE

Pressure Sensor Calibration

I opened the Arduino Serial Monitor at 115200 baud and watched live pressure values.

Setting Value Result
At Rest (no pressure) 100-200 No Trigger
Pressed Firmly 5-15 Next shows in serial monitor and motor pulsates
Threshold set 20 clean separation between states

Bidirectional Communication Test

Board to Computer

Pressing the velostat sensor sent NEXT to the Serial Monitor and fired the motor simultaneously. Both outputs confirmed on first press.

Computer to Board

Typing MOTOR_ON (all caps — case sensitive) in the Serial Monitor input and pressing Enter fired the motor and returned MOTOR_DONE. Confirmed on first attempt after discovering the case sensitivity.

Bidirectional Communication

Serial Monitor Output

  ─── Arduino Serial Monitor — 115200 baud ────────────────────────
  Week 8 ready
  187
  192
  178
  ...
  5          ← velostat pressed
  NEXT       ← board sends to computer
  ...
             ← MOTOR_ON typed and sent from computer
  MOTOR_DONE ← board confirms motor pulse completed
  
Serial Monitor Shot

Reflection

The most valuable thing this week was the gap between what looked correct in KiCad and what the SRM-20 could actually produce. Running the design rules characterisation first told me 0.4mm was the reliable minimum; I had designed to 0.3mm and paid for it immediately with a trace bridge at the first continuity check. The fix was easy — X-Acto knife, two minutes — but the lesson is that machine capability has to be a design input, not an afterthought.

The motor debugging sequence was the moment I felt most like an engineer this week. Having a systematic approach — gate voltage, then drain voltage, then motor in isolation — meant I found the connector fault in under five minutes without guessing. That discipline will matter a lot when the system gets more complex in later weeks.

If I milled this board again I would: (1) set 0.4mm clearance in KiCad from the start, (2) use a screw terminal instead of a pin header for the motor connection to avoid the contact reliability issue, and (3) mill a second board after the design was verified rather than accumulating wire repairs on the first one. The board works. The wristband prototype is real now.

Files

File Description
Wearable Wristband — Inkscape Traces IDE Code - Motor controller for SEEED Xiao RP2040