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 : 243 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 : 347 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 : 239 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 : 217 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 : 275 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 : 323 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 : 310 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 : 186 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...
8 Karakter Di Drama Korea Ini Bisa Jadi Contoh Bahwa Emansipasi Bukan Cuma Cita Cita Wanita Indonesia

Bukan Ulama Lantikan Politik Sendiri Tu Ular Dalam Semak

La Dolce Vita Cranking The Vespa Gt 200 Up To Eleven

Filem Mustaqim

8 Kelebihan Daun Pudina Untuk Kesihatan Dalaman Dan Luaran

April 18 2024 Pesan Orang Alim

Wee Barking Up The Wrong Tree

Bersih Slams Hulu Selangor Funds Ahead Of Kuala Kubu Baharu Polls



Kisah Restoran Colonel Sanders Selain KFC Yang Tidak Boleh Dikembangkan

Info Dan Sinopsis Filem J2 J Retribution J2 J Retribusi Filem Malaysia 2021 Di Netflix Sekuel J Revolusi

Info Sinopsis Kutipan Sheriff Narko Integriti Filem Malaysia 2024

Info Dan Sinopsis Dough Doh Filem Malaysia 2023 Lakonan Syafiq Kyle Kini Di Netflix

Info Dan Sinopsis The Djinn s Curse Khong Khaek Filem Seram Thailand 2023 Kini Di Netflix Malaysia


From Christopher Wray

Amalan Paling Minima Mendapatkan Lailatul Qadar

Yang Nilai Baik Dan Buruk Itu Dari Allah Bukan Dari Manusia

Oh Baju Melayu

First Blog Post

Pra Pesanan Samsung Ai Tv Berpeluang Memenangi Hadiah Bernilai Rm140 000