Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1131 https://internationalpubls.com Smart Gas/Water Leakage Detection System for Pipes Laying in Ground or in a Wall Shivkanya Anil Rasal1, Dr. Sanjay Koli2 Research Scholar1, Ajeenkya Dy Patil School of Engineering, Dr. D Y Patil Knowledge City, Charholi Bk, Via Lohegaon, Pune, Maharashtra 412105 Professor2, Ajeenkya Dy Patil School of Engineering, Dr. D Y Patil Knowledge City, Charholi Bk, Via Lohegaon, Pune, Maharashtra 412105 Mail id: rasalshivkanya2004@gmail.com [1*] sanjay.koli@dypic.in [2*] Article History: Received: 12-01-2025 Revised: 25-02-2025 Accepted: 05-03-2025 Abstract: This paper presents a smart leakage detection system for gas/water pipelines using IoT- based sensors and ESP32 microcontroller. The system, built on the ESP32 microcontroller, integrates water and gas sensors, a GSM module, flow sensor and a mobile app for notifications, ensuring high accuracy and minimizing false alarms. It offers a cost-effective, scalable solution that enhances safety, reduces resource waste, and enables timely preventive maintenance, making it a significant advancement over traditional detection methods for urban and industrial applications. Keywords: ESP32, water leakage detection, gas leakage detection, IoT, real-time monitoring, smart safety systems. 1. Introduction Underground and wall-mounted gas/water pipes face challenges in sensor installation, maintenance, and leak detection due to signal interference, environmental factors, and corrosion. [1] These issues impact sensor performance and make access difficult for repairs, increasing costs. Wireless sensor power supply is often problematic, and managing large data volumes can overwhelm operators. Effective analytics are needed to handle this data. These factors complicate infrastructure management and leak detection efforts. Smart gas/water leakage detection systems enhance safety, efficiency, and sustainability by enabling real-time leak detection. Early identification prevents costly damage, reduces wastage, and minimizes environmental impact [2,3,4]. These systems also help avoid hazards like fires or toxic gas exposure. They reduce the need for invasive inspections, optimizing maintenance efforts. As cities grow, such systems are essential for better resource management and utility reliability. Environmental factors like soil composition and temperature can interfere with sensor accuracy, leading to false readings. Wireless signals are often blocked by physical barriers, complicating communication. These challenges, along with corrosion risks, make developing reliable, durable solutions difficult. Previous solutions for gas/water leak detection face high costs, limited sensor Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1132 https://internationalpubls.com accuracy, and communication challenges due to environmental factors. Many rely on intrusive installation methods [1] causing disruption and false alarms. Proposed Smart Gas/Water Leakage Detection System uses advanced and energy-efficient sensors (acoustic, pressure, vibration) to detect leaks; reducing cost and maintenance [5-9]. It integrates Global System for Mobile communication (GSM) module for reliable data transmission in difficult environments. A centralized data analysis platform processes the data to identify leaks, enabling early detection and reducing maintenance. This will help to improve leak detection accuracy, minimizing false positives and boosting system reliability. Challenges include sensor calibration over time, environmental interference, and ensuring continuous power supply for wireless sensors. Deploying these systems in existing infrastructure can be costly and complex. Despite these challenges, the system enhances leak detection and response times. 2. Literature Survey Several studies have explored the use of Internet of Things (IoT) technologies for leakage detection systems. These studies emphasize the importance of real-time monitoring in enhancing the efficiency of safety systems, particularly in reducing response times during emergencies. By leveraging IoT, the research by J. Smith et al. [5] have demonstrated that how connected devices can provide continuous, real-time data, enabling quicker detection of hazards and more rapid intervention, ultimately improving safety outcomes and reducing risks in various environments. The authors have explored the potential of IoT technology in creating cost-effective safety systems. However, this system has limitations including network reliability, power supply, and sensor calibration issues. R. Brown et al. [10] have presented Gas Leakage Detection system and uses recent advancements in gas sensor technologies, focusing on improvements in sensitivity and the integration of these sensors with IoT platforms. The study highlights how enhanced sensor capabilities enable more accurate and reliable detection of gas leaks, which is critical for safety applications. It also explores the role of IoT in enabling real-time monitoring and data analysis, enhancing the overall efficiency and responsiveness of gas leakage detection systems. These advancements are crucial for improving safety standards in both residential and industrial settings. A drawback of this system is the limited focus on the practical challenges of environmental interference, and the integration of these systems into existing infrastructures. A Real-Time Water Monitoring Systems is presented by M. Johnson [11] with a particular focus on IoT-enabled devices designed to detect and mitigate leaks in both residential and industrial settings. The paper explores how these IoT-based systems provide real-time monitoring capabilities, allowing for early leak detection, reducing water wastage, and improving overall efficiency in water management. It also highlights the potential of these technologies to enhance water conservation efforts and minimize damage from leaks, demonstrating the growing importance of IoT in smart infrastructure solutions. A drawback of this system is the lack of emphasis on the challenges related to the reliability, scalability, and maintenance of IoT-based systems in diverse and dynamic real-world environments. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1133 https://internationalpubls.com A Smart Home Automation with Leak Detection system is presented by A Gupta [12]. It demonstrates the integration of leak detection technologies with smart home automation systems to enhance both safety and convenience. The study highlights how combining leak detection sensors with smart home platforms enables real-time monitoring, alerting homeowners to potential water or gas leaks and allowing for immediate action. This integration not only improves safety by preventing damage and hazards but also adds convenience by automating responses to leaks, such as shutting off valves or notifying homeowners and service providers, thereby contributing to more efficient and secure home management. But this system faces difficulty in ensuring the reliability and accuracy of leak detection sensors over time, as well as addressing integration challenges with existing home infrastructure. Therefore, the proposed smart gas/water leakage detection system aim to address the above limitations by utilizing the ESP32 microcontroller and IoT sensors. 3. Proposed System 3.1 Overview The block diagram of the proposed integrated gas/water leakage detection system is shown in figure 1.1 below. Fig.1.1 Block diagram of the proposed System The proposed system architecture comprises three key components: detection system, notification system, and response systems. The detection system utilizes water and gas sensors interfaced with the ESP32 microcontroller to identify leaks. The notification system employs GSM connectivity to send alerts via a mobile application, while the response system controls automated shut-off valves and provides local feedback through LEDs and buzzers. The architecture ensures real-time monitoring and swift response to leakage events. There is also an LCD screen display that is used to display the output of the water readings Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1134 https://internationalpubls.com 3.2 Flowchart The working process of the proposed system is explained with the help of flowchart as shown in figure 1.2 below. Fig. 1.2 Flowchart of the proposed System The system starts and enters in a continuous monitoring state. This step is called System Initialization. The water and gas sensors are continuously monitored to check for abnormal readings indicating a leak. If the sensor readings exceed the predefined threshold value, the system confirms a leakage. If no leak is detected, the system continues monitoring. If a leak is detected, the system triggers an alert, such as: Buzzer or Alarm, LED Warning Indicator. The system then sends notification to the user via SMS, mobile app, or email to inform the user about the detected leakages. To prevent further leakage, the system automatically closes the water or gas valve using an actuator. The system records the sensor data and status for future analysis, allowing users to review past leakage incidents using data logger. The system introduces a 1-second delay before repeating the monitoring cycle. This ensures efficient system performance while continuously checking for leakages. 4. Implementation 4.1 Hardware Integration The sensors are interfaced with the ESP32 microcontroller, with analog signals converted to digital data. The relay module is connected to a general-purpose input/output (GPIO) pin for controlling external devices like shut-off valves. A buzzer and LED indicators provide immediate local feedback. GSM used for send the notification. LCD used for display Notification. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1135 https://internationalpubls.com 4.2 Software Development The system firmware includes: 1. Sensor data acquisition and threshold-based leak detection. 2. GSM configuration for connecting to a local network. 3. Notification triggers using Message Queuing Telemetry Transport (MQTT) or Hypertext Transfer Protocol (HTTP) protocols. 4. Over-The-Air (OTA) updates for system maintenance. 5. Results and Discussion The experimental setup was designed to simulate real-world pipeline conditions, where sensors are placed along different pipeline sections to detect leaks. The system consists of gas and water flow sensors, an ESP32 microcontroller, an LCD display, and an alert system to notify users in case of leakage. The detection mechanism works by continuously monitoring flow rates and comparing them to pre-set thresholds. 5.1 Experimental Setup The system was tested using standard pipeline sections with controlled leak scenarios. Sensors are placed at different points along the pipeline, ensuring that any variation in flow rate or gas concentration is detected. The experimental setup included: Gas Leakage Detection: Sensors monitored changes in gas concentration levels, triggering alerts if values exceeded safety thresholds. Water Leakage Detection: Flow rate sensors measured discrepancies in water flow at two points (Q1, Q2), identifying significant deviations (Ξ”Q) that indicated leaks. Microcontroller-Based Data Processing: The ESP32 collected sensor data and processed real-time alerts. LCD Display and Notification System: Alerts were displayed on an LCD screen and sent via GSM model for remote monitoring. When leakage detected LED is blinking. 5.2 Gas Sensor Results The results are summarized in Table 1, where gas concentration is measured in parts per million (PPM). Fig a Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1136 https://internationalpubls.com Table 1: Gas Sensor Readings Under Different Conditions Detection Accuracy(DA) Detection accuracy is the percentage of correctly identified leakage cases compared to total test cases DA= ( 𝑇𝑃+𝑇𝑁 𝑇𝑃+𝑇𝑁+𝐹𝑃+𝐹𝑁 ) βˆ— 100 (1) Where: TP(True Positive) = Correctly detected leakages TN( True Negative) = Correctly identified normal flow FP( false Positive) = Incorrect leakage detection (False alarm) FN(False Negative) = Missed leakage cases False Alarm Rate(FAR) FAR = ( 𝐹𝑃 𝑇𝑃+𝐹𝑃 ) βˆ— 100 (2) Response Time(RT) RT = βˆ‘π‘‡π‘‘π‘’π‘‘π‘’π‘π‘‘π‘–π‘œπ‘› 𝑁 (3) Where: Tdetection = Time taken to detet each leakage N = Number of test cases 5.3 Water Flow Sensor Results The water flow sensor (e.g., YF-S201) was tested under different flow rates and leakage conditions. The sensor readings were compared between the inlet flow (Q1) and outlet flow (Q2) to detect any discrepancies. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1137 https://internationalpubls.com Fig. b Table 2: Water Flow Sensor Readings Under Different Conditions Water Flow Rate: Q = V*A (4)[14] Where: Q= Flow rate(L/H) V= Average velocity of water (m/s) A = Cross sectional area of the pipe(mΒ²) Relationship Between Flow Rate and Velocity The Flow rate(Q) is given by: Q= V*A Rearranging for velocity: V= 𝑄 𝐴 (5) Where: Q= Flow rate(L/H) Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1138 https://internationalpubls.com A= Cross sectional area of the pipe(mΒ²) V = Velocity of water flow(m/s) Leakage Detection Formula Leakage is detected using the flow difference: Ξ”Q = |Q1-Q2| (6)[14] Where: Q1 = Flow rate at the source(L/H) Q2 = Flow rate at the end point(L/H) Ξ”Q = Difference in flow rates(L/H) Ξ”Q = |1000-500| = 500L/H(Major Leakage detected) Table 3: Water Leakage Detection Performance Overall System Performance Overall DA= π·π΄π‘”π‘Žπ‘ +π·π΄π‘€π‘Žπ‘‘π‘’π‘Ÿ 2 = 94+92 2 = 93% Overall FAR= πΉπ΄π‘…π‘”π‘Žπ‘ +πΉπ΄π‘…π‘€π‘Žπ‘‘π‘’π‘Ÿ 2 = 6+8 2 = 7% Overall RT= π‘…π‘‡π‘”π‘Žπ‘ +π‘…π‘‡π‘€π‘Žπ‘‘π‘’π‘Ÿ 2 = 1.6+2.1 2 = 1.85𝑠𝑒𝑐 5.5 Advantages β€’ Cost-effective solution compared to traditional systems. β€’ Scalability for large-scale applications. β€’ Real-time alerts enhance safety and response times. 5.6 Limitations β€’ The high sensitivity of sensors may sometimes cause false alarms. β€’ Limited water leakage detection during the rainy season due to increased humidity and water condensation effects. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 10s (2025) 1139 https://internationalpubls.com 6. Conclusion The smart Gas/Water Leakage Detection System was successfully designed and implemented using ESP32, gas sensors (MQ-5), and water flow sensors (YF-S201). This model gives ongoing leakage present in the pipeline. References [1] Saumya Gupta, β€œUnderground Gas Leakage Detection System” Journal JETIR May 2023, Volume 10, Issue 5 [2] A. Santos and M. Younis, β€œA sensor network for nonintrusive and efficient leak detection in long pipelines,” in Proc. IEEE WD, 2011, pp. 1–6. [3] Z. Wang, X. Hao, and D. Wei, β€œRemote water quality monitoring system based on wsn and gprs,” Instrument Techniqueand Sensor, vol. 1, p. 018, 2010. [4] M. Allen, A. Preis, M. Iqbal, and A. J. Whittle, β€œWaterdistribution system monitoring and decision support using awireless sensor network,” in Proc. IEEE SNPD, 2013, pp.641– 646. [5] J. Smith, "IoT-Based Safety Systems," IEEE IoT Journal, vol. 7, no. 4, pp. 1234-1242, 2021. [6] Demma. A et al 2003 The Reflection of the Fundamental Torsional Mode from Cracks and Notches in Pipes J. Acoust. Soc. Am. 114(2) pp 611-625. [7] Bakker M et al 2014 Heuristic Burst Detection Method using Flow and Pressure Measurements J. Hydroinformatics 16:1194. [8] Qiang Xu et al 2013 Optimal Pipe Replacement Strategy based on Break Rate Prediction through Genetic Programming for Water Distribution Network J. Hydro-Environ Res. 7 pp 134–140. [9] Rahmat R F et al 2016 Water Pipeline Monitoring and Leak Detection using Flow Liquid Meter Sensor IOP Conf. Ser.: Mater. Sci. Eng. 190. [10] R. Brown, "Gas Leakage Detection Technologies," IEEE Sensors Journal, vol. 15, no. 2, pp. 456- 462, 2020. [11] M. Johnson, "Real-Time Water Monitoring Systems," Proceedings of the IEEE, vol. 8, no. 3, pp. 789-795, 2022. [12] A. Gupta, "Smart Home Automation with Leak Detection," International Journal of Smart Systems, vol. 10, no. 1, pp. 101-110, 2020. [13] Sood, R., Kaur, M., & Lenka, H. (2013). Design and development of automatic water flow meter. International Journal of Computer Science, Engineering and Applications, 3(3), 49.dfasd [14] Muhammad Arman Uddin,” Leakage Detection in Water Pipeline Using Microcontroller”, 1st International Conference on Advances in Science, Engineering and Robotics Technology 2019 (ICASERT 2019) 978-1-7281-3445-1/19/$31.00 Β©2019 IEEE