Lora Based Industrial Environment Monitoring System
Lora Based Industrial Environment Monitoring System
Abstract:- With the advent of automation, the concept of Industrial automation relies on microcontrollers, which
protecting the business environment has become popular are widely used in embedded systems. From home appliances
and recognized in the business world. As the factory scale to car remotes, microcontrollers play an important role in
grows and the complexity of the process increases, modern technology. Precise measurement is essential for
advanced technology must be used in the device to automatic control and protection in a work environment.
measure and control many business processes Microcontrollers facilitate the encoding and decoding
simultaneously. Today, the trend is towards techniques required for digital communications.
miniaturization of instruments and greater precision and
accuracy. Reliable equipment and controls are crucial to Wireless communications, specifically LoRa
the safety and efficiency of any process. The goal of this technology, can transfer data from the production site to a
project is to gain knowledge about the most important central monitoring station. The system reads the meter and
aspects of the job to improve safety. measurement data and transmits the data through the LoRa
transceiver. This allows two-way communication, making it
The system includes the use of LORA to monitor the easy to quickly monitor and control.
business environment. In this project, we use Lora
communication to send data, and the receiving end of the Radio communication uses electromagnetic waves as
monitoring station receives the data from the sending the basis of wireless communication. In this project, digital
end. In an emergency, when you press the emergency communication with efficiency and reliability advantages
button on the monitoring station, a message is sent to the was adopted. The system transmits high-quality digital data
work unit by LORA. Since LORA is a transceiver, two- by changing the radio frequency.
way communication is possible in the project.
Temperature sensors, gas sensors and fire sensors are The design operating frequency of this communication
used to monitor the environment of business units. is approximately 433MHz. Digital data is superimposed on
Temperature sensors are used in industry to calculate the carrier wave and transmitted as a modulated signal.
temperature and provide information to Finally, when data is received, the data is demodulated,
microcontrollers. Gas sensors are used in industry to decoded and compared to the database. Any suspicious
detect gas leaks. Fire sensors are used to detect fire and activity, such as making noise or displaying unusual
send the information to the monitoring station. This information, will trigger the alarm.
product is delivered by LORA.
Overall, this project integrates embedded systems and
Keywords:- LoRa Communication, Arduino, Monitoring. wireless communication technologies to create a powerful
centralized factory monitoring system. It increases efficiency
I. INTRODUCTION and security in the business environment by automating data
collection and transmission. The detailed description in the
The project aims to create a business automation central report shows the description of physical products, functions
factory monitoring system focused on data collection, storage and practical applications in the automation industry.
and transmission. The system uses an Arduino configuration.
microcontroller and LoRa wireless communications to
monitor and control multiple factory parameters. II. METHODOLOGY
Collecting information from the manufacturer in the The majority of actual physical quantities, including
automation industry is important for optimization and voltage, current, and temperature, are available in analog
security. This project only solves three things: data collection, form. Even though an analog signal accurately represents a
storage/display, and wireless communication. The true physical characteristic, noise superimposition, as in the
microcontroller used by the Arduino ATMEGA 328 chip case of amplitude modulation, makes it impossible to process,
does the main work by taking data from the factory store, or transmit the analog signal without significantly
parameters and displaying them on the LCD panel. increasing inaccuracy. Therefore, it is frequently convenient
to express this variable in digital form for processing,
transmission, and storage needs. It improves the process employed. Compared to integrating type converters, the
automation's precision. successive approximation and comparator type are often
quicker but less precise. The flash (comparator) kind costs
At a certain frequency rate, the transducer's analog more for a higher level of precision. Applications where
signal is sampled. The sampled signal needs to be kept steady conversion precision is crucial, such digital meters, panel
while the ADC converts it. This means that a sample and hold meters, and monitoring systems, employ the integrated type
circuit integrated into the same device must come before the converter. In this instance, the ADC and microcontroller are
ADC. A binary digit sequence is the ADC's output. The interfaced with the goal of reading the data acquired from the
controller employed in this project work is used to carry out ADC and executing the control action in accordance with it.
the desired control algorithm's numerical computations. The following is a basic overview of microcontrollers and
Since the Arduino controller has an integrated ADC, the control theory as it relates to ADCs.
sensor output is immediately sent into the controller's ADC
pins. As described in the abstract and according to the
program prepared, here the microcontroller controls only
The integrator type and sequential approximation are three channels that is temperature sensing channel, gas
the most often utilized ADCs. In applications where monitoring channel and fire sensing channel. The following
conversion speed is crucial, including data loggers and is the description of individual sensing circuits.
instrumentation, successive approximation ADCs are
Flame Sensor
The project includes an IR diode module for fire
detection, using IR sensor technology to detect the unique
spectral patterns emitted by hot fire-related gases in the IR
region. Weighing only 5 grams, this compact module is easy
to install and responsive.
When a fire is detected, the module generates a high Fig 4 MQ2 GAS Sensor
output signal that can be used to trigger appropriate actions,
such as wireless transmission of information to a monitoring LCD
unit using LoRa technology. In addition, the built-in LED A serial computer bus, as seen in Figure 5, is a small
provides a visual indication of fire detection, increasing user interface that links processors and microcontrollers to
awareness. peripheral integrated circuits (ICs) operating at lower
speeds. This bus is essential to our project since it makes it
With a fast response time of only 1 second, the IR diode possible for the LCD display and Arduino microcontroller to
module ensures early detection of fires and enables quick and connect.
effective responses to potential fire hazards.
LoRa
LoRa, or long-range wireless technology, is intended
for low-power, long-distance communication between
gateways and sensors in Internet of Things (IoT) and
Fig 3 Flame Sensor machine-to-machine (M2M) applications. It uses spread-
spectrum technology with frequency-modulated chirp for
Gas Sensor enhanced receiver sensitivity and works in unlicensed radio
MQ2 is a versatile sensor that exhibits strong spectrum channels.
sensitivity for a wide range of gases. This device requires a
consistent 5V power supply to function; the voltage can vary LoRaWAN, built upon LoRa technology by the LoRa
according on the model. The MQ2 is ideal for residential gas Alliance, is an open-source LPWAN (Low Power Wide Area
or smoke detectors because it can detect methane, propane, Network) protocol specification. It enables the creation of
and butane. IoT networks with bi-directional secure communication,
interoperability, and mobility, supporting accurate
The stable working time of MQ2 is very short, and its localization.
properties after long working time are stable and excellent.
The MQ2 is sensitive to "noise gases", greatly reducing the Introduced by the French start-up Cycle in 2010 and
problem of false alarms. The most effective use of the MQ2 later acquired by SEMTECH, LoRa offers exceptional
is in power generation, where it controls the voltage at a sensitivity and coverage, reaching up to -148 dBm with a
constant value of 5V. Due to its wide range of applications, diffusion factor of 12. It typically provides a range of 3 km
this power factor is useful when determining the design. This in urban areas and 14 km in rural areas, with battery life
makes the use of MQ2 a unique industry opportunity to extending up to 10 years.
produce low-energy, reliable fuel cells.
LoRa modules offer different classes (A, B, and C) The following new features are included in the board's
based on power consumption and delay capabilities, catering revision 3: 1.0 Pinout: two more new pins, the IOREF, are
to various IoT device requirements. These modules can positioned next to the RESET pin and the SDA and SCL pins
connect to millions of end devices, supporting applications that were introduced to allow the shields to adjust to the
such as smart metering, inventory tracking, and automotive voltage supplied by the board. Future shields will work with
industry needs. the Arduino Due, which runs on 3.3V, as well as boards that
use the AVR, which runs on 5V. A disconnected pin
Ultra-long-range spread spectrum communication, designated for future use is the second one. A more robust
strong interference immunity, and low current consumption RESET circuit. An Atmega 16U2 in instead of an 8U2.
are features of Semtech's LoRa transceivers. Sensitivities of
-137dBm and -148dBm are possible because to the "Uno" is an Italian word for one, and it was chosen to
proprietary modulation approach, which makes them perfect commemorate the impending introduction of Arduino 1.0.
for IoT applications that need resilience and range. Going future, the Arduino reference versions will be the Uno
and version 1.0. The Uno is the most recent in a line of USB
The project utilizes the SX1278 Ra-02 LoRa module Arduino boards and the platform's reference model; view the
operating at 433MHz. It's essential to ensure compliance index of Arduino boards for a comparison with earlier
with local regulations regarding frequency usage, as LoRa iterations.
modules are available in different frequency ranges
(433MHz, 915MHz, 868MHz). Additionally, LoRa modules Overview:
can be purchased as standalone units or integrated chips.
ATmega328 microcontroller;
Arduino UNO 5V operating voltage;
Using the ATmega328 as its foundation, the Arduino 7–12V suggested input voltage;
Uno is a microcontroller board. A 16 MHz ceramic 6–20V limited input voltage;
resonator, 6 analog inputs, a USB port, a power jack, an 14 digital I/O pins (six of which give PWM output)
ICSP header, a reset button, and 14 digital input/output pins
Pins 6 for analog input;
are all included on it. This microcontroller comes with all the
40 mA for DC current per I/O pin;
necessary components to operate it; all you need to do is use
50 mA for DC current per 3.3V pin;
a USB cable to connect it to a computer or an AC-to-DC
adapter or battery to power it. With regard to using the FTDI 32 KB of flash memory (ATmega328), of which 0.5 KB
USB-to-serial driver chip, the Uno is different from all is used by the bootloader;
previous boards. Rather, it has the Atmega16U2 (or 2 KB for SRAM; and 1 KB for EEPROM
Atmega8U2 up to version R2) configured as a serial-to-USB Clock Speed 16 MHz
converter using programming. To facilitate DFU mode
booting, the Uno board revision 2 has a resistor that pulls the
8U2 HWB line to ground.
IV. IMPLEMENTATION
{lcd.setCursor(0,1);}} RX:
lcd.setCursor(0,0); //3.3V-3.3V,GND-GND,NSS-D10,DIO0-D2,
lcd.print("danger "); SCK-D13,MISO-D12,MOSI-D11,RST-D9
lcd.setCursor(0,1); #include <LiquidCrystal.h>
lcd.print(" "); LiquidCrystal lcd(A1,A0,6,5,4,3);
while(1);} #include <SPI.h>
#include <LoRa.h>
if(digitalRead(GAS)==LOW) const int key=8;
const int BUZZ=7;
{lcd.setCursor(4,1); int cnt=0;
lcd.print("YES"); char b[200];
Serial.println("HARMFUL GASES!"); int i=0;
for(counter=0;counter<=10;counter++) int counter=0;
void setup()
{Serial.print("Sending packet:"); {lcd.begin(16, 2);
Serial.println(counter); lcd.setCursor(0,0);
LoRa.beginPacket(); lcd.print("WELCOME ");
LoRa.print("!HARMFUL GASES Detected"); pinMode(key,INPUT);
LoRa.endPacket();}} pinMode(BUZZ,OUTPUT);
else digitalWrite(BUZZ,LOW);
digitalWrite(key,HIGH);
{lcd.setCursor(4,1); Serial.begin(9600);
lcd.print("NO "); Serial.println("ready");
Serial.println("NO HARMFUL GASES");} if (!LoRa.begin(433E6)) {
if(digitalRead(FIRE)==HIGH) Serial.println("Starting LoRa failed!");
{lcd.setCursor(5,0); lcd.setCursor(5,1);
lcd.print("YES"); lcd.print("error");
Serial.println("FIRE DETECTED"); while (1);}}
for(counter=0;counter<=10;counter++) void loop()
{Serial.print("Sending packet: "); {lcd.setCursor(0,0);
Serial.println(counter); int packetSize = LoRa.parsePacket();
LoRa.beginPacket(); if (packetSize)
LoRa.print("ALERT!FIRE DETECTED"); {Serial.println("Received packet '");
LoRa.endPacket();}} digitalWrite(BUZZ,HIGH);
else while (LoRa.available())
{lcd.setCursor(5,0); {b[cnt]=LoRa.read();
lcd.print("NO "); lcd.print((char)b[cnt]);
Serial.println("NO FIRE");} cnt=cnt+1;
t = dht.readTemperature(); if(cnt==16)
{lcd.setCursor(0,1);}}
Serial.print("TEMPERATURE:"); delay(5000);
Serial.print(t); digitalWrite(BUZZ,LOW);
Serial.println('C'); cnt=0;
for(i=0;i<50;i++)
lcd.setCursor(13,0);
lcd.print(t); {b[i]=0;}
lcd.setCursor(15,0); i=0;}
lcd.print("C ");
if(t>36) if(digitalRead(key)==LOW)
{for(counter=0;counter<=10;counter++) {for(counter=0;counter<=10;counter++)
{Serial.print("Sending packet: "); {Serial.print("Sending packet: ");
Serial.println(counter); Serial.println(counter);
LoRa.beginPacket(); LoRa.beginPacket();
LoRa.print("T:"); LoRa.print("DANGER!");
LoRa.print(t); LoRa.endPacket();}}}
LoRa.print("C,HIGH TEMPERATURE");
LoRa.endPacket();}}}