Introduction: LPG Gas Leakage Detector Using Arduino

About: hIOTron is an IoT Based company that offers IoT Platforms, IoT Solutions, IoT Training.

Here we have designed Arduino based LPG gas detector alarm that will detect the leakage and creates an alert.


Hardware Components

Arduino Uno

LPG gas sensor module


BC 547 Transistor

1k Resistor

LCD 16X2

Connecting Wires

9V battery

Software Components

Arduino IDE

Step 1: About Project

LPG Gas Sensor Module

This module consists of an MQ3 sensor that actually recognizes LPG gas, a comparator (LM393) for comparing MQ3 output voltage with a reference voltage. When LPG gas is detected it will give high output. A potentiometer is basically used for controlling the sensitivity of gas detecting. Working of the Project: LPG gas sensor module is used to detect LPG Gas.

When LPG gas leakage sensed, it will give a HIGH pulse on its DO pin and Arduino constantly reads its DO pin. When Arduino receives a HIGH pulse from the LPG Gas sensor module it displays the“LPG Gas Leakage Alert” message on 16x2 LCD and stimulates buzzer which beeps again until the gas detector module doesn't recognize the gas in the environment.

When Arduino gets a LOW pulse from the LPG Gas detector module, then LCD will show the“No LPG Gas Leakage” alert message. Arduino manages the complete process of this system like reading LPG Gas sensor module output, sending a message to LCD and stimulating buzzer.

We can set the sensitivity of this sensor module by inbuilt potentiometer located on it.

Internet of Things Course Training will give you a thorough view of suchIoT devices.

Step 2: Run a Program


LiquidCrystal lcd(3, 2, 4, 5, 6, 7);

#define lpg_sensor 18

#define buzzer 13

void setup()


pinMode(lpg_sensor, INPUT);

pinMode(buzzer, OUTPUT);

lcd.begin(16, 2);

lcd.print("LPG Gas Detector");


lcd.print("Circuit Digest");



void loop()




digitalWrite(buzzer, HIGH);


lcd.print("LPG Gas Leakage");

lcd.setCursor(0, 1);

lcd.print(" Alert ");


digitalWrite(buzzer, LOW);





digitalWrite(buzzer, LOW);


lcd.print(" No LPG Gas ");


lcd.print(" Leakage ");