Automation of Railway Gate Control Using Microcontroller

DOI : 10.17577/IJERTV1IS3013

Download Full-Text PDF Cite this Publication

Text Only Version

Automation of Railway Gate Control Using Microcontroller

Atul Kumar Dewangan,Meenu Gupta,Pratibha Patel

Lecturer, Kirodimal Govt Polytechnic Raigarh,Chhattisgarh,India Diploma Scholar Kirodimal Govt Polytechnic Raigarh,Chhattisgarh,India Diploma Scholar Kirodimal Govt Polytechnic Raigarh,Chhattisgarh,India


There are many railway crossings which are unmanned due to lack of manpower, needed to fulfill the demands. Hence, many accidents occur at such crossings, since there is no one to take care of the functioning of the railway gate when a train approaches the crossing.The objective of this paper is to manage the control system of railway gate using the microcontroller. The proposed model has been designed using 8052 microcontroller to avoid railway accidents occurring at unattended railway gates, if implemented detection of train approaching the gate can be sensed by means of two sensors placed on either side of the gate. This work utilizes two powerful magnetic sensors; one of these magnetic sensors is fixed at upside (from where the train comes) and similarly the other magnetic sensor is fixed at down side of the train direction. Sensors are fixed 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 sensor gets activated, the sensed signal is sent to the microcontroller and the gate motor is turned on in one direction by relay driver and the gate is closed and stays closed until the train crosses the gate and reaches after side sensors. When after side sensor gets activated and the signal about the departure is sent to the microcontroller, motor turns in opposite direction and gate opens and motor stops.

  1. Introduction

    Now a days, India is the country which having worlds largest railway network. Over hundreds of railways running on track every day. As we know that it is surely impossible to stop, the running train at instant is some critical situation or emergency arises. Train accidents having serious repercussion in terms of loss of human life, injury, damage to Railway property. These consequential train accidents – include Collision, Derailments, Fire in Trains, and Collisions of trains at Level Crossings.

    Our country is a progressive country. It has already enough economical problems, which are ever been unsolved. To avoid all these things some

    sort of automatic and independent system comes in picture. So, keeping all these things, aspects, and need of such system our paper tries to make such

    type of system with the help of various electrical, electronic and mechanical components.

  2. Train Accident

    A classification of accidents by their effects (consequences); e.g., head-on collisions, rear-end collisions, derailments. Head on collision; one type of train accident is when two trains collide front face with each other or train colliding on the same track from opposite ends called head on collision. Rear end collision; the other kind is when a train collides into the other that is in front of it, called a rear end collision. Derailments plain track; a train may derail on a simply straight track that may cause the train accident. Curves; derailment of a train is more common when there is a curve on the track causing an accident. Junctions; a train may also get derailed on a junction, which is the place where two tracks converge into one, or one diverges into two.

    Accident contributors such as train visibility advance signs, active warning, driver behavior, driver distraction and risk taking have been identified as common human factors contributors to vehicle train grade crossing accident [3].Factor includes highway and railway characteristic are contributing factor to accident at RLC [4].

    The environmental factors are snow, heavy rain, fog, or blowing snow, which collision the train [5]. The three main factors contributing to accidents at RLC is basic safety engineering studies, human factor, engineering factor, and environment factor [6].The taxonomy of railway intersection accident contributors was created to generate hypotheses and deduction about specific cases and common patterns of accident (See Fig. 1) contributors [7].

    Figure 1. Specific Cases and Common Patterns of Accident

  3. Present Indian Railway Technology

    The ministry of railways has taken steps to reduce the consequential train collision accidents and level crossing accidents. Ministry of railways has invested several crore rupees for modernization and uplift nets of the technologies used in Indian Railways. Presently Indian Railway provides some sign and signal to prevent the train accident.

    1. Warning Signs and Devices used in Indian Railway to Reduced the Level Crossing

      3.1.1 Advance Warning Sign

      Sign tells you to slow down, look and listen for the train, and be prepared to stop at the tracks if a train is coming.

      Figure 2 Advance Warning Signe

      3.1.2. Cross-bucks Sign

      Cross bucks are located at all grade crossings on both approaches to the crossing. Form an X via the intersection of two 1200 mm x 200 mm retro-reflective pieces. A cross buck sign provides the last indication to the driver where the crossing is located.

      Figure 3 Cross buck Sign

          1. Multiple Track Signages

            Multiple track signages are required when there is more than one track present and are attached below the cross buck sign. A multiple track sign under the cross buck tells the driver the numb more than a single track.

            Figure 4 Multiple Track Sinanges

          2. Whistle Indicator

            The 'W' is a general whistle indicator while the 'W/L' stands for whistle for level crossing. 'see/pha' = 'seetee bajao – phatak').

            Figure. 5 Whistle Indicator

          3. Level Crossing Indicator

            A square yellow board indicates approach to a level crossing.

            Figure. 6 Level Crossing Indicator

          4. Stop Sign and Line

            Minimum standard stop sign dimensions are 600 mm x 600 mm and sign shape is octagonal.A stop line painted across your lane of the road shows you where to stop and look for an approaching train. On a gravel road with no marking, stop at least 15 feet from the railroad tracks.

            Figure. 7 Stop Sign and Line

          5. Roadway Pavement marking

            Pavement markings are painted on the roadway just past the AWS and before a highway- railway crossing. The pavements markings consist of a large X with a stroke width of 300 to 500 mm. dimensions of the X are 6.0 m long and 2.5 m wide. Retro-reflective paint must be used and the X must be incorporated on each side of the road before the railway grade crossing.

            Figure 8. Roadway Preventive Mark

          6. Manually Activated Signal

            Manually Activated Signals are operated by level crossing staff, on instructions transmitted by telephone or telegraph signal from the nearest station. Automatic Warning Signals need short track circuits or markers which detect trains and activate warning indications at level crossings. These warning indications are usually flashing lights, or sounds emitted by bells or claxons (horns), or a combination of these two.

          7. Mechanical Crossing Barriers

      Mechanical crossing barriers are operated by level crossing staff using hand or electrically powered levers, winches or windlasses. In addition, mechanical barriers providing complete protection of level crossings are connected to manually operate warning signals (Light and Sound).

        1. Technology Used to Reduce the TrainAccident by Indian railway

          1. Walkie Talkie Set of Crew

            5 W walkie-talkie sets have been provided to drivers and guards of all the trains for communication in static mode or at low speeds. 25W VHF sets have also been provided at stations on broad gauge double line / multiple line sections so that train crew can communicate with the nearest station masters in the case of emergencies. This is duplex communication wherein both the parties can talk simultaneously. The works for provision of MTRC have been sanctioned on 2,415 km. It will be GSM based MTRC system with digital technology, as being used by cellular networks worldwide.

          2. Auxiliary Warning System

            Automatic train protection and warning system provides audiovisual warning to the driver and

            prevents him from passing signals at danger. Presently, an AWS is working on Mumbai suburban area of western and central railways. AWS on 128 kms stretch of southern railway is in progress.

          3. Tail Lamp

            Guards have been provided the conventional kerosene lit tail lamps. Guards have been provided with electronic flashing tail lamps, having better visibility than the conventional kerosene lit tail lamps.LED type flashing tail lamps have been provided in rear of all trains for better visibility to prevent rear end collision.

          4. Railway Signal

      Hand signals flags, lamps, bells, and whistles, all right signal, guard's signals, all-ready signal.Hand signals include signals given by hand, or by flags or lamps used by the signalman, drivers, guards, or station staff. The all-right signal refers to the display of green flags by stationmasters (or other staff), line side workers; level crossing gatekeepers, and others, to passing trains. The green flag is held in the left hand. The red flag is kept ready to be displayed in case of a problem in the right hand. A steady green signal shown by the guard is an indication that there is no problem (or no longer any problem) and that the train can continue on its journey. A green flag or lamp waved violently up and down, however, is the signal that the train has parted, and the driver should bring his portion of the train to a halt. The all-ready signal is given to indicate that the everything is ready and in order for the train movement for which it is given. It is given by 3 quick waves a green flag horizontally followed by 2 quick waves vertically; at night, waves of a green lamp are used in similar fashion.

  4. Research Works

    1. Flasher Light

      Aberg L. Flasher lights have been provided on all 7000 locomotives to warn trains coming from opposite direction, after a derailment on double line, and prevent such type of collisions.Automatic switching ON of the flasher lights, not requiring the interference of drivers and becoming operational in case of sudden need, have also been introduced. Automatic loco flasher lights are being progressively installed on locomotives to give indication to drivers of trains running from opposite direction in case of mishap for prevention of further accidents.

    2. Automatic Warning Signals

      San Franciscos Automatic Warning Signals need short track circuits or markers which detect trains and activate warning indications at level crossings. These warning indications are usually flashing lights, or sounds emitted by bells or claxons (horns), or a combination of these two.

        1. Automatic train detector

          Siti Zaharah, an automatic device to detect the presence and speed of a train in block sections at the approach to a level crossing. They are installed only near unmanned level crossings and usually consist of a series of transponders inserted in track at certain intervals and interlocked with level crossing barriers and warning signals. Such devices must be capable of detecting train speeds since the elapsed time between a trains detection and its arrival at a crossing will be a function of its speed. The alternative to installation of automatic train detectors is to have train starting signals at stations interlocked with level crossing barriers and warning signals. These signals have the capability of identifying the type and hence speed of different trains and will transmit the appropriate signal to the level crossing protection system in order to activate it at a specified time before the arrival of a train. In the case of manned level crossings the function of the train detector is substituted by level crossing staff, which receives advance warning by telephone or telegraph from the nearest station of the arrival of a train

        2. Load Cell

      Gunyoung Kim, Kyungwoo Kang Each zone containing load cell as a pressure sensor, the load cell used is compression type load cell. The threshold of load cell is set to six tones. Whenever a train or any object passes over the load cell, the load cell crosses its threshold and it gives analog signal to the load cell processing unit. The load cell processing unit consists of buffer IC74 LS 245, A/D Converter which convert analog signal which are coming from load cell into digital signal. Now these digitized signals are sent to RS 485 communication protocol. Here the RS 485 communication protocol provides the communication interfacing with 8051 microcontroller.8051microcontroller communicates with RS 485 and fetches the original status (0 or 1) of each load cell. The main function of 8051 based logic signal processing unit is to identify the error from the received data.

  5. Problem Identification

The status of the present Indian Railway is as follows:

1. Presently railway-crossing gates are operated manually. At present scenario, in level crossings, a gatekeeper operates the railway gate normally after receiving the information about the train's arrival. When a train starts to leave a station, stationmaster of the particular station delivers the information to the nearby gate. The above said procedures are followed for operating the railway gates.

Problems Faced:

Sometimes the road traffic is so busy that it becomes impossible for the gatekeeper to shut down the gates in correct time

In many remote areas, railway-crossing gates are open and no person is located for the operation of gates and hence leading to accidents.

Many times gates are shut down too early leading to wastage of time of people stuck at crossing.

2 .Presently as such no centralized system is there through which we can track the location of trains from any center point.

Problems Faced:

As trains cannot be centrally located, often more than one train runs on the same track in opposite direction leading to accidents

  1. Presently in Indian Railway only semiautomatic railway gate operation is followed in certain areas.

  2. Signals are located in the vicinity of the railway gate along with gate master board and a marker light.

  3. If barriers remain closed for excessive periods on crossings carrying a high volume of road and rail traffic, the build-up of road traffic will exceed the capacity of the crossing to safely discharge this build-up before the next train arrival at the crossing.

  4. A number of train accidents happened due to a manual system of signals between stations.

  5. Presently signals are control by mean of interlocking system and for this system require regular maintenance and upgrading.

  1. Circuit Description

    First, one is the sensing circuit that contains magnetic sensors, which is connected in parallel. This part of the circuit is mainly used to sense the train on the railway track. The main function of the magnetic sensor is to sense the magnetic indication occur in the train engine due to driving the heavy motors which works on the DC. The magnetic sensor senses the induction while crossing of the engine through the tracks where the magnetic sensor is fixed near the tack. Increments negative and positive voltage through the sensor to the microcontroller and the microcontroller decides to open and close the crossing. The decision of the microcontroller depends upon the switching

    the heart bit pulse oscillation which oscillate the whole program in counting mode. The microcontroller works on the 16 bits operation cross 12 divide by 6 that is finally in works on 6 bit after oscillation. Pin 3 and 4 work as the trigger input for sensing that, railway crossing is closed and opened. Pin 10 and 12 which is connected in parallel with two sensors which works simultaneously according to the logic program which is decided by the train on passing. Pin 18 and 19 is the crystal operation and 33 pF capacitor is connected for narrowing the oscillations done by crystal oscillator of 12 MHz oscillation. Pin 25 and 28 in the main output which is fitted to the ULN IC

    sensors SW1 and SW2

    which is attached to the

    for operating the railway motor. Pin 40 and 31 is

    railway crossing. Switch SW1 is connected at the opening side and SW2 is connected at the closing side. This switch works in opposite direction, which is when the switch is pressed, it becomes open connection and when the switch is released, it is closed connection. Normally in the switch, when it is pressed it becomes closed connection and when it is released it becomes open connection. Switch operation gives the instruction to the microcontroller for opening and closing. The SW1 is connected at the opening side of crossing and SW2 is connected at closing position. The operation is that when the railway crossing is open then SW1 is closed and SW2 is opened. But when railway crossing is closed then SW1 is opened and SW2 is closed. By this process the microcontroller decides the opening and closing of railway crossing. The working of the sensor is to sense the train and to give the instruction to the microcontroller that train is coming. The time delay is provided between two sensors in the same track. The working is that, when train crosses the incoming sensor, railway crossing is opened and train crosses the outgoing sensor, railway crossing is closed.

    The second circuit contents the transformer and the voltage regulator. This part of the circuit is mainly used to obtain different power levels according to the requirement of the components, used in the circuit. It is filtered and given to regulator IC 7805 to generate 5 V DC.

    Third circuit is a microcontroller 89C52 AL, it has four port operations. Port 1 is used for sensing purpose, port 3 for sensing operation, port 2 for output operation and port 0 not working. The port 2 senses the switching trigger and makes decision according to the sensor and makes its operational output with port 2. Port 3 extracts 1.5 to 3 Volts in the output which is given by the other devices. According to the crystal oscillators which help as

    Vcc and pin 20 is ground. Mainly two functions are provided by the microcontroller to operate our complete project, firstly to sense the indication from the sensors and secondly make decision and create output.

    Fourth circuit is ULN driver; according to the instruction of microcontroller, the voltage emitted from the port and it has operated the ULN IC. ULN IC converts the digital voltage into analog voltage and extract through pin 14 and 15 of ULN IC or 4017 IC.

    The Fifth circuit contains transistors, four relays and two motor. This part of the circuit is mainly used to control the working of the motor. Motors are being used to shut the railway crossing gate to block the road traffic from both sides of the railway track. Relay 1 and relay 2 are for motor1. Relay 1 for moving the motor 1 clockwise and relay 2 for rotating the motor anti-clockwise. Similarly relay 3 and relay 4 are for motor 2 for moving the motor clockwise and anti-clockwise respectively. A transistor seems to be working as a power amplifier. Thus the relay switches are used to open and close the motor. IC 4017 drive the relay negatively through by driver transistor DS 547 NPN Transistor. The relay 12 V, 1 amp is used to operate the motors. In order to change the polarity of the motors while crossing and opening this relay is used. The relay has NO and NC and COM initially when the relay is OFF position that is relay is seen NO position and in NO positive voltage is connected and in NC position negative voltage is connected from COM the output is connected to the motor. Simultaneously relays are operating for one motor, when the instruction starts from the microcontroller. It gets cross over D/A converter that is 4017 IC and UNL IC and is passes through relay driver transistor and its ON A1 and A2 which is connected to two motor for driving the crossing.

    Figure 9 Circuit Diagram of railway Gate Control

  2. Programming and Flowchart Algorithm

    1. Programming Flowchart

      Figure 10. Flow Chart

    2. Algorithm

  1. Start.

  2. Set the variables.

  3. Make initial settings of the signals for the train.

  4. Check the arrival of the train in either direction by the sensors. If train is sensed go to STEP 5.otherwose repeat STEP 4.

  5. Close the gate.

  6. Change the signal for train.

  7. Check the train departure by the sensors, if the train sensed goes to STEP 8.otherwise go to STEP 5.the train sensed to STEP 8.otherwise go to STEP 5.

  8. Open the gate.

  9. Go to STEP3.

  10. Stop.

  1. Methodology

    Figure 11. Process Chart for Railway Gate Control

    Figure 11 shows the process chart for railway gate control. Let, as we have to start the train before the sensor so that all the sensors are closed and the railway crossing is open.

    When a train crosses the first sensor that is S1 . Sensor S1 start incrementing to the microcontroller and microcontroller decides to close the railway crossing because the microcontroller senses that the railway crossing is open before sensing the sensors. The microcontroller decides to close the railway crossing and extract a digital signal through pin 28 of the microcontroller and it provide a micro voltage of 1.5 to 3 volts digital signal through a 10 resistance positive feeding signal for boosting of the voltage. This signal is applied to ULN IC to convert this signal into analog form and it extract

    1.5 to 3 volts analog from pin 15 of UNL IC or 4017 IC, which drives the relay driver. This consists of an NPN transistor and these drivers drive the motor according to the instruction of microcontroller. The same process is repeated after

    and gives an increment to microcontroller and the microcontroller opens the crossing because previously microcontroller got the instruction that the railway crossing is closed by SW2 .

  2. Result and Discussion

    The present existing system is manually and human controlled 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. No centralized system is available, presently signals are control by mean of interlocking and warning signs and signal device, which is totally semiautomatic system.

    By employing the automatic railway gate control at the level crossing and anti collision device, 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. And implementing the work railway system can be centralized which can control the train collision accidents.

  3. Conclusion

    A new approach for improving safety at LCs and train collision on IR has been suggested. Formats have been given to maintain records of LC inventories, accident / incident reports. Each LC should be assigned a hazard rating and the priority of safety enhancement works be decided accordingly. A regular assessment of safety performance should be done. This approach should be able to bring down the rising trend in accidents at LCs and train collision accident. This project uses the present infrastructure of railways, e.g. present signaling methods and meet all the requirements to have an automatic controlling of the railway traffic. It provides the supervision and control systems for the crossing and station. The proposed system provide the means for real time inspection, review and data collection for the purpose of maintenance on the movable and fixed facilities for the guarantee of operation safety and maintenance efficiency as well as the safety appraisal decision-making system based on the share of safety data. The great achievement of modern technologies in each relevant field and the

    crossing of the

    S 2 sensor. This S 2

    sensor senses

    technological development of the railway industry

    itself have provided railway with feasibility to win higher service quality and faster speed.

  4. Recommendations

  1. This project is developed in order to help the Indian Railways in making its present working system a better one, by eliminating some of the loopholes existing in it.

  2. Based on the responses and reports obtained as a result of the significant development in the working system of Indian Railways, this project can be further extended to meet the demands according to situation. This can be further implemented to have control room to regulate the working of the system. Thus becomes the user friendly.

  3. The automation of the railways is such that it save energy, provide full safety from the loss of man and material. So this type of system can be applied in any railways. This will be very helpful in the development of any country both financially and technically.

  4. This circuit can be expanded and used in a station with any number of platforms as per the usage.

  5. This can be further implemented to have control room to regulate the working of the system. Thus becomes the user friendly.

  6. Additional modules can be added without affecting the remaining modules. This allows the flexibility and easy maintenance of the developed system. This system consists of following features over manual system: There is no time lag to operate the device, Accuracy.


I owe a debt of gratitude to my guide Prof. Naveen Kumar Dewangan, Associate Professor of Electronics and Telecommunication Engg. Department for providing me with an opportunity to start this paper. Through his timely advice, constructive criticism and supervision he was a real source of inspiration for me and thanks Prof. R. K. Patel Kirodimal Govt. Polytechnic Raigarh. My sincere thanks are also to M. Tech Coordinator Prof

R. M. Potdar for his detailed review, constructive comments and excellent advice during the preparation of this thesis.


  1. Wigglesworth,E.C.Human Factors in Level Crossing Accidents, vol.10, p.p. 229- 240, 1978.

  2. Saccomanno Causal Factors in Railroad-, Highway Grade Crossing Accidents transportation Research Record, p.p.47- 54.1982.

  3. Meeker,F.L.Bhat,R.A. An observational study of driver behavior at a protection

    Railway grade crossing as train approach,vol. 21,pp 255-262,1989.

  4. Siti Zaharana,Causal factor in railroad highway grade crossing.Reserch record accident transportation 847,pp 47-54,1982.

  5. H.Ben Brown,Jr.Gregg. Podnar,Mel Siegel,Haighway railway grade crossing accident contribution litigation,vol.2,pp 25-69,1981-1986.

  6. ABERG. L, 1988 Driver Behavior at Flashing- Light, Rail-Highway Crossings. Accident Analysis Prevention, 20, 59-65, 1988.

  7. San Franciscos Advanced automatic warning signal system in Proc. CERIE 2010, paper C, p. 297, 2010

  8. Siti Zaharah, Transit District Advance Automated Train Detector System Case Study Description, pp: 115-135.

  9. Gunyoung Kim, Kyungwoo Kang, Railway Gate Control System at Railroad- Highway Grade Crossing in KoreaA paper prepared for presentation at the 82nd Annual Meeting of the Transportation Research Bord,Washington,August,paper No. A3A05- 03- 3027, 2002.

  10. Some principle of DC motor, www.crouzet.cpm


Leave a Reply