Surilli
Published © LGPL

Smoke and Gas Detection Using Surilli GSM

This sensor is used to monitor gas leakage in your home or workplace, and beeps the buzzer whenever a leak is detected.

BeginnerFull instructions provided30 minutes401
Smoke and Gas Detection Using Surilli GSM

Things used in this project

Hardware components

Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Surilli GSM
Surilli GSM
×1
Buzzer
Buzzer
×1
MQ2 Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Smoke and Gas Detection using Surilli GSM

Code

MQ2_Sensor_and_Piezo

C/C++
 int smoke_sensor_pin =12;//D0 pin of sensor is connected to pin 12 of surilli.
int buzzer =2;//positive pin of buzzer is connected to pin 2 of surilli
void setup() {
 pinMode(smoke_sensor_pin, INPUT);//pin 12 is declared as input
 pinMode(buzzer, OUTPUT);//pin 2 is declared as output
 Serial.begin(9600);
}
void loop() {
 delay(500);
 int SmokeSensor = digitalRead(smoke_sensor_pin);//it will read D0 pin of sensor which is connected to pin 12
 Serial.println(SmokeSensor);//to display value (1 or 0) of pin 12 on serial monitor.
 if(SmokeSensor == 0){
   digitalWrite(buzzer, HIGH);//when gas is detected buzzer will be on.
   Serial.println("Gas detected");
   }
   if(SmokeSensor == 1){
     digitalWrite(buzzer, LOW);//when no gas is detected buzzer is turned off.
   Serial.println("Gas not detected");
   }
}

Credits

Surilli

Surilli

196 projects • 47 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments