Interfacing the hardware devices to our mobile and #portable devices is one of the most essential things today, even in our daily lives. Be it a small notification for our car being serviced and ready or a fire alert at home. This process of interfacing and receiving notifications can be a simple task to be easily carried out or a necessity. This basically tells us how #IoT has added to ease and monitor our day to day activities and avoid hazards.
Many such systems have been developed, like water level monitors in overhead tanks at homes, parking lot sensors in apartments to keep track of the vehicles coming in and out, and finally to the Home automation system itself. This article is going to give an idea of interfacing with a fire sensor and receive notifications to the mobile phone through the #Blynk App.
The following image shows all the components required for building the circuit.
Unlike #Arduino, Raspberry Pi works with its own Operating System, Linux. So, Raspberry Pi can be called a single-board computer. It does not have any peripherals like a keyboard, mouse, etc. but works when connected to a system.
Features of Raspberry Pi:
SoC (System On Chip).
GPU (Graphics Processing Unit - on chip).
In this project, the Raspberry Pi Model B/B+ can be used, which have a 1.2GHz/1.4GHz processor. It has inbuilt WiFi and #Bluetooth capabilities.
Buy the Raspberry Pi chip from here.
2. Flame sensor
The flame sensor has 4 pins namely A0, D0, GND, and Vcc. The A0 pin is the analog output pin for which an ADC (Analog-to-Digital Converter) needs to be used to get the desired output. The D0 pin is the Digital Output pin which directly gives the output in terms of 0 and 1.
The GND pin will be connected to the Ground pin of any other device that we will interface with. Vcc is the pin through which power in terms of Voltage will be provided to the #sensor to function accordingly. The sensor operates from 3.3V to 5V DC.
Buy Flame Sensor from here.
3. USB Cable
USB Cable is considered an Industry Standard for establishing connections between peripherals and #computers to transfer data between them.
Buy a USB cable from here.
4. Jumper Wires
Jumper wires establish a connection between the Raspberry Pi and the flame sensor. Both Male and Female wire configurations are required.
Buy Jumper Wires from here.
5. MicroSD card
The MicroSD card used here needs to be loaded with Raspbian OS which is a zip file containing the code needed to run the #program on Raspberry Pi and allows interfacing between the hardware and software.
Buy a MicroSD Card from here.
It is an application installed in Andriod and iOS devices that allow interfacing hardware devices in real-time. It is an IoT platform that has free cloud storage. Blynk app allows creating a project dashboard, widgets, graphs, etc.
2. Raspberry Pi Imager
The software is used to allow the interfacing of the hardware devices and #software applications. This software needs to be downloaded into the system for the Raspberry Pi Chip to be recognizable.
3. Python IDLE IDE
The main software application is a #Python IDE for this device to work. The code is written in the notepad and saved with .py extension so that it becomes a python code file and can be interfaced with the device.
The circuit connections for this device is simple. As stated above, the flame sensor has 4 pins amongst which we will be making use of three of them. They are the D0 (Digital Output), GND (Ground), and Vcc ( Voltage/Power Supply) pins.
The GND pin of the flame sensor is connected to the GND pin of the Raspberry Pi. The Vcc pin of the flame sensor is connected to the power supply pin of the chip. Finally, let's consider any one of the channel pins in Raspberry Pi to connect the D0 pin of the flame sensor. In our case, channel 4 is chosen.
The Raspberry Pi chip is then connected to the computer through the USB cable where the software is interfaced with the hardware device.
Download the code from here
The following images show how the circuit looks when connected and assembled.
Once the circuit connections are completed and the code is written in the IDE, connect the hardware device to the computer and interface the code to the hardware.
The code is written in a notepad file and saved as a python file which creates the type of document required for the code execution.
After the file with the code is saved under the given extension, the SSH (Secure Socket Shell) #Terminal is opened.
The saved file name is entered and is then opened in the terminal. The output of which is shown above.
By the time the terminal with the file and code is opened, the Blynk app must be opened and must be configured. That is the Notification must be enabled and the widget option must be chosen. The steps for which are shown in the project video given below.
The explanation of the circuit building, code, and the work with the terminal is explained clearly in the video.
Check the Project working video here - IoT Based FIRE alarm system using Blynk App & Flame Sensor || IOT Projects || Raspberry Pi Projects
Video By - Sai Parimal
Flame sensor interfacing is one of the basic components of the home automation system. The scope of this project is huge and this is a basic circuit. The knowledge about building this circuit is essential for designing other big automation systems.