Close
0%
0%

ZeroSmokeX - Smoke Guardian

ZeroSmokeX detects cigarette smoke in classrooms using Arduino Uno R4 WiFi and MQ-135, triggering alarms and sending real-time web alerts

Public Chat
Similar projects worth following
ZeroSmokeX is a smoke detection system built using Arduino Uno R4 WiFi board and C++ codes, designed to automatically detect cigarette smoke in classrooms and report real-time alerts through a lightweight HTML web interface. When smoke is detected by MQ-135 sensor, the device triggers audible and visual alarms, records the event time, and sends the data to a web dashboard for monitoring. The system also supports email notifications to teachers or administrators.

Phase 1 – AntiSmokeX (prototype using Python and Arduino Uno R3)

AntiSmokeX is the first version of the project designed to detect cigarette and vape smoke in schools. The system combines Arduino Uno R3, MQ-2 smoke sensor, and Python programming, using the Firmata protocol to enable communication between the computer and the Arduino board.

  • Main functions:
    • Detect cigarette smoke and vape aerosol in indoor school environments
    • Activate sound and light alarms when smoke is detected
    • Display smoke level and detection time on a Python GUI (Tkinter)
    • Send data to teacher’s email address
  • Operation: Arduino sends analog data to Python via Firmata. When the smoke value exceeds the smoke_threshold_for_alarm, the red LED lights up and the buzzer beeps
  • Testing results: The system successfully detected cigarette and vape smoke within 2-3 seconds at about 20 cm distance, with high accuracy and sensitivity

Phase 2 – ZeroSmokeX (upgraded with C++, Arduino Uno R4 WiFi, and web app)

ZeroSmokeX is a fully upgraded version written in C++ with HTML/CSS, running independently on the Arduino Uno R4 WiFi without needing a computer.

  • Key Improvements:
    • Replace MQ-2 with MQ-135 for better sensitivity and precision
    • Integrate WiFi to allow standalone operation
    • Add a real-time monitoring web interface accessible via PC or mobile
    • Implement log storage (6 most recent alerts) with time stamps
  • Impact: Assists teachers and administrators in monitoring student behavior, contributing to a smoke-free and healthier school environment
  • Comparison with commercial products: Costs 50% less than other commercial devices in the market, while offering remote data logging and monitoring features they lack

Phase 2 - ZeroSmokeX Presentation Slides.pdf

introduction about product description, technology, development process, testing, and future vision

Adobe Portable Document Format - 4.32 MB - 10/15/2025 at 05:04

Preview

Phase 2 - Source code CPP_ZeroSmokeX.ino

C++ codes for Phase 2

ino - 12.36 kB - 10/15/2025 at 05:03

Download

Phase 2 - ZeroSmokeX Product Report.pdf

Full description of the upgraded version using Arduino R4 WiFi, MQ-135 sensor, and a web-based dashboard

Adobe Portable Document Format - 195.80 kB - 10/15/2025 at 05:01

Preview

Phase 1 - source code Python_AntiSmokeX.py

Python codes of Phase 1

x-python-script - 2.74 kB - 10/15/2025 at 04:58

Download

Phase 1 - AntiSmokeX Project Description.pdf

This is the description of the initial phase of the project

Adobe Portable Document Format - 4.06 MB - 10/15/2025 at 04:58

Preview

View all 6 files

  • 1 × Arduino Uno R3 used in Phase 1 as main microcontroller, connected to PC via USB (Firmata)
  • 1 × MQ-2 Sensor used in Phase 1 as basic smoke detection
  • 1 × Arduino Uno R4 WiFi used in Phase 1 as WiFi-enabled microcontroller for standalone operation
  • 1 × MQ-135 Sensor used in Phase 1 as high-sensitivity sensor for smoke and harmful gases
  • 1 × Buzzer commonly used in 2 phases for audible alarm

View all 8 components

  • Future development plan

    Le Tuan Kiet10/15/2025 at 05:35 0 comments

    • Implement AI models to differentiate cigarette smoke from normal vapors
    • Add offline data buffering during WiFi loss with auto-sync afterward
    • Design custom PCB and plastic enclosure for portability and classroom use
    • Expand into STEM educational kits for students to learn IoT and coding
    • Develop a centralized web dashboard to manage multiple devices across schools

  • Progress... to be continued

    Le Tuan Kiet10/15/2025 at 05:21 0 comments

    June 2024: initiated the concept

    Oct 2024: completed AntiSmokeX prototype (Python + Firmata); conducted 3 smoke-type tests (cigarette, incense, ambient)

    Mar 2025: began developing ZeroSmokeX using Arduino Uno R4 WiFi, encountered Python incompatibility then switched to C++

    Apr 2025: built web interface for live data; tested smoke detection and auto-logging to local host

    May 2025: completed ZeroSmokeX with improved sensor calibration

View all 2 project logs

  • 1
    Phase 1 - HW, SW, and Operation

    Phase 1 – AntiSmokeX

    • Hardware setup:
      • Components: Arduino Uno R3, MQ-2, 2 LEDs, buzzer, breadboard, jumper wires
      • Wiring: MQ-2 → A0; Red LED → D11; Green LED → D9; Buzzer → D6 + 3.3 V
    • Software setup:
      • Install Arduino IDE → upload StandardFirmata
      • Install Python 3.9 → libraries: pyfirmata, pyserial, tkinter
    • Operation:
      • Open AntiSmokeX.py, adjust smoke_threshold_for_alarm, select correct USB port
      • When smoke is detected: Red LED and buzzer activate; GUI displays smoke status
  • 2
    Phase 2 - How to set up HW&SW and operate the device

    Phase 2 – ZeroSmokeX

    1. Hardware:
      • Components: Arduino Uno R4 WiFi, MQ-135, 2 LEDs, buzzer, 9 V adapter
      • Wiring: MQ-135 → A0; Red LED → D11; Green LED → D9; Buzzer → D6
    2. Software:
      • Install Arduino IDE 2.3.5 + libraries WiFiS3.h, HTTPClient.h, NTPClient.h
      • Configure WiFi SSID, password, and smoke_threshold = 100
    3. Operation:
      • Power on → Arduino connects to WiFi automatically
      • When smoke exceeds threshold → trigger alarm and send log to web
      • Access http://192.168.1.x to monitor live sensor data

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates