Automatic Railway Gate Controller
Automatic Railway Gate Controller
Automatic Railway Gate Controller
ELECTRONICS HUB
P R O J E C T S | T U T O R I A L S
HOME FREE PROJECT CIRCUITS EMBEDDED AVR MICROCONTROLLER AUTOMATIC RAILWAY GATE CONTROLLER
Contents [hide]
Automatic Railway Gate Control System is a simple but very useful project, which help is
automatically opening and closing the railway gate upon detecting arrival or departure of the
train.
In general, Railway gates are opened or closed manually by a gate keeper. The information
about arrival of train for opening or closing of door is received from nearby station. But some
railway crossings are totally unmanned and many railway accidents occur at these unmanned
level crossings.
To avoid the human intervention at level crossings completely, we need to automate the
process of railway gate control.
We have two different Automatic Railway Gate Control circuits mentioned in this article: using
8051 and AVR.
Principle of Operation
The principle of operation behind the working of this project lies in the functioning of IR Sensor.
A Reflective type IR Sensor is used in this project.
In Reflective Type IR Sensor, the IR transmitter and receiver are placed side by side. When
there is no obstacle in front of the sensor, the IR rays transmitted by the IR Transmitter will
travel undetected as there are no rays falling on the IR Receiver.
If there is an obstacle in front of the IR Transmitter and Receiver pair, the IR Rays gets reflected
off from the surface of the obstacle and are incident on the IR Receiver.
This setup can be configured to detect an object like a Train and in turn can be used to switch
ON or OFF the loads like motors with the help of microcontroller.
Project Components
Microcontroller Section
AT89C51 MCU
11.0592 MHz Quartz Crystal
2 x 33pF Ceramic Capacitor
10F / 16V Electrolytic Capacitor
10K Resistors x 2
AT89C51 Programmer Board
Component Description
IR Sensor
An IR sensor is used in this project to sense the arrival and departure of the train.
An IR Sensor generally comprises of two components: an IR Transmitter and an IR
Receiver. An IR Transmitter is a device that emits IR Rays.
Similarly, an IR Receiver is a device that detects the IR Rays. Photo Diodes are the most
commonly used IR Receivers.
The following image shows the circuit of IR Sensor used in this project.
L293D Motor Driver
L293D is a motor driver IC used in this project to control the gate motor. L293D Motor Drive IC
is a dual H-bridge type motor driver and is available in 16-pin Dual in-line Package.
With the help of this motor driver IC, we can control two motors at a time with both forward
and reverse direction control for individual motors.
Motor drivers are generally used to drive high current drawing devices like DC Motors, stepper
motors, high intensity lights, etc. They act as simple current amplifiers as their input is a low
current signal usually from a microcontroller and their output is a high current signal to drive
the loads.
Circuit Design
Major components of our project are 8051 microcontroller (AT89C51), Reflective Type IR
Sensor, L293D Motor Driver IC and a Motor.
The mandatory connections for 8051 MCU include oscillator circuit, reset switch and EA Pin.
A crystal oscillator of up to 20MHz can be used as a source of external clock. In this project, an
11.0592 MHz quartz crystal oscillator is used. To complete the external oscillator circuit, two
33pF capacitors are used. Finally, the EA pin is pulled high using a 10K resistor.
Now, let us see the actual connections required to implement the project. In that, first is the
L293D Motor drive. The inputs (IN1 and IN2) to the motor driver (Pins 1 and 2) are given from
Port 0 of the microcontroller.
But before connecting them, two 1K resistors are used to pull the Port 0 pins high. Now,
connect the motor driver input pins i.e. IN1 and IN2 to first two pins of Port 0 i.e. P0.0 and P0.1.
Finally connect two IR sensors to the microcontroller: one for detecting the arrival of the train
and one for detecting the departure of the train.
So, connect the data outputs of the IR sensors to the pins P2.6 and P2.7 of the microcontroller.
Working
The working of the project is very simple and is explained here.
Practically, the two IR sensors are placed at left and right side of the railway gate. The
distance between the two IR sensors is dependent on the length of the train. In general
we have to consider the longest train in that route.
Now well see how this circuit actually works in real time. In this image, we can see the
real time representation of this project.
If the sensor 1 detects the arrival of the train, microcontroller starts the motor with the
help of motor driver in order to close the gate.
Limitations
The system can be implemented more efficiently by incorporating more efficient sensor
network.
A combination manual wireless control and sensors based control can be used for better
operation.
It has detectors at the far away distance on the railway track which allows us to know the
arrival and departure of the train.These detectors are given to microcontroller which activates
the motors which open/close the railway gate correspondingly.
Also Read the Post: Automatic Door Bell With Object Detection
Another feature of this circuit is that it has an intelligent alerting system which detects the
speed of the train that is arriving. If the speed is found to be higher than the normal speed,
then the microcontroller automatically activates the alarm present at the gate.
This alerts the passengers at the railway crossing on the road about this. Also This circuit has
the feature for Identification of train from other intruders i.e, animals etc .This can be
implemented in manned level crossings also, as manual errors can be eliminated by
automation.
Circuit Operation
The operation of the circuit can be clearly explained as follows. Basically the circuit consists of
four IR LED-Photo diode pairs arranged on either side of the gate such that IR LED and
photodiodes are on either side of the track as shown in the figure below.
Initially transmitter is continuously transmitting the IR light which is made to fall on the
receiver. When the train arrives it cuts the light falling on receiver. Let us assume the train is
arriving from left to right, now when the train cuts the 1st sensor pair a counter is activated and
when it crosses 2nd sensor pair the counter is stopped. This counter value gives the time
period which is used to calculate the velocity of the train.
The sensor2 output is sent to microcontroller which makes the relay activate which causes the
gate to be closed. Now when the last carriage of the train cuts the sensor4 microcontroller de-
activates the relay and gates are opened.
Here as previously mentioned the counter value is used to calculate the velocity of the train,
which means that every wheel of the carriage cuts the sensor pair within small fraction of time
based on its velocity. After the last carriage is passed there is no obstacle to the sensor pair
within that fraction of time hence it knows that the train has left.
One more feature of this circuit is detecting a train accurately i.e, there may be a chance that
some obstacle (for e.g some animal) may cut the sensor then in such a case the counter is
made to run for certain period of time (this time period is set considering the possible lowest
speed of train) if the obstacle does not cut the 2nd sensor before this predefined time then this
obstacle is not considered as train and gates remain opened.
Another advantage of calculating the velocity of train is, if the speed of the train crosses a limit
i.e, if it is traveling at an over speed then the passengers are alerted using a by activating a
buzzer.
The system basically comprises two IR LED Photodiode pairs, which are installed on the
railway track at about 1 meter apart, with the transmitter and the photodiode of each pair on
the opposite sides of the track. The installation is as shown in the block diagram. The system
displays the time taken by the train in crossing this distance from one pair to the other with a
resolution of 0.01 second from which the speed of the vehicle can be calculated as follows:
As distance between the sensors is known and constant, the time is counted by the
microcontroller and from this information, we can calculate the speed.
This circuit has been designed considering the maximum permissible speed for trains as per
the traffic rule.
The microcontroller is used to process the inputs that are provided by the sensors and
generate the desired outputs appropriately.
Line Follower Robot Temperature Street Light Glowing Density Based Traffic
using Microcontroller Controlled DC Fan On Detecting Vehicle Signal System using
using Microcontroller Movement Using IR Microcontroller
Sensor
FILED UNDER: AVR MICROCONTROLLER, ELECTRONICS, EMBEDDED, FREE PROJECT CIRCUITS, MINI PROJECTS
Comments
VIVEK says
SEPTEMBER 29, 2013 AT 10:42 AM
In automatic railway gate controller with high speed alerting system AVR microcontroller is
used but the programming of microcontroller is not available in the project so I request you
to provide the programming of microcontroller because I am interested in making this
project.
Reply
yanie says
NOVEMBER 16, 2013 AT 3:24 PM
I am interested in making this project. Can you provide the complete information of
this project. I also need the programming coding of the micro controller.Thank you
Reply
salma says
OCTOBER 21, 2013 AT 4:15 AM
plz mail me code of Automatic Railway Gate Controller with High Speed Alerting System
of this project.
Reply
bishnu says
OCTOBER 8, 2014 AT 6:04 AM
did u got the source of diz project if u have den plz fwd me ma mail id is
bis.mfsd@gmail.com
Reply
Sowmya says
FEBRUARY 23, 2017 AT 5:22 AM
vasundhara 66.ravi@gmail.com
Reply
Can you please provide the complete information of circuit and document of multi solar
tracking system and its project for daily use instead of prototype. To use it for regular use.
Reply
crystal says
NOVEMBER 17, 2013 AT 3:40 PM
can you help me by provide the complete information regarding the circuit and also the
coding. i really interested in your project tq
Reply
Reply
sherin says
DECEMBER 15, 2013 AT 5:03 PM
Reply
akhil s m says
DECEMBER 28, 2013 AT 7:13 AM
Reply
akhil s m says
DECEMBER 28, 2013 AT 7:15 AM
Reply
AKHIL S M says
DECEMBER 28, 2013 AT 12:29 PM
Reply
sreelakshmi says
JANUARY 6, 2014 AT 6:18 PM
please give the code for the project automatic railway gate controller in assembler
language.please
Reply
suraj says
JANUARY 14, 2014 AT 12:07 PM
Reply
Reply
Administrator says
APRIL 20, 2014 AT 7:46 AM
Reply
Sir,
I am working on this project of automatic railway gate controlling, can you please
provide me the program code for this project. I need this cide very soon as
possible . please forwaord that code to my email id if possible as soon .
Thank you sir in advance. My email id is rajesh_creator@live.com
Reply
Reply
Reply
Reply
Anusha says
JUNE 20, 2017 AT 5:24 AM
Reply
missKylie says
JUNE 15, 2017 AT 5:22 AM
i want the code too but in assembly language,,can u email the code for me?
Reply
Reply
Reply
prem says
MARCH 9, 2016 AT 12:46 AM
Reply
Thanks
Reply
Reply
Jason says
MAY 21, 2014 AT 2:52 PM
Im also very interested on this project, can provide me detail about the project? codes?
Reply
shashank says
MAY 27, 2014 AT 5:40 PM
Reply
Administrator says
MAY 30, 2014 AT 6:47 AM
Reply
shashank says
MAY 27, 2014 AT 5:42 PM
I am interested in making this project. Can you provide the complete information of this
project. I also need the programming coding of the micro controller.Thank you
Reply
sagufa says
JUNE 12, 2014 AT 3:05 PM
can you help me by providing the complete information of designing the circuit.It would be
a great help.I am interested in making this project.
Reply
sagufa says
JUNE 12, 2014 AT 4:04 PM
Please send me the design of the project,what materials are needed and how to make it.
Reply
sir please provide the source code for the microcontroller of this project send it to the mail
id kamalrocksy@gmail.com without the source code this project is waste so please send it
soon thanks you sir
Reply
veera says
SEPTEMBER 6, 2014 AT 3:04 PM
I am interested in doing this project. please provide complete information regarding it..
Reply
Ashok says
SEPTEMBER 14, 2014 AT 11:20 AM
Please provide complete information about the project and contact details from whom this
can be available. then it can be planned to implement and save the life of road user.
Reply
Ashok says
SEPTEMBER 14, 2014 AT 11:22 AM
please give in detail for implementation, so that life of road user can be safe.
Reply
Reply
sir i am intrested to make this project.so kindly provide full information about this projects
Reply
Administrator says
OCTOBER 10, 2014 AT 7:20 PM
Here we provided complete information, still if you require any additional information
you can comment below.
Thank you.
Reply
dhurgadevi says
OCTOBER 10, 2014 AT 10:21 AM
sir can you send me the entire info of this project..i already send u a mail regarding this but
i didnt get any reply from u..
Reply
Administrator says
OCTOBER 10, 2014 AT 7:18 PM
Complete information you can collect from here, almost we provided entire data here.
Thank you.
Reply
Reply
Reply
Reply
Reply
plz can u provide me.with the programming code of the microcontroller and other
necessary details for this.project.
Reply
Reply
R.Narmatha says
NOVEMBER 27, 2015 AT 7:14 AM
I want to know the entire operation and microcontroller code please send it to me
Reply
aravind says
NOVEMBER 28, 2015 AT 1:14 PM
Reply
ganimarine says
JANUARY 24, 2016 AT 1:48 AM
I want to know the entire operation and micro controller code please send it to my emailid
Reply
prem says
MARCH 9, 2016 AT 12:42 AM
Reply
prem says
MARCH 9, 2016 AT 12:44 AM
hey, i want the codes for this project plzz send it soon
Reply
VIGNESHWAR says
APRIL 3, 2016 AT 12:13 AM
Im interested in doing this project. Could u give me the complete information including the
program code
Reply
Spha says
APRIL 4, 2016 AT 3:07 AM
Can you please provide me with a full details of this project including the coding for the
micro controller.
Reply
Sphamandla says
APRIL 4, 2016 AT 3:11 AM
Would you please send me the full project details including the coding for micro-
controller, I want to do this project.
Reply
umang says
APRIL 11, 2016 AT 8:33 AM
Reply
Gopika P says
APRIL 21, 2016 AT 5:54 AM
I am interested in this project. Can I get help rgarding the code of the project.My mail id is
given.
Reply
Vineet says
MAY 10, 2016 AT 1:05 AM
can you please send me the program,i have tried on my own but im not able to get the
output
Thankyou
Reply
Roman says
MAY 29, 2016 AT 3:55 AM
Reply
RafiQ says
JUNE 12, 2016 AT 6:36 AM
Even Im started to do this project.. .. But Ive a doubt between is the ATMEGA16L
microcontrollee is already programed as for this operation by manufacturer or we have to
program this for this operation If weve to program this can please send me the
programing code pleaseeee
Reply
Reply
anjali says
JULY 7, 2016 AT 3:38 AM
sir im realy intrested in this project i really want to do this project for my smartcity can u plz
send me the coding part of the project.thanku
Reply
manoj says
JULY 8, 2016 AT 12:27 AM
sir
can you send me ckt. of automatic railway crossing system with component and ckt. pcb.
Reply
Subashini says
JULY 13, 2016 AT 12:59 PM
Reply
Subashini says
JULY 13, 2016 AT 1:24 PM
can you please mail me the complete working and microcontroller code??
Reply
Kartikswarn .k says
JULY 21, 2016 AT 12:59 AM
Reply
vishal says
AUGUST 22, 2016 AT 9:42 AM
Reply
Johne192 says
AUGUST 24, 2016 AT 8:37 AM
I was looking through some of your blog posts on this internet site and I conceive this web
site is rattling informative ! Keep on posting . bbdgeegaeded
Reply
Sowmya says
FEBRUARY 23, 2017 AT 5:33 AM
plz forward the programming code for automatic railway gate controller high alert system
immediately plz
vasundhara66.ravi@gmail.com
Reply
vinay says
FEBRUARY 23, 2017 AT 7:41 AM
sir i am really interested in this project i really want to do this project for Technical Fest can
u plz send me the complete information regarding circuit and code of the project.thank
you.
E-mail:ummadi.vinay@yahoo.com
Reply
Anusha says
JUNE 20, 2017 AT 5:25 AM
Hi vinay go through this link for complete info regarding circuit and code
http://courses.electronicshub.org/p/automatic-railway-gate-control-using-8051
Reply
vinay says
FEBRUARY 23, 2017 AT 7:43 AM
sir i am really interested in this project i really want to do this project for Technical Fest can
u pleaze send me the complete information regarding circuit and code of the project.thank
u
Reply
monica says
FEBRUARY 27, 2017 AT 8:28 AM
Can you pls send me programming code of this project as soon as possible??
Reply
bhavesh patil says
FEBRUARY 28, 2017 AT 2:27 AM
hello i want to make this railway gate monitoring system project and i want total cost for
this project and when i will get if order ..please tell me thanks
Reply
Jovita says
MARCH 2, 2017 AT 4:09 AM
Reply
Elizabeth says
MARCH 4, 2017 AT 1:20 PM
Reply
silver says
MAY 7, 2017 AT 5:52 AM
hi, can you please mail me the code??i really need your help..please
awaljefri00@gmail.com
Reply
hazirah says
MAY 8, 2017 AT 10:07 PM
Reply
Anusha says
JUNE 20, 2017 AT 5:23 AM
Please go thorough this course we have provided code along with detailed
information of the projecthttp://courses.electronicshub.org/p/automatic-railway-
gate-control-using-8051
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
reCAPTCHA
POST COMMENT
Search this website
ads by media.net
Alert System
Electronics Hub
YouTube 18K
Electronics Hub
Follow On
Electronics Hub
Suivre
SUBSCRIBE
Delivered by FeedBurner
Electronics Hub
667,246 likes
USB IR Receiver
Medical ID Bracelets
DC Motor Driver
IR Sensor
Vishay Semiconductors
Swing Gate
PROJECTS BY CATEGORY
GENERAL
Tutorials
Symbols
Courses
Calculator
Contact
PROJECTS
Electrical
Electronics
Embedded
Power
Robotics
ARM
IOT
PROJECTS
Mini projects
Microcontroller
Aurdino
Solar
Free circuits
Home Automation
TUTORIALS
Capcitors
Resitors
Filters
Diodes
Transistors
TUTORIALS
Amplifiers
IO Devices
Thyristors
DC Circuits
Nummber System
FOLLOW US
Facebook
Youtube
Google Plus