0% found this document useful (0 votes)
170 views

B10 IOT Based Industrial Monitoring and Protection System

The project uses an ESP32 microcontroller to wirelessly monitor industrial sensors and send the data to a cloud server. Sensors like smoke, humidity, and temperature sensors detect parameters and send data to the cloud via WiFi. Users can access the sensor readings graphically from the cloud server using MATLAB. An email alert system notifies users if critical sensor values are detected.

Uploaded by

kalemula sahithi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views

B10 IOT Based Industrial Monitoring and Protection System

The project uses an ESP32 microcontroller to wirelessly monitor industrial sensors and send the data to a cloud server. Sensors like smoke, humidity, and temperature sensors detect parameters and send data to the cloud via WiFi. Users can access the sensor readings graphically from the cloud server using MATLAB. An email alert system notifies users if critical sensor values are detected.

Uploaded by

kalemula sahithi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

IOT BASED INDUSTRIAL MONITORING AND PROTECTION

SYSTEM

Abstract:
A remote monitoring, control and intelligent are one of the most important criteria for maximizing
process plant availability production. With the development of modern industry, the requirement
for industrial monitoring system is getting higher. A system is required to be able to acquire and
process real time data. It is also required to control related instruments to change those
environmental factors and monitoring in long distance so that it realizes modern, intelligent and
accurate control. The main aim of the project is to develop an embedded web system using ARM11
processor and real time operating system, which enables data acquisition and status monitoring
with the help of any standard web browser. Determining the dynamic behavior of Industrial
parameters require dense development of sensor. The wired Industrial parameters monitoring
system of highly expansive and always needs large installation space to deploy. This project
describes wireless sensor network which consume low power and less space. The wireless sensor
network developed to detect physical parameters of industry continuously and send the sensor
information to internet cloud server via TCP/IP protocol. The user can access graphical view of
various sensor from cloud server. The cloud server utilizes MATLAB program to give graphical
representation of WSN data. On cloud server, user with server account can access real time WSN
data and view graphically using MATLAB. In this project an email alert also developed. When
WSN detect critical values of sensor data to predict upcoming accident and fault at machineries in
industry. The user can also access WSN for announcement when damage and upcoming accidents
predicted.
CHAPTER 1
INTRODUCTION
Technology advancement is a never-ending process; thus, we must be well-equipped and informed
about new developments. Day-to-Day human life has gotten more convenient as a result of these
technological improvements. Automation has evolved into a must need. The internet today
provides access to all data and systems, and web technology is continually expanding. A network
interface enables remote management and control of embedded devices using a web-based
embedded system. Controlling Internet of Things (IoT) devices is done through web controllers,
often known as E-controllers. A web controller, often known as an Econtroller, is a set of
embedded systems and software stacks that is the most extensively used method of web
development in the world. Instead of employing large server systems for monitoring,
administering, and handling data, remote login and monitoring using a distributed web control
system produced using web pages generated in web applications are increasingly used instead of
big server systems for monitoring, administering, and processing data. Web control systems that
leverage IoT has three characteristics: energy savings, comfort, and efficiency. Our main objective
is to adapt the Internet control system to the Internet of Things, allowing users to access the
application over the Internet from anywhere in the globe. IoT monitoring allows you to analyze
dynamic systems and analyze billions of events and alerts. IoT monitoring also enables you to
bridge the gap between devices and businesses by collecting and analyzing a wide range of IoT
data at a web scale across connected devices, consumers, and apps. The industrial monitoring
system connects itself with the open-source app Blynk. Blynk connects itself with esp8266 for
virtual control of the devices along with getting updates. The Arduino Mega is the brain of the
project connected to the component and operates them with the code embedded in it. Sensors like
smoke sensors, humidity, and temperature sensors are used to monitor the surroundings of the
machine.

LITEARTURE SURVEY:

Safety is the utmost priority of all industrial sectors as even minimal malfunctions in the
mechanisms can lead to unavoidable deteriorating circumstances. Human monitoring system
although with good efficiency has its drawbacks as turbulences in the accuracy rate in checking and
monitoring mechanisms are inevitable. Total prevention of accidents in industrial workspaces is
impossible but preventive measures to near perfection in our motive are achievable. A specified
system with diverse technical devices such as sensor-based network integrated monitoring devices
lowers the random and human errors produced in the validation process. Common factors such as
gas leakage, fire explosion, and unauthorized entry that lead to inconveniences can be detected
with optimum precision levels to avoid these disastrous scenarios. The modern automation system
provides the mechanism with desired parametric sensors to analyse the performable and structural
states with historic component data and execute the required output based on the analysis made by
the sensors. Instrumentational transducers are incorporated to accompany supervision in fault
detection in mechanical parameters and accumulative data is transferred to the control system to
structure an algorithm and dissipate the required output actions, thus enabling a whole-time
industrial surveillance system to prevent accidents and maintain an efficient industrial environment
CHAPTER 2
EXISTING AND PROPOSED SYSTEM
Existing system:

In previous projects we have not seen any projects that protect the lab. Due to the temperature and
harmful gases release in to the lab may effect the human life in danger and may lead to death.to
avoid such situation we are implementing this project.

Proposed system:

The manufacturing sectors or/and industrial sectors are very common sectors that develop to
fulfill the demands of industries, such as Oil, Gas, Water/Wastewater, Electric, and others. In past
two decades, there have been several enhancements accounted in term of remote information
carries, and system monitoring and control, through integration with IP-centric network
technology. Moreover, nowadays, the uses of Internet of things smart technology with the
existing network-based industrial infrastructures, several enhancements have made that enables
more efficiency, system scalability, performance accuracy, capital saving and others.
BLOCK DIAGRAM:
Chapter 3
HARDWARE CONSTRAINTS

ESP32

ESP32 is a low-cost, low-power Microcontroller with an integrated Wi-Fi and Bluetooth. It is the
successor to the ESP8266 which is also a low-cost Wi-Fi microchip albeit with limited vastly
limited functionality.

It is an integrated antenna and RF balun, power amplifier, low-noise amplifiers, filters, and power
management module. The entire solution takes up the least amount of printed circuit board area.
This board is used with 2.4 GHz dual-mode Wi-Fi and Bluetooth chips by TSMC 40nm low power
technology, power and RF properties best, which is safe, reliable, and scale-able to a variety of
applications.
ESP32 Spec List

ESP WROOM32, Dual-Core 32-bit LX6 microprocessor

 ROM: 448 KB, SRAM: 520 KB, Support up to: 16MB flash

 Built-in CP21XX USB-to-UART(serial) Bridge

 Wi-Fi: 802.11b/g/n/e/i

 Bluetooth: v4.2 BR/EDR and BLE

 2 × 8-bit DACs
o [D26][D25]

 9 × touch sensors Note: Touch sensor 1 is [D0]. However, it’s not available as a pin in this
particular ESP32 development board (version with 30 GPIOs). GPIO 0 is available on the
version with 36 pins.

o [D13][D12][D14][D24][D33][32]
o [D15][D2][D4]

 Internal Temperature Sensor

ESP32 Board Guide


The ESP32 supports three types of I/O modes with each GPIO Pin: Digital, Analog and Internal
Sensors

Analog: Used to send/receive analog data using the following functions:

# examples based on Arduino IDE


analogRead();
analogWrite();

Digital: Used to send/receive digital data using the following functions:

# examples based on Arduino IDE


digitalRead();
digitalWrite();

Internal Sensors: This mode allows us to fetch internal sensor data from the ESP32 itself. The
three sensors available are as follows:

 Internal Temperature Sensor


 Hall Effect Sensor
 Touch Sensor

These sensors can be accessed by the following functions:

# examples based on Arduino IDE


temprature_sens_read()
hallRead()
touchRead()

ESP32 DevKitC Pinout Configuration

Pin Category Pin Name Details


Power Micro-USB, 3.3V, 5V, GND Micro-USB: ESP32 can be powered through
USB port

5V: Regulated 5V can be supplied to this pin


which is we be again regulated to 3.3V by on
board regulator, to power the board.

3.3V: Regulated 3.3V can be supplied to this pin


to power the board.

GND: Ground pins.

Enable En The pin and the button resets the microcontroller.

Analog Pins ADC1_0 to ADC1_5 and Used to measure analog voltage in the range of
ADC2_0 to ADC2_9 0-3.3V.

12-bit 18 Channel ADC

DAC pins DAC1 and DAC2 Used for Digital to analog Conversion

Input/Output GPIO0 to GPIO39 Totally 39 GPIO pins, can be used as input or


Pins output pins. 0V (low) and 3.3V (high). But pins
34 to 39 can be used as input only

Capacitive T0 to T9 These 10 pins can be used as touch pins normally


Touch pins used for capacitive pads

RTC GPIO RTCIO0 to RTCIO17 These 18 GPIO pins can be used to wake up the
pins ESP32 from deep sleep mode.

Serial Rx, Tx Used to receive and transmit TTL serial data.


External All GPIO Any GPIO can be used to trigger an interrupt.
Interrupts

PWM All GPIO 16 independent channel is available for PWM


any GPIO can be made to work as PWM through
the software

VSPI GPIO23 (MOSI), Used for SPI-1 communication.


GPIO19(MISO),
GPIO18(CLK) and GPIO5 (CS)

HSPI GPIO13 (MOSI), Used for SPI-2 communication.


GPIO12(MISO),
GPIO14(CLK) and GPIO15
(CS)

IIC GPIO21(SDA), GPIO22(SCL) Used for I2C communication.

AREF AREF To provide a reference voltage for input voltage.

ESP32 Technical Specifications

Microprocessor TensilicaXtensa LX6

Maximum Operating Frequency 240MHz

Operating Voltage 3.3V

Analog Input Pins 12-bit, 18 Channel

DAC Pins 8-bit, 2 Channel


Digital I/O Pins 39 (of which 34 is normal GPIO pin)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

SRAM 520 KB

Communication SPI(4), I2C(2), I2S(2), CAN, UART(3)

Wi-Fi 802.11 b/g/n

Bluetooth V4.2 – Supports BLE and Classic Bluetooth

Input/output

There are totally 39 digital Pins on the ESP32 out of which 34 can be used as GPIO and the
remaining are input only pins. The device supports 18-channels for 12-bit ADC and 2-channel for
8-bit DAC. It also has 16 channels for PWM signal generation and 10 GPIO pins supports
capacitive touch features. The ESP32 has multiplexing feature, this enables the programmer to
configure any GPIO pin for PWM or other serial communication through program. The ESP32
supports 3 SPI Interface, 3 UART interface, 2 I2C interface, 2 I2S interface and also supports CAN
protocol.

 3 UART interface: The ESP32 supports 3 UART interface for TTL communication. This would
require 3 sets of Rx and Tx pins. All the 6 pins are software configurable and hence any GPIO
pin can be programmed to be used for UART.
 External Interrupt: Again since the ESP32 supports multiplexing any GPIO pin can be
programmed to be used as an interrupt pin.
 GPIO23 (MOSI), GPIO19(MISO), GPIO18(CLK) and GPIO5 (CS): These pins are used for
SPI communication. ESP32 supports two SPI, this is the first set.
 GPIO13 (MOSI), GPIO12(MISO), GPIO14(CLK) and GPIO15 (CS): These pins are used
for SPI communication. ESP32 supports two SPI, this is the second set.
 GPIO21(SDA), GPIO22(SCL): Used for IIC communication using Wire library.
 Reset Pin: The reset pin for ESP32 is the Enable (EN) pin. Making this pin LOW, resets the
microcontroller.

Powering the ESP32

There are total three ways by which you can power your ESP32 board-

Micro USB Jack: Connect the mini USB jack to a phone charger or computer through a cable and
it will draw power required for the board to function

5V Pin: The 5V pin can be supplied with a Regulated 5V, this voltage will again be regulated to
3.3V through the on-board voltage regulator. Remember ESP32 operated with 3.3V only.

3.3V Pin: If you have a regulated 3.3V supply, then you can directly provide this to the 3.3V pin of
the ESP32.

Applications

 Prototyping of IoT devices


 Low power battery operated applications
 Network projects
 Easy to use for beginner level DIYers and makers.
 Projects requiring Multiple I/O interfaces with Wi-Fi and Bluetooth functionalities.

Fire sensor:
A sensor which is most sensitive to a normal light is known as a flame sensor. That’s why
this sensor module is used in flame alarms. This sensor detects flame otherwise
wavelength within the range of 760 nm – 1100 nm from the light source. This sensor can
be easily damaged to high temperature. So this sensor can be placed at a certain
distance from the flame. The flame detection can be done from a 100cm distance and the
detection angle will be 600. The output of this sensor is an analog signal or digital signal.
These sensors are used in fire fighting robots like as a flame alarm.

Smoke sensor:

A smoke detector is a device that senses smoke, typically as an indicator of fire. Smoke
detectors are usually housed in plastic enclosures, typically shaped like a disk about 150
millimetres (6 in) in diameter and 25 millimetres (1 in) thick, but shape and size vary.
Smoke can be detected either optically (photoelectric) or by physical process (ionization).
Detectors may use one or both sensing methods. Sensitive alarms can be used to detect
and deter smoking in banned areas. Smoke detectors in large commercial and industrial
buildings are usually connected to a central fire alarm system.

Buzzer:
A buzzer or beeper is an audio signaling device,[1] which may
be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of
buzzers and beepers include alarm devices, timers, train and confirmation of user input
such as a mouse click or keystroke.

CHAPTER 4
SOFTWARE CONSTRAINTS

INTRODUCTION TO ARDUINOIDE

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and


software. It consists of a circuit board, which can be programmed (referred to as a
microcontroller) and a ready-made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physicalboard.

KEY FEATURES OF ARDUINOIDE

Arduino boards are able to read analog or digital input signals from different sensors and
turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and
many other actions.
You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).

Unlike most previous programmable circuit boards, Arduino does not need an extra piece
of hardware (called a programmer) in order to load a new code onto the board. You can
simply use a USBcable.

Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn
to program.

Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into a more accessible package.
After learning about the main parts of the Arduino UNO board, we are ready to learn how
to set up the Arduino IDE. Once we learn this, we will be ready to upload our program onthe
Arduino board.

ARDUINO DATATYPES

Data types in C refers to an extensive system used for declaring variables or functions of
different types. The type of a variable determines how much space it occupies in the storage
and how the bit pattern stored isinterpreted.
The following table provides all the data types that you will use During Arduino
programming.
Void

The void keyword is used only in function declarations. It indicates that the function is
expected to return no information to the function from which it was called.

Example:

Void Loop ( )

// rest of the code


}

Boolean

A Boolean holds one of two values, true or false. Each Boolean variable occupies one
byte of memory.

Example:

Boolean state= false ; // declaration of variable with type boolean and initialize it
withfalse.

Boolean state = true ; // declaration of variable with type boolean and initialize it
withfalse.

Char

A data type that takes up one byte of memory that stores a character value. Character
literals are written in single quotes like this: 'A' and for multiple characters, strings use double
quotes: "ABC".

However, characters are stored as numbers. You can see the specific encoding in the
ASCII chart. This means that it is possible to do arithmetic operations on characters, in
whichthe ASCII value of the character is used. For example, 'A' + 1 has the value 66, since
theASCII value of the capital letter A is65.

Example:

Char chr_a = ‘a’ ;//declaration of variable with type char and initialize it with
character a.

Char chr_c = 97 ;//declaration of variable with type char and initialize it with
character 97
Unsigned char

Unsigned char is an unsigned data type that occupies one byte of memory. The
unsigned char data type encodes numbers from 0 to 255.

Example:

Unsigned Char chr_y = 121 ; // declaration of variable with type Unsigned char
and initialize it with character y

Byte
A byte stores an 8-bit unsigned number, from 0 to 255.
Example:
byte m = 25 ;//declaration of variable with type byte and initialize it with 25

int

Integers are the primary data-type for number storage. int stores a 16-bit (2-byte) value.
This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of
(2^15) - 1).

The int size varies from board to board. On the Arduino Due, for example, an intstores a
32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647 (minimum value
of -2^31 and a maximum value of (2^31) - 1).

Example:

int counter = 32 ;// declaration of variable with type int and initialize it with 32.

Unsigned int

Unsigned int’s (unsigned integers) are the same as int in the way that they store a 2
byte value. Instead of storing negative numbers, however, they only store positive values,
yielding a useful range of 0 to 65,535 (2^16) - 1). The Due stores a 4 byte (32-bit) value,
ranging from 0 to 4,294,967,295 (2^32 -1).

Example:

Unsigned int counter= 60 ; // declaration of variable with type unsigned int and
initialize it with 60.
Word

On the Uno and other ATMEGA based boards, a word stores a 16-bit unsigned
number. On the Due and Zero, it stores a 32-bit unsigned number.

Example

word w = 1000 ;//declaration of variable with type word and initialize itwith 1000.

Long Long variables are extended size variables for number storage, and store 32 bits
(4 bytes), from 2,147,483,648 to 2,147,483,647.

Example:

Long velocity= 102346 ;//declaration of variable with type Long and initialize it
with 102346
Unsigned long

Unsigned long variables are extended size variables for number storage and store 32
bits (4 bytes). Unlike standard longs, unsigned longs will not store negative numbers, making
their range from 0 to 4,294,967,295 (2^32 - 1).

Example:
Unsigned Long velocity = 101006 ;// declaration of variable with type Unsigned Long
and initialize it with 101006.

Short

A short is a 16-bit data-type. On all Arduinos (ATMega and ARM based), a short
stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -
2^15 and a maximum value of (2^15) -1).

Example:

short val= 13 ;//declaration of variable with type short and initialize it with 13
Float

Data type for floating-point number is a number that has a decimal point. Floating-point
numbers are often used to approximate the analog and continuous values because they have
greater resolution than integers.

Floating-point numbers can be as large as 3.4028235E+38 and as low as 3.4028235E+38.


They are stored as 32 bits (4 bytes) of information.

Example:

float num = 1.352;//declaration of variable with type float and initialize it with

1.352.

Double

On the Uno and other ATMEGA based boards, Double precision floating-point
number occupies four bytes. That is, the double implementation is exactly the same as the
float, with no gain in precision. On the Arduino Due, doubles have 8-byte (64 bit) precision

Example:
double num = 45.352 ;// declaration of variable with type double and initialize it with
45.352.

STEPS TO UPLOAD THE PROGRAM IN ARDUINOBOARD

In this section, we will learn in easy steps, how to set up the Arduino IDE on our
computer and prepare the board to receive the program via USB cable.

Step 1: First you must have your Arduino board (you can choose your favorite board) anda
USB cable.
In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega2560, or
Diecimila, you will need a standard USB cable (A plug to B plug), the kind youwould connect
to a USB printer as shown in the following image.

Fig 4.1 USB Cable

Step 2: Download Arduino IDE Software.

You can get different versions of Arduino IDE from the Download page on the
Arduino Official website. You must select your software, which is compatible with your
operating system (Windows, IOS, or Linux). After your file download is complete, unzip the
file.
Step 3: Power up your board.

The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power
from either, the USB connection to the computer or an external power supply. If you are using
an Arduino Diecimila, you have to make sure that the board is configured
todrawpowerfromtheUSBconnection.Thepowersourceisselectedwithajumper,a

small piece of plastic that fits onto two of the three pins between the USB and power
jacks. Check that it is on the two pins closest to the USB port. Connect the Arduino board to
your computer using the USB cable. The green power LED (labeled PWR) should glow.

Step 4: Launch Arduino IDE.

After your Arduino IDE software is downloaded, you need to unzip the folder. Inside
the folder, you can find the application icon with an infinity label (application.exe).
Doubleclick the icon to start theIDE.
Step 5: Open your first project.

Once the software starts, you have two options: Create


a new project.

Open an existing project example.

To create a new project, select File -->New.To open


To open an existing project example, select File -> Example -> Basics -> Blink.

Here, we are selecting just one of the examples with the name Blink. It turns the LED on
and off with some time delay. You can select any other example from the list.

Step 6: Select your Arduino board.

To avoid any error while uploading your program to the board, you must select the
correct Arduino board name, which matches with the board connected to your computer.

Go to Tools -> Board and select your board


Here, we have selected Arduino Uno board according to our tutorial, but you must
select the name matching the board that you are using

Step 7: Select your serial port.

Select the serial device of the Arduino board. Go to Tools ->Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial
ports). To find out, you can disconnect your Arduino board and re-open the menu, the entry
that disappears should be of the Arduino board. Reconnect the board and select that serialport.
Step 8: Upload the program to your board.

Before explaining how we can upload our program to the board, we mustdemonstrate
the function of each symbol appearing in the Arduino IDE toolbar.
A- Used to check if there is any compilation error.
B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.

D- Used to directly open one of the example sketch.


E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial
data to theboard.

Now, simply click the "Upload" button in the environment. Wait a few seconds; you will see
the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.

Note: If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the
ArduinoSoftware.
ARDUINO PROGRAMMINGSTRUCTURE

In this chapter, we will study in depth, the Arduino program structure and we will
learn more new terminologies used in the Arduino world. The Arduino software is open-
source. The source code for the Java environment is released under the GPL and the C/C++
microcontroller libraries are under the LGPL.

Sketch: The first new terminology is the Arduino program called “sketch”.
Structure
Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software
program, step by step, and how we can write the program without any syntax or
compilation error.
Let us start with the Structure. Software structure consist of two main functions:
Setup( ) function
Loop( ) function

You might also like