Automatic Unmanned Railway Gate Control System

1.     AIM:
The aim of this project is to Automate unmanned railway gate using 8051 microcontroller.

2.     ABSTRACT:
The aim of this project is to Automate unmanned railway gate using microcontrollers. The objective of this project is to manage the control system of railway gate using the microcontroller. When train arrives at the sensing point alarm is triggered at the railway crossing point so that the people get intimation that gate is going to be closed. Then the control system activates and closes the gate on either side of the track. Once the train crosses the other end control system automatically lifts the gate. For mechanical operation of the gates stepper motors are employed. Here we are using embedded controller built around the 8051 family (AT89C52) for the control according to the data pattern produced at the input port of the micro controller, the appropriate selected action will be taken. The software program is written, by using the KEIL micro vision environment. The program written is then converted in HEX code after simulation and burned on to microcontroller using FLASH micro vision.  

3.     APPROACH: 
Present project is designed using 8051 microcontroller to avoid railway accidents happening at unattended railway gates, if implemented in spirit. This project utilizes two powerful IR transmitters and two receivers; one pair of transmitter and receiver is fixed at upside (from where the train comes) at a level higher than a human being in exact alignment and similarly the other pair is fixed at down side of the train direction. Sensor activation time is so adjusted by calculating the time taken at a certain speed to cross at least one compartment of standard minimum size of the Indian railway. We have considered 5 seconds for this project. Sensors are fixed at 1km on both sides of the gate. We call the sensor along the train direction as ‘foreside sensor’ and the other as ‘after side sensor’. When foreside receiver gets activated, the gate motor is turned on in one direction and the gate is closed and stays closed until the train crosses the gate and reaches aft side sensors. When aft side receiver gets activated motor turns in opposite direction and gate opens and motor stops. Buzzer will immediately sound at the fore side receiver activation and gate will close after 5 seconds, so giving time to drivers to clear gate area in order to avoid trapping between the gates and stop sound after the train has crossed.



4.     COMPONENTS:

1.      8051 microcontroller
2.      IR Transmitter
3.      IR Receiver
4.      Stepper Motor Circuit

Ø IR CIRCUITS
This circuit has two stages: a transmitter unit and a receiver unit. The transmitter unit consists of an infrared LED and its associated circuitry.
Ø IR TRANSMITTER
The IR LED emitting infrared light is put on in the transmitting unit. To generate IR signal, 555 IC based astable multivibrator is used. Infrared LED is driven through transistor BC 548. IC 555 is used to construct an astable multivibrator which has two quasi-stable states. It generates a square wave of frequency 38 kHz and amplitude 5 Volts. It is required to switch ‘ON’ the IR LED.
Ø IR RECEIVER
The receiver unit consists of a sensor and its associated circuitry.  In receiver section, the first part is a sensor, which detects IR pulses transmitted by IR-LED. Whenever a train crosses the sensor, the output of IR sensor momentarily transits through a low state. As a result the monostable is triggered and a short pulse is applied to the port pin of the 8051 microcontroller. On receiving a pulse from the sensor circuit, the controller activates the circuitry required for closing and opening of the gates and for track switching.
Ø STEP MOTOR
Step motors convert electrical energy into precise mechanical motion. These motors rotate a specific incremental distance per each step. The number of steps executed controls the degree of rotation of the motor’s shaft. This characteristic makes step motors excellent for positioning applications.
Step motors can be very accurately controlled in terms of how far and how fast they will rotate. The number of steps the motor executes is equal to the number of pulse commands it is given. A step motor will rotate a distance and at a rate that is proportional to the number and frequency of its pulse commands.

5.     CODE:
org 000h
mov p1,#00h
mov p0,#00h
mov p2,#0ffh
mov p3,#0ffh
main :
               lcall checkswitch1
               lcall checkswitch2
               sjmp main
checkswitch1:
off:      
                       mov a,p2
                       xrl a,#0ffh
                       cjne a,#01h, off
                       lcall switchon
                       ret
switchon:
                       mov a,#01h
                       mov p0,a
                       mov a,#66h
                       mov p1,a
                       lcall delay
                       mov p0,#00h
                       ret
checkswitch2:
off2:                            
                       mov a,p3
                       anl a,#0ffh
                       cjne a,#0feh, off2
                       lcall switch2on
                       ret
switch2on:
                       mov p0,#01h
                       mov p1,#09h
                       lcall delay
               mov p0,#00h
                       ret
delay:
                       mov r1,#013h
go:                              
                       mov r2,#30h
go2:                            
               djnz r2,go2  
               djnz r1,go
                       ret
end



6.     RESULT:

The code is implemented in Keil software and hardware is implemented in Proteus
software. Following snapshots are taken from Proteus software.

Ø Before Sensor 1 Crossing:
The Railway Gate is opened as no disturbance in Sensor 1 and Sensor 2


Ø After Signal 1 Crossing:
The Railway Gate is closed as train passes through the Sensor 1.


Ø After Signal 2 Crossing:

Again Railway Gate is opened as train passes through the Sensor 2.

4 comments:

  1. but what is the name of the element on the Proteus schema that is connected on the resistor and that one on the extreme right that is separate connected to an earthing

    ReplyDelete
  2. SIR CAN I GET YPUR CONTACT NUMBER.

    ReplyDelete