USING ARUDINO
A PROJECT REPORT
Submitted by
WILLSON SELVA R
MAHESH M
of
Bachelor Of Engineering
IN
BONAFIDE CERTIFICATE
SELVA R” and “ MAHESH “ who carried out the project work under my
supervision.
SIGNATURE SIGNATURE
S No Title Page No
01 Abstract 5
02 Introduction 6
04 Rail Accidents 9
05 Cause of Accidents 11
07 Steps by Government 14
08 Hardware Specifications 15
09 Working 19
10 Arduino Code 20
11 Conclusion 21
---------------------------
Abstract
The road users have to wait for a long time before the arrival of train and even after
the train has left. And secondly the chances of accidents that usually made by the
carelessness of the road users or due to the time errors made by the gatekeepers is
more. Here comes the importance of automatic railway gate control system.
The system reduces the time for which the gate remains closed. This type of gates
can be employed in an unmanned level crossing where the chances of accidents are
higher and reliable operation is required.
Since, the operation is automatic; error due to manual operation is prevented. The
system works on a microcontroller based control. The proposed system uses Ardino
Uno R3 microcontroller. With the help of IR sensors, the arrival and leaving of the
system is monitored and the gate is operated accordingly with the help of DC Motor.
5|Page
Introduction
Indian Railways is one of the world's largest railway networks comprising 115,000 km
(71,000 mi) of track over a route of 65,436 km (40,660 mi) and 7,172 stations. It has
23 million passengers daily and 8,245 million passengers annually. Its revenue in
2013-14 was Rs.1441.67 Billion.
Railroad related accidents are more dangerous than other transportation accidents in
terms of severity and death rate etc. Therefore more efforts are necessary for
improving safety.
The number of deaths on railway tracks has been on the rise in the past few years
despite several measures taken by the authorities to contain such incidents. Mishaps
at level crossings are the biggest killer, although trespassing into railway premises
including the track is a punishable offence under Section 147 of the Railways Act.
6|Page
What is Level crossing?
Level Crossing is a place where a railway and a road, or two railway lines, cross at
the same level. It is called Grade Crossing in North America.
7|Page
3. B Class Level Crossings
All rail or road intersections are provided with either passive or active protection.
Passive Protection –
Passive protection is the application of passive traffic control devices (signage) which
provides an unchanging warning to the road user whether or not a train is
approaching the crossing.
Active Protection –
Active protection is the application of warning devices to warn road users of the
approach of a train when the train is a minimum time from entering the road-rail
intersection. In some cases it also blocks access to the crossing.
8|Page
Rail Accidents
Railway Accidents can be classified on the basis of cause and effect, study of which
helps in preventing similar ones in future.
Based on Cause –
1. Driver’s Errors
Passing Signals at
danger Excessive Speed
Mishandling Engine
2. Signalmen’s Error
3. Mechanical Failure
Poor Design
Poor Maintenance
Track Faults
Bridge and Tunnel collapses
Vandalism
Terrorism
Suicide
Trespassing
9|Page
6. Contributory Factors
Fires
Effectiveness of brakes
Inadequate Rules Level
Crossing misuse
Based on Effects –
1. Collisions
Head-on collision
Rear Collision
Obstructions on the line (landslides, avalanches etc)
2. Derailments
Plain track
Curves
Junctions
3. Other
10 | P a g e
Cause of Accidents
Level Crossings are one of the major causes of accidents. In spite of various
measures taken by the Indian Railways, level crossing accidents have continued to
occur, that too frequently.
The road vehicle drivers are duty bound under Section 131 of the Motor Vehicles
Act, 1988, to ―get down from the Vehicle, walk up to the crossing to ensure that no
train is approaching from either side before crossing the unmanned level crossing‖
11 | P a g e
Accidents and Deaths
2000-01 84
2001-02 88
2002-03 96
2003-04 95
2004-05 70
2005-06 75
2006-07 79
2007-08 77
2008-09 69
2009-10 70
2010-11 53
2011-12 61
2012-13 448
According to Indian Railway Ministry Data, recent deaths that occurred on railway
tracks were –
2011 14,973
2012 16,336
2013 19,997
12 | P a g e
Main reasons for death of persons on railway tracks are trespassing, falling off trains,
accidents and suicides.
Mishaps at level crossings are the biggest killer, accounting for 40% of train
accidents and 66% of fatalities, reflecting the railways' failure to man these crossings
or build road-over bridges and road-under-bridges. There are 30,348 level crossings,
of which around 40% (11,563) are unmanned.
53 people have been killed in accidents on unmanned crossings since April this year.
In last five years, 723 people were killed in accidents at level crossings. Around 95
people were killed in accidents on unmanned crossings in 2013-14 while 124 people
lost their lives in 2012-13. The figure was 204 in 2011-12.
13 | P a g e
Steps by Indian
government
The transport department has set target to eliminate 9,808 level crossings during the
12th Five Year Plan (2012-17) and not adding any new level crossing to the rail
network in future. But this task seems ambitious considering the financial health of
the railways as removing one level crossing costs around Rs 4.4 crore.
The panel pegged it at Rs 50,000 crore, but said this could be recovered over 7-8
years due to saving in operation and maintenance costs incurred at gates and
smooth train operations.
"The gigantic project will also need setting up of a dedicated and empowered SPV
for each railway zone to accomplish this task within a 5-year period," it said.
With the introduction of high speed trains on the cards, Indian Railways has
decided to acquire the sophisticated "early warning system" to alert both the driver
and staff at the nearest railway station about an impending danger of an accident.
This way the railways hope to do way with human error as cause of an accident.
In a move to prevent accidents, Indian Railways is all set to start a new chapter by
introducing Train Protection and Warning System (TPWS) which is based on
European Train Control System (ETCS) — a proven and well known protection
technology used in several countries across the globe for prevention of accidents
caused due to human errors either by over shooting a signal or failing to adhere to
speed limit directions on the tracks.
14 | P a g e
Hardware
Specifications
Arduino Uno
The Uno 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.
15 | P a g e
Revision 3 (R3) of the board has the following features –
pinout: added SDA and SCL pins that are near to the AREF pin and two
other new pins placed near to the RESET pin, the IOREF that allow the
shields to adapt to the voltage provided from the board. In future, shields
will be compatible with both the board that uses the AVR, which operates
with 5V and with the Arduino Due that operates with 3.3V. The second one
is a not connected pin, that is reserved for future purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
Summary of Specifications –
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7 – 12V
Input Voltage (limits) 6 – 20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40mA
DC Current for 3.3V Pin 50mA
Flash Memory 32kB of which 0.5 KB used by boot loader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically.
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Each of the 14 digital pins on the Uno can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each
pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 kΩ.
16 | P a g e
IR Sensor
The power consumption of this module is low. It gives a digital output. The output
of IR receiver goes low when it receives IR signal. Hence the output pin is normally
low because, though the IR LED is continuously transmitting, due to no obstacle,
nothing is reflected back to the IR receiver. The indication LED is off. When an
obstacle is encountered, the output of IR receiver goes low, IR signal is reflected
from the obstacle surface. This drives the output of the comparator low. This output
is connected to the cathode of the LED, which then turns ON.
DC Motor
A DC motor relies on the fact that like magnet poles repel and unlike magnetic
poles attract each other. A coil of wire with a current running through it generates
an electromagnetic field aligned with the centre of the coil. By switching the current
on or off in a coil its magnetic field can be switched on or off or by switching the
direction of the current in the coil the direction of the generated magnetic field can
be switched 180°.
17 | P a g e
A simple DC motor typically has a stationary set of magnets in the stator and an
armature with a series of two or more windings of wire wrapped in insulated stack
slots around iron pole pieces (called stack teeth) with the ends of the wires
terminating on a commutator. The armature includes the mounting bearings that
keep it in the centre of the motor and the power shaft of the motor and the
commutator connections.
Different number of stator and armature fields as well as how they are connected
provide different inherent speed/torque regulation characteristics. The speed of a
DC motor can be controlled by changing the voltage applied to the armature.
18 | P a g e
Working of this Design
2. When The Train Further Crosses the Cross way other sensor detects the
motion and opens the cross way.
19 | P a g e
Arduino Code
int l,r;
int leftSensor=3;
int rightSensor=4;
int roghtMotor = 12;
int leftMotor = 13;
void setup(){
pinMode(leftMotor, OUTPUT);
pinMode(roghtMotor, OUTPUT);
pinMode(rightSensor, INPUT);
pinMode(leftSensor, INPUT);
}
void loop(){
l = digitalRead (leftSensor);
r = digitalRead (rightSensor);
20 | P a g e
Conclusion
As infrared sensors are relatively cheaper and easier to fabricate while also
being integration – friendly, it decimates the possibility of casualty occurring
due to shortcoming to the existing of the manned level crossing, which rely on
human unpredictability, there by rendering it a much more effective way of
supporting vehicular movement.
Although this approach offers various distinct advantages, it does suffer from its own
set of drawbacks. Inference of radiation from other electromagnetic waves is one
issue. Also the security offered by such systems is also in doubt owing to the
possibility of any external human interference or an attempt to distort its working
environment.
Through the course of our study and research for this project, we came to know that a
great lack of acknowledgement of the importance and of safe and reliable crossing
system exists. It is therefore imperative to ensure that a significant emphasis is placed on
the design, implementation and maintenance of efficient railway level crossing.
21 | P a g e