Chapter - 1: 1.1 Purpose
Chapter - 1: 1.1 Purpose
CHAPTER -1
INTRODUCTION
The railway system is the most commonly used transportation mode in India. It is also one of
those modes of transport that faces a lot of challenges due to human errors. There are mainly
two types of level crossing they are manned level crossing and unmanned level crossing.
When we go through the daily newspapers we come across many railway accidents
occurring at unmanned railway crossings obstacle on track system. This is mainly due to
the carelessness in manual operations or lack of workers. In order to avoid the human
errors that could occur during the operation of gates, the proposed system introduces the
concept of railway gate automation.
The existing system involves the manual gate operation by the gate keepers based on the
signals received from the control room. But the rate of manual error that could occur at
these level crosses are high because they are unsafe to perform without actual knowledge
about the train time table. The human errors such as delay in informing the gatekeeper
about the arrival of the train, delay in the gate operation by the gate keeper, obstacle stuck
in the level cross etc. leads to the increasing rate of accidents at the level cross.
Thus the railway gate automation system aims to deal with two things. It reduces the total
time taken for the gate operation at the level cross and also ensures the safety of the
passengers at the level cross during when the train passes. The reduction in the direct
human intervention during the gate operation in turn helps to reduce the collision and
accidents at the level cross. Since the gate operations are automated based on the sensors,
the time for which the gate is closed is less.
Sensors are fixed at 1km on both sides of the gate. When sensor1 gets activated, the gate
motor is turned on in one direction and the gate is closed and stays closed until the train
crosses the gate. When sensor2 gets activated motor turns in opposite direction and gate
opens and motor stops. Buzzer will immediately sound at the sensor1 activation and gate
will close after 5 seconds, so giving time to drivers to clear gate area in order to avoid
trapping between the gates and stop sound after the train has crossed.
1.1 PURPOSE
This project is aimed at developing an IOT device which can automate the railway gate system in
real time. This automation gate system makes the gate close and open system automatic with the
help of sensors. The main purpose of this automation is to reduce the accidents and traffic jam at
railroad crossing. This is also used in unmanned railway gate in order to avoid accidents.
1
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
1.2 SCOPE
This project is mainly used in unmanned railway gates. This railway gate system doesn’t need
any man power to operate gates. It warns people about occurrence of fire accident in train.
1.3 OVERVIEW
The automatic railway gate system uses two IR sensors in which IR1 senses the arrival of train
and gives warning signal and then closes the railway gate by using gear motor. IR2 senses the
departure of train and then opens the gate by using gear motor. Smoke sensor is also used which
is used in detecting the smoke intensity in train when there is any fire accidents. It detects the
amount of smoke if it is greater than actual range then it initiates alarm sound indicating the
occurrence of fire accidents in train. The Arduino sketch is written, compiled and loaded to the
Arduino board using Arduino IDE.
2
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER - 2
LITERATURE SURVEY
This paper deals mainly with the automation in unmanned and manned railway crossings. In
recent days the accidents in railway level crossing are increasing. There are two types of level
crossing Manned and Unmanned. The accidents occurring in both level crossings are very
severe. Our work uses simple mechanical and electrical components to control the railway gate.
The Infrared detector which is placed at a few distances away from the gate detects the train and
sends the signal to the controller. From the controller the signal is send to the timer which is
connected to LED display near the gate. Timer displays the time remaining for closing or
opening of the gate according to the necessary situation. The power is transmitted from the
controller to the motor which is connected to the L-shaped cylinder through the pinion of rack
and pinion arrangement. Thus our paper presents a highly secured and safe automated level
crossing at low cost, which requires no human monitoring.
In the rapidly flourishing countries accidents in the unmanned level crossings and due to obstacle
on track are increasing day by day. No fruitful steps have been taken so far in these areas. Our
project deals with automatic railway gate control at a level crossing replacing the gates operated
3
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
by the gatekeepers and detection of obstacle on track. By employing the automatic railway gate
control at the level crossing the arrival of the train is detected by the sensors placed in the side of
the tracks. Hence, the time for which it is closed is less compared to the manually operated gates.
Detection of obstacle on railway track deals with two things, Firstly it senses any obstacle on the
track by using sensors placed on the front end of the train and Secondly, to convey the obstacle
detection message to the nearby railway station through GSM technology.
The proposed system uses infrared sensors to detect the arrival and departure of trains at
the railway level crossing, ultrasonic sensor to detect the obstacle on the track, GSM to convey
the obstacle message to the nearby railway station and Arduino to control the opening/closing of
gates and to convey the obstacle message. The review of train accidents of the last 5 years (2009-
10 to 2013-14) for which the data is available indicates that a large number of accidents happen
because of derailments & at level crossing. NCRB says a total of 2,547 railway crossing
accidents led to 2,575 deaths and 126 injuries across the country in 2014. This motivated us to
take up this project.
4
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER-3
PROBLEM DEFINITION
Train accidents are drastically increasing day by day due to various reasons which cannot
be ignored. Traditional method of manual operating of railway gate system is one of the major
cause for the occurrence of accidents at railway crossing. Since gates of Railway crossing are
usually operated manually by a gate keeper, for most of the times gates are kept closed for no
reason, increasing road traffic. As in some places there are no gates at railway crossing and in
some areas gate keepers are delaying in closing gates due to this the accidents at rail road
5
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
to this the accidents occurs. When there is any occurrence of fire accidents in remote areas or
during night times the loss or damage being caused is at higher rates.
6
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER-4
SYSTEM REQUIREMENTS AND ANALYSIS
Arduino microcontrollers come in a variety of types. The most common is the Arduino UNO, but
there are specialized variations. Before you begin building, do a little research to figure out
which version will be the most appropriate for your project.
Get the latest version from the download page. You can choose between the Installer (.exe) and
the Zip packages. We suggest you use the first one that installs directly everything you need to
7
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
use the Arduino Software (IDE), including the drivers. With the Zip package you need to install
the drivers manually. The Zip file is also useful if you want to create a portable installation.When
the download finishes, proceed with the installation and please allow the driver Installation
process when you get a warning from the operating system.
8
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Choose the installation directory (we suggest to keep the default one)
STEP 1:
To begin, you'll need to install the Arduino Programmer, the integrated development
environment (IDE).
STEP 2:
Connect your Arduino to the USB port of your computer. This may require a specific
USB cable. Every Arduino has a different virtual serial-port address, so you’ll need to
reconfigure the port if you're using different Arduinos.
STEP 3:
Set the board type and the serial port in the Arduino Programmer.
STEP 4:
Test the microcontroller by using one of the preloaded programs, called sketches, in the
Arduino Programmer. Open one of the example sketches, and press the upload button to
load it. The Arduino should begin responding to the program: If you've set it to blink an
LED light, for example, the light should start blinking.
STEP 5:
To upload new code to the Arduino, either you'll need to have access to code you can
paste into the programmer, or you'll have to write it yourself, using the Arduino
programming language to create your own sketch. An Arduino sketch usually has five
parts: a header describing the sketch and its author; a section defining variables; a setup
routine that sets the initial conditions of variables and runs preliminary code; a loop
routine, which is where you add the main code that will execute repeatedly until you stop
running the sketch; and a section where you can list other functions that activate during
the setup and loop routines. All sketches must include the setup and loop routines.
STEP 6:
Once you've uploaded the new sketch to your Arduino, disconnect it from your computer
and integrate it into your project as directed.
9
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER-5
SYSTEM ARCHITECTURE
IOT:
IOT is simply the network of interconnected things/devices which are embedded with sensors,
software, network connectivity and necessary electronics that enables them to collect and
exchange data making them responsive.
More than a concept Internet of Things is essentially an architectural framework which allows
integration and data exchange between the physical world and computer systems over existing
network infrastructure. Any stand-alone internet-connected device that can be monitored and/or
controlled from a remote location is considered an IoT device. With more smaller, more
powerful chips, almost all products can be an Internet of Things devices.
MODULES EXPLANATION:
10
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
The I2C pins (A4, A5) have been also been brought out on the side of the board near
AREF. There is a IOREF pin next to the reset pin, which is a duplicate of the 5V pin.
The reset button is now next to the USB connector, making it more accessible when a
shield is used. Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a Twitter message and turn it into an output activating a motor, turning on an
LED, publishing something online.
All Arduino boards are completely open-source, empowering users to build them
independently and eventually adapt them to their particular needs.
The software, too, is open-source, and it is growing through the contributions of users
worldwide.
It is an Atmega 328 based controller board which has 14 GPIO pins, 6 PWM pins, 6
Analog inputs and on board UART, SPI and TWI interfaces. In this IOT device, 9 pins of
the board are utilized.
11
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
1. Power USB
2. Power (Barrel Jack)
3. Voltage Regulator
4. Crystal Oscillator
5. Arduino Reset
6. Voltage(5v)
7. Voltage(3.3v)
8. GND(Ground)
9. Vin
12
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
NEED OF ARDUINO:
Active User Community: A group of people using a similar product can hold posted
message conversations and share their experiences or solve the problems of the other
users in the communities with their own experience
.
Growth of Arduino: Arduino was developed with intent to provide an economical and
trouble-free way for hobbyists, students and professionals to build devices that interact
with their situation using sensors and actuators.
Inexpensive Hardware: Since Arduino is an open source platform the software is not
purchased and only the cost of buying the board or its parts is incurred, thus making it
very cheap.
Arduino Board as a Programmer: To make Arduino board function easy and also
making it available everywhere these boards come with a USB cable for power
requirements
• Hardware
• Software
HARDWARE:
The Arduino Development Board consists of many components that together make it
work. Here are some of those main component blocks that help in its functioning:
13
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Microcontroller:
This is the heart of the development board, which works as a mini computer and can
receive as well as send information or command to the peripheral devices connected to
it. The microcontroller used differs from board to board; it also has its own various
specifications.
The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An
ATmega8U2 on the board channels this serial communication over USB and appears as
a virtual com port to software on the computer. The '8U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, an *.inf
file is required.
The Arduino software includes a serial monitor which allows simple textual data to be
sent to and from the Arduino board. The RX and TX LEDs on the board will flash when
data is being transmitted via the USB-to serial chip and USB connection to the
computer (but not for serial communication on pins 0 and 1).
USB plug:
This plug is a very important port in this board. It is used to upload (burn) a program to
the microcontroller using a USB cable. It also has a regulated power of 5V which also
powers the Arduino board in cases when the External Power Supply is absent.
Internal Programmer:
The developed software code can be uploaded to the microcontroller via USB port,
without an external programmer.
Reset button:
This button is present on the board and can be used to resets the Arduino microcontroller .
14
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Analog Pins:
There are some analog input pins ranging from A0 – A7 (typical). These pins are used
for the analog input / output. The no. of analog pins also varies from board to board.
LED: 13:
There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
AREF:
Reference voltage for the analog inputs. Used with analogReference().
15
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Reset:
Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from
shorts and overcurrent. Although most computers provide their own internal protection,
the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB
port, the fuse will automatically break the connection until the short or overload is
removed.
SOFTWARE:
The program code written for Arduino is known as a sketch. The software used for
developing such sketches for an
Arduino is commonly known as the Arduino IDE.
F − Serial monitor used to receive serial data from the board and send the serial data to
the board.
16
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Text editor:
This is where the simplified code can be written using a simplified version of C++
Programming language.
Message area:
Displays error and also gives a feedback on saving and exporting the code.
Text:
The console displays text output by the Arduino environment including complete error
messages and other information
Console Toolbar:
This toolbar contains various buttons like Verify, Upload, New, Open, Save and Serial
Monitor. On the bottom right hand corner of the window there displays the
Development Board and the Serial Port in use.
FEATURES:
ATmega328 microcontroller
Input voltage - 7-12V
14 Digital I/O Pins (6 PWM outputs)
6 Analog Inputs
32k Flash Memory
16Mhz Clock Speed
17
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
5.1.2 IR Sensor:
An infrared sensor circuit is one of the basic and popular sensor module in an electronic
device. This sensor is analogous to human’s visionary senses, which can be used to detect
obstacles and it is one of the common applications in real time.
More in detail an IR transmitter, also known as IR LED, sends an infrared signal
with a certain frequency compatible with an IR receiver which has the task to
detect it.
IR sensors use infrared radiation of wavelength between 0.75 to 1000µm which falls
between visible and microwave regions of electromagnetic spectrum.
IR Transmitter acts as source for IR radiation. IR receivers are photo diode and photo
transistors. They are capable of detecting infrared radiation.
18
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
FEATURES OF IR SENSOR :
IR transmitter
Ambient light protected IR receiver
3 pin easy interface connectors
Indicator LED & Power LED
Detection distance: 2 ~ 30cm
Can differentiate between dark and light colours
Active Low on object detection
3.3 to 5V operation
The comparator using LM393, stable
19
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
The MQ-2 is a flammable gas and smoke sensor detects the concentrations of
combustible gas in the air and outputs its reading as an analog voltage. The conductivity
of this material is lower in clean air.
The sensor can measure concentrations of flammable gas of 300 to 10,000 ppm. The MQ-
2 gas sensor is sensitive to LPG, i-butane, propane, methane, alcohol, Hydrogen and
smoke.
MQ2 is one of the commonly used gas sensors in MQ sensor series. It is a Metal Oxide
Semiconductor (MOS) type Gas Sensor also known as Chemiresistors as the detection is
based upon change of resistance of the sensing material when the Gas comes in contact
with the material. Using a simple voltage divider network, concentrations of gas can be
detected.
The sensor is actually enclosed in two layers of fine stainless steel mesh called Anti-
explosion network. It ensures that heater element inside the sensor will not cause an
explosion, as we are sensing flammable gases.
The smoke sensor has a built-in potentiometer that allows you to adjust the sensor
sensitivity according to how accurate you want to detect gas.
20
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Specifications:-
High Sensitivity to Smoke & combustible gasses like Hydrogen, LPG & Propane.
Low Cost.
VCC supplies power for the module. You can connect it to 5V output from your Arduino.
GND is the Ground Pin and needs to be connected to GND pin on the Arduino.
D0 provides a digital representation of the presence of combustible gases.
A0 provides analog output voltage in proportional to the concentration of smoke/gas.
21
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
In the 1970’s the solder less breadboard became available and now a days the
Term “breadboard” is commonly used to refer to these.
Because the solder less breadboard does not require soldering, it is reusable,
This makes it easy to use for creating temporary prototypes and experimenting
with circuit design.
The clips are often called tie points or contact points .The number of the tie
points is often given in the specification of the breadboard.
The spacing between the clips is typically 0.1 in integrated circuits. In dual in-line
packages (DIPS) can be inserted to straddle the centerline of the block.
Where IC’s are not used ,discrete components and connecting wires may use any
of the holes.
22
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Individual jump wires are fitted by inserting their “end connectors “into the
slots provided in a breadboard, the header connector of a circuit board, or a piece
of test equipment.
Male to Male:
These are Jumper wire male to male, used in connecting female header pin of any
development board (like Arduino) to other development board or breadboard.Also you
can combined it with our Female jumper wire to create Male to Female jumper wire.
23
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Male to Female:
Jumper wire male to female, used in connecting female header pin of any development
board (like Arduino) to other development board having male connector.
5.1.6 DC MOTOR:
A DC Motor is a type of electric motor that converts DC electrical power to mechanical
power i.e. a DC supply is converted to rotation or movement. DC motors are one of the
commonly used motors in different applications like electronic toys, power tools,
portable fans, etc.
Features:
Although motor gives 500 RPM at 12V, motor runs smoothly from 4V to
12V and gives the wide range of RPM, and torque.
The shaft has a hole for better coupling.
Operating Voltage(V): 12
Rated Torque(kg-cm): 0.7
Stall Torque(kg-cm): 3
24
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Features:
Piezo buzzer is an electronic device commonly used to produce sound. Light weight,
simple construction and low price make it usable in various applications like car/truck
reversing indicator, computers, call bells etc. Most buzzers produce sound in the range of
2 to 4 kHz.
25
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Specifications:
o Rated Voltage: 6V DC
o Operating Voltage: 4-8V DC
o Rated current: <30mA
o Sound Type: Continuous Beep
o Resonant Frequency: ~2300 Hz
o Small and neat sealed package
ARDUINO COMPILER:
The project file or the sketches for a project are saved with the file extension .ion
There also is a facility for finding a particular word and replacing it with another by
pressing the Ctrl + F buttons on the keyboard
The most basic part or the skeleton of all Arduino code will have two functions.
There are two main parts every sketch will always have, they are:
Void setup ()
Void loop ()
26
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
This is the first routine that begins when the Arduino starts functioning. This
function is executed only once throughout the entire program functioning. The setup
function contains the initialization of every pin we intend use in our project for input
or output. Here is an example of how it should be written
Void setup ()
{
Pin Mode (pin, INPUT);
Pin Mode (pin, OUTPUT);
}
Here the pin is the no. of the pin that is to be defined. INPUT / OUPUT correspond to
the mode in which the pin is to be used.
Void setup ()
{
Serial. Begin (9600);
}
This function is the next important function in the Sketch. It consists of that part of the
code that needs to be continuously executed unlike the part of the code written in the
setup function.
Void loop ()
{
Digital Write (pin, HIGH);
}
27
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
STATECHART DIAGRAM :
28
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
FOR IR SENSOR:
29
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
.
Initially connect IR sensor1 GND and Vcc to IR2 GND and Vcc respectively i.e.
common connection.
From IR sensor2 GND and Vcc connect to arduino GND and Vcc respectively.
Connect IR1 out pin to arduino pin5.
Connect IR2 out pin to arduino pin6.
This IR sensor is used to detect the objects and indicates through LED lights. It is a cheap
device. The detection distance is 2 ~ 30cm.
Connect Red LED on the PCB board with resistor to vary the voltage and connect
arduino pin13 to red Led.
This red Led will be in on state when it detects the train arrival.
Connect Green LED on the PCB board with resistor to vary the voltage and connect
arduino pin10 to green Led.
Now use Buzzer to warn the passengers and road users at the track for indication of train
arrival.
Connect Buzzer wires one to Gnd and other to the resistor placed on the breadboard and
make connection with arduino by connecting arduino pin9 to the buzzer wire.
30
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Using Gear motor for railway gate close and open when it detects the train. Connect the
gear motor to arduino using driver module L293.
L293D Driver Module is a medium power motor driver perfect for driving DC Motors
and Stepper Motors. It uses the popular L293 motor driver IC. It can drive 4 DC motors
on and off, or drive 2 DC motors with directional and speed control.
It can drive motors up to 12 V with a total DC current of up to 600mA.
An L293D has 4 input pins, 4 output pins, 2 enable pins, Vcc and GND. Vcc is the
voltage that it needs for its internal operation. L293D will not use this voltage for driving
the motor.
The 2 input pins IN1 & IN2 are connected to arduino 11 & 12 pins respectively. The
11th and 12th pin of arduino is used for controlling the direction of rotation.
The 2 output pins OUT1 & OUT2 are connected to the gear motor.
Connect adapter positive to gear motor positive wire and adapter negative to gear motor
negative wire for the passage of current to gear motor.
Then we will connect the MQ2 sensor with the Arduino.
Connect the VCC and the ground pin of the sensor to the 5V and ground of the Arduino
and the Analog pin of sensor to the A0 of the Arduino.
The MQ2 sensor can sense LPG, Butane, Propane, Methane, Alcohol & Hydrogen.
The analog output voltage provided by the sensor changes in proportional to the
concentration of smoke/gas. The greater the gas concentration, the higher is the output
voltage; while lesser gas concentration results in low output voltage .
We give certain threshold value as a input. If the smoke range is greater than threshold
value then there is an indication that fire accident will occur.
This will be cautioned to passengers by red led and buzzer alarm sound for alerting them.
If smoke range doesn’t cross the threshold value the model works as usual.
This component is useful in saving the lives of passengers in the train.
The program code is intended to be loaded on an Arduino UNO. In the program code, first the
standard open-source libraries of Arduino for setting up virtual serial communication are
imported. This followed by declaration of variables representing the circuit connections of the
Arduino with the character MQ-2 sensor and IR sensor.
The setup() function is used to initialize the input and output pins of components. This is used to
set input to IR sensor that is object and smoke sensor also acts an input. Leds, motor input pins
and buzzer acts as an output.
The loop () function is called in which the smoke sensor value is read using the
analogRead () function and the value is stored in a variable. It reads the IR sensor value
using the digitalRead() function and the value is stored in a variable.
31
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Program:
int irsensor1 = 5;
int irsensor2= 6;
int MI1 = 11;
int MI2 = 12;
int led3 = 13;
int led4 = 10;
int buzzer = 9;
int smokeA0 = A0;
int sensorThres = 200;
void setup ()
{
pinMode(irsensor1, INPUT);
pinMode(irsensor2, INPUT);
pinMode(MI1, OUTPUT);
pinMode(MI2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(smokeA0, INPUT);
}
void loop()
{
int readsen = digitalRead(irsensor1);
int readsen1 = digitalRead(irsensor2);
int analogSensor = analogRead(smokeA0);
32
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
}
else if(readsen == !HIGH && readsen1 == HIGH)
{ digitalWrite(led3, HIGH);
delay(5000);
digitalWrite(MI1, !HIGH);
digitalWrite(MI2, HIGH);
delay(1000);
digitalWrite(led3, LOW);
}
33
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
5.4 SCREENSHOTS:
34
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER-6
SYSTEM TESTING
Software Testing:
Software testing is the process of evaluation a software item to detect differences between given
input and expected output. Also to assess the features of a software item. Testing assesses the
quality of the product. Software testing is a process that should be done during the development
process. In other words software testing is a verification and validation process.
Verification:
Verification is the process to make sure the product satisfies the conditions imposed at the start
of the development phase. In other words, to make sure the product behaves the way we want it
to.
Validation:
Validation is the process to make sure the product satisfies the specified requirements at the end
of the development phase. In other words, to make sure the product is built as per customer
requirements.
There are two basics of software testing: Blackbox testing and Whitebox testing.
Blackbox Testing:
Black box testing is a testing technique that ignores the internal mechanism of the system and
focuses on the output generated against any input and execution of the system. It is also called
functional testing.
Whitebox Testing:
White box testing is a testing technique that takes into account the internal mechanism of a
system. It is also called structural testing and glass box testing.
Black box testing is often used for validation and white box testing is often used for verification.
35
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Types of testing:
Unit Testing
Integration Testing
Functional Testing
System Testing
Acceptance Testing
Regression Testing
Beta Testing
Unit Testing:
Unit testing is the testing of an individual unit or group of related units. It falls under the class of
white box testing. It is often done by the programmer to test that the unit he/she has implemented
is producing expected output against given input.
Integration Testing:
Integration testing is testing in which a group of components are combined to produce output.
Also, the interaction between software and hardware is tested in integration testing if software
and hardware components have any relation. It may fall under both white box testing and black
box testing.
Functional Testing:
Functional testing is the testing to ensure that the specified functionality required in the system
requirements works. It falls under the class of black box testing.
36
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
System Testing:
System testing is the testing to ensure that by putting the software in different environments (e.g.,
Operating Systems) it still works. System testing is done with full system implementation and
environment. It falls under the class of black box testing.
Acceptance Testing:
Acceptance testing is often done by the customer to ensure that the delivered product meets the
requirements and works as the customer expected. It falls under the class of black box testing.
Regression Testing:
Regression testing is the testing after modification of a system, component, or a group of related
units to ensure that the modification is working correctly and is not damaging or imposing other
modules to produce unexpected results. It falls under the class of black box testing.
Beta Testing:
Beta testing is the testing which is done by end users, a team outside development, or publicly
releasing full pre-version of the product which is known as beta version. The aim of beta testing
is to cover unexpected errors. It falls under the class of black box testing.
TESTING OBJECTIVES:
The main objective of testing is to uncover a host of errors, systematically and with
minimum effort and time. Stating formally, we can say
Testing is a process of executing a program with the intent of finding an error.
A good test case is one that has a high probability of finding error, if it exists.
37
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
CHAPTER-7
CONCLUSION
Automatic gate control system offer an effective way to reduce the occurrence of railway
accidents. This system can contribute a lot of benefit either to the road users or to the railway
management. Since the design is completely automated it can be used in remote villages where
no station master or line man is present. Railway sensors are placed at two sides of gate. It is
used to sense the arrival and departure of the train. This system uses the DC motor to open and
close the gates automatically when it is rotated clockwise or anticlockwise direction. The LCD
display shows the status of the railway gate control system. The system can also generate buzzer
and light indicators while the train passing through the level crossing. So by using this automated
system we can reduce the accidents.
FUTURE ENHANCEMENT:
In future we can enhance our project by using RFID card reader sensor which detects
the train even in reverse direction.
We can store the data of train arrival & departure over the cloud by using data
analytics.
We can create an app about the train status of location.
38
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
BIBILIOGRAPHY
REFRENCES:
2. Sayali R. More, Ruchira J. Raut, Rasika K. Tandel, Snehal D. Yendhe, “Intelligent Railway
Crossing Gate Control with High Speed Anti-Collision Alerting System,” .
3. Jeong Y., Choon-Sung Nam, Hee-Jin Jeong, and Dong Shin, “Train Auto Control System
based on OSGI”, International Conference on Advanced Communication Technology, pp.276-
279, 2008.
4. Karthik, Krishnamurthi, Monica Bobby, Vidya V, “Sensor based automatic control of railway
gates”, International Journal of Advanced Research in Computer Engineering & Technology.
WEB REFERENCES:
1. https://www.academia.edu/5914238/IEEE_Automatic_Railway_Gate_Control_System/
2. https://www.ijareeie.com/upload/2016/may/105_22_Arduino.pdf/
3. https://ieeexplore.ieee.org/document/4304240/
39
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Pos 1 2 3 4 5 6 7 8 9 10 11 12
Project ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
40
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
41
Gudlavalleru Engineering College
SAFEGUARD AUTOMATION OF RAILWAY USING IOT
Project Outcomes
Outcome 1 Identify the problem statement by analyzing various
domains.
Outcome 2 Design and implement solutions to the computational
problems by applying engineering knowledge.
Outcome 3 Present technical report by applying different
visualization tools and Evaluation metrics.
Outcome 4 Analyze ethical, environmental, legal and security
issues related to computing projects.
Mapping Table
Outcome 2 3 1 3 2 3 3 2 3 3 3 3 2 3 1
Outcome 3 2 1 1 3 2 2 3 2 2 2 2 3 3 2
Outcome4 1 1 1 3 2 2 2 1 1 1 1 1 2 3
Note: Map each project outcomes with POs and PSOs with either 1 or 2 or 3 based
on level of mapping as follows:
1-Slightly (Low) mapped 2-Moderately (Medium) mapped 3-Substantially (High) mapped
42
Gudlavalleru Engineering College