OTHERS

Gas Leakage Detection System using Arduino

The Gas Leakage Detection System using Arduino is a security solution designed to detect the presence of gas leaks in indoor environments.

It employs an Arduino microcontroller, a gas sensor, LEDs, a buzzer, and an LCD display to monitor gas levels continuously.

When the gas sensor detects a gas leak above a predefined threshold, the system triggers visual and auditory alerts to notify users of the potential danger. The LCD screen provides real-time feedback on the gas levels, ensuring timely response and mitigation of risks.

Component List:

NameQuantityComponent
U11Arduino Uno R3
PIEZO11Piezo
GAS11Gas Sensor
U21LCD 16 x 2
D11Green LED
D21Red LED
R11220 mΩ Resistor
R21221 mΩ Resistor
R314.7 kΩ Resistor
R4
R5
21 kΩ Resistor

The system begins by initialising the Arduino and setting up the necessary pins for input and output. It then reads analog values from the gas sensor to measure the gas concentration in the environment.

If the sensor reading exceeds the predefined threshold, indicating a gas leak, the system activates the red LED, sounds the buzzer, and displays an alert message on the LCD screen.

Conversely, if the gas levels are within the safe range, the green LED lights up, and the system displays a “SAFE” message on the LCD. This continuous monitoring and alerting mechanism ensure the safety of indoor spaces by promptly detecting and responding to gas leaks.

Arduino Code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(5, 6, 8, 9, 10, 11);
int redled = 2;
int greenled = 3;
int buzzer = 4;
int sensor = A0;
int sensorThresh = 500;
void setup() {
pinMode(redled, OUTPUT);
pinMode(greenled, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(sensor, INPUT);
Serial.begin(9600);
lcd.begin(16, 2);
}
void loop() {
int analogValue = analogRead(sensor);
Serial.print(analogValue);
if (analogValue > sensorThresh) {
digitalWrite(redled, HIGH);
digitalWrite(greenled, LOW);
tone(buzzer, 1000, 10000);
lcd.clear();
lcd.print("ALERT");
delay(1000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Dangerous zone");
delay(1000);
} else {
digitalWrite(greenled, HIGH);
digitalWrite(redled, LOW);
noTone(buzzer);
lcd.clear();
lcd.print("SAFE");
delay(1000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("ALL CLEAR");
delay(1000);
}
}

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button