Project Overview
This week I fabricated a custom PCB featuring the MQ-3 gas sensor with SAMD21 microcontroller - the first prototype for my
final project: a "digital nose" capable of sensing and differentiating incense aromas. 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 CNC 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 with SAMD21 microcontroller and MQ-3 sensor used as design foundation
Close-up view of reference board showing component layout and circuit design details
PCB Design and Fabrication Process
PCB editor showing the complete board layout with SAMD21 microcontroller, MQ-3 sensor connections, and component placement
Gerber file PNG translation showing the MQ-3 sensor PCB trace pattern for milling
Traces
Exterior
Milling preview
Mistake: Broken End Mill
Incorrect scaling from EasyEDA PNG export
Broken trace
Broken holes
Broken end mill from first milling attempt
Final Fabricated PCB
Completed MQ-3 sensor PCB with SAMD21 microcontroller - ready for component population and testing
Sensor Data Collection and Analysis
Real-time sensor data collection from reference board showing analog readings and response patterns
Machine learning model configuration for processing sensor data and pattern recognition
AI clustering analysis results showing distinct patterns in sensor responses - demonstrating potential for incense classification
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
Links