Analysis of the Analog Signal Response of the MQ-2 Sensor to Variations in Gas Source Distance in an IoT System
Keywords:
Sensor MQ2, Analog Signal, ADC Value, Internet of ThingsAbstract
This study aims to analyze the analog signal response of the MQ-2 sensor to variations in gas source distance in an Internet of Things (IoT) system. The study used an experimental method with an MQ-2 sensor integrated with a NodeMCU ESP8266 as the microcontroller to read and process the sensor output values. Testing was carried out using an LPG gas source at distance variations of 5, 10, 20, 30, and 40 cm, with five measurements at each distance. The sensor reading data, in the form of Analog-to-Digital Converter (ADC) values, were recorded and analyzed using a descriptive approach in order to determine the pattern of change in the sensor response with respect to distance. The test results show that the average ADC values at distances of 5, 10, 20, 30, and 40 cm were 641.4; 485.4; 357.8; 207.6; and 187.2, respectively. These results indicate a tendency for the ADC value to decrease as the distance of the gas source from the sensor increases under the testing conditions. The IoT system using the NodeMCU ESP8266 and the ThingSpeak platform was also able to transmit and display the sensor reading data periodically at an interval of 15 seconds. Based on the research results, variation in the gas source distance produces changes in the analog signal response of the MQ-2 sensor, so that the distance between the sensor and the gas source becomes one of the factors that needs to be taken into account in the implementation of IoT-based gas detection systems.
References
[1] T. Dutta, T. Noushin, S. Tabassum, and S. K. Mishra, “Road map of semiconductor metal-oxide-based sensors: A review,” Sensors, vol. 23, no. 15, art. no. 6849, Aug. 2023, doi: 10.3390/s23156849.
[2] A. Dey, “Semiconductor metal oxide gas sensors: A review,” Materials Science and Engineering: B, vol. 229, pp. 206–217, Mar. 2018, doi: 10.1016/j.mseb.2017.12.036.
[3] Hanwei Electronics Co., Ltd., “Technical data MQ-2 gas sensor,” MQ-2 datasheet, Zhengzhou, China.
[4] A. Rofik, “Analisa kebocoran LPG dengan menggunakan sensor gas MQ-2,” SinarFe7, vol. 4, no. 1, pp. 206–208, 2021.
[5] R. Pal, F. Shaikh, J. Shirodkar, and S. Gindi, “IoT based real time weather monitoring system using NodeMCU,” International Journal for Research in Applied Science and Engineering Technology, vol. 11, no. 4, pp. 2965–2970, Apr. 2023, doi: 10.22214/ijraset.2023.50313.
[6] A. H. Kelechi et al., “Design of a low-cost air quality monitoring system using Arduino and ThingSpeak,” Computers, Materials & Continua, vol. 70, no. 1, pp. 151–169, 2021, doi: 10.32604/cmc.2022.019431.
[7] G. J. H. Aziz and D. Naista, "Implementasi kendali PI pada single axis solar tracker untuk smart lamp berbasis IoT," CHAIN: Journal of Computer Technology, Computer Engineering and Informatics, vol. 4, no. 3, pp. 284–296, Jul. 2026, doi: 10.58602/chain.v4i3.303.
[8] A. Sesanti and Y. Rahmanto, “Perancangan sistem deteksi kebocoran gas berbasis IoT dan web server,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 2, 2025, doi: 10.57152/malcom.v5i2.1683.
[9] R. Inggi and J. Pangala, “Perancangan alat pendeteksi kebocoran gas LPG menggunakan sensor MQ-2 berbasis Arduino,” Simkom, vol. 6, no. 1, pp. 12–22, Jan. 2021, doi: 10.51717/simkom.v6i1.51.
[10] M. I. Prananda, S. Syahputra, and M. A. Syari, “Design of an LPG leak detection system using IoT based MQ-2 sensor,” Journal of Artificial Intelligence and Engineering Applications (JAIEA), vol. 3, no. 1, pp. 383–387, 2023, doi: 10.59934/jaiea.v3i1.337.
[11] Sohibun, I. Daruwati, R. G. Hatika, and D. Mardiansyah, “MQ-2 gas sensor using micro controller Arduino Uno for LPG leakage with short message service as a media information,” Journal of Physics: Conference Series, vol. 2049, no. 1, art. no. 012068, 2021, doi: 10.1088/1742-6596/2049/1/012068.
[12] D. M. Panjaitan, V. F. Naibaho, and A. Amelia, “Rancang bangun sistem pendeteksi kebocoran gas LPG menggunakan sensor MQ-2 berbasis NodeMCU ESP8266,” in Konferensi Nasional Sosial dan Engineering Politeknik Negeri Medan, Medan, Indonesia, 2021, p. 113.
[13] R. J. Jadhav, P. Radhakrishnan, D. A. Jadhav, B. Ashreetha, J. Divya, and S. Mukherjee, “Internet of Things enabled gas leakage detection over industrial areas using powerful MQ series sensor and controller,” in Proc. 7th Int. Conf. Inventive Computation Technologies (ICICT), 2024, pp. 1679–1686, doi: 10.1109/ICICT60155.2024.10544961.
[14] G. N. Sai, K. P. Sai, K. Ajay, and P. Nuthakki, “Smart LPG gas leakage detection and monitoring system,” in Proc. 5th Int. Conf. Smart Systems and Inventive Technology (ICSSIT), 2023, pp. 571–576, doi: 10.1109/ICSSIT55814.2023.10060970.
[15] R. Sarkar et al., “Elevating gas safety standards: ESP32-based detection systems with Blynk integration,” in Proc. IEEE Region 10 Symposium (TENSYMP), 2024, doi: 10.1109/TENSYMP61132.2024.10752183.
[16] S. Ahmed, M. J. Rahman, and M. A. Razzak, “Design and development of an IoT-based LPG gas leakage detector for households and industries,” in Proc. IEEE World AI IoT Congress (AIIoT), 2023, pp. 762–767, doi: 10.1109/AIIoT58121.2023.10174377.




