In this tutorial we will learn how to make a GAS LEAKAGE DETECTOR to protect your home from a big explosion
USE OF THIS CIRCUIT
This
is very usefull circuit to protect your home from a big explosion
because when the gas leaks the sensor used in this circuit recognise it
and make sound (if you are using buzzer)
THINGS NEEDED
* Arduino : https://amzn.to/40m7UpN
* Gas Sensor (I am using MQ-6 Gas Sensor) : https://amzn.to/41n8Co2
*LED or Buzzer
* GSM900a : https://amzn.to/43Bs5Tg
CIRCUIT
Gas Sensor : VCC to VCC
GND to GND
A0 to A0
LED : Positive to Pin13
Negative to GND
GSM900a : 5vt to D9
5vr to D10
Negative to GND
CODE
///https://dreamprojectsnow.blogspot.com/ //DREAM PROJECT MALAYALAM #include #include <SoftwareSerial.h>SoftwareSerial mySerial(9, 10); char msg; char call; int buzzer = 13; int smokeA0 = A0;//gas sensor pin number int sensorThres = 600; // Your threshold value void setup() { mySerial.begin(9600); // Setting the baud rate of GSM Module Serial.begin(9600); pinMode(buzzer, OUTPUT); pinMode(smokeA0, INPUT); Serial.begin(9600); } void loop() { int analogSensor = analogRead(smokeA0); Serial.print("Pin A0: "); Serial.println(analogSensor); // Checks if it has reached the threshold value if (analogSensor > sensorThres) { digitalWrite(buzzer, HIGH); mySerial.println("ATD+91xxxxxxxxxx;"); //calling AT command Serial.println("Calling "); delay(1000); } else { digitalWrite(buzzer, LOW); } delay(100); }
If your circuit is not working rotate the screw behind the sensor or change the value inthe code according to your sensor output
Detailed video
Thank you
Comments
Post a Comment