0% found this document useful (0 votes)
28 views4 pages

Vijay RK MKC

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Vijay RK MKC

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Implementation of LPG Gas Monitoring, Control and Alert

System using ARM Microcontroller

Vijay Soni1, Rajeev Karothia2, Manju K. Chattopadhyay3


School of Electronics, Devi Ahilya University, Indore, (M. P.), India -452001
1
[email protected]
2
[email protected]
3
[email protected]

ABSTRACT- We present a system to monitor, control is monitoring as well as controlling the LPG gas level
and alert about the LPG Gas leakage. The system has a in the surroundings. In most of the Indian household
built-in LCD display and option to connect the system LPG gas is used as fuel for cooking. And not just
with a Bluetooth display and a USB device. It uses an household LPG gas is used for commercial purpose
ARM based microcontroller, a Gas sensor (MQ2), a
also. Since LPG gas is highly flammable there is
buzzer, an LCD display, a Bluetooth module, a relay, a
push button and some LED’s. When the system is always chance of accidents to happen and it does
switched ON, it starts reading the gas sensor data and happen sometimes due to leakages. In this system we
converts the sensor data into LPG ppm format. There are continuously monitoring the amount of LPG gas in
are some threshold limits to indicate Normal, High and the surrounding and displaying it on the LCD screen
Hazardous presence of the gas in the air. When the gas attached to the system. This can be a very useful
level is in normal range, the relay remains ON and the product for common household to avoid any accident.
system will indicate this condition by a blue color LED
and text written on the LCD display. When the system II. HARDWARE DESCRIPTION
passes normal level, it is indicated by glowing red LED.
Relay is turned OFF in this condition. When the gas level
reaches hazardous level, the relay is turned OFF and the
buzzer starts beeping. The code for whole application is
written in C language and the IDE used here is
“STM32CubeIDE”. The whole system is prototyped on a
breadboard and is working well. And, may be readily
deployed.
Keywords- ARM Microcontroller, LPG leakage
detection, Sensor, Safety system, STM32Cube IDE

I. INTRODUCTION
One of the essential materials but with a high
potential of destruction used widely nowadays, in
industry and domestic applications, is the Liquefied
petroleum gas (LPG). Cylinders containing liquefied
gas are used in various areas such as in the kitchens as
cooking fuel, commercial industries etc. Improper Fig. 1: Block Diagram of the complete system along with the Pin
handling of inflammable gas cylinders are one of the numbers
most common sources of fire and explosion. One of the
effective methods of prevention of such explosions is Figure 1 shows the block diagram of the proposed
deployment of a constant monitoring system. system. The system consist of following module and
parts to build:
In this work, we present an ARM microcontroller  STM32F103C8T6 Microcontroller
based Gas leakage monitoring system that enhances the  MQ2 Gas Sensor
preparedness to reduce possible damage due to the  I2C LCD display
leakage. Monitoring is employed on various parameter  HC05 Bluetooth Module
such as the temperature, pressure, flow etc. This system  Serial to USB converter
 Relay Module for Gas Valve
 Buzzer
 LED’s
 Button

A. STM32F103 Microcontroller Development


board
As shown in the Fig. 2, we are using a development
board in our design. This board is based on
STM32F103C8T6 microcontroller and it also has all
the necessary circuitry such as reset circuit, oscillator,
pinouts and connectors which are required for a Fig. 3: Physical photo of MQ2 Gas sensor Module
microcontroller to work properly.

C. I2C LCD Display


A typical I2C LCD display consists of an HD44780
based character LCD display and an I2C LCD adapter.
These are explained here one by one. Character LCD
Display - True to their name, these LCDs are ideal for
displaying only text/characters. A 16×2 character LCD,
has an LED backlight and can display 32 ASCII
characters in two rows of 16 characters each. I2C LCD
Adapter - At the heart of the adapter is an 8-bit I/O
expander chip – PCF8574. This chip converts the I2C
data from an Arduino into the parallel data required for
an LCD display HC05 Bluetooth Module [2].
Fig. 2: STM32F103C8T6 Microcontroller Development Board
D. 2.4 HC-05
It is a Bluetooth module designed for wireless
B. 2.2 MQ2 gas sensor: communication. This module can be used in a master
or slave configuration. Bluetooth serial modules allow
It is an electronic sensor used for sensing the all serial enabled devices to communicate with each
concentration of gases in the air such as LPG, propane, other using Bluetooth [3].
methane, hydrogen, alcohol, smoke and carbon It has 6 pins,
monoxide. MQ2 gas sensor is also known as i. Key/EN: It is used to bring Bluetooth
chemiresistor. It contains a sensing material whose module in AT commands mode. If
resistance changes when it comes in contact with the Key/EN pin is set to high, then this
gas. This change in the value of resistance is used for module will work in command mode.
the detection of gas. This sensor contains a sensing Otherwise by default it is in data mode.
element, mainly aluminium-oxide based ceramic, The default baud rate of HC-05 in
coated with Tin dixide, enclosed in a stainless steel command mode is 38400bps and 9600 in
mesh [1]. Sensing element has six connecting legs data mode. HC-05 module has two modes,
attached to it. Two leads are responsible for heating the a. Data mode: Exchange of data
sensing element, the other four are used for output between devices.
signals. Oxygen gets adsorbed on the surface of sensing b. Command mode: It uses AT
material when it is heated in air at high temperature. commands which are used to
Then donor electrons present in tin oxide are attracted change setting of HC-05. To
send these commands to module
towards this oxygen, thus preventing the current flow.
serial (USART) port is used.
When reducing gases are present, these oxygen atoms
ii. VCC: Connect 5 V or 3.3 V to this Pin.
react with the reducing gases thereby decreasing the iii. GND: Ground Pin of module.
surface density of the adsorbed oxygen. Now current iv. TXD: Transmit Serial data (wirelessly
can flow through the sensor, which is generated analog received data by Bluetooth module
voltage values. These voltage values are measured to transmitted out serially on TXD pin)
know the concentration of gas. Voltage values are
higher when the concentration of gas is high.
v. RXD: Receive data serially (received data data is “Bluetooth Terminal HC-05” [4]. The serial
will be transmitted wirelessly by monitor which is used to display the serial data
Bluetooth module). incoming from the system through USB is “Arduino
vi. State: It tells whether module is connected Serial Monitor” [5]. The photo of the physical working
or not. system is shown in Fig. 4. The data coming through
Bluetooth terminal is shown in Fig. 5. The data sent
serially through USB on PC is shown in Fig. 6.
III. WORKING
As soon as the system is powered up, the LPG gas
sensor starts converting the gas concentration into
electrical signal. This electrical signal is then read by
the microcontroller(STM32F103) and convert this
signal into the respective gas concentration in ppm.
There are three threshold which are set in the code ie.
800ppm, below which is Normal Mode and above
which is High concentration Mode. 1400ppm, above
which is Hazardous level of concentration. When the
gas levels are below 800ppm then the system is in
Normal working mode in which the Gas valve is ON.
When gas level are above 800ppm then system is in
High concentration mode in which the gas Valve is
turned OFF. When gas level is above 1400ppm the
system is in hazardous mode and the buzzer starts
ringing. During the whole working, the gas
concentration is continuously sent on Bluetooth every Fig. 4: Physical working prototype system
1 second and the gas concentration is sent serially every
10 seconds if someone wants to log the data on a PC.
The ON and OFF conditions of different indicators
such as LED, Buzzer and gas valve is shown in Table
1 below.

TABLE I. ON AND OFF CONDITION OF PERIPHERALS

Indicators and Modes


control Norma High Hazardous
l (>8000ppm (>1400 ppm)
(<800p )
pm)
LED Blue ON OFF OFF
LED Red OFF ON ON
Buzzer OFF OFF ON
Gas Valve Relay ON OFF OFF

IV. RESULTS AND DISCUSSION

Since the goal of the project is to design the


physical hardware, it will be tested whether the
function is realized when displaying the results. The
prototype is produced according to the block diagram
as shown in Fig. 1. The prototype contains all the
functions as described above. The entire system allow
user to monitor the LPG gas concentration wirelessly
using Bluetooth and also log the gas data using PC Fig. 5: A Display of the Bluetooth data coming on the mobile app
through USB, as data is also sent on USB device
serially. The system can be further enhanced by the
integration of IoT in future. The android application
which is used to display the incoming gas concentration
Fig. 6: Incoming Serial Data shown on Arduino Serial Monitor

V. CONCLUSIONS
We have developed a system which can be very
useful for common household as well as commercial
applications. The system is based on STM32
Microcontroller, MQ2 Gas sensor, I2C based LCD
screen, Relay valve, HC-05 Bluetooth module, Buzzer
and LED’s. The system can run on multiple modes
depending upon the gas concentrations. For the
complete code development, the STM32Cube IDE is
used to develop the firmware and upload the binaries
into the microcontroller. An additional STLink
hardware is used to send firmware binary from PC to
the Microcontroller board. The user can view
continuous data on a wireless Bluetooth terminal and
can also log the data in pc using a USB cable. During
the development of the project, various hurdles such as
sensor integration, protocol understanding and
hardware interfacing were faced and overcome. Based
on the low power ARM microcontroller, our system
can be readily deployed commercially.

REFERENCES
[1] https://www.elprocus.com/an-introduction-to-mq2-gas-sensor
[2] https://lastminuteengineers.com/i2c-lcd-arduinotutorial
[3] https://www.electronicwings.com/sensors-
modules/bluetooth-module-hc-05
[4] https://play.google.com/store/apps/details?id=project.bluetoot
hterminal&hl=en_IN&gl=US
[5] https://www.arduino.cc/en/software

You might also like