Site icon Circuit Ideas for You

LPG Gas Leakage Detector Circuit using Arduino

LPG Gas Leakage Detector Circuit using Arduino is important safety tool which can stop accidents.

This project uses Arduino to check LPG gas in air.

If gas level goes too high then buzzer make sound and LCD show warning.

Through this circuit people know danger fast.

Code Programming and Explanation:

#include <LiquidCrystal.h>

// Define pins
const int gasSensorPin = A0;
const int buzzerPin = 13;
const int threshold = 300; // Adjust threshold as needed

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

void setup() {
  // Set up sensor and LCD
  pinMode(gasSensorPin, INPUT);
  pinMode(buzzerPin, OUTPUT);
  lcd.begin(16, 2);
}

void loop() {
  int sensorValue = analogRead(gasSensorPin);

  // Check for gas leak
  if (sensorValue < threshold) {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("No Gas Leak");
    digitalWrite(buzzerPin, LOW);
  } else {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Gas Leak Detected!");
    digitalWrite(buzzerPin, HIGH);
  }

  delay(100);
}

Code Explanation:

Circuit Working:

Parts List:

ComponentQuantity
Resistors
1k 1/4 watt1
Potentiometer 10k1
Semiconductors
Arduino Uno board1
LPG gas sensor module (MQ-2 or similar)1
16×2 LCD display1
Buzzer1
IC 78091
Transistor BC5471

In this project we used Arduino board, gas sensor MQ-2, buzzer and LCD screen.

Arduino reads gas sensor and shows message on LCD and turns ON the buzzer if needed.

We can change sensor sensitivity.

MQ-2 sensor checks LPG gas by change in resistance.

More gas means less resistance.

Sensor gives analog voltage and Arduino reads it and compares with threshold.

If value is more than threshold then gas leak is detected.

Arduino turns ON the buzzer using transistor and shows warning on LCD.

System keeps checking gas level and gives updates until its safe again.

How to Build:

To build a LPG Gas Leakage Detector Circuit using Arduino we need to follow the below mentioned steps:

Connection of LCD to Arduino are mentioned below:

Connections for Buzzer, Transistor BC547, and LPG Gas Sensor are mentioned below:

Buzzer and BC547 Transistor Connection:

LPG Gas Sensor Connections:

Note:

Conclusion:

LPG Gas Leakage Detector Circuit using Arduino is a life-saving safety device.

With Arduino and basic parts a strong system we can be built.

Ensure to test and adjust the system properly.

References:

Detecting LPG Leakage and Automatic Turn off using Arduino Connected with PIR Sensor

Exit mobile version