Hello,

In this tutorial-based article, we are going to learn how to build a Fire alarm using NodeMCU and Blynk App.

Hardware Required

Software Required

Flame Sensor

  • This IR Infrared Flame sensor module which is Arduino compatible can be used to detect flame or wavelength of the light source within 760nm-1100nm. It is also useful for lighter flame detection at a distance of 80 cm. Greater the flame, the farther the test distance. It has a detect angle of 60 degrees and is very sensitive to the flame spectrum. 

  • It produces the one-channel output signal at the D0 terminal for further processing like an alarm system or any switching system. The sensitivity is adjustable with the help of a blue potentiometer given on the board. 

Circuit Diagram

  • The circuit diagram for this project consists of only two components: An ESP8266 microcontroller board and a Flame sensor. 

Pins on Flame Sensor

Pins on NodeMCU ESP8266

GND

GND

+

3.3V

Signal Pin D0

D1

Working Concept

  • The working concept of this project is quite simple as there are only two components. 

  • The Flame sensor comes under the category of the photosensor. So the light of the flame is sensed by the sensor and it then sends the appropriate signals to the ESP8266 board. 

  • The ESP board then sends the signal over wi-fi to the smartphone in which the Blynk App has been installed.  

  • The App will show the notification that the phone that the Fire has been detected. 

NodeMCU code

 

Blynk App

  • Download the Blynk App from the link given above. 
  • Register using an email id in the Blynk app. Remember, you will receive an authorization token in your email.

  • After logging into the Blynk app, create a new project selecting the NodeMCU board and Wi-Fi setting. 

  • Now you will see the main page where you can drag and drop widgets on the main screen as you like. 

  • Now upload the code to NodeMCU. If you do not know how to configure the Arduino IDE to upload the code to NodeMCU, you can check out that blog here. 

  • After uploading, you will see something like this on your serial monitor. 

  • After this, your fire alarm system is ready to go.
  • This system has the main advantage over the Arduino fire alarm system as you need to keep the Arduino board connected to the computer and you need to be at that place to see if there is a fire or not. 
  • But using the NodeMCU makes this system wireless, so you can use this fire alarm at any point. You just need the IP address to access it anywhere in the world.