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 : 278 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 : 379 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 : 278 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 : 248 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 : 344 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 : 370 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 : 335 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 : 213 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...
Beli Rumah Lebih Jimat Dengan Kempen Hartanah Bumiputera Matrix

Tattoos Raised And Itchy

Bersatu Man Demands Dnb Exit Strategy For U Mobile

Khutbah Jumat Jumadil Awal Tangis Ibnu Rawahah Jelang Perang Mu Tah

Tattoos Portland Maine

Bertolak Ansurlah

Kisah Adv 160 Pengajaran Dari Bateri Lemah

Haram Guna Dan Jual Vape Dewan Pemuda Pas Pahang Zahir Sokongan Penuh Terhadap Titah Sultan


echo '';
Senarai Lagu Tugasan Konsert Minggu 1 Gegar Vaganza 2024 Musim 11

Info Dan Sinopsis Drama Berepisod Dhia Kasyrani Slot Akasia TV3

Biodata Terkini Reshmonu Peserta Gegar Vaganza 2024 Musim 11 GV11 Penyanyi Lagu Hey Waley

Gegar Vaganza 2024 GV 11 Hadiah Tiket Peserta Juri Format Pemarkahan Dan Segala Info Tonton Live Di Astro Ria Dan Sooka

6 Janji Donald Trump Kalau Dia Naik Jadi Presiden Semula


Mixology Vape S Commitment To Quality Crafting The Best Vape Flavours Nz

Pensyarah Didakwa Hina Nabi Jawi Turut Buka Siasatan

Murid Buktikan Pada Guru Lembu Makan Martabak

The Difference In The Concept Of Illicit Relationship Between Muslims And Non Muslims

Tiada Masalah Pas Ketuai Pn Tapi Bincang Dulu Kata Pemimpin Bersatu

Cek Pertama Dari Google Adsense