MAS.863/4.140/6.9020
How To Make (almost) Anything
Week 6: Electronics Production - Making my own PCB
Awu Chen
2025

Project Overview

This week I fabricated a custom PCB with the goal of testing the MQ-3 gas sensor with SAMD21 microcontroller. The board integrates analog sensing with a 32-bit microcontroller for data acquisition and processing, building on the Genji-Mon incense holder design from previous weeks.

The Sensor System

The board combines an MQ-3 gas sensor with a SAMD21 microcontroller. The MQ-3 is a tin dioxide semiconductor sensor that detects volatile organic compounds - while it's typically used for breathalyzers, it's sensitive to the aromatic compounds in incense smoke. The SAMD21's 12-bit ADC reads the sensor's analog output and can send data via USB for logging and analysis. This single-sensor prototype will eventually expand into a multi-sensor array capable of identifying different incense types by their chemical signatures.

Fabrication Process

I started by exporting the PCB design as Gerber files and processing them through mods to generate toolpaths. The process used a 0.4mm end mill for trace milling and 0.8mm end mill for the board outline. The most critical step was setting the Z-height precisely on the copper surface - even small errors significantly affect trace quality. After milling, I inspected the board under magnification and tested for continuity and shorts. The final board came out clean with well-isolated traces.

Mistake: Breaking the Carvera Machine

During my first milling attempt, I broke the Carvera CNC machine by snapping off the tip of the end mill. The issue came from my workflow: I exported the design through EasyEDA and generated PNG files instead of using Quentin's recommended workflow. This caused a scaling problem - the measurements were off, and when the machine tried to cut at the wrong depth, the end mill broke off completely.

This taught me an important lesson about the importance of following established workflows in digital fabrication. Different tools export at different resolutions and scales, and assuming "a PNG is a PNG" can have expensive consequences. After switching to the proper workflow and double-checking my measurements, the second attempt was successful.

Testing and Validation

Before fabricating my board, I tested the concept with a reference board using the same SAMD21 + MQ-3 configuration. I collected sensor data by exposing it to different aromatic sources - incense, alcohol, and clean air - and logged the readings via USB. The sensor responses showed distinct patterns for each source.

I then ran unsupervised clustering on this data to see if different aromas would naturally group separately. The results were promising: the sensor responses formed clear clusters based on source type, not random noise. This proof-of-concept validates that even a single sensor can distinguish different volatile compounds, and that a multi-sensor array should provide even better classification for identifying specific incense varieties.

Images

Reference Bread Board - Starting Point

Reference Board Overview
Reference board with SAMD21 microcontroller and MQ-3 sensor used as design foundation

Reference Board Close-up
Close-up view of reference board showing component layout and circuit design details

PCB Design and Fabrication Process

PCB Editor Design
PCB editor showing the complete board layout with SAMD21 microcontroller, MQ-3 sensor connections, and component placement

Gerber PNG Translation
Gerber file PNG translation showing the MQ-3 sensor PCB trace pattern for milling

Milled Traces
Traces
Board Outline
Exterior

Toolpath Preview
Milling preview

PCB During Milling Process
PCB board during the milling process on the Carvera CNC machine

Mistake: Broken End Mill

EasyEDA Export Scaling Issue
Incorrect scaling from EasyEDA PNG export

Broken Trace
Broken trace
Broken Holes
Broken holes
Broken End Mill from Carvera
Broken end mill from first milling attempt

Final Fabricated PCB

Final Fabricated PCB
Completed MQ-3 sensor PCB with SAMD21 microcontroller - ready for component population and testing

Board Failure

The board did not work at first so I thought maybe the connection is not good enough so I soldered on pins as well to see if that helps. It didn't work either, and I think the issue has to do with not having resistor in the circuit board. So I decided to redesign the board with ability to place resistors in it. Unfortunately, I didn't have enough time to implement this fix. I addressed this during my week 9 assignment.

Reflection

This week brought together electronics production and the conceptual validation of my final project. The PCB milling process taught me the importance of precision - particularly Z-height calibration, which makes or breaks trace quality. I also learned this the hard way by breaking the Carvera's end mill on my first attempt. Using the wrong export workflow from EasyEDA created scaling issues that led to incorrect cutting depths. It's a reminder that in digital fabrication, the entire toolchain matters - not just the final step.

But more importantly, testing the reference board and seeing clear clustering in the sensor data proved that the "digital nose" concept actually works. Different aromas produce distinguishable patterns, even with just a single sensor. The fabricated board is now ready to become the foundation for a multi-sensor array. Combined with the Genji-Mon incense holder from earlier weeks, this creates a system that bridges traditional Japanese aesthetics with modern sensing technology - a device that can actually "smell" and distinguish different incense varieties.

Note: This assignment documentation website was created with assistance from Cursor AI.

Attachments

MQ-3 Sensor G-code File (.nc)

Links

Back to Awu's Page
Final Project: Digital Nose for Incense Detection
Course Homepage
Fab Academy Electronics Production Reference
Mods - Fab Modules Web-based Toolpath Generator
MQ-3 Gas Sensor Datasheet (PDF)
Week 1: Genji-Mon 3D Incense Holder Design
Week 2: Genji-Mon Vinyl Cut Incense Heater