← Back to blog
Student Projects

Hazardous Gas leak detection

About This Project

Safety plays a major role in today’s world and it is necessary that good safety systems are to be implemented in places of Chemical plant. The main objective of the work is designing Arduino based toxic gas detecting, alerting and protecting system. The hazardous gases like Hydrogen sulfide, Nitrogen dioxide and Carbon monoxide are sensed and displayed the status every second in the LCD display. The advantage of this automated detection, alerting system and protecting system over the manual method is that it offers quick response time and accurate detection of an emergency and in turn leading faster diffusion of the critical situation.

Hazardous Gas leak detection when the gas sensor senses the emission of hazardous gases like Hydrogen sulfide, Nitrogen dioxide and Carbon monoxide, it will generate the alerting sound and alert everyone and also the electric motors will close the electric gates and control the emission of hazardous gases.

Components Required

  • Arduino UNO
  • Gas Detection Sensor, Hydrogen
  • DC Motor, 12V

Code Of Project

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
int Gas_Sensor_Value = 0;
int Gas_sensor = A0;
int Piezo = 3;
int electric_motor_1 = 4;
int electric_motor_2 = 5;
int electric_motor_3 = 6;
int electric_motor_4 = 7;

void setup() {
  lcd.begin(16, 2);
  pinMode(Gas_sensor, INPUT);
  pinMode(Piezo, OUTPUT);
  pinMode(electric_motor_1, OUTPUT);
  pinMode(electric_motor_2, OUTPUT);
  pinMode(electric_motor_3, OUTPUT);
  pinMode(electric_motor_4, OUTPUT);
}

void loop() {
  lcd.clear();
  Gas_Sensor_Value = analogRead(A0);
  if (Gas_Sensor_Value >= 700) {
    digitalWrite(Piezo, HIGH);
    digitalWrite(electric_motor_1, HIGH);
    digitalWrite(electric_motor_2, HIGH);
    digitalWrite(electric_motor_3, HIGH);
    digitalWrite(electric_motor_4, HIGH);
    lcd.print("Caution:Gas leak");
    delay(1000);
  } else {
    digitalWrite(Piezo, LOW);
    digitalWrite(electric_motor_1, LOW);
    digitalWrite(electric_motor_2, LOW);
    digitalWrite(electric_motor_3, LOW);
    digitalWrite(electric_motor_4, LOW);
    lcd.print("The environment");
    lcd.setCursor(0, 1);
    lcd.print("is Safe");
    delay(1000);
  }
}
More stories
Book free trial
Buy a kit Become partner Talk to us