Oil and Gas Hazard Alert System Using Raspberry Pi Pico
Oil and Gas Hazard Alert System Using Raspberry Pi Pico
i
TABLE OF CONTENTS
ABSTRACT i
LIST OF FIGURE v
1 INTRODUCTION
1.1 Introduction 1
2 LITERATURE SURVEY
3 SYSTEM ANALYSIS
ii
3.2.1 Advantages Of Proposed System 5
4 SYSTEM SPECIFICATION
5 SOFTWARE DESCRIPTION
5.1 Python 7
5.2.1 Definition 12
6 HARDWARE DESCRIPTION
6.5 Transformer 29
iii
6.8 Relay 34
7 CIRCUIT DIAGRAM
7.2 Working 39
7.3.Screen Shots 40
8.1 Conclusion 43
REFERENCES 44
iv
LIST OF FIGURES
v
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
The environmental care has become one of the prime concerns for almost every
country in the last decades. Even though the number of industrial accident has
been increasing in the last few decades, the current scenarios in the industry
have not improved. They tend to be more a dangerous environment rather than a
safe one even with a wide range of modern technologies. Recently the current
industries have been demanding sophisticated instrumentation for monitoring
and control of environmental risk parameters in the danger-prone areas. Human
safety and property losses are the essential to maintain a balance between
industry and industrial environments. Five main components are the reasons for
an accident to occur: the fire, gas leakage, radiation, over voltage and high
temperature. An industrial accident usually occurs individually to the above-
mentioned factors or as the result of their combined effects. In this paper
propose, combining the virtual monitoring technology with hazardous risk
management together, a wireless multi-sensory monitoring system of hazardous
site environment. wireless sensor network architecture is adopted and based on
virtual instrument technology, Virtual instrumentation environment. In this
project we propose a combination of the real time monitoring technology with
the sensors to keep a time to time track of the various factors which are
recognised to cause an accident on site. In addition to this, internet of things
wireless sensor network architecture are adopted. The function of real-time
monitoring is to provide remote-distance hazardous parameters information,
display the data, analyze, identify when the parameters cross threshold, provide
warning in case of an accident. A wide range of industrial IoT applications have
been developed and deployed in recent years. In an effort to understand the
development of IOT in Industries.
1
1.2 BLOCK DIAGRAM
Cloud storage
Wi-Fi Module
Android
app
Buzzer
indication
Gas Sensor
Raspberry pi PICO
oil Sensor
RELAY
Exhaust fan
Power Supply
2
CHAPTER 2
LITEATURE SURVEY
3
Security and automation is a prime concern in our day-to-day life. The approach
to home and industrial automation and security system design is almost
standardized nowadays. In this paper, we have tried to increase these standards
by combining new design techniques and developed a low cost home and
industrial automated security systems. Everyone wants to be as much as secure
as possible. The design of simple hardware circuit enables every user to use this
wireless home security system with PIR sensor, Gas sensor, Smoke sensor and
Main fuse Failure Detector at Home & Industries
2.3 Industry Based Security System Using Gsm And Arduino
Author:Shubham Raut, Avinash Gaikwad, Mudaliyar Raghurajan,
the design of a simple low cost GSM based security monitoring system using
GSM technique. The security monitoring system using GSM undergoes analog
to digital converter and with GSM Modem the message is send to mobile. ADC
is used because Arduino works with digital inputs. GSM modem can be used at
the transmitter side, the user sends an SMS to the GSM modem using. The fire
sensor is an integrated circuit sensor that can be used to detect the fire. The fire
sensor is connected to Arduino and varying fire condition is sent to GSM
modem, which is simultaneously performs the operation of sending message to
a particular SIM number. GSM technology provides users with high quality
signal, giving them access to high quality digital communication. GSM network
operators can provide their customers with cheaper text messing options.The
approach to industrial automation and security system design is almost
standardized nowadays. We have tried to increase these standards by combining
new design techniques and developed a low cost industrial automated security
systems. Everyone wants to be as much as secure as possible. The design of
simple hardware circuit enables every user to use this wireless industrial
security system with vibration sensor, Motion sensor, Fire sensor, Door sensor
and Main fuse Failure Detector at Industries.
4
2.4 LPG Leakage Detector using Arduino with SMS Alert and Sound
Alarm
AUTHORS: Rhonnel S. Paculanan, Israel Carino
LPG leakages are a mutual hindrance in household and manufacturing
nowadays. It is very life threatening if you will not distinguish and modified
right away.The idea behind our project is to give a solution by power cut the
gas provision as soon as a gas leakage is perceived apart from activating the
sounding alarm.In addition to this, the authorized person will receive a message
informing him about the leakage With the increase of natural gas productions in
the last 10 years:Philippines gas industry has really taken its toll. However,the
Bureau of Fire Protection prompted the society to yield preventive and security
measures against defective electrical cabling and dissolved petroleum gas leaks
regardless of fire alarming incidents in the first half of 2017.
2.5 Microcontroller Based LPG Gas Leakage Detector Using GSM Module
AUTHORS: Ankit Sood, Babalu Sonkar, Atul Ranjan and Mr. Ameer Faisal
Introduced by presents a research work which is easty to use and gives remote
indication to the user. The sensor used in this Research Work has excellent
sensitivity combined with a quick fast response time. The system is highly
reliable, tamper-proof and secure. In the long run the maintenance cost is very
less when compared to the present system. It is possible to get instantaneous
results and with high accuracy.
5
CHAPTER 3
SYSTEM ANALYSIS
• More secured.
• Accuracy is high
6
CHAPTER - 4
SYSTEM SPECIFICATION
4.1. HARDWARE REQUIREMENTS
Raspberry pi PICO
Power supply
LCD
Relay
Fan
Buzzer
2. Python Language
4. Adaboost Algorithm
5. Php
7
CHAPTER-5
SOFTWARE DESCRIPTION
5.1 PYTHON
8
range of applications from simple text processing to WWW browsers to
games.
History of Python
Python was developed by Guido van Rossum in the late eighties and early
nineties at the National Research Institute for Mathematics and Computer
Science in the Netherlands.
Python is copyrighted. Like Perl, Python source code is now available under the
GNU General Public License (GPL).
Python Features
9
Extendable − You can add low-level modules to the Python interpreter.
These modules enable programmers to add to or customize their tools to
be more efficient.
Databases − Python provides interfaces to all major commercial
databases.
GUI Programming − Python supports GUI applications that can be
created and ported to many system calls, libraries and windows systems,
such as Windows MFC, Macintosh, and the X Window system of Unix.
Scalable − Python provides a better structure and support for large
programs than shell scripting.
Apart from the above-mentioned features, Python has a big list of good features,
few are listed below −
Development
10
Python design decisions. Python coding style is covered in PEP 8. Outstanding
PEPs are reviewed and commented on by the Python community and the
steering council.
11
team monitors the state of the code by running the large unit test suite during
development, and using the Build Bot continuous integration system.
The major academic conference on Python is P y Con. There are also special
Python mentoring programmers, such as P y ladies.
12
CHAPTER 6
HARDWARE DESCRIPTION
6.1 RASPBERRY PI PICO
Raspberry Pi Pico is a microcontroller board built on silicon designed by
Raspberry Pi. Microcontrollers are computers stripped back to their bare
essentials. You don’t use monitors or keyboards, but program them to take their
input from, and send their output to the input/output pins. Using these
programmable connections, you can light lights, make noises, send text to
screens, and much more.
The ultra-light, ultra-small Raspberry Pi Pico microcontroller board is ideal for
embedding inside digital projects. Raspberry Pi Pico represents two major firsts
for Raspberry Pi: it’s the first microcontroller development board from
Raspberry Pi; it’s also the first device to use a silicon chip designed by
Raspberry Pi’s in-house Application-Specific Integrated Circuit (ASIC) team.
Raspberry Pi Pico is a development board built around this powerful yet low-
cost RP2040 microcontroller.Like Raspberry Pi computers, Raspberry Pi Pico
features a pin header with 40 connections, along with a new debug connection
13
enabling you to analyse your programs directly from another computer
(typically by connecting it directly to the GPIO pins on a Raspberry Pi).
14
• 16kB on-chip cache and external Quad-SPI flash memory with eXecute In
Place (XIP)
Liquid crystal displays (LCDs) have materials which combine the properties of
both liquids and crystals. Rather than having a melting point, they have a
temperature range within which the molecules are almost as mobile as they
would be in a liquid, but are grouped together in an ordered form similar to a
crystal.
An LCD consists of two glass panels, with the liquid crystal material sand
witched in between them. The inner surface of the glass plates is coated with
transparent electrodes which define the character, symbols or patterns to be
displayed polymeric layers are present in between the electrodes and the liquid
crystal, which makes the liquid crystal molecules to maintain a defined
orientation angle. One each polarizer is pasted outside the two glass panels.
These polarizers would rotate the light rays passing through them to a definite
angle, in a particular direction.When the LCD is in the off state, light rays are
rotated by the two polarizers and the liquid crystal, such that the light rays come
out of the LCD without any orientation, and hence the LCD appears
transparent.. By using backlighting, reading is possible in the dark. The LCD’s
have long life and a wide operating temperature range. Changing the display
size or the layout size is relatively simple which makes the LCD’s more
customer friendly.
15
The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing
it, clearing its screen, setting the cursor position, controlling display etc. The
data register stores the data to be displayed on the LCD. The data is the ASCII
value of the character to be displayed on the LCD. Click to learn more about
internal structure of a LCD.
FEATURES
6)Abundant instruction set including clear display, cursor on/off, and character
blinking.
7)Compact and light weight for easy assembly to the host instrument.
16
alludes to the firmware as opposed to the improvement units. The firmware
utilizes the Lua scripting dialect
The NodeMCU (Node Micro Controller Unit) is an open source software and
hardware development environment that is built around a very inexpensive
System-on-a-Chip (SoC) called the ESP8266. The ESP8266 is designed and
manufactured by Express, contains all crucial elements of the modern computer:
CPU, RAM, networking (wi-fi), and even a modern operating system and SDK.
When purchased at bulk, the ESP8266 chip costs only $2 USD a piece. That
makes it an excellent choice for this system design. The NodeMCU aims to
simplify ESP8266 development. It has two key components.
ii. A development kit board that incorporates the ESP8266 chip on a standard
circuit board. The board has a built-in USB port that is already wired up with
the chip, a hardware reset button, Wi-Fi antenna, LED lights, and standard-sized
GPIO (General Purpose Input Output) pins that can plug into a bread board.
Figure 2 below shows the NodeMCU development board..
17
Figure:6.3. Node MCU
There are various platforms for IoT system one of them is NodeMCU. It
provides lower level control on devices which is known as firmware. These
control runs on ESP8266 Wi-Fi SoC, which hardware is based on ESP-12
module.Esp8266 is a Wi-Fi based communication system’s microchip. It uses
TCP/IP protocol for communicating with internet through router. It uses
802.11b/g/n slandered technology for Wi-Fi communication. It is a Tensilica
L106 32-bit RISC instruction unite microprocessor with 32 KB instruction
RAM, 32KB instruction Cache RAM, 80KB Data memory.ESP8266 (Pin) and
Arduino Mega’s (Pin) common pins are GND TX (0)-3.3V, RX (0), 3.3V. For
running the ESP8266 on Arduino platform we need to install ESP8266 package
in Arduino IDE. As a board is using, we need to give the additional board manager.
There are many types of power supply. Most are designed to convert high
voltage AC mains electricity to a suitable low voltage supply for electronics
circuits and other devices. A power supply can by broken down into a series of
blocks, each of which performs a particular function.
18
Each of the blocks is described in more detail below:
Power supplies made from these blocks are described below with a circuit
diagram and a graph of their output:
Transformer only
Transformer + Rectifier
The low voltage AC output is suitable for lamps, heaters and special AC
motors. It is not suitable for electronic circuits unless they include a rectifier
and a smoothing capacitor.
19
Transformer + Rectifier
The varying DC output is suitable for lamps, heaters and standard motors. It
is not suitable for electronic circuits unless they include a smoothing capacitor.
20
The regulated DC output is very smooth with no ripple. It is suitable for all
electronic circuits.
Further information: Transformer | Rectifier | Smoothing | Regulator
Transformer
Transformers convert AC electricity from one voltage to another with little loss
of power. Transformers work only with AC and this is one of the reasons why
mains electricity is AC.
The input coil is called the primary and the output coil is called the secondary.
There is no electrical connection between the two coils, instead they are linked
by an alternating magnetic field created in the soft-iron core of the transformer.
The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the
power in. Note that as voltage is stepped down current is stepped up.
The ratio of the number of turns on each coil, called the turns ratio, determines
the ratio of the voltages. A step-down transformer has a large number of turns
on its primary (input) coil which is connected to the high voltage mains supply,
and a small number of turns on its secondary (output) coil to give a low output
voltage.
6.5 TRANSFORMER
21
Transformer circuit symbol
When the IR receiver does not receive a signal, the potential at the inverting
input goes higher than that non-inverting input of the comparator IC (LM339).
Thus the output of the comparator goes low, but the LED does not glow. When
the IR receiver module receives signal to the potential at the inverting input
goes low. Thus the output of the comparator (LM 339) goes high and the LED
starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure
that minimum 10 mA current passes through the IR LED Devices like
Photodiode and normal LEDs respectively. Resistor VR2 (preset=5k ) is used to
adjust the output terminals. Resistor VR1 (preset=10k ) is used to set the
sensitivity of the circuit Diagram. Read more about IR sensors.
22
feedback. It may use an electromechanical mechanism, or electronic
components. Depending on the design, it may be used to regulate one or more
AC or DC voltages.
Feedback network
24
magnetic field produced by the coil and pulling the core towards the field. The
magnet is physically connected to a mechanical power switch, which opens as
the magnet moves into the field. As voltage decreases, so does the current,
releasing spring tension or the weight of the core and causing it to retract. This
closes the switch and allows the power to flow once more.If the mechanical
regulator design is sensitive to small voltage fluctuations, the motion of the
solenoid core can be used to move a selector switch across a range of
resistances or transformer windings to gradually step the output voltage up or
down, or to rotate the position of a moving-coil AC regulator.
More modern designs now use solid state technology (transistors) to perform
the same function that the relays perform in electromechanical regulators.
6.7 RELAY
INTRODUCTION:
By using a level sensor we will get the level of feed water. This signal controls
the feed water valve for maintaining a constant level. In our project we are
using an ON-OFF control valve i.e. solenoid valve. The advantage of using ON-
OFF control valve is
In this circuit transistor BC547 is used as a switch. The control signal is given to
the base terminal of the transistor. The collector is attached to the relay coil.
Relays are electromechanical devices. There are two types of relays.
1. Normally closed
2. Normally opened
We are using normally opened type relay. When the controller output from the
PC is high the transistor will be in the ON state, so relay is energized. When the
25
controller output from the PC is low the transistor will be in the OFF state, so
relay is de-energized the valve will open. When the relay is de-energized the
valve will close. So according to the controller output the valve will open or
close and thus level is maintained.
26
The analog Smoke/LPG/CO Gas Sensor (MQ2) module utilizes an MQ-2 as the
sensitive component and has a protection resistor and an adjustable resistor on
board. The MQ-2 gas sensor is sensitive to LPG, i-butane, propane, methane,
alcohol, Hydrogen and smoke. It could be used in gas leakage detecting
equipments in family and industry. The resistance of the sensitive component
changes as the concentration of the target gas changes.
27
Figure: 6.10 Fire Sensor
6.11 BUZZER:
28
various designs, it can generate different sounds like alarm, music, bell &
siren.The pin configuration of the buzzer is shown below.It includes two pins
namely positive and negative. The positive terminal of this is represented with
the ‘+’ symbol or a longer terminal. This terminal is powered through 6Volts
whereas the negative terminal is represented with the ‘- ‘symbol or short
terminal and it is connected to the GND terminal
6.12 FAN
29
CHAPTER – 7
CIRCUIT DIAGRAM
7.2 WORKING
30
7.3.SCREEN SHOTS
31
32
CHAPTER - 8
33
REFERENCES
34
[11]T. Murugan, Azha Periasamy, S. Murugananad. “Embedded based
industrial temperature monitoring system using GSM”. International Journal of
Computer Applications (0975-8887) volume 58-No. 19, November 2012.
[12]Onengiye M. Georgewill, Chukwunazo J. Ezeofor. “Design and
implementation of SMS-based industrial/homes gas leakage monitoring and
detection alarm System”. International Journal of Engineering Trends and
Technology (IJETT)-Volume 35 Number 9-May 2016.
35