Project Paper Hardware
Project Paper Hardware
A Project
Report By
Most. Barkaty Mahbubul
April, 2022
i
“Automatic Railway Gate Control System”
A Project
Report By
Most. Barkaty
Mahbubul Id:
01018106025
Batch: 10th
Submitted to
The Department of Computer Science and Engineering of Pundra University of Science &
technology. This Report Presented in Partial Fulfillment of the Requirements for the
Degree of
Bachelor of
Science In
Computer Science & Engineering
ii
April, 2022
iii
“Automatic Railway Gate Control System”
A Project
Report By
Most. Barkaty
Mahbubul Id:
01018106025
Batch: 10th
....................................................
Md. Ataur Rahman
(Supervisor)
iv
April, 2022
v
ACKNOWLEDGEMENT
At, first we express our heartiest thanks and gratefulness to Almighty God for His divine
blessing makes us possible to complete the final year project successfully.
We really grateful and wish our profound our indebtedness to Md. Ataur Rahman ,
Lecturer , Department of CSE, Pundra University of Science & Technology, Bogura, for his
deep Knowledge & keen interest of our supervisor in the field of “Automatic Railway Gate
Control System “to carry out this project. His endless patience, scholarly guidance, continual
encouragement, constant and energetic supervision, constructive criticism, valuable advice,
reading many inferior drafts and correcting them at all stage have made it possible to
complete this project.
We would like to express our heartiest gratitude to Md. Ataur Rahman, Lecturer ,
Department of CSE, Pundra University of Science & Technology, and Farjana Alam,
Lecturer, Department of CSE, for their kind help to finish our project and also to other
faculty member and the staffs of CSE department of Pundra University of Science &
Technology.
We would like to thank my entire course mate in Pundra University of Science &
Technology, who took part in this discuss while completing the course work.
Finally, we must acknowledge with due respect the constant support and patients of my
parents and guardians.
…………………….
The Author
vi
ABSTRACT
There has been an increase in the road traffic as well as the rail traffic, accidents at level
crossing has increased and this has caused the concern for the Bangladesh railways. The
objective of this project is to provide an automatic railway gate at a level crossing replacing
the gates operated by the gatekeepers. In this project we are proposing a simple solution for
the level crossing in which we fix the Ultrasonic sensing system for detect the train. our paper
deals with automatic railway gate operation (i.e.,) automatic railway gate at a level crossing
replacing the gates operated by the gatekeepers, it deals with two things, firstly it deals with
the reduction of time for which the gate is being kept closed and secondly, to provide safety
to the road users by reducing the accidents. By employing the automatic railway gate control
at the level crossing the arrival of the train is detected by the sensors placed near to the gate.
Hence, the time for which it is closed is less compared to the manually operated gates. The
operation is automatic; error due to manual operation is prevented. Automatic railway gate
control is highly Arduino based arrangements, designed for use in almost all the unmanned
level crossing in the train. In order to overcome the accidents due to the above problem we
have planned to design the project.
vii
Table of Contents
Chapter-1: Introduction
1.1 Background 1
1.2 Objectives 1
vii
i
4.2 Hardware Used in this Circuit 11
4.2.1 Arduino Uno 11
4.2.6 Breadboard 18
4.2.7 Connecting Wires 19
5.2 Conclusion 22
5.35.3 Future
References 23
Work
ix
CHAPTER 1
INTRODUCTION
1.1 Background
Railway is considered as one of the cheapest and safest mode of transport worldwide.
Therefore, safety is one of the crucial aspects when it’s come to railway operation
everywhere. With the ever-increasing population, the railway industry always encounters
many problems due to technical and human errors, especially at level crossings. The Level
crossing is a cross-sectional area where rail track and roadway intersect each other. In most
cases, level crossing remains unattended mostly in rural and remote areas. Hence, such
intersection requires constant human coordination and monitoring on everyday basis.
Railways preferred the cheapest mode of transportation over all the other means. This system
is designed using Arduino Uno to avoid railway accidents happening at railway gates where
the level crossings. Arduino Uno performs the complete operation i.e., sensing, gate closing
and opening. As a train approaches the railway crossing from either side, the sensors placed
at a certain distance from the gate detects the approaching train and controls the operation of
the gate. This system was operated after signal received from the Ultrasonic sensors. This
signal is used to trigger the Arduino Uno for operating the gate motor, alarm system. This
system also can be used in parking gate controlling and sliding door system. The abstraction
of this system is to provide the advanced control system available to everywhere.
1.2 Objectives
The objectives of this project are to develop an “Automatic Railway Gate Control System” to
replace the present deployed system in the railway industry. The system consists of sensors
which can be implemented easily inroads especially at level crossings. With the increase of
vehicles daily, it has become more difficult to manually operate the gate and its time
consuming at level crossing. As a result, often accident occurs and many people become
injured badly and sometimes it become very serious when people died due to this type of
accidents. This project can help us to reduce accidents in the society by introducing automatic
railway level crossing.
The main aim of this thesis is to improve safety, minimizes travel time and increase capacity
of Infrastructures. This type of improvements is advantageous to health, economy and to the
environment. Hence, reduced time delay at level crossing and saving travel time are the main
objective of Intelligent Transportation Systems (ITS). Parameters such as day, time, weather,
season and other undetermined circumstance such as accidents, special occasion, road
maintenance and construction are the major contributor to traffic load. Besides that, the usage
of guards (personnel) to physically control (open/close) the gate involves heavy use of
manpower which directly contributes to inefficient because sometimes it takes much time.
This often creates a traffic jam especially during peak hours and as a result, road users end up
1
being late for work. In addition to that, the guards are forced to endure extreme weather
conditions such as intense heat and also light drizzles just to enforce the current entry system.
1.3 Implementation
To reduce the risk of human errors we are introducing the automated safety security for the
railway of Bangladesh. Our concern is to protect the level crossings in the first place as most
of the accidents occurs because of the unguarded level crossing. Limited analysis was
conducted on accidents at level crossings in Bangladesh. This project will help the decision
makers to improve the safety status of vulnerable level crossings in Bangladesh and hence
reduce accidents and economic losses.
1.4 Motivation
The motivation towards working on this project and development program was originated
from the view of massive accident occurrence during railway crossing in Bangladesh and it is
increasing rapidly day by day. The existing railway gate control system is working according
to our needs but we wanted to establish an innovative idea and make more feasible and
reliable system. Thus, we can reduce accident than before andthis project will help the
decision makers to improve the safety status of vulnerable level crossings in Bangladesh.
2
CHAPTER 2
LITERATURE REVIEW AND RELATED WORKS
b) A Class
c) B Class For roads
3
2.5 Train Accident
A classification of accidents by their effects (consequences); e.g., head-on collisions, rear-end
collisions, derailments. Head on collision; one type of train accident is when two trains
collide front face with each other or train colliding on the same track from opposite ends
called head on collision. Rear end collision; the other kind is when a train collides into the
other that is in front of it, called a rear end collision. Derailments plain track; a train may
derail on a simply straight track that may cause the train accident. Curves; derailment of a
train is more common when there is a curve on the track causing an accident. Junctions; a
train may also get derailed on a junction, which is the place where two tracks converge into
one, or one diverges into two. Accident contributors such as train visibility advance signs,
active warning, driver behavior, driver distraction and risk taking have been identified as
common human factors contributors to vehicle train grade crossing accident. Factor includes
highway and railway characteristic are contributing factor to accident at RLC. The
environmental factors are snow, heavy rain, fog, or blowing snow, which collision the train.
The three main factors contributing to accidents at RLC is basic safety engineering studies,
human factor, engineering factor, and environment factor. The taxonomy of railway
intersection accident contributors was created to generate hypotheses and deduction about
specific cases and common patterns of accident
4
has been constructed for the last 50 years. Whereas more than 1,200km rail lines are under
the risk of operation that has resulted due to negligence, privation of maintenances and
insufficient fund allocation. One of the major problems is shortage of locomotive routes, the
trains need to suffer an excess of traffic caused by the lack of routes. This results to major
delays frequent cancelations and most direly innumerous accidents at the rail crossing point
in the busy street areas.
According to the Bangladesh Railway officials, 80% out of total 2,541 level crossings had
been illegally set up in different places across the country while the Bangladesh Railway had
gatekeepers at less than 15% of level crossings. Sources in the Bangladesh Railway said at
least 201 people were killed and 349 others injured in 264 accidents at different level
crossings in last seven years till 2013.
5
Fig. 2.4 Level Crossing indicator Fig 2.5 Stop Sign and Line
Nowadays, a number of people die due to human error while crossing the railway gate. The
major errors include no proper control flow of traffic, manual operation of traffic gates. If
mechanism is automatic, the margin of error becomes less. Hence, can save lives of people
through this concept. Using Arduino, we can emphasis on systematic flow of traffic and
therefore avoid tension at junction.
Ultrasonic Sensors (2/4 quantity) used at two ends for checking of train arrival and departure.
The distance at which the Ultrasonic sensors are placed is properly selected so that the gates
close in time. As the train approaches the ultrasonic sensor, it detects the train and the servo
which is a replica of automatic gates in our project will close or open according to the
condition. At one end, if obstacle is detected, condition for presence of train will be ON,
gates will be CLOSED. Receiving again the original condition, gates will be OPEN. Same-
case will be observed for train travelling otherwise.
One of the major advantages of this system is its simple circuit and working principle. The
circuit is divided into three parts. First one is the Arduino section second is the Ultrasonic
sensor section kept on rail and third is the servo motor which is used to operate the gate. All
of them are discussed in detail in coming sections. The fig shows the detailed circuit diagram
of the system. By employing the automatic railway gate control at the level crossing the
arrival of train is detected by the sensor placed on either side of the gate at about 5 km from
the level crossing. Once the arrival is sensed, the sensed signal is sent to the Arduino and it
checks for possible presence of vehicle between the gates, again using sensors. Subsequently,
buzzer indication and light signals on either side are provided to the road users indicating the
closure of gates. Once, no vehicle is sensed in between the gate the motor is activated and the
gates are closed. But, for the worst case if any obstacle is sensed it is indicated to the train
driver by signals placed at about 2km and 180m, so as to bring it to halt well before the level
crossing.
The red signal changes to a green one once the obstacle is moved away from the rail. The
sensor placed at 2km away from the rail cross detects the departure of the train
6
CHAPTER-3
DIAGRAM AND DESCRIPTION
3.1 Introduction
The concept is to build an entire railway system that can run without regular human
contribution covering a few areas of the existing railway system which needed an upgrade to
make the system more efficient and accurate. In this project, Arduino Uno will be used to
program an application. The Ultrasonic sensor detects the train and send data to the Arduino.
Arduino receive the data and control the level crossing system.
Train Arrive? No
Yes
Alarm
Gate Close
Train
Departure No
Yes
Gate Open
7
3.3 Working Principle of Ultrasonic Sensor
Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. These
propagate in the air at the velocity of sound. If they strike an object, then they are reflected
back as echo signals to the sensor, which itself computes the distance to the target based on
the time-span between emitting the signal and receiving the echo.
As the distance to an object is determined by measuring the time of flight and not by the
intensity of the sound, ultrasonic sensors are excellent at suppressing background
interference. Virtually all materials which reflect sound can be detected, regardless of their
color. Even transparent materials or thin foils represent no problem for an ultrasonic sensor.
Micro sonic ultrasonic sensors are suitable for target distances from 20 mm to 10 m and as
they measure the time of flight they can ascertain a measurement with pinpoint accuracy.
Some of our sensors can even resolve the signal to an accuracy of 0.025 mm. Ultrasonic
sensors can see through dust-laden air and ink mists. Even thin deposits on the sensor
membrane do not impair its function.
Sensors with a blind zone of only 20 mm and an extremely thin beam spread are making
entirely new applications possible today: Fill level measurement in wells of microtiter plates
and test tubes, as well as the detection of small bottles in the packaging industry, can be
implemented with ease. Even thin wires are reliably detected.
The Arduino Uno board is a microcontroller based on the ATmega328. It has 14 digital
input/output pins in which 6 can be used as PWM outputs, a 16 MHz ceramic resonator, an
8
ICSP header, a USB connection, 6 analog inputs, a power jack and a reset button. This
contains all the required support needed for microcontroller. In order to get started, they are
simply connected to a computer with a USB cable or with an AC-to-DC adapter or battery.
Arduino Uno Board varies from all other boards and they will not use the FTDI USB-to-
serial driver chip in them. It is featured by the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter.
There are various types of Arduino boards in which many of them were third-party
compatible versions. The most official versions available are the Arduino Uno R3 and the
Arduino Nano V3. Both of these run a 16MHz Atmel ATmega328P 8-bit microcontroller
with 32KB of flash RAM 14 digital I/O and six analogue I/O and the 32KB will not sound
like as if running Windows. Arduino projects can be stand-alone or they can communicate
with software on running on a computer. For e.g. Flash, Processing, Max/MSP). The board is
clocked by a 16 MHz ceramic resonator and has a USB connection for power and
communication. You can easily add micro SD/SD card storage for bigger tasks.
3.8 Working
Procedure
9
To detect the train arrival and departure time, we used two Ultrasonic sensors. When the
sensor will detect the train, we will send the data using wire connection to the Arduino. We
have used the received data as input in the Arduino and as the output we will use servo motor
and buzzer. But in real life we will also use display and sound system.
The buzzer will provide a signal to everybody at the level crossing end. When the train will
leave, the sensor the other end will detect the departure and send the data using wire
connection which will cause the level crossing to go up.
10
CHAPTER-4
HARDWARE IMPLEMENTATION
4.1 Introduction
Using simple electronic device, we have tried to control the railway gate. A sensor is placed
at certain distance of railway gate to detect the train. When a train comes it detects the train
and send to Arduino. Other side Receiver get this data and control the gate by using Arduino
Uno. It reduces the railway accident. The whole system includes a few parts of
implementation. The major ones are: To build a safe unmanned crossing system, to track
trains and command various actions according to it and to ensure line security.
11
STK500 protocol. The Uno also differs from all preceding boards in that it does not use the
FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to
version R2) programmed as a USB-to-serial converter. The Arduino UNO is generally
considered the most user-friendly and popular board of the Arduino board series.
Features
Microcontroller : ATmega328P
SRAM :2 KB (ATmega328P)
EEPROM :1 KB (ATmega328P)
Length :68.6 mm
Areas of Application
1. Traffic Light Count Down Timer
2. Parking Lot Counter
3. Weighing Machines
4. Medical Instrument
5. Emergency Light for Railways
8. Microwave Oven
9. Security Systems
12
PIN Configuration AND Description
HC-SR04 Ultrasonic (US) sensor is a 4-pin module, whose pin names are Vcc, Trigger, Echo
and Ground respectively. This sensor is a very popular sensor used in many applications
where measuring distance or sensing objects are required. The module has two eyes like
projects in the front which forms the Ultrasonic transmitter and Receiver. The sensor works
with the simple high school formula that
13
Distance = Speed × Time
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it
gets objected by any material it gets reflected back toward the sensor this reflected wave is
observed by the Ultrasonic receiver module as shown in the picture below
Now, to calculate the distance using the above formulae, we should know the Speed and time.
Since we are using the Ultrasonic wave we know the universal speed of US wave at room
conditions which is 330m/s. The circuitry inbuilt on the module will calculate the time taken
for the US wave to come back and turns on the echo pin high for that same particular amount
of time, this way we can also know the time taken. Now simply calculate the distance using a
microcontroller or microprocessor.
14
A servo motor is a special kind of motor that operates upon the given instructions. It provides
angular precision, which means, unlike other electrical motors that keep on rotating until
power is applied to them and stops only when the power is switched off, the servo motor
rotates only to a certain degree or until it is required to and then the motor stops and waits for
the next instruction to carry out further action. Servo motors are controlled with the help of
servomechanism. Its angular rotation and final movement are dictated by position feedback.
The input to its control line determines the position demanded for the output shaft.
A servo motor is basically a DC motor (in some special cases it is AC motor) along with
some other special purpose components that make a DC motor a servo. In a servo unit, you
will find a small DC motor, a potentiometer, gear arrangement and an intelligent circuitry.
The intelligent circuitry along with the potentiometer makes the servo to rotate according to
our wishes. As we know, a small DC motor will rotate with high speed but the torque
generated by its rotation will not be enough to move even a light load. This is where the gear
system inside a servomechanism comes into the picture. The gear mechanism will take high
input speed of the motor (fast) and at the output, we will get an output speed which is slower
than original input speed but more practical and widely applicable. Tiny and lightweight with
high output power. Servo can rotate approximately 180 degrees (90 in each direction), and
works just like the standard kinds but smaller. You can use any servo code, hardware or
library to control these servos. Good for beginners who want to make stuff move without
building a motor controller with feedback & gear box, especially since it will fit in small
places. It comes with a 3 horns (arms) and hardware.
Tower Pro can push a maximum load of 35 kg. PWM Period given for this servo motor is
20ms. Operating Frequency is 50Hz. Duty cycle is 2ms. To rotate the arm head, one must
have to generate a PWM Signal with signal period of 20ms and signal duty cycle in between
0 to 2ms. This Tower Pro Micro Servo SG90 9g remains at middle, right angle, 90-degree on
duty cycle of 1.5ms, goes to 90-degree right, at 0-degree on 2ms duty cycle, and moves 90-
degree left at duty cycle of 1ms.
15
Servo Motor Duty Cycle and PWM Period
16
Specifications of micro servo motor
No load speed: 0.12 seconds / 60 degrees (4.8V)
Stall Torque: 1.6 kg / cm (4.8V)
Operating temperature: -30 ~ +60 degrees Celsius
Dead Set: 7 microseconds
Operating voltage: 4.8V-6V
Working current: less than 500mA
Cable length: 180mm (7 inches)
Size: 22mmx12.5mmx29.5mm (0.9x0.5x1.2 in)
Weight: 9 grams
Today almost every electronic device needs a DC supply for its smooth operation and they
need to be operated within certain power supply limits. This required DC voltage or DC
supply is derived from single phase ac mains. In this project, we have used 12 Volts dc
adapter for external power source.
4.2.5 Buzzer
17
include alarm devices, timers, and confirmation of user input such as a mouse click or
keystroke. Apply 3V to 5V to this buzzer module and you'll be rewarded with a loud 2KHz
BEEP. Unlike a plain piezo, this buzzer does not need an AC signal. Inside is a piezo plus the
driver circuitry that makes it oscillate at 2KHz. On one hand, that makes it really great for
integrating into projects because you don't need an oscillating control signal. On the other
hand, you cannot change the frequency. One advantage to an active buzzer is that you can
still produce a sound from the buzzer connected to a microcontroller, such as an Arduino, by
just driving a standard high output on the connected pin. The benefits of this are that you
don't need to use processing power, hardware timers, or additional code to produce sound.
4.2.6 Breadboard
A breadboard is a solderless device for temporary prototype with electronics and test circuit
designs. Most electronic components in electronic circuits can be interconnected by inserting
their leads or terminals into the holes and then making connections through wires where
appropriate. The breadboard has strips of metal underneath the board and connect the holes
on the top of the board. The metal strips are laid out as shown below. Note that the top and
bottom rows of holes are connected horizontally and split in the middle while the remaining
holes are connected vertically.
18
Fig 4.9: Breadboard
19
4.2.8 Toy Train
A toy train is a toy that represents a train. It is distinguished from a model train by an
emphasis on low cost. And durability, rather than scale modeling. A toy train can be as
simple as a pull toy that does not even run on track, or it might be operated by clockwork or a
battery. By the way, many of today's model trains might be signed as toy ones as well,
providing they are not strictly scale ones in favor of a robustness appropriate for children or a
reasonable manufacturing.
Fig 4.11: Toy Train
20
4.2.10 Project Physical View
21
CHAPTER 5
DISCUSSION AND CONCLUSION
5.1 Discussions
The advantage of this project is the use of ultrasonic sensors and “Arduino UNO” which is
low of cost. In this project, we have used simple equipment that is more economic rather than
the system which is available in the current railway gate controlling system.
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.
5.2 Conclusion
Automatic gate control system offers 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.
22
REFERENCES
[1] T. Shimazoe, T. Okutanit, “Safety of Level Crossing on the Integrated Crossing Control
System Using Electronic Controller”, Japan Railway Construction Public Corporation’
Kyosan Electric Mfg. Co.’, Ltd pp:1333-1338, ISIE 2001.
[2] Dwarakanath S K, Sanjay S, Soumya G, Arjun V, Vivek R, “Arduino Based Automatic
Railway Gate Control and Obstacle Detection
[3] Bangladesh Railway [Online] Available: http://www.railway.gov.bd
[4] Arduino Official Website: https://www.arduino.cc
[5] Servo Motor: https://en.wikipedia.org/wiki/Servomotor
[6] Ultrasonic Sensor: https://components101.com/ultrasonic-sensor-working-pinout-
datasheet
[7] https://transmitter.ieee.org/makerproject/view/63c1c
[8] https://www.youtube.com/channel/UCevlfy8fq9tYTx9T77LuLng
23
24
25