Mini Project
Mini Project
Chapter 1:
Introduction
Gas leaks, whether in residential, commercial, or industrial settings, are a significant safety
concern due to the risks of explosion, fire, and inhalation of toxic gases. LPG (Liquefied
Petroleum Gas), natural gas,andotherfuelgasesarecommonlyusedinhomes,industries,and
transportation systems. While these gases are essential for various applications, they are also
highly flammable and, when mixed with air in certain proportions, can cause catastrophic
explosions.
According to multiple studies and reports, gas-related accidents have resulted in not only
massivepropertydamagebutalsofatalitiesacrosstheglobe.Incountrieswithdensepopulations
or heavy industrialization,thepotentialrisksincreaseduetotheextensiveuseofgascylinders,
pipelines,andstoragetanks.Gasleaksthatgoundetectedforprolongedperiodscanleadtofires
or explosions, causing irreparable harm to both human life and infrastructure.
Tomitigatetheserisks,earlydetectionofgasleaksiscrucial.Traditionalgasdetectionmethods
involve manual inspections or basic alarms that require human presence to detect leaks.
However,thesemethodsarenotalwaysreliable,particularlyduringoff-hoursorinremoteareas.
This necessitates the development of an automated system that can continuously monitor gas
levels and provide immediate notifications in case of a leakage.
The objective of this project is to design a Gas Leakage Detector that provides real-time
monitoring and alerting through SMS, using an Arduino microcontroller integrated with a
SIM800GSMmoduleandanMQ2gassensor.Thesystemwilldetectdangerouslevelsofgases
such as LPG, methane, alcohol, benzene, and smoke, andtriggeranSMSalerttoapredefined
phone number. This solution not only ensures faster detection but also enables remote
monitoring, allowing users to take preventive actions promptly.
In addition to providing an immediate alert, the system also features a16x2LCDdisplaythat
continuouslyshowsthegaslevels,allowinguserstovisuallymonitortheconcentrationofgasin
This gas leakage detection system incorporates several key components: an Arduino UNO
microcontroller,aSIM800GSMmodule,anMQ2gassensor,anda16x2LCDdisplay.Each
of these components plays a critical role in ensuring the effective operation of the system.
1. Arduino UNO: The Arduino board serves as the brain of the system, processing the
input from thegassensorandcontrollingtheoutput.Itreadstheanalogsignalfromthe
MQ2 sensor and converts it into a meaningful gas concentration value. Based on the
concentrationlevels,theArduinodeterminesifthegashasreacheddangerouslevelsand
triggers the SMS alert function via the GSM module.
2. MQ2 Gas Sensor: This gas sensor is highly sensitive to gases like LPG, methane,
ammonia, alcohol, and smoke, making it suitable for detecting gas leaks in various
environments. The sensor produces an analog voltage output proportional to the
concentration of the gases present in the air. This output is fed into the Arduino for
further processing.
3. SIM800GSMModule:TheSIM800moduleenablesthesystemtosendSMSalertstoa
designatedphonenumberwhenagasleakisdetected.Thisfeatureallowsthesystemto
notify users even if they are not physically present near the location of the leak. The
GSMmodulecommunicateswiththeArduinousingATcommands,anditispoweredby
an external 9V/12V DC supply.
4. 16x2 LCD Display: The LCD display provides a real-time readout of the gas
concentration levels. This visual aid allows for on-site monitoring, making it easy to
assess whether the environment is safe or if action needs to be taken.
Chapter 2:
Literature Review
Inthissection,weexplorevariousstudiesrelatedtogasleakagedetectionsystems,focusingon
different technologies and approaches, including the integration of Internet of Things (IoT)
platforms, low-power solutions, andadvancedsensors.Thereviewhighlightskeycontributions
and innovations fromeachstudy,providingacomprehensivebackgroundforunderstandingthe
current state of research in gas detection systems.
E. M. Saleh, T. Imbarake, S. Elakeili, and A. G. Faraj (2024) proposed theSGD:SmartGas
Leakage DetectionSystemforHomeSafety,whichemphasizestheintegrationofgassensors
withsmarttechnologiestoenhancehomesafety.Thesystemusesanarrayofsensors,including
gasdetectors,tomonitorpotentialleaksinreal-time.AGSMmoduleisemployedtosendalerts
tohomeownersviaSMSintheeventofaleak.Thesystemincorporateswirelesssensornetworks
(WSNs) to ensure that the detection is spread across the entire household, preventing any
potential blind spots in monitoring. Their research demonstrates the effectiveness of wireless
networksinprovidingrapidresponsestogasleaks,contributingsignificantlytotheliteratureon
home safety and IoT-driven gas detection systems [1].
In another significant contribution, J. Yin (2024) presented a system for Indoor Fire Safety
Detection Based on ARM, targeting fire hazards often caused by gas leaks. TheARM-based
systemusesacombinationofgasandsmokesensorstodetectanyanomalyrelatedtogasleaks
orfire.Thesystemoperatesautonomously,alertingusersthroughbothauditoryalarmsandSMS
notifications. The ARM architecture provides the advantage of low power consumption while
maintaining high performance, making the system suitable for long-term monitoring in
residential and industrial settings. Yin’s study highlights the importance of integrating fire
detection with gas sensors to provide a comprehensive safety mechanism for indoor
environments [2].
S. Alves, S. Paiva, P. Santos, and J. Cabral (2024) explored the concept of Low-Power IoT
Solutions for Monitoring Natural Gas Systems Using CH4MOSDetection.Theirresearch
aimed tocreateacost-effective,low-powersolutionforcontinuousgasmonitoringinindustrial
settings, particularly for natural gas distribution. The system uses CH4
metal-oxide-semiconductor (MOS) sensors integrated with an IoT framework to transmit
real-time data on methane levels to a centralized monitoring hub. This work is crucial in
addressing the power consumption challenges often faced in IoT devices, particularly those
deployedinremotelocations.Theauthorsemphasizetheneedforenergy-efficientsolutionsthat
do not compromise the accuracy of gas detection [3].
L.Jinfeng,C.Chen,C.Xiaowei,andW.Wei(2021)proposedasystemfortheManagementof
Indoor Gas Safety Based on NB-IoT Gas Meter. The system utilizes narrowband IoT
(NB-IoT) technology to monitor gas consumption and detect leaks in real-time. The authors
integratetheNB-IoTplatformwithsmartgasmeters,enablingremotecontrolandmonitoringof
gas usage in both residential and industrial settings.Theresearchemphasizestheadvantageof
using NB-IoT due toitsextendedcoverage,lowpowerconsumption,andtheabilitytosupport
massive deviceconnections.Thissolutionallowsforreal-timecommunicationwithgasmeters,
making it easier to prevent accidents by remotely controlling gas supply in case of leaks [5].
L.Fraiwan,K.Lweesy,A.Bani-Salma,andN.Mani(2011)presentedoneoftheearlystudieson
Wireless Home Safety Gas Leakage Detection Systems. Their research aimed to develop a
cost-effective and reliable gas detection system for residential applications. Using a wireless
sensor network (WSN), the system continuously monitors gas levels and sends alerts to
homeowners via text messages if a leak is detected. This early work laid the foundation for
subsequent studies that integrated more advanced IoT and GSM technologies intogasleakage
detection systems.Despiteitssimplicity,thesystemeffectivelydemonstratedtheimportanceof
real-time alerts and the potential of wireless communication in enhancing home safety [6].
H.Paul,M.K.Saifullah,andM.M.Kabir(2021)presentedastudyontheSmartNaturalGas
Leakage Detection and Control System for Gas Distribution Companies of Bangladesh
using IoT. The system employs IoT devices todetectandcontrolgasleaksacrossvariousgas
distribution networks. The authors developed a framework where IoT sensors are placed at
criticalpointswithinthedistributionnetwork,providingcontinuousmonitoringandtheabilityto
shutoffthegassupplyremotelyifaleakisdetected.Theirresearchcontributestoimprovingthe
operational safety of gas distribution companies by minimizing human intervention and
automating the process of gas leakage detection and control [7].
R.K.Kodali,R.N.V.Greeshma,K.P.Nimmanapalli,andY.K.Y.Borra(2018)developedan
IoT-Based Industrial Plant Safety Gas Leakage Detection System, focusing on providing
real-timemonitoringofgaslevelsinindustrialplants.TheirsystemusesIoT-enabledgassensors
to continuously monitortheenvironmentandtransmitthedatatoacloud-basedplatform.Plant
managers can access this data fromremotelocations,enablingquickresponsestoanydetected
leaks. The study highlights the importance of integrating IoT with industrial safety systems,
providing an automated, efficient solution for monitoring gas levels in large industrial
environments [8].
R. Xie et al. (2024) proposed an Identification Method of Tubing Leakage Based on
PCA-SVMinGasWells,addressingthespecificchallengeofdetectingleaksingaswelltubing.
Their approach uses principal component analysis (PCA) combined with a support vector
machine(SVM)algorithmtoaccuratelyidentifygasleaksfromcomplexdatasetscollectedfrom
gas wells. This method reduces false positives and improves the overall accuracy of leak
detectioninharshandnoisyenvironments.Theapplicationofmachinelearningingasdetection
isasignificantadvancement,particularlyintheoilandgasindustry,wheretheearlydetectionof
leaks can prevent major accidents [9].
Finally,M.H.B.M.Yaya,R.K.Patchmuthu,andA.T.Wan(2021)focusedonLPGGasUsage
andLeakageDetectionUsingIoTinBrunei.TheirsystemmonitorsLPGusageinresidential
homes and detects gas leaks using IoT-based gas sensors. The data is transmitted to a cloud
platform,wherehomeownerscantracktheirgasconsumptionandreceivealertsifanyabnormal
gas activity is detected. The system also allows for the automatic shutoff of the gas supply,
providinganadditionallayerofsafety.ThisstudyreinforcestheimportanceofIoTinimproving
the safety and efficiency of gas usage monitoring systems [10].
Chapter 3:
Problem Analysis and Solution
Gasleaksareoneofthemajorsafetyconcernsinhouseholdsandindustrialenvironmentsdueto
theirpotentialtocauseseveredamage,fires,explosions,andhealthhazards.Themostcommon
causesofgasleaksarefaultyappliances,deterioratedpipes,orimpropermaintenance.Detecting
these leaks early can prevent catastrophicincidentsandreducethenumberofaccidentscaused
by hazardous gases such as methane (CH₄), propane (C₃H₈), and Liquefied Petroleum Gas
(LPG). Despite numerous systems for detectinggasleaks,manylackreal-timealertsorcannot
be installed in residential settings at an affordable cost.
Inindustriesandhomes,variousgaseslikemethaneandLPGarecommonlyusedforheatingand
cooking. When these gases leak and go undetected, they pose a serious threat to life and
property.Gassensorsinsuchsettingsarecrucialforidentifyingleaksearly.Thecurrentsystems
either rely on wired alarms or advanced setups that are costly, complex, and not suited for
smaller setups. Additionally, the lack of a remote monitoring system, such as GSM or IoT
integration,limitstheirusability,particularlyinhomesorsmallbusinesseswherereal-timealerts
areessential.Therefore,thereisaneedforanaffordable,reliable,andeasy-to-installgasleakage
detection system that can provide real-time notifications.
1. Gas Detection: The MQ2 sensor will be used for detecting harmful gases such as
methane, LPG, and other volatile compounds. This sensor is sensitive and quick in
response,whichmakesitidealfordetectinggasleaks.Itprovidestwooutputsignals:an
analogsignal(proportionaltothegasconcentration)andadigitalsignal(triggeredwhen
a threshold concentration is surpassed).
2. Microcontroller(Arduino):TheArduinoUNOwillbethecentralprocessingunitthat
monitorsthegaslevelsandtriggersappropriateactions.TheanalogoutputfromtheMQ2
sensor will be fed into the Arduino,wheretheconcentrationofgaseswillbecompared
against predefined threshold levels. If the concentration surpasses these levels, the
Arduino will initiate an alert process.
3. AlertSystemusingGSM:Whenthesystemdetectsagasleak,theArduinowillsenda
signal to the SIM800 GSM module, which will trigger an SMS alert to a predefined
mobile number,notifyingtheuserofapotentialgasleak.TheSIM800modulesupports
quad-band GSM/GPRS and features a compact design, making it suitable for a wide
range of applications. Its low power consumptionandrobustconnectivityensurethatit
functions well in residential environments where power supply might be an issue.
4. Visual Alert: A 16x2 LCD display will be connected to the system to provide a
real-timedisplayofgasconcentrations.Userswillbeabletoseethecurrentstatusofthe
gas levels in the environment. In case of a leak, the system will display a warning
message, such as "Gas Leakage Detected."
5. PowerSupply:Thesystemwillbepoweredusingacombinationof5VDCand12VDC
supplies, which willrunthesensor,Arduino,andGSMmodule.Ensuringareliableand
consistent power supply is essential for uninterrupted operation.
Chapter 4:
Methodology & Implementation
4.1 Flowchart
● Gas Sensor (MQ2): Senses the gas concentration andsends an analog signal to Arduino.
● Arduino UNO: Receives sensor input and processes thedata.
○ If gas concentration exceeds the threshold:
■ Send command toGSM Module (SIM800)to send SMS.
■ Displays gas concentration and alert message on theLCD Display.
● Power Supply: Provides required voltage to components.
● GSM Module (SIM800): Sends an SMS alert to the predefined mobile number when
triggered by the Arduino.
Working Mechanism
● The system begins by continuously monitoring the gas levels using the MQ2 sensor,
which provides real-time data to the Arduino.
● The Arduino processes the sensor data and compares the gas concentration with a
predefined threshold.
● When the gas level exceeds the threshold, the Arduino:
○ ActivatestheGSMmodule,whichsendsanSMSalerttotheuserwithamessage
indicating a gas leak.
○ Simultaneously, the system displays a warning message on the LCD.
This setup ensures that the user is notified even when they are not present at the location,
allowing timely intervention. The combination of visual and SMS alerts ensures a
comprehensive solution for gas leakage detection.
The proposed system can easily be modified to accommodate additional sensors or
functionalities, such as:
● MultipleSensorCompatibility:ThesystemcanalsoworkwithothersensorslikeMQ2
orMQ5for smoke detection or different gas types.
● IoT Integration: The system can be expanded to useIoTtechnology,allowingthegas
leak data to be sent to a centralized server or cloud for remote monitoring.
● Advanced Alarm System: An audible alarm or emergency shut-off valve could be
incorporated to further enhance the safety measures.
TheuseofGSMtechnologyensuresthatthesystemcanoperateeveninareaswithlimitedWi-Fi
or network connectivity, making it highly adaptable for both urban and rural applications
● Cost-Effective:Thesystemisaffordableandsimpletosetup,makingitsuitableforboth
household and small-scale industrial use.
● Real-TimeAlerts:SMSnotificationsensurethatusersareimmediatelyawareofanygas
leakage, even when they are away from the premises.
● Customizable: Different gas sensors and GSM modulescanbeused,dependingonthe
user’s specific requirements.
● PortableandCompact:TheuseofArduinoandSIM800resultsinasmall,portable,and
power-efficient system, which is ideal for constrained environments.
By addressing the limitations of existing gas leakage detection systems, the proposedsolution
provides a flexible, scalable, and affordable approach for ensuring home and industrial safety.
This design helps in mitigating the risks associated with gas leaksthroughearlydetectionand
immediate notification, thereby preventing accidents and damage.
● Residential Use: Detecting gas leaks from LPG cylinders or gas lines in kitchens and
homes,ensuringfamilysafetybyprovidingearlywarningsbeforeafireorexplosioncan
occur.
● Industrial Use: In manufacturing plants, chemical storage areas, or warehouses where
gases are stored in large quantities, this system can prevent major disasters by
continuously monitoring gas levels and sending out remote alerts.
● AutomobileandTransportation:Thesystemcanbeinstalledinvehiclesthatrunongas
or in transportation systems where gas is used. Early detection ofgasleaksinvehicles
can help prevent accidents during travel.
● CommercialBuildings:Restaurants,hotels,ormallsthatusegasforcookingorheating
purposescandeploythissystemtoavoidaccidentsandensurethesafetyofworkersand
customers.
Theprimarybenefitofthisprojectisitscost-effectivenessandeaseofimplementation.Witha
few readily available components, the system can be assembled and installed in homes or
workplaces. The use of the GSMmodulemakesitconvenienttosendnotificationswithoutthe
needforcomplexnetworksetups,andtheArduinoplatformprovidesaflexibleandopen-source
environment for future enhancements.
Additionally, the quick response time of the MQ2 sensor, coupled with the remote alert
capabilityoftheGSMmodule,ensuresthatanygasleaksaredetectedandreportedbeforethey
escalate into serious hazards. This makes the system a reliable safetytoolforbothindividuals
and businesses.
The flowchartoutlinestheprocessoftrainingandevaluatingamachinelearningmodelusinga
RandomForestClassifier.Theprocessoftrainingamachinelearningmodelisdividedintotwo
primary sections: Data Preparation andModelTraining.IntheDataPreparationphase,the
process begins with initiating the model training workflow and loading the dataset into the
program.ThedatasetisreadintoaPandasDataFrame,makingiteasytomanipulateandanalyze.
The data is then split into features (input variables) and labels (target variable), assigned to
separate variables such as
Xand
y,respectively.Toensureproperevaluationofthemodel,the
train_test_splitfunction is used to divide the dataset into training and testing sets,
allocating 20% of the data for testing.Thissplitallowsthemodeltolearnfromoneportionof
the data while being tested on another, ensuring reliable performance metrics. Additionally, a
fixedrandomstateof42isusedtoensurereproducibilityofresults.TheDataPreparationphase
concludes, providing a foundation for the next steps in model development.
The Model Training phase focuses on creating, training, and evaluating a Random Forest
Classifier. An instance of the classifier is created with specific parameters, including 100
estimators for adequate complexity and a random state of 42 forreproducibility.Themodelis
then trained using the training dataset (
X_trainand
y_train
), learning the underlying
patternsinthedata.Oncetrained,themodelisevaluatedusingthetestingdataset(
X_testand
y_test
). The trained model predicts the labels for the test data, and these predictions are
compared to the true labels to calculate accuracy, providing a clear metric of the model's
performance. The accuracy score is displayed, offering insight into the effectiveness of the
model. Finally, the trained model is saved using
joblib
, allowing it to be reused without
retraining, enabling deployment in real-world applications.
The two sections are interconnected, as the prepared data from the Data Preparation phase
(
X_train
,
X_test
,
y_train y_test
, )servesasinputfortheModelTrainingphase.This
structuredworkflowensuresthatthedatasetisproperlyhandled,themodelistrainedeffectively,
and its performance is thoroughly evaluated and saved for future use.
Chapter 5:
Results and Discussion
Theanalysiscombinestheflowchartontrainingamachinelearningmodelwiththegasdetection
outputs for LPG and alcohol. The flowchart outlines a process for preparing data, training a
RandomForestClassifier,andevaluatingitsperformance.Thisstructuredprocesscoulddirectly
apply to the gas detection system, where the model learns to interpret sensor data—such as
analog readings and sensor resistance (RS)—to identify gas types and concentrations accurately.
IntheLPGdetectionoutput,thesensorresistanceisextremelylowat0.0768kΩ,corresponding
to a high concentration of 38,639.78 PPM. This indicates that LPG presence significantly
reduces the sensor's resistance, likelyduetoitschemicalpropertiesinteractingwiththesensor.
On the other hand,alcoholdetectionresultsinmuchhigherresistance(33.1kΩ)andanalmost
negligible concentration of 0.21 PPM, suggesting the sensor's sensitivity to alcohol is
significantly lower under these conditions. These variations in sensor resistance and gas
Overall,thecombinedanalysissuggeststhatthegasdetectionsystemcanbenefitfromamachine
learning approach to improve accuracyandautomategasclassificationbasedonresistanceand
concentration data.Thestructuredtrainingprocess,asdescribedintheflowchart,wouldensure
the model is robust and capable of handling diverse scenarios for real-time applications.
Chapter 6:
Future Trends and Conclusion
The field of gas leakage detection and safety systems is continuously evolving, driven by
advancements in sensor technologies, wireless communication, and automation. Some of the
future trends in this domain include:
systems may leverage 5G to provide faster real-time alerts and handle larger
amounts of data, which is critical for industries and smart cities.
5. Smart Home and Automation Integration:
○ Gas detectorswillbeincreasinglyintegratedintosmarthomeecosystems,where
various household systems work together. A gas leak detected by the system
could automatically trigger ventilation, sound alarms, or disconnect gas supply
valves. Automation and interconnectivity with other smart appliances will
enhance safety while minimizing user intervention.
6. Portable and Wearable Gas Detectors:
○ The future will also seeanincreaseinportableorwearablegasdetectors.These
devices can be used in industries where workers are constantly exposed to
hazardous gases. Wearable sensors could sendreal-timehealthandsafetyalerts,
thus improving occupational safety standards.
7. Sustainability and Green Technology:
○ With an increasing focus on sustainability, future gas leakage systems may
incorporate eco-friendly materials and energy-efficient technologies.
Solar-powered detectors or low-energy consumption devices will be adopted in
areas where access to electricity is limited, providing an environmentally
conscious solution to safety.
6.2 Conclusion
Inconclusion,theGasLeakageDetectionSystemusingGSMandArduinooffersapractical,
low-cost solution for both household and industrial applications. It ensurestimelydetectionof
gas leaks and provides immediate alerts via SMS, which significantly reduces the risks of
accidentsandpropertydamage.ByincorporatingreadilyavailablecomponentssuchastheMQ2
sensor, SIM800 GSM module, and Arduino UNO, the system is easy to implement and
provides real-time gas monitoring.
TheprojectdemonstratedtheeffectivenessofusingGSMtechnologyforremotealerts,makingit
suitable for environments where Wi-Fi connectivity may not be reliable. The flexibilityofthe
design allows it to be upgraded or customized with additional sensors, alarms, or IoT-based
functionalities to suit a wide variety of needs.
Astechnologycontinuestoadvance,futuredevelopmentsingasdetectionsystemswillfocuson
higheraccuracy,fastercommunication,andenhancedintegrationwithsmarthomeandindustrial
automationplatforms.TheintegrationofAI,IoT,and5Gwillfurthertransformthelandscapeof
safety systems, making gas leak detection smarter, more efficient, and highly responsive.
.
REFERENCES
[1] E.M.Saleh,T.Imbarake,S.ElakeiliandA.G.Faraj,"SGD:SmartGasLeakageDetectionSystemforHome
Safety," 2024 14th International Conference on Advanced Computer Information Technologies (ACIT), Ceske
Budejovice, Czech Republic, 2024
[2]J.Yin,"DesignandImplementationoftheIndoorFireSafetyDetectionSystemBasedonARM,"2024IEEE2nd
International Conference on Image Processing and Computer Applications (ICIPCA), Shenyang, China, 2024
[4] M. Zhang et al., "Application of Laser Gas Detectors in Gas Operation Sites," 2023 IEEE International
Conference on Electrical, Automation and Computer Engineering (ICEACE), Changchun, China, 2023
[5] L. Jinfeng, C. Chen, C. Xiaowei and W. Wei, "Management of Indoor GasSafetybasedontheNB-IoTGas
Meter," 2021 33rd Chinese Control and Decision Conference (CCDC), Kunming, China, 2021
[7]H.Paul,M.K.SaifullahandM.M.Kabir,"ASmartNaturalGasLeakageDetectionandControlSystemforGas
Distribution Companies of BangladeshusingIoT,"20212ndInternationalConferenceonRobotics,Electricaland
Signal Processing Techniques (ICREST), DHAKA, Bangladesh, 2021
[9] R. Xie, L. Zhang, Z. Li, G. Tong, J. Fan and Y. Fang, "Identification Method of Tubing Leakage Based on
PCA-SVM in Gas Well," 2024 2nd International Conference on Signal Processing and Intelligent Computing
(SPIC), Guangzhou, China, 2024
[11]RupakSarkar,Md.AshiqulHaiderChowdhury,SheikhIftekharAhmed,AbdullahAllHasib,MdWazihYeaser
Tanzim, Razi Mudassir, Md. Jawad Ul Islam, Celia Shahnaz, "Elevating Gas Safety Standards: ESP32-based
Detection Systems with Blynk Integration", 2024 IEEE Region 10 Symposium (TENSYMP)
[12] Varsha Dange, Samarth Bagde, Siddhi Bagul, Shreya Barsude, Omkar Bhanji, "Automated Gas Leakage
DetectionandControlSystem",2024InternationalConferenceonEmergingInnovationsandAdvancedComputing
(INNOCOMP).
APPENDIX A:
Plagiarism Report