Vous êtes sur la page 1sur 32

Electronics Project Kits For Students Click Here

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

Automatic Railway Gate Controller


AUGUST 26, 2017 BY ADMINISTRATOR 80 COMMENTS

Contents [hide]

1 Construction and Output Video


2 Principle of Operation
3 Circuit 1 Automatic Railway Gate Control using 8051
3.1 Circuit Diagram of Automatic Railway Gate Control using 8051
3.2 Project Components
3.2.1 Microcontroller Section
3.2.2 Sensor and Load Section
3.3 Component Description
3.3.1 IR Sensor
3.3.2 L293D Motor Driver
3.4 Circuit Design
3.5 Working
3.6 Advantages and Applications
3.7 Limitations
4 Circuit 2 Automatic Railway Gate Controller with High Speed Alerting System
4.1 Circuit Diagram of Automatic Railway Gate Controller
4.2 Circuit Operation
5 Related Articles

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.

Construction and Output Video

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.

Circuit 1 Automatic Railway Gate Control using 8051


Circuit Diagram of Automatic Railway Gate Control using 8051
Buy Step by step Guide along with Code:Automatic Railway Gate Controller

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

Sensor and Load Section

2 x Reflective Type IR Sensor


2 x 1K Resistor
L293D Motor Driver IC
Motor

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.

A motor is connected to OUT pins of the motor driver.

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.

The gate remains closed as the train passes the crossing.


When the train crosses the gate and reaches second sensor, it detects the train and the
microcontroller will open the gate.
Advantages and Applications
An Automatic Railway Gate Control is implemented with very simple hardware and easy
control.
Human intervention at level crossings can be removed with the help of this project and
many railway level crossing accidents can be prevented.

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.

Circuit 2 Automatic Railway Gate Controller with High Speed


Alerting System
Automatic Railway Gate Control System with High Speed Alerting System is an innovative
circuit which automatically controls the operation of railway gates detecting the arrival and
departure of trains at the gate.

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 Diagram of Automatic Railway Gate Controller


Fig. 2.2: Circuit Diagram of Automatic Railway Gate Controller ElectronicsHub.Org

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.

Figure 2.3: Sensor Arrangement ElectronicsHub.Org

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.

How does the sensor know the last carriage?

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:

Speed (kmph) = Distance/Time

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.

Note: Also Read the Post Automatic Washroom Light Switch


Related Articles

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

Boolean Algebra Password Based Digital Temperature Water Level Indicator


Calculator Circuit Breaker Sensor Circuit

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

Plz forward the code for automatic railway gate controller


Immediately

vasundhara 66.ravi@gmail.com

Reply

Sampath Patel.M. says


OCTOBER 31, 2013 AT 4:53 PM

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

shinu a thomas says


DECEMBER 11, 2013 AT 9:01 AM

pls send me the programming code of microcontroller of railway gate

Reply

sherin says
DECEMBER 15, 2013 AT 5:03 PM

plz send me the details of how the micro controller works

Reply

akhil s m says
DECEMBER 28, 2013 AT 7:13 AM

Can i get the programming code for this


Project please.

Reply

akhil s m says
DECEMBER 28, 2013 AT 7:15 AM

pls send me the programming code of microcontroller of railway gate

Reply
AKHIL S M says
DECEMBER 28, 2013 AT 12:29 PM

please send me the working programming code of microcontroller of automatic railway


gate

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

pls send me microcontroller programming automatic railway gate controller

Reply

aqil sadiq says


APRIL 19, 2014 AT 1:36 PM

dear send me the code. here code was not given.

Reply

Administrator says
APRIL 20, 2014 AT 7:46 AM

Code has been sent.

Reply

Rajesh Kumar arya says


APRIL 9, 2016 AT 11:20 AM

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

Muhammad Umar says


APRIL 10, 2016 AT 11:08 AM

plz send me code


my id is
mumar4252@gmail.com

Reply

varun reddy says


AUGUST 4, 2016 AT 4:54 AM

Admin Please provide the code I am trying to work on it

Reply

Harpreet singh says


APRIL 20, 2017 AT 11:29 AM

sir plz send me code

Reply

Anusha says
JUNE 20, 2017 AT 5:24 AM

Hi please go through this link


http://courses.electronicshub.org/p/automatic-railway-gate-control-using-
8051 for code and other complete information..

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

ajinkya honale says


MARCH 2, 2016 AT 2:48 AM

dear send me the code. here code was not given

Reply

Muhammad Umar says


APRIL 10, 2016 AT 11:07 AM

dear send me the code plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Reply

prem says
MARCH 9, 2016 AT 12:46 AM

hey if u got the code then plz forward it to me

Reply

Akhil Varghese says


APRIL 8, 2016 AT 5:15 AM

Sir if you got the code , please send it to me also.

Thanks

Reply

Varun Reddy says


AUGUST 4, 2016 AT 10:41 AM

Sir if u have got the code please send to my mail id


s.varunreddy09@gmail.com
Thanks in advance

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

please mail me the code

Reply

Administrator says
MAY 30, 2014 AT 6:47 AM

Kindly send your request through contact us page or send a mail to


admin@electronicshub.org

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

krishanveer singh says


JULY 9, 2014 AT 12:55 PM

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

shubham kumar says


SEPTEMBER 24, 2014 AT 3:28 PM
Please send me the design of the project,what materials are needed and how to make it.

Reply

RAMESH UPPARA says


OCTOBER 9, 2014 AT 5:12 AM

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

the hallo says


NOVEMBER 7, 2014 AT 11:40 AM
am interested with your idea. i wanna to know the detail.the requirement analysis, the cost
also the detailed circuit and how i can implement.pls respond me as soon as possible.

Reply

ASHIF AMEEN says


NOVEMBER 16, 2015 AT 12:37 AM

sir, pls sent me the programming code

Reply

sidra shakoor says


NOVEMBER 16, 2015 AT 8:41 AM

i need coding plz help

Reply

sidra shakoor says


NOVEMBER 16, 2015 AT 8:41 AM

plz give me coding

Reply

pranika gupta says


NOVEMBER 19, 2015 AT 2:51 AM

plz can u provide me.with the programming code of the microcontroller and other
necessary details for this.project.

Reply

Anjana Rakesh says


NOVEMBER 20, 2015 AT 9:52 AM

Haiiii sir i am doing this project can u send me the codes

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

how will download this project


I read it its reallynice

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

i want code of this project..plz send it soon..

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

plz send me assembly code of this project.

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

Hello, plz send me a code.

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

thivanka dewas says


JUNE 25, 2016 AT 3:19 AM

plz send da programming code. this is an emergency

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

can you please mail me the code??

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

Pls mail me code for railway gate controller

Reply

vishal says
AUGUST 22, 2016 AT 9:42 AM

I want to project idea , help me

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

Can u please mail me the source code

Reply

Elizabeth says
MARCH 4, 2017 AT 1:20 PM

Pls send me the code for this project

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

please email me the code for this project . thanks

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

Please upgrade to a supported browser


to get a reCAPTCHA challenge.

Alternatively if you think you are getting


this page in error, please check your
internet connection and reload.

Why is this happening to me?

POST COMMENT
Search this website

Suggest A Topic [or] Project

COMPLETE STEP BY STEP GUIDE

ads by media.net

Alert System

Basic Electronics Tutorial

Apollo Gate Operators

Emergency Medical Services

Embedded Systems Projects

Electronics Project Ideas

Simple Electronics Projects

Electronics Hub

YouTube 18K
Electronics Hub

Follow On

Electronics Hub

Suivre

SUBSCRIBE FOR FREE PROJECT CIRCUITS

Enter your email address:

SUBSCRIBE

Delivered by FeedBurner

Electronics Hub
667,246 likes

Like Page Sign Up

Be the first of your friends to like this


ads by media.net

Medical Alert Systems

USB IR Receiver

Apollo Gate Operators

Stepper Motor Drive

Automatic Security Gates

Train Route Planner

Emergency Medical Services

Power Quality Analyzer

Medical ID Bracelets

DC Motor Driver

Gate Security Systems

IR Sensor

Vishay Semiconductors

Swing Gate

New Invention Ideas

PROJECTS BY CATEGORY

Arduino Projects (200+)


Electronics Projects (250+)
Mini Project Circuits (160+)
Mini Project Ideas (150+)
ECE Projects (150+)
EEE Projects (150+)
8051 Projects (110+)
Raspberry Pi Projects (101+)
Electrical Project Ideas (100+)
Embedded Projects (100+)
Latest Electronics Ideas (100+)
Microcontroller Mini Projects (100+)
Robotics Projects (100+)
VLSI Projects (100+)
Solar Projects (100+)
IOT Projects (100+)

Communication Projects (70+)


LED Projects (70+)
Power Electronics Projects (60+)
RFID Projects (60+)
Home Automation Projects (50+)
Matlab Projects (50+)
EIE Projects (50+)
Wireless Projects (50+)
LabView Projects (45+)
Zigbee Projects (45+)
GSM Projects (40+)
555 Timer Circuits (40+)
Sensor Projects (40+)
ARM Projects (60+)
DTMF Projects (30+)
PIC Projects (30+)
Electrical Mini Projects (25)

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

Twitter

Copyright 2017 Electronicshub.org