1. Automatic Railway Gate Control
Using Arduino Uno
A PROJECT REPORT
Submitted by
T.Selvalakshmi
2. Abstract
As Human safety is major goal for Railways. The intention of this of paper is to
achieve automatic control at the level crossings when the arrival/departure of the
train takes place replacing the manual gate control. The railway gate automatically
is closed when a train passes through the railway crossing. The detection of arrival
and departure of train is done by using two IR sensors. The gate opening and
closing is to be done using servo motors/DC motors which is controlled by Arduino
Uno. Buzzers are used to indicate the closing of gate for the people who are trying
to cross the gate. This system helps in avoiding the increased number of the
accidents at level crossing in India. The hardware is supported by the Arduino C
programming. The proposed system is more reliable and cost efficient.
3. INTRODUCTION
In today’s scenario Railway safety becomes the most important aspect of
railways all over the world. As we know the Railways is the cheapest mode of
transportation, and due to manual operation, accidents are likely to happen.
There are 30348 level crossings on Indian Railways across the country.18785
are man handled and 11563 are non-man handled level crossings out of 303048
level crossings. To avoid accidents over previous five years 4792 level
crossings have been removed by the respective Zonal railways of Indian
Railways. The Indian ministry of Railways made a decision focusing on
eliminating all level crossings on availability of railway funds, which could be
4. . The suggest system helps in achieving the safety and to prevent accidents at
the level crossings that are non-man handled. The Automatic railway gate
control system can be employed under non man handled level crossing where
the chances of accidents are higher and requirement of reliable operation are
there. Since, the proposed model suggests an automatic system, it helps in
reducing the error which is in manual operation and it will be used as highly
reliable source. The proposed model suggests a design to control a railway
level-crossing by servo motor/ DC motors using Arduino controller. The
connection of motor is done from Arduino with the help of a motor driver for
6. WORKING
In this proposed model we use USB cable to connect the Arduino Uno to the PC that
will supply the power Arduino Uno and the sensors are powered by 9v battery. After
this Supply is given to ARDUINO the servo motor/DC motor and IR sensor are
controlled and interfaced through the ARDUINO. Now the IR sensor senses the
arrival/departure of the Train and accordingly sets up the Buzzer to notify the
surrounding/nearby area. After which the servo motor/DC motor which here is used to
control the gateway system at the crossing itself takes the corresponding action to
whether open or close the gateway accordingly.
8. Coding Explanation
First the pin mode for the appropriate pins in Arduino Uno. Set the
pin 2 & 3 as a inputs and set the pin 8 & 9 as a outputs. Then enter
into the loop and write the command. When the digitalRead to pin 2
is HIGH then it will HIGH the pin 8, else it check digitalRead to pin
3 if it is HIGH then it will also HIGH the pin 8, if the digitalRead to
pin 2 and 3 both are LOW then it will HIGH the pin 9.
9. Required Components
Arduino Uno R3
L293D motor driver
Lm 358 IC
IR sensor Pairs
DC Motor
Buzzer
LEDs
Jumper Wires
10. Description of components
Arduino Uno
The Arduino UNO is a widely used open-source microcontroller board
based on the ATmega328P microcontroller and developed by
Arduino.cc. The board is equipped with sets of digital and analog
input/output (I/O) pins that may be interfaced to various expansion
boards (shields) and other circuits.[1] The board features 14 Digital pins
and 6 Analog pins. It is programmable with the Arduino IDE
(Integrated Development
12. Technical Specifications
Microcontroller: ATmega328P
Operating Voltage: 5v
Input Voltage: 7-20v
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 20 mA
DC Current for 3.3V Pin: 50 mA
Flash Memory: 32 KB of which 0.5 KB used by bootloader
SRAM: 2 KB
EEPROM: 1 KB
Clock Speed: 16 MHz
Length: 68.6 mm
Width: 53.4 mm
Weight: 25 g
13. H-Bridge Motor Driver
An H bridge is an electronic circuit that switches the polarity of a voltage applied to a
load. These circuits are often used in robotics and other applications to allow DC
motors to run forwards or backwards. Most DC-to-AC converters (power inverters),
most AC/AC converters, the DC-to-DC push–pull converter, most motor controllers,
and many other kinds of power electronics use H bridges. In particular, a bipolar
stepper motor is almost invariably driven by a motor controller containing Two H
Bridges.
15. IR Sensor Module
Working method
When we turn ON the circuit there is no IR radiation towards photodiode and the
Output of the comparator is LOW. When we take some object (not black) in front of IR
pair, then IR emitted by IR LED is reflected by the object and absorbed by the
photodiode. Now when reflected IR Falls on Photodiode, the voltage across photodiode
drops, and the voltage across series resistor R2 increases. When the voltage at Resistor
R2 (which is connected to the non-inverting end of comparator) gets higher than the
voltage at inverting end, then the output becomes HIGH and LED turns ON.
17. Working method
Voltage at inverting end, which is also
called Threshold Voltage, can be set
by rotating the variable resistor’s knob.
Higher the voltage at inverting end (-),
less sensitive the sensor and Lower the
voltage at inverting end (-), more
sensitive the sensor.
IR sensor module
18. DC Motor
A DC motor usually means a permanent-magnet, direct-current
(DC) motor of the sort used in toys, models, cordless tools, and
robots. These motors are particularly versatile because both their
speed and direction can be readily controlled; speed by the
voltage or duty cycle of their power supply, and direction by its
polarity.
19. DC Motor
Torque is a measurement of the motors power. The higher the torque of the motor the
more weight it can move. DC motors provide different amounts of torque depending on
their running speed, which is measured in RPM (revolutions per minute). At low RPM
DC motors produce poor torque, and generally the higher the RPM, the better the
motors torque. However, in high torque, the speed may be too high for an application.
That's why we have to use gears (or geared motor) to reduce the overall speed of the
motor and running at the top speed to get the most power to, say, a wheel attached to
the shaft of the motor.
20. Battery
A 9V battery is required to supply
the dc power to drive the Arduino
Uno and other components
connected to the Arduino.
21. Software
Arduino IDE is used to develop the
prototype of the software. Arduino
IDE is available at the official
website of Arduino. This is open
source. So any one can develop
anything according to their
choices.
22. FUTURE SCOPE
Though this prototype is simple to build and highly reliable but there’re some obstacles too.
Rather than a train if an animal or other object is placed in front of the IR sensor the alarm will
and the gate will be closed which is not desirable at all. Also other natural obstacles like fog may
arise problems. There’re also a scope of alerting the nearest railway station about arrival and
departure of the train. The problems indicated above can be overcome by adding some extra
modules.
Like we left the GSM module for future scope. After adding this module, upon arrival and
departure of train, the GSM module will send an SMS to registered phone number for
acknowledgement and safety. Also adding a pair of pressure sensor increases the chance of fault
triggering of gate as well as alarm. After adding the pressure sensor, the Arduino closes the gate
after receiving both signal from IR sensor as well as pressure sensor.
23. Problems
Working in this project, some problems have been faced by us .The problems are given below:
First of all, the value of resistances should be changed as the voltage changes with the change of
light .It is very difficult to vary the resistance for the perfect operation.
Another problem is IR sensor easily damages so that the operation hampers.
IR sensor is light dependent sensor. It varies with the change of light so it is not applicable for all
environment.
IR sensor works at a certain distance .If the distance is increased the IR will not work which is a
drawback of this project.
24. 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 speed of the train. The system can also generate
buzzer while gate close. In this system, this is controlled by using ATmega328p
microcontroller. Now a day’s automatic system occupies each and every sector of
applications as it is reliable and accurate.