Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghj2
AUTOMATED RAILWAY LEVEL CROSSING
3/19/2013 ROHAN L. BHAMARE
2
INDEXIntroductionBlock diagramBasic workingCircuit diagramWorkingProgramApplicationsComponentsVero board componentsDatasheets
3
INTRODUCTIONUnmanned railway level crossings are common
features at many remote locations. For example, the vast railway network of Indian railways faces this issue of level crossings that are either unmanned or need to be operated by trained personnel at those points to avoid Accident of the commuters. In this project we propose to provide a cost effective solution that turns an unmanned railway level crossing into an AUTOMATED UNMANNED RAILWAY LEVEL CROSSING.
Usually, the unmanned railway level crossing does not have gates to control commuting of people across the railway tracks. Also, many railway crossings have gates which are manually operated by commuters themselves or people sneak from beneath the cross bow, this causes thousands of accidents.
In this project, the unmanned railway level crossing is automated by controlling the gates that are interfaced to a Stepper Motor which is controlled by a Microcontroller. The input to the microcontroller is from a set of LDRs which are placed between the tracks. The LDR sense crossing of trains and Microcontroller opens and closes the gates according to appropriate real time conditions for safe commuting.
BLOCK DIAGRAM
4
BASIC WORKING
5
In this project we have used three LDRs as input sensors, Stepper motor to open and close the gates & LEDs as signal indicators for the Train.There are four situations in this project.Situation 1->Suppose the train has not yet arrived then the gates remain open to cause commuting across the track.Situation 2->When train arrives and crosses sensor no.1:
The buzzer at the level crossing is triggered indicating that the train is arriving.
And also the gates start to close. At that time the signal is RED. When the gates are completely closed then only the
signal will become GREEN. The signal will remain RED when the gates are not
properly closed. As soon as the gates are closed completely:
The signal turns GREEN to indicate that the level crossing is cleared and the train can pass.
When this train crosses sensor no.3, again the signal turns RED and also now the level crossing gates open again.
Situation 3->
6
In this situation sensor no.2 plays most important role for saving lives of commuters crossing the tracks.Suppose some vehicle or animal gets stuck in the middle of track or in the middle of railway level crossing, sensor no.2 senses it:
At this condition the signal turns RED indicating for the train driver that the level crossing is not cleared.
The gates remain open until the obstacle (which may be a stuck vehicle or cattle) does not crosses over.
Once they have crossed, the signal turns GREEN to bypass the train.
Once again when the train crosses sensor no.3, signal turns RED and also the gates open again.
Situation 4-> For this situation, even after the gates of the level
crossing are closed and if sensor no.2 senses some hurdle across the railway track, the signal for the train remains RED and the gates of the level crossing open for the hurdle to clear.
Once the obstacle is cleared the gates of the level crossing close and the signal for the train turns GREEN.
Once again when the train crosses sensor no.3, signal turns RED and also the gates open again.
7
CIRCUIT DIAGRAM
8
WORKINGThe working of the Project is based on:
Three LDRs as input sensors A Stepper Motor that controls the Gates LEDs as signals Microcontroller which synchronizes all of the above
according to three situationsThe three input sensors i.e. the LDRs are interfaced to Schmitt inverter (7414). The Schmitt Inverter is used in order to remove noise and proper transitions. Schmitt inverter (7414) is a high speed, Si-gate CMOS device and it provides six inverting buffers with Schmitt trigger action which also gives noise immunity.
For situation 1, the voltages across the input sensors (LDRs) are low, thereby the output of the Schmitt inverter (7414) are high. These signals are fed to the PIC Microcontroller (16F84A). This is an indication that the train has not yet arrived, so, gates of the level crossing are open for the people to cross over.
For situation 2, as soon the train arrives it is sensed by sensor no.1 (LDR 1). Hence the voltage across sensor no.1 becomes high. This change in is then sensed by 16F84A, as its Port B pin RB6 becomes low.
The lower nibble of PORT B i.e. RB0-RB3 are made as output pins i.e. they are interfaced to a stepper motor through current drivers i.e. IC (ULN 2003).
9
As soon as the voltage at RB6 becomes low indicating the arrival of train. The stepper motor is energized hence the gates of the level crossing starts to close.
When the gates of the level crossing is closing the signal for the train is RED. Only when gates of the level crossing are completely closed the signal turns GREEN, for the train to pass.
As soon as the train crosses sensor no.3 (LDR 3), RB4 pin becomes low. Now the stepper motor rotates in the reverse direction for the gates of the level crossing to open. And also at the same time the train signal turns RED.
For situation 3, whenever the level crossing is not cleared completely or if there is any hurdle across the track near the level crossing, then it is sensed by sensor no.2 (LDR 2). In this situation the signal for the train remains RED and gates of the level crossing are opened for the obstacle to move across. Once the obstacle moves across the level crossing or when the level crossing is completely cleared the signal for the train turns GREEN and also the gates of the level crossing closes.
For situation 4, even after the gates of the level crossing are closed and if sensor no.2 (LDR 2) senses some hurdle across the railway track, the signal for the train remains RED and the gates of the level crossing open for the hurdle to clear. Once the obstacle is cleared the gates of the level crossing close and the signal for the train turns GREEN.
10
PROGRAM
;*******AUTOMATED RAILWAY LEVEL CROSSING*******include "p16f84A.inc"
11
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
cblock 0x0cT1T2endc
ORG 0x00goto mainORG 0x04goto main
delay movlw h'ff'movwf T2
loop2 movwf T1loop1 decfsz T1,1
goto loop1decfsz T2,1goto loop2return
stop nopnopmovlw h'00'movwf PORTBreturn
open bsf PORTB,0call delaycall delaymovlw h'00'
12
movwf PORTBbsf PORTB,1call delaycall delaymovlw h'00'movwf PORTBbsf PORTB,2call delaycall delaymovlw h'00'movwf PORTBbsf PORTB,3call delaycall delaymovlw h'00'movwf PORTBcall delaycall delaygoto stopnopnopmovlw h'00'movwf PORTBreturn
close bsf PORTB,3call delaycall delaymovlw h'00'movwf PORTBbsf PORTB,2call delaycall delaymovlw h'00'movwf PORTB
13
bsf PORTB,1call delaycall delaymovlw h'00'movwf PORTBbsf PORTB,0call delaycall delaymovlw h'00'movwf PORTBcall delaycall delaygoto stopnopnopmovlw h'00'movwf PORTBreturn
check movlw h'19' movwf PORTA call open call open call open
recheck movlw h'19' movwf PORTAbtfss PORTB,5goto recheckcall closecall closecall closegoto loop5movlw h'02'
14
movwf PORTAreturn
main bsf STATUS,RP0movlw h'00'movwf TRISAmovlw h'f0'movwf TRISBbcf STATUS,RP0
loop3 movlw h'01'movwf PORTAbtfsc PORTB,4goto loop3movlw h'1d'movwf PORTAcall delaycall delaycall delaycall delaycall delaycall delaycall delaycall delaycall delaycall delay
loop4 movlw h'19'movwf PORTAbtfss PORTB,5goto loop4call close call closecall closecall delaycall delay
15
call delaycall delaycall delaycall delaymovlw h'19'movwf PORTAbtfss PORTB,5goto check
loop5 movlw h'1a'movwf PORTAbtfsc PORTB,6goto loop5movlw h'01'movwf PORTAcall delaycall delaycall delaycall delaycall opencall opencall opengoto loop3end
ADVANTAGES The present prototype can be interfaced with a
Pressure Sensors in place of Light Sensors for Real Time Systems.
The same circuit can be used to drive a real time gate which will be controlled by an electromechanical relays & AC/DC Motors.
16
The present working is especially targeted for unmanned railway level crossings.
DISADVANTAGES In its present form the prototype cannot be used for
collision control of trains approaching on the same track in opposite directions.
Use of Light Sensors is an impediment to the solution in terms of its applications during the night.
COMPONENTS PIC Microcontroller - PIC 16F84A Buffer IC - 74HC245 HEX Inverter - 74HC14 Stepper Motor Driver - ULN2003 Input Sensors - Light dependent resistors Signal Indicators – LEDs
Vero Board Components
Components namesNo. of
components used
17
PIC Microcontroller (16F84A)1
Buffer IC - (74HC245) 1Hex inverter – (74HC14) 1Stepper motor driver IC – ( ULN2003) 1Input sensors – Light dependent resistors 3Signal indicators – LEDs 4Stepper motor 1Resistance(330Ω) 4Resistance(2.8KΩ) 3Resistance(10KΩ) 1Reset switch 1Buzzer 1