LPG gas leakage detection System

LPG leakage with Arduino

Welcome to the Quanta project. today we decided to make a social helpful project which can be useful in day to day life. As we are using LPG gas in the kitchen to make food. LPG gas is nonpolluted cheap fuel. but as it good another side it’s also very dangerous. so, it’s necessary to take care during the use of this fuel. to get rid of this problem we are making an electronic system which can be very useful and safe. in this project, we will make a system which detects the LPG leakage and alert us with an alarm. So, we can protect ourselves from danger.

LPG gas leakage having a sensor which can detect the LPG gas. we will use this data to make an alarm by applying some logic. so in the embedded system, we have to apply logics over the sensors input to make anything smart or automatic. You have to put the sensor near the kitchen or in the kitchen and power the system. when the LPG gas leakage occurs then the alarm inside the system will start to alert you. and you can now stop off of the gas system.

There is an MQ series sensor which can easily detect the LPG gas in the surrounding. MQ4 is the sensor code which is used to detect the LPG gas leakage. MQ4 series sensor having an inductor coil which has negligible conductivity in normal conditions. but when you put the sensor in the LPG the conductivity of the coil will increase and start to conduct the electricity. and the amount of electricity can give he value of LPG by some calculation.

Components required LPG gas leakage detection System:-

  1. Arduino Pro Mini
  2. LPG Gas Sensor Module mq4
  3. Buzzer
  4. 16×2 LCD
  5. 1K resistor
  6. Breadboard
  7. 9-volt battery
  8. Connecting wires


To make this project work. we need schematic and code which provided in the below portion of the post. now we have to use the sensor logic into our project. just read the sensor value into the serial monitor and make some condition on a critical value. suppose the critical value is 250 then. you have to make a condition like if the value is greater than 250 then the Buzzer will start to beep else buzzer off. so this is simple logic to make this project work. all the components must be connected according to the circuit diagram.

Circuit Diagram for LPG gas leakage detection System

Share on Pinterest
(function () {
var triggerOnLoad = false;

window.apiShareOnFB = function() {
triggerOnLoad = true;

var _fbAsyncInit = window.fbAsyncInit;

window.fbAsyncInit = function() {
appId : ”,
xfbml : true,
version : ‘v3.0’

window.apiShareOnFB_5d6ddf42884c9bimber_microshare_0 = function() {
var shareTitle = ‘Submit your project’;
var shareDescription = ”;
var shareImage = ‘’;

FB.login(function(response) {
if (response.status === ‘connected’) {
var objectToShare = {
‘og:url’: ‘’, // Url to share.
‘og:title’: shareTitle,
‘og:description’: shareDescription

// Add image only if set. FB fails otherwise.
if (shareImage) {
objectToShare[‘og:image’] = shareImage;

method: ‘share_open_graph’,
action_type: ‘og.shares’,
action_properties: JSON.stringify({
object : objectToShare
// callback
function(response) {

// Fire original callback.
if (typeof _fbAsyncInit === ‘function’) {

// Open share popup as soon as possible, after loading FB SDK.
if (triggerOnLoad) {
setTimeout(function() {
}, 1000);

// JS SDK loaded before we hook into it. Trigger callback now.
if (typeof window.FB !== ‘undefined’) {

Share on FacebookShare on Twitter

Arduino Code for LPG gas leakage detection System:-

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 

int sensor=7;

int speaker=8;

int gas_value,Gas_alert_val, Gas_shut_val;

int Gas_Leak_Status;

int sms_count=0;

void setup(){pinMode(sensor,INPUT);





void loop()





void CheckGas(){


lcd.print(“Gas Scan – ON”);


if(Gas_alert_val==LOW){ SetAlert();

 // Function to send SMS Alerts}}

int ScanGasLevel()


 // reads the sensor output (Vout of LM35)

return gas_value;

 // returns temperature value in degree celsius

}void SetAlert(){digitalWrite(speaker,HIGH);  



lcd.print(“Gas Alert! SMS Sent!”);

}void CheckShutDown()




lcd.print(“No Gas Leaking”);




Upload the code into the arduino and make the connections.

What do you think?

1 point
Upvote Downvote

Written by shahid

J.A.C.O.B (Gyro-bot)

How to Make an Ultrasonic Levitator Using Arduino