LPG Gas Leakage Detector with SMS Alert | Home Safety Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 เม.ย. 2020
  • LPG Gas Leakage Detector with SMS Alert | Home Safety Project
    Scroll down for code.....
    In this tutorial we are going to learn how to detect LPG gas leakage and send SMS notification via GSM Module. It can be a good home safety features, as we can forget to off or accidentally gas leaking, until we know this, it's already late. With this project, it will detect within 5 to 10 seconds of leakage and send the SMS. Even you can receive call for that, but we are not going in this video. This video shows how MQ2 sensor detect LPG gas leakage and GSM SIM900 module will send SMS to owner about gas leakage.
    LiquidCrystal_I2C library Github link
    github.com/fdebrabander/Ardui...
    I2C scanner arduino website
    playground.arduino.cc/Main/I2...
    If you want to support my video please buy any product through my amazon affiliate link. I will receive a commission, at no extra cost to you.
    LIST OF COMPONENT (affiliate links)
    amzn.to/2fvSRJq (Arduino)
    amzn.to/2ytw1ve (SIM900) (SIM900 is for US & Canada user & SIM900A is mostly for Asian user)
    amzn.to/3dTEGr0 (MQ2 Gas Sensor)
    amzn.to/2zg8aeX (I2C)
    amzn.to/2yBk7eT (LCD display)
    amzn.to/2vSpUON (LED)
    amzn.to/2vmSK8l (Resistor)
    amzn.to/2wxPmWz (Breadboard)
    amzn.to/2vJ3lvo (Jumper wire)
    Track: Julius Dreisig & Zeus X Crona - Invisible [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • Julius Dreisig & Zeus ...
    Free Download / Stream: ncs.io/InvisibleYO
    #include (LiquidCrystal_I2C.h) //instead of parenthesis () put angle bracket as TH-cam description does not allow angle bracket
    // Set the LCD address to 0x27 for a 16 chars and 2 line display
    LiquidCrystal_I2C lcd(0x3F, 16, 2);
    #include (SoftwareSerial.h)
    SoftwareSerial SIM900(7, 8);
    int led = 2;
    int sensor = A0;
    int threshold = 150; // threshold value
    void setup() {
    pinMode(led, OUTPUT);
    pinMode(sensor, INPUT);
    SIM900.begin(19200);
    Serial.begin(19200);
    delay(10000);
    lcd.begin();
    }
    void loop() {
    float MQ2SensorValues = analogRead(sensor);
    lcd.setCursor(0, 0);
    lcd.print("Ur Home is Safe!");
    lcd.setCursor(0, 1);
    lcd.print("Sensor Value:");
    lcd.setCursor(13, 1);
    lcd.print(MQ2SensorValues);
    Serial.println(MQ2SensorValues);
    if (MQ2SensorValues ) threshold) // Checks if MQ2 Sensor Value greater than threshold value
    {
    lcd.setCursor(0, 0);
    lcd.print("Gas Leakage...!!");
    digitalWrite(led, HIGH);
    sendSMS();
    }
    digitalWrite(led, LOW);
    delay(500);
    lcd.clear();
    }
    void sendSMS() {
    // AT command to set SIM900 to SMS mode
    SIM900.print("AT+CMGF=1
    ");
    delay(100);
    // REPLACE THE X's WITH THE RECIPIENT'S MOBILE NUMBER
    // USE INTERNATIONAL FORMAT CODE FOR MOBILE NUMBERS
    SIM900.println("AT + CMGS = \"XXXXXXXXXXXXX\"");
    delay(100);
    // REPLACE WITH YOUR OWN SMS MESSAGE CONTENT
    SIM900.println("Gas Leakaged..!!");
    delay(100);
    // End AT command with a ^Z, ASCII code 26
    SIM900.println((char)26);
    delay(100);
    SIM900.println();
    // Give module time to send SMS
    delay(60000);
    }
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 6

  • @Hahe2023
    @Hahe2023 3 หลายเดือนก่อน

    Hello sir , I am following your video to make my project . I have a doubt should I use any dc to dc buck converter as sim800l supports only 3.4V-5.5V (since iam using sim800l)..
    Kindly do reply sir

  • @abhisheknaik4589
    @abhisheknaik4589 3 ปีที่แล้ว +1

    Can we use 2 mobile num on which we get sms of gas leakage.....

  • @itzclaudialee8518
    @itzclaudialee8518 2 ปีที่แล้ว +1

    What app u using

  • @unknownnightcore9736
    @unknownnightcore9736 ปีที่แล้ว

    can it detect smoke?

  • @nilminimediwake4995
    @nilminimediwake4995 2 ปีที่แล้ว

    Hello, robotic a diy🙄

  • @boopathi_ofil9411
    @boopathi_ofil9411 3 ปีที่แล้ว

    Hi