IoT-Based Indoor Localization of Cigarette Smoke Using K-Nearest Neighbor and MQ-7 Sensors
Keywords:
Indoor smoke localization, MQ-7 sensor, K-Nearest Neighbor (KNN), Internet of Things (IoT), Real-time monitoring systemAbstract
Due to the high prevalence of smoking among individuals aged 15 and older in Lampung Province and limited enforcement of smoke-free areas, a system was developed to detect and map smoker locations within a 4 × 3.42-meter room using four MQ-7 sensors. The K-Nearest Neighbor (KNN) algorithm classified smoke source locations based on carbon monoxide (CO) concentrations across four designated observation zones. Experimental results indicated that the system had an average sensor reading error of 2.041%. The classification process for smoker positions achieved 93.75% accuracy and displayed smoker locations in Zones 1, 2, 3, and 4 on a dashboard map. Detection and classification data were stored in the InfluxDB database and visualized online using Grafana. The system also delivered real-time values in parts per million (ppm), the status of each zone, and a ten-minute history of ppm values
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Anisa Ulya Darajat, Muhammad Qutham Najmi Abdillah, FX Arinto Setyawan, Helmy Fitriawan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.












