How To Make An Iot Smoke Alarm With Nodemcu Esp8266




About Gas Sensor

The MQ2 is used in gas leakage detecting equipment in consumer and industry markets, this sensor is suitable for detecting CH4, Natural gas, LNG, avoid exposure to alcohol, cooking fumes, and cigarette smoke. The sensitivity can be adjusted by the potentiometer. Come with cables

Specification:

Power supply: 5V
Interface type: Analog
Pin Definition: 1-Output 2-GND 3-VCC
High sensitivity to CH4, Natural gas
Small sensitivity to alcohol, smoke
Fast response
Stable and long life
Simple drive circuit
Size: 40x20mm

The MQ-2 sensor has 4 pins.
Pin-------------------------------------Wiring to Arduino Uno
A0-------------------------------------Analog pins
D0-------------------------------------Digital pins
GND-----------------------------------GND
VCC------------------------------------5V
How does it Work?
The voltage that the sensor outputs changes accordingly to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas. You can use with Gas Lighter

In other words, the relationship between voltage and gas concentration is the following:
The greater the gas concentration, the greater the output voltageThe lower the gas concentration, the lower the output voltage

The output can be an analog signal (A0) that can be read with an analog input of the Arduino or a digital output (D0) that can be read with a digital input of the NodeMCU ESP8266


Tools and materials :
NodeMCU ESP8266Sensor MQ-2  Jumper female to male 

Drawing Circuits:






Program:

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = " ***";
char ssid[] = "***";
char pass[] = "***";

int gas;    // Declare gas

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
  pinMode(16,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(A0,INPUT);
}



void loop()
{
  gas=analogRead(A0);
  Serial.println(gas);

  if(gas>190)   // If gas more than 190
  {
     digitalWrite(16,HIGH); // LED1 RED LAMP
    digitalWrite(5,LOW);
     Blynk.notify("Gas Detected");
  }

  if(gas<190)   // If gas less than 190
  {
      digitalWrite(16,LOW);
      digitalWrite(5,HIGH); // LED2 GREEN LAMP
  }
    Blynk.virtualWrite(V1, gas); // Set V1 in Blynk Apps
    Blynk.run();
    timer.run();
}

Artikel ini hanyalah simpanan cache dari url asal penulis yang berkebarangkalian sudah terlalu lama atau sudah dibuang :

https://www.belajarblogs.com/2019/05/final-year-project-program-gas-sensor.html

Kempen Promosi dan Iklan
Kami memerlukan jasa baik anda untuk menyokong kempen pengiklanan dalam website kami. Serba sedikit anda telah membantu kami untuk mengekalkan servis percuma aggregating ini kepada semua.

Anda juga boleh memberikan sumbangan anda kepada kami dengan menghubungi kami di sini
Iot Watering Plant With Adruino Uno And Wifi Shield

Iot Watering Plant With Adruino Uno And Wifi Shield

papar berkaitan - pada 22/11/2019 - jumlah : 300 hits
everyone knows what is IOT Interning Of thing With now technology we can do many thing that possible I just want to share some programming that I make for my friend with simple programing using Adruino Uno and wifi shield define BLYNK PRINT...
How To Make Your House Aesthetically Pleasing For All Ages

How To Make Your House Aesthetically Pleasing For All Ages

papar berkaitan - pada 10/11/2019 - jumlah : 396 hits
Parents want to come back home kick off their shoes and relax Kids want to come back home and play to their heart s delight Grandparents want to come back home and plop down on their The post appeared first on
How To Make A Folder In Ubuntu Using Command Line

How To Make A Folder In Ubuntu Using Command Line

papar berkaitan - pada 18/11/2019 - jumlah : 295 hits
Follow this step to create new folder in Ubuntu using command line Step Type this command and hit Enter if you want to create new folder in your Desktop where user is your username and NewFolder is your folder name
Azmin Believed In Talks With Barisan Mps Tonight To Back Dr M

Azmin Believed In Talks With Barisan Mps Tonight To Back Dr M

papar berkaitan - pada 19/11/2019 - jumlah : 268 hits
A stream of VIP cars and security personnel were seen going to Azmin Ali s home tonight watched by members of the media PETALING JAYA A group of Barisan Nasional MPs are believed to be at a meeting tonight at the home of PKR deputy presiden...
Jason Lo Charged With Trespassing Injecting Drug Into Body

Jason Lo Charged With Trespassing Injecting Drug Into Body

papar berkaitan - pada 19/11/2019 - jumlah : 367 hits
A former chief executive officer of a local telecommunications company was charged in separate Magistrates Courts in Kuala Lumpur today with trespassing into a house and injecting a drug into his body Jason Jonathan Lo 44 who is also a sing...
Shahidan Those Who Met With Azmin Not Jumping Ship To Pakatan

Shahidan Those Who Met With Azmin Not Jumping Ship To Pakatan

papar berkaitan - pada 20/11/2019 - jumlah : 392 hits
KUALA LUMPUR Umno lawmakers who purportedly met PKR deputy president Datuk Seri Azmin Ali have no plans to jump ship to Pakatan Harapan says Arau MP Datuk Seri Shahidan Kassim He said that it was unfair to accuse the group as they were mere...
Land Your Dream With Modello My Platform Unik Yang Merealisasikan Impian Seorang Talent

Land Your Dream With Modello My Platform Unik Yang Merealisasikan Impian Seorang Talent

papar berkaitan - pada 18/11/2019 - jumlah : 346 hits
Hai korang kali ni i nak share sesuatu yang mana ia akan menjadi satu platform bagi kaki socmed yang aktif dalam memviralkan sesuatu yang menarik Semestinya kalau yang viral haruslah yang best dan berfaedah tau Tahu tak sekarang semua orang...
Hr Ministry To Come Up With List Of Critical Jobs

Hr Ministry To Come Up With List Of Critical Jobs

papar berkaitan - pada 16/11/2019 - jumlah : 229 hits
The Human Resources Ministry is preparing a list of jobs categorised as critical as a guideline for students in choosing courses to further their studies at the tertiary level Minister M Kulasegaran said this was because the Fourth Industri...
Mengapa Sholat Sebaiknya Dilakukan Di Awal Waktu

Siti Mastura Pays Rm830k Pending Appeal In Dap Leaders Defamation Case

All The Android Updates Coming To The Samsung Galaxy S25 Series And More

Ringgit Strengthens After Bnm Maintains Opr At 3

Wordless Wodnesday Nasi Daun Jeruk By Sheila Rusly

Siti Kasim Enraged At Money Play To Lure Conversion Forced Islamisation In Malaysia

Laku Keras Rumah Teres Setingkat Mampu Milik Di Bandar Ainsdale Rm400k Sekelip Mata Habis Dijual

Anwar Beri Impak Besar Pada Forum Wef


echo '';
4 Tanda Ketagihan Yang Jelas Pada Wajah Seorang Penagih Syabu Ice

Biodata Putra Abdullah Atlet Muay Thai Boxing Malaysia Seangkatan Johan Ghazali Jojo Team Jordan Boy

Senarai Lagu Tugasan Konsert Minggu 10 Gegar Vaganza 2024 2025 Musim 11 Suku Akhir

Keputusan Markah Peserta Konsert Minggu 9 Gegar Vaganza 2024 2025 Musim 11

Info Dan Sinopsis Drama Berepisod Akad Yang Terlindung Slot Samarinda TV3


Wr Rosse Sunday Getaway

Singgah Makan Satay Kajang Rnr Dengkil

Pengalaman Buat Scaling Gigi Di Klinik Pergigian Kerajaan Seksyen 7 Shah Alam

Dividen Asb 2024 Kadar Bonus Dan Cara Pengiraan

Kami Brunch Di Kolumpo Kopitiam

Cara Merancang Jadual Aktiviti Harian Yang Berkesan