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
CIRCUIT
Gas Sensor : VCC to VCC
GND to GND
A0 to A0
LED : Positive to Pin 8
Negative to GND
CODE
///https://dreamprojectsnow.blogspot.com/ //DREAM PROJECT MALAYALAM int buzzer = 10; //YOU CAN CHANGE THE PIN NUMBER int smokeA0 = A0; int sensorThres = 600; void setup() { pinMode(buzzer, OUTPUT); pinMode(smokeA0, INPUT); Serial.begin(9600); } void loop() { int analogSensor = analogRead(smokeA0); Serial.print("Pin A0: "); Serial.println(analogSensor); if (analogSensor > sensorThres) { digitalWrite(buzzer, HIGH); } else { digitalWrite(buzzer, LOW); } delay(100);}
WORKING
If your circuit is not working rotate the screw behind the sensor or change the value in
the code according to your sensor output
Thank you
Comments
Post a Comment