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 : 287 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 : 384 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 : 284 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 : 256 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 : 354 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 : 378 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 : 341 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 : 224 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...
Lirik Lagu Curang Abg Pau

Tanah Melayu Sg Baru Diambil W Azizah Jual B Putih

The Future Of Nutrient Analysis In Cannabis Cultivation

Verizon Accessories Must Have Gadgets To Boost Your Device Performance

10 Myanmar Nationals Found In Car After Crash

Siti Kasim Pas Loyalists Are Fools If They Fall For The Jihad Fundraising Drive To Save Siti Mastura S Skin

Watercolor Apartment For A Young Family With A Maine Coon

Pas Launches Donation Drive To Help Mp Settle Rm825 000 Defamation Bill


echo '';
Info Dan Sinopsis Drama Berepisod Curang Tanpa Niat Slot Megadrama Astro Ria

5 Insiden Jalan Sesak Yang Berlaku Lebih 24 Jam Durasinya

Senarai Lagu Tugasan Konsert Minggu 6 Gegar Vaganza 2024 Musim 11

Keputusan Markah Peserta Konsert Minggu 5 Gegar Vaganza 2024 Musim 11

10 Filem Drama Seram Melayu Berhantu Terbaru 2024 2025 Mesti Tonton


Isteri Czer Tiga Kali Komen Suami Ni Buat Ramai Respect Malu Berdebat Dengan Orang Yang Lahirkan Anak Saya

Nabila Razali Selamat Bersalin Anak Pertama Timang Cahaya Mata Lelaki

Makan Laksa Sarawak Di King Laksa

Pantun Hujung Tahun Dan Selamat Bercuti

Petua Mengatasi Rambut Gugur Secara Tradisional

Kalendar Kuda 2025 Kalendar Akademik Sesi 2025 2026 Cuti Sekolah Cuti Perayaan Bagi Sekolah Seliaan Kpm