gas leakage detector using arduino with sms alert - engineering project

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

Upload: circuitstoday

Post on 16-Apr-2017

42.400 views

Category:

Engineering


26 download

TRANSCRIPT

Page 1: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 2: Gas Leakage Detector using Arduino with SMS Alert - Engineering 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.

Page 3: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 4: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 5: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 6: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 8: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 9: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 10: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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!

Page 11: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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)

Page 12: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 13: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 14: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

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

Page 15: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

OUTPUT PHOTOGRAPH

• Read Full Project Here- Gas

Leakage Detector using Arduino

Page 16: Gas Leakage Detector using Arduino with SMS Alert - Engineering Project

CIRCUITSTODAY

• 1000+ Electronic Circuits and

Projects

• www.circuitstoday.com

• To Buy Electronic Kits and Projects

• www.store.circuitstoday.com