Smellamatic
Project File · Active LogFEATURED BUILD

Smellamatic

The Open-Source DIY Stink Score Machine

COMPILED: 2026-06-22
ESP32SensorsIoT3D Printing
Smellamatic

Smellamatic: DIY Stink Score Machine

The Smellamatic is a playful, maker-friendly relative odor experiment housed in a retro-style physical box. It estimates a playful 0–100 stink score and shows it on an OLED display.

Smellamatic on Workbench

The Core Concept

Unlike standard gas detectors or scientific air quality devices, Smellamatic doesn't output precise parts-per-million (PPM) values for individual gases. Instead, it aggregates readings from multiple gas sensors into a single, vibes-based Stink Score ranging from 0 (Fresh) to 100 (Criminal).


Technical Specifications

Hardware Guts

  • Microcontroller: Seeed Studio XIAO ESP32C3. Selected for its integrated Wi-Fi, compact footprint, and cheap price point.
  • Environmental Sensor: BME688. Handles general VOC (Volatile Organic Compound) detection and ambient temperature/humidity compensation.
  • Hydrogen Sulfide Sensor: MQ-136. Detects sulfurous funk (think rotten eggs, sewers, and hot springs).
  • Ammonia & Amine Sensor: MQ-137. Detects ammonia-like odors (pet boxes, stale sweat, and cleaning agents).
  • Fan: 5V 30x30x10mm brushless fan. Critical for keeping room air actively circulating through the enclosure rather than getting stale.
  • MOSFET Control: AO3400 N-channel logic-level MOSFET, allowing the ESP32 to switch the 5V fan power source dynamically.
  • Display: 0.96" I²C SSD1306 OLED Screen. Renders the main interface: score, rating, and mini sensor-level bar graphs.

Wiring Diagram

The ESP32 communicates with the BME688 and OLED screen over the I²C bus (pins D4 and D5). The MQ-136 and MQ-137 are analog sensors connected to analog input pins (D0 and D1), read via voltage-divider circuits to map analog resistance to relative gas concentration.


The Firmware & Calibration

The firmware is written in Arduino-flavored C++.
Because metal-oxide gas sensors (like the MQ series) require a heating element, they have a natural warmup curve. The Smellamatic firmware includes:

  1. Warmup Cycle: A 60-second visual count-down on startup that runs the heater before reading values.
  2. Dynamic Calibration: Pressing Button A resets the "Fresh Air Reference" baseline. This recalibrates the current room level as 0, allowing you to detect relative rises in odor.
  3. Scoring Logic: Combines VOC baseline drifts, H2S analog voltage increases, and NH3 voltage increases using a weighted geometric average to compute the final Stink Score.
// Scoring function snippet
float rawScore = (vocWeight * vocDiff) + (h2sWeight * h2sVoltage) + (nh3Weight * nh3Voltage);
int stinkScore = constrain(map(rawScore, 0, MAX_VAL, 0, 100), 0, 100);

3D Printed Enclosure

The CAD design focuses on retro-scientific lab aesthetics.

  • Airflow Optimization: Dual air-intake slits on the side feed directly onto the gas sensor chamber. The fan is configured in exhaust mode, pulling fresh air through the intakes, over the sensors, and out the top vents.
  • Print Settings: Designed to be printed without support material. Recommend printing in high-contrast PLA colors (e.g. Slate Grey for the main body and Safety Yellow/Orange for the buttons and tape stripes).
ESTABLISHED BUILD · DO NOT SOLDER UNDER INFLUENCE OF COFFEE