0% found this document useful (0 votes)
461 views

Gas Leakage Detector Using Arduino With Sms Alert 160215122705

This document describes a gas leakage detector project using an Arduino, MQ5 gas sensor, GSM module, and other components. The objectives are to detect gas leaks, send SMS alerts to two mobile numbers, and sound an alarm. When gas is detected, the Arduino activates the alarm and sends up to three SMS messages. When gas levels return to normal, it resets the system to prepare for future leaks. The circuit connects the MQ5, GSM module, speaker, and LCD display to the Arduino. The program initializes components, sets variables, and includes subroutines to check for gas levels, send alerts if needed, and verify that the leak is resolved. This project aims to provide home and industrial safety against

Uploaded by

Samudranil Giri
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
461 views

Gas Leakage Detector Using Arduino With Sms Alert 160215122705

This document describes a gas leakage detector project using an Arduino, MQ5 gas sensor, GSM module, and other components. The objectives are to detect gas leaks, send SMS alerts to two mobile numbers, and sound an alarm. When gas is detected, the Arduino activates the alarm and sends up to three SMS messages. When gas levels return to normal, it resets the system to prepare for future leaks. The circuit connects the MQ5, GSM module, speaker, and LCD display to the Arduino. The program initializes components, sets variables, and includes subroutines to check for gas levels, send alerts if needed, and verify that the leak is resolved. This project aims to provide home and industrial safety against

Uploaded by

Samudranil Giri
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

GAS LEAKAGE DETECTOR USING

ARDUINO WITH SMS ALERT


GAS LEAKAGE DETECTOR USING ARDUINO AND MQ5 SENSOR – WITH SMS ALERT
(USING GSM MODULE) AND SOUND ALARM - ENGINEERING MAIN PROJECT
OBJECTIVES OF THE PROJECT

• Detect Gas Leakage (like LPG) using MQ5 Sensor and Arduino
• Setup an SMS based Alert Mechanism using GSM Module
• Send 3 SMS (3 alert messages) to 2 specified mobile numbers
• Sound Alarm – produce sound alert on gas leak
• Display status in an LCD using a 16×2 LCD module.
PLANNING OF COMPONENTS

• MQ5 – to sense LPG (use Digital Out to detect level status)


• Arduino
• To read MQ5 output and detect Gas Leak (through level comparison)
• To activate outputs upon gas leak – sound alarm and sms alert
• To send AT Commands to GSM Module
• To send Status message commands to LCD Module
• To Turn ON and OFF Sound Alarm
• GSM Module – for GSM Communication and to send SMS to mobile numbers
• LCD Module – to display status messages
• Speaker – to produce Alarm Sound
ARDUINO

• Arduino Uno – an electronic prototyping platform/board based on Atmega AVR


Microcontroller – Atmega328P (8 bits, 16 Mhz)
• Operates on +5 Volts
• 14 Digital I/O Pins (of which 6 are PWM)
• 6 Analog Input Pins
• 32 KB Flash Memory and 1KB EEPROM
• Serial Communication Enabled
MQ5 SENSOR MODULE

• MQ5 – is a generic gas sensor used to detect LPG presence


• The module has Digital Out and Analog Out
• Detects LPG from 200ppm to 10000ppm
• Operated on +5 Volts
• Can be used detect other gases like Methane and Alcohol as well
GSM MODULE

• SIM 900 GSM Module – is used to send SMS alerts upon gas leak
• Serial Communication is employed
• AT COMMANDS – are used to communicate with GSM Module
CIRCUIT DIAGRAM
CIRCUIT EXPLANATION-1

• Interfacing MQ5 Sensor to Arduino


• Connecting Digital Out of MQ5 to pin 7

• Interfacing GSM Module to Arduino


• Connect to PWM pins 9 and 10 of Arduino (using SoftwareSerial)
• Tx of GSM Module to 9 and Rx of GSM Module to 10

• Interfacing Speaker to Arduino


• 2N2222 is used as driving transistor
• Connect to Pin 8 of Arduino
CIRCUIT EXPLANATION-2

• Interfacing LCD Module to Arduino


• 16x2 LCD Module is used
• Data Lines (DB4,DB5,DB6,DB7) connected to 5,4,3,2 pins of Arduino (in order)
• Enable Pin connected to 11 and RS (Register Select) connected to 12
• Backlit LED is connected to Vcc (+5v) through a 560 ohms current limiting resistor
• Contrast – is adjusted by connecting VEE to a 10K Pot and +5V
PROGRAM EXPLANATION - 1

• Important Initializations and Setup


• Sensor MQ5 is assigned to pin 7 using variable ‘sensor’
• Sound Alarm Speaker is assigned to pin 8 using ‘speaker’
• ‘sensor’ – configured as Input
• ‘speaker’ – configured as output
• Software Serial communication is used with PWM pins of Arduino
• <SoftwareSerial.h> - header library is made use of!
PROGRAM EXPLANATION -2

• Important Variables
• sms_count – variable used to limit number of SMS
• Gas_Leak_Status – variable to identify ‘gas leak’ occurrence status
• gas_value – temporary variable to store gas level fetched from sensor MQ5
• Gas_alert_val – to store fetched value and to compare with set limit value (during
Scanning for Gas Leak)
• Gas_shut_val – to store fetched value and to compare with set limit value (during
checking for Gas Shut Down Process)
PROGRAM EXPLANATION-3

• Important Subroutines
• CheckGas() – has the following functions
• Scans for gas level by calling ScanGasLevel() inner subroutine
• If scanned gas value ‘Gas_alert_val==LOW’ – alert actions are invoked by calling SetAlert() inner subroutine
• Displays status messages on LCD Module – for Scanning Process and Gas Leak Alert

• CheckShutDown() – is to check if gas leak has been eliminated


• Scans for present gas level by calling ScanGasLevel() inner subroutine
• If scanned value stored in variable ‘Gas_shut_val==HIGH’ – gas leak is eliminated
• Immediately stops alarm – with digitalWrite(speaker,LOW)
• Resets the gas leak status variable and sms_count variable – to reactivate Gas Leak Scanning Process and SMS
Alert mechanism
PROGRAM EXPLANATION-4

• Important Inner Subroutines


• ScanGasLevel()
• Scans the gas level from sensor MQ5 and stores to temporary variable gas_level
• SetAlert()
• Activates sound alarm through digitalWrite(speaker,HIGH)
• Sends 3 SMS to 2 Mobile numbers by calling SendTextMessage() inner subroutine
• Outputs status message commands to LCD Module
• SendTextMessage()
• Subroutine to send AT Commands to GSM Module for sending SMS
APPLICATIONS

• Home Security – can be used in homes (especially kitchen area) to prevent


accidents due to gas leak
• Industrial Security – can be used in sensitive areas to prevent any accidents
• Enhancement – can be enhanced to measure specific gas levels to use in
industrial applications
• Automation – can be enhanced to automate electrical cut off process to
prevent short circuit
OUTPUT PHOTOGRAPH

• Read Full Project Here- Gas


Leakage Detector using Arduino
CIRCUITSTODAY

• 1000+ Electronic Circuits and • To Buy Electronic Kits and Projects


Projects
• www.circuitstoday.com • www.store.circuitstoday.com

You might also like