MICROCONTROLLER BASED AUTOMATIC RAILWAY GATE CONTROL

ABSTRACT:
The objective of this paper is to provide an automatic railway gate at a levelcrossing replacing the gates operated by the gatekeeper. It deals with two things. Firstly, it deals with the reduction of time for which the gate is being kept closed. And secondly, to provide safety to the road users by reducing the accidents. By the presently existing system once the train leaves the station, the stationmaster informs the gatekeeper about the arrival of the train through the telephone. Once the gatekeeper receives the information,he closes the gate depending on the timing at which the train arrives. Hence, if the train is late due to certain reasons,then gate remain closed for a long time causing traffic near the gates. By employing the automatic railway gate control at the level crossing the arrival of the train is detected by the sensor placed near to the gate. Hence, the time for which it is closed is less compared to the manually operated gates and also reduces the human labour. This type of gates can be employed in an unmanned level crossing where the chances of accidents are higher and reliable operation is required. Since, the operation is automatic, error due to manual operation is prevented . Automatic railway gate control is highly economical microcontroller based arrangement, designed for use in almost all the unmanned level crossings in the country.

INTRODUCTION:
In this paper we are concerned of providing an automatic railway gate control at unmanned level crossings replacing the gates operated by gate keepers and also the semiautomatically operated gates. It deals with two things. Firstly, it deals with the reduction of time for which the gate is being kept closed. And secondly, to provide safety to the road users by reducing the accidents that usually occur due to carelessness of road users and at times errors made by the gatekeepers. By employing the automatic railway gate control at the level crossing the arrival of train is detected by the sensor placed on either side of the gate at about 5km from the level crossing. Once the arrival is sensed , the sensed signal is sent to the microcontroller and it checks for possible presence of vehicle between the gates, again using sensors. Subsequently, buzzer indication and light signals on either side are provided to the road users indicating the closure of gates. Once, no vehicle is sensed in between the gate the motor is activated and the gates are closed. But, for the worst case if any obstacle is sensed it is indicated to the train driver by signals(RED) placed at about 2km and 180m,so as to bring it to halt well before the level crossing. When no obstacle is sensed GREEN light is indicated, and the train is to free to move.

SG1 and SG4 are placed at 2Km on either side of the gate whereas SG2 and SG3 are placed at 180m from the gate. the time for which the gate is closed is less compared to the manually operated gates since the gate is closed depending upon the telephone call from the previous station.SG3 and SG4 are placed near the gate each at a specified distance. The train may be approaching the gate in either direction. The signal about the departure is sent to the microcontroller. B Buzzer. i) Initial Signal Display: Signals SG1. Also reliability is high as it is not subjected to manual errors. ii) Train Arrival Detection: IR transmitter .SG2. placed at about 1 km from the gate to detect the train departure on either directions. R1 & R2 Sensors on the track. R3 & R4 Sensors on the track. an audio signal to warn the road user about the approach of train.SG3 & SG4 Signals placed by the side of the track to indicate the train driver about the closing of the gate. M Motor for gate operation. LEVEL CROSSING 89C51 CONTROLLER MICRO R1 R4 R3 R2 M M SG1 SG2 SG4 SG3 L L B B RAILWAY GATE CONTROL rail track road The detailed description of the working of the above model can be explained under various heads. So all four signals are made RED initially to indicate that gate is open and vehicles are passing through the gate.SG2. SG1. placed at about 5 km from the gate to detect the train arrival on either directions. which in turn operates the motor and opens the gate. The road user signals are made GREEN so that they can freely move through the gate buzzer is made µOFF¶ since there is no approach of train and road users need not be warned.The departure of the train is detected by sensors placed at about 1km from the gate. L Light signal to warn the road user. Thus.

a comparator and a transistor switch. iv) Sensing For Vehicles: Laser light is used as a source and LDR as a tool for sensing purpose. IR receiver. RED signal appears for the road user once the train cuts the relay sensor placed 5Km before the gate. The same is applied for in the other direction and SG3 and SG4 are made GREEN and gates are closed. road users are warned about the train approach by RED signals placed to caution the road users passing through the gate. then it automatically produces the signal to operate the motor through relay circuit and hence .R3 and R4 placed on either side of the gate. if there is a sudden breakdown of a vehicle between the gate. A buzzer is made ON as a precautionary measure for the road user and that nobody should enter the gate at that moment. Its output voltage is the difference between this voltage drop and input voltage to the sensor. the comparator produces -12V saturation when it senses a train and +12V if not. Since there is no vehicle or obstacle. then the laser light from the source falls on the LDR since there is no obstacle. Correspondingly.R1 is used to sense the arrival while R3 senses the departure of train.R4 senses the approach and R2 the departure respectively in the other direction of train arrival. If there is no vehicle in between or beneath the gates. IR transmitter gives IR rays whose wavelength depends upon the vibration of track that corresponds to the input frequency . In a particular direction of approach.R2. This change of resistance of LDR is used for sensing by the micro controller 89C51 by the use of compensation. In the same way. The sensor comprises of an IR transmitter. Then the obstacle should be warned to clear the path. v) Gate Closing Operation: Once the microcontroller senses that there is no vehicle inside. signal is made GREEN for the train to pass through the gate. This is transmitted employing FM to the microcontroller. If frequency increases its wavelength increases and thus reduces the resistance of the IR receiver.IR receiver Comparator ~ Transistor switch +V Detection of a train approaching the gate can be sensed by means of sensors R1. Based on the vibration of the track as the train approaches the sensor works. When light strokes on LDR its resistance decreases and when light does not strike LDR its resistance remains at normal value. Thus. then the light from laser source does not fall on LDR. This is fed to the comparator whose reference voltage is based on the threshold frequency which is minimum frequency caused by a slow train. a transistor switch produces +5V and 0V respectively. It reduces voltage drop across the receiver. Due to some unavoidable circumstances. It indicates the presence of vehicle and the signal for train should be made RED in order to slow down the train to avoid collision. iii) Warning For Road Users: At the moment the train arrival is sensed on either side of the gate.

STEP 3: Make initial settings of the signals for the train and road users. STEP 10: Open the gate. Otherwise repeat STEP 6. This rotary motion is converted to linear motion of the gate using a gear. Otherwise repeat STEP 9. FLOW CHART: Make the initial settings for train & road users If arrival of . vi) Signal For Train: When the path is clear inside the gate. signal is made RED for the train in order to slow down its speed before 5 Km from the gate. If there is no obstacle go to STEP 7. When any presence of obstacle is sensed. signal is given to the Microcontroller which operates the motor in reverse direction and the gates are opened. Another signal placed at 180 m before the gate. 89C51 gives signal for obstacle to clear the path and once the path is cleaned. Once the gate is opened signal for road users are made GREEN so that the vehicles can pass through the gate. vi)Train Departure Detection: Detection of train departure is also done using relay technique as explained under the head of train arrival detection. Train departure sensing is done by sensors R3 and R2 respectively considering the directions of train approach. GREEN signal is produced for the train when there is any obstacle. STEP 6: Check for the presence of the obstacle using sensors. motor is operated to close the gate. STEP 9: Check for the train departure by the sensors. STEP 7: Close the gate and stop the buzzer warning. Actually rotary motion occurs in a motor. Otherwise repeat STEP 4. viii) Gate Opening: When the train departure is sensed by the sensors.close the gate for the passage of train. STEP 2: Set the variables. STEP 8: Change the signal for the train. If the train sensed go to next STEP. ALGORITHM: STEP 1: Start. STEP 4: Check for the arrival of the train in either direction by the sensors. STEP 12: Stop. STEP 5: Make the warning signal for the road users and set the signal for the train. when it is still RED when train approaches if then provisions if then provisions should be stop the train. STEP 11: Go to STEP 3. If the train is sensed go to STEP 5.

reg p2.reg p3.0 sig2g .reg p2.7 rlysens2 .0 laser .1 sig3r .7 rsg6r .reg p1.reg p0.reg p0.6 ldr1 .reg p2.reg p3.reg p3.reg p2.reg p3.reg p0.3 ldr3 .6 rlysens3 .reg p2.0 rlysens1 .4 sig4r .1 ldr4 .reg p3.reg p0.3 sig3g .3 sig2r .reg p2.reg p2.2 ldr1 .2 sig1g .4 rsg5r .2 sig1r .reg p3.reg p3.reg p0.1 count .1 ce .2 rsg5g .reg 24h .reg p3.reg p1.5 sig4g .reg p0.train in either of directions Buzzers & signal warnings to road users Stop warning & close the gate Set the signal for train If train departure Open the gate If obstacles SOURCE CODE : ASM PROGRAMME FOR AUTOMATIC RAILWAY GATE CONTROL: gateon .reg p1.reg 23h count2 .5 rlysens4 .4 buzzer .reg p2.5 rsg6g .0 gateoff .

#ffh loop2: djnz count2.loop20 jnb ldr3.loop20 jnb ldr4.#ffh loop15: mov count2.loop15 call dly mn: setb sig1r setb sig2r setb sig4r setb sig3r setb rsg5g setb rsg6g clr buzzer clr laser main: jnb rlysens1.#03h clr buzzer clr laser clr gateon clr gateoff gon: mov count1.#00h mov p2.loop20 jnb ldr2.loop20 jnb ldr3.loop20 loop2a: call gatecls clr buzzer clr laser .loop1 jb rlysens4.main clr sig4g setb buzzer setb laser setb rsg5r clr rsg5g setb rsg6r clr rsg6g jnb ldr1.loop2 djnz count1.org 0000h jmp start org 0003h reti org 000bh reti org 0013h reti org 001bh reti org 0023h reti start: clr ce mov p0.

loop23 loop24: call gatecls clr buzzer .loop21 jnb ldr2.clr sig3r clr sig4r setb sig4g setb sib3g loop5: jb rlysens2.loop21 jnb ldr3.loop6 clr sig3g setb sig3r clr sig4g setb sig4r clr rsg5r clr rsg6r setb rsg5g setb rsg6g call delay call gateopen call delay clr rsg5r clr rsg6r setb rsg5g setb rsg6g call delay call delay jmp mn loop20: setb buzzer setb laser setb sig3r setb sig2r loop21: jnb ldr1.loop23 jnb ldr2.loop23 jnb ldr4.loop21 clr buzzer clr laser jmp loop2a loop1: setb sig2r clr sig1g setb buzzer setb laser setb rsg5r clr rsg5g setb rsg6r clr rsg6g jnb ldr1.loop23 jnb ldr3.loop21 jnb ldr4.loop5 loop6: jnb rlysens2.

loop26 clr buzzer jmp loop24 gateopen: setb gateon clr gateoff call delay clr gateon ret gatecls: setb gateoff clr gateon call delay clr gateoff ret delay: mov 50h.#04h ji: mov 51h.riju djnz 51h.loop10 call delay call gateopen clr buzzer clr laser clr sig1g clr sig2g setb sig1r setb sig2r clr rsg5r clr rsg6r setb rsg5g setb rsg6g call delay call delay jmp mn loop23: setb buzzer setb sig3r setb sig2r loop26: jnb ldr1.#f0h bala: mov 52h.loop26 jnb ldr3.loop26 jnb ldr2.bala .loop9 loop10: jnb rlysens3.#ffh riju: djnz 52h.loop26 jnb ldr4.clr laser setb sig1g clr sig1r setb sig2g clr sig2r call delay setb rsg5r setb rsg6r loop9: jb rlysens3.

gate closing and opening operation is done by software coding written for the controller.#50H kr: djnz 53h. It can be avoided and a battery charged by means of a solar cell. Microcontroller 89C51 performs the complete operation i..ji ret dly: mov 53H. As it thinks in different angles or aspects. The obstacle detection part can be implemented using Fuzzy logic. It can be used directly during the daytime and by charging the battery during night.kr ret FUTURE ENHANCEMENT: This paper has satisfactorily fulfilled the basic things such as prevention of accidents inside the gate and the unnecessity of a gatekeeper. The mechanism works on a simple principle and there is not much of complexity needed in the circuit. THE LAST WORD« The idea of automating the process of railway gate operation in level crossings has been undertaken. CLM8CO EI9RCNVCORTEO 5RSLO1SL IL NEGR . presence of a gatekeeper is not necessary and automatic operation of the gate through the motor action is achieved. Hence this arrangement can be used in remote areas where the power supply can¶t be expected. By this mechanism.e. the system works still more efficiently. it avoids manual errors and thus provides ultimate safety to road users. sensing . But still the power supply for the motor operation and signal lights.djnz 50h. As the system is completely automated.

Sign up to vote on this title
UsefulNot useful