Automatic Railway Gate Control System Using Arduino Controller

The present work attempts to automate the opening and closing of gates at a railway level crossing. In general, level crossing gates are operated manually by a gate keeper. The gate keeper receives the information about the train arrival from a near station. When the train starts to leave the station, the station in-charge delivers this information to the closest gatekeeper to get ready. This human intervention can be avoided by automating the process. In situations where the train is late due to some reason, the gates remain closed for long durations causing dense tra�c jam near the gates. This too can be prevented by automation. The proposed system uses infrared sensors to detect the arrival and departure of trains at the railway level crossing and Arduino to control the opening/closing of gates. The system uses two IR sensors to detect the arrival of the train and a third IR sensor to detect the departure of the train. When the arrival of the train is sensed, signals are provided to the tra�c indicating the arrival of the train on the track. When the second sensor detects the train then the signal turns red and the motor operates to close the gate. The gate remains closed until the train completely moves away from the level cross. When the departure of the train is detected by the third sensor, the tra�c signal turns green and the motor operates to open the gate. Thus automation of the gate operations at the railway level cross is achieved using sensors.


Introduction
The railway system is the most commonly used transportation mode in India. It is also one of those modes of transport that faces a lot of challenges due to human errors such as level cross accidents, collisions, etc. A level cross, an intersection of a road and a railway line, requires human coordination, the lack of which leads to accidents. Level crosses are controlled by manually operated gates. In order to avoid the human errors that could occur during the operation of gates, the proposed paper introduces the concept of railway gate automation. Level crossings are managed by the gatekeeper and the gatekeeper is instructed my the means of telephone at most of the level cross from the control room. But the rate of manual error that could occur at these level crosses are high because they are unsafe to perform without actual knowledge about the train time table. Delay in the opening and closing of the gate could lead to railway accidents. The present work attempts to develop a system which automates gate operations (opening and closing) at the level cross using micro-controllers detect collisions at the level cross using a laser beam and Light Dependent Resistor (LDR).
The major challenge faced by the Indian railway system is the increasing accident rate at the level crosses. The existing system involves the manual gate operation by the gate keepers based on the signals received from the control room. The human errors such as delay in informing the gatekeeper about the arrival of the train, delay in the gate operation by the gate keeper, obstacle stuck in the level cross etc. leads to the increasing rate of accidents at the level cross. Thus the railway gate automation system aims to deal with two things. It reduces the total time taken for the gate operation at the level cross and also ensures the safety of the passengers at the level cross during when the train passes. The reduction in the direct human intervention during the gate operation in turn helps to reduce the collision and accidents at the level cross. Since the gate operations are automated based on the sensors, the time for which the gate is closed is less. The paper thus intends to develop an automatic railway gate control system which is reliable and secured than the existing manual systems.
The rest of the paper is organized as follows. Section II gives a review of the previous papers that relate to our work. Section III describes the overview of the railway gate automation system. Section IV describes the system architecture, the gate operations at the level cross and methodology. The experimental results are discussed in Section V and the conclusion of the work is discussed in Section VI.

Related Work
The railway gate automation system is successively implemented since 2000 in Korea. The implementation of the system effectively reduced the accident rate at the level cross and the sensors used in the Korean railway gate automation system is magnetic sensors. Magnetic sensors placed underground are less affected by environmental changes and recognizes the direction of movement of vehicles [2]. Jeong [3] de ned the railway auto control system using OGSi and JESS. The method by which the state of railway cross is estimated using JESS is described in their paper. The different methods with which the locomotive pilots can avoid the accident situations and the safety measures to be taken in the level crossings are also discussed. In [4], a detailed introduction about the present railway technology is presented. It discusses the disadvantages of manually activated railway signals and the railway warnings at the level cross. The train detectors acts as the major component in the train automation system.

System Overview
Sensor based railway gate automation system is developed to automate the process of opening and closing of gate at the railway level crosses. The system detects the arrival and the departure of train for the gate operation using different types of sensors. The proposed system uses three infrared sensors to identify the arrival and departure of trains. The system also implements obstacle sensor which detects any obstacle on the track and controls the operation of the train. Sensors and servo motors are programmed using Arduino micro-controller.
The major components used in the automation of railway gate at the level gates are sensors. Sensors that detects the train can be classi ed into different types such as: Wheel detecting sensor: Wheel sensors works on magnetic inductive principle. The DC current which is generated as the output signal from the wheel detectors are used for the detection of train arrival.
Vibration sensor: Vibration sensors uses piezoelectric effect to detect the vibration in the track which detects the arrival and departure of the train. The output signal from the vibration sensor is fed into the micro-controller and it automates the gate operations. The major application of the vibration sensor is collision detection.
IR sensor: IR sensors detect the train using infra-red receiver and transmitter. Infra-red sensors are capable of detecting the presence of an object by sensing the heat being emitted by the object. It emits or detects the radiations to detect the motion of an object surrounding it. The most commonly used sensors for the automatic railway gate system is vibration sensors and IR sensors [5].

System Architecture
In India the maximum speed at which a train moves is 91.82km/hr and the minimum speed of a passenger/goods train is 59km/hr. Hence the ideal distance at which the sensors could be placed to detect the arrival of the train is 5km from the level cross and the departure of the train is 1km and thus the gate will not be closed for more than 8 minutes [1]. Our paper proposes a system which uses ve sensors, four IR Sensors (IR1, IR2, IR3 and IR4), a Light Dependent Resistor (LDR), a laser source (L), counter and one buzzer (B1). In real time, the IR Sensors are placed on the track at a distance of 5km and 1km on both sides of the level crossing. The LDR and laser source is used to detect the presence of an obstacle between the railway gates. The system also uses DC motors to control the operation of the gates. The buzzer is used to indicate the arrival of the train within a stipulated time [6]. IR1 detects the arrival of a train. Once it detects a train, it sends a signal to B1 and C1, and B1 is triggered and C1 starts count down, and yellow LEDs are switched on for the tra c to know the arrival of the train.
The train then travels to IR2. When the train nears IR2, DC motors are powered on. The DC motors starts and the gates begin to close. Parallel red LEDs are switched on. After the train passes the gates and nears IR3, a signal is again sent to the DC motors and the gates open and green LEDs are switched on for the road tra c to pass. The proposed system architecture is shown in Fig. 1. The laser source and LDR work simultaneously to detect obstacles in the path. The laser source continuously emits laser rays which reach the LDR. When the rays do not reach the LDR it means that there is some obstacle in the path and the gates do not close. A signal is also sent to the LEDs to signal the trains to stop as an obstacle is present.
A. Closing of Gates Fig. 2 shows the ow chart of the gate closing operation. After the train is detected and the gate is closed the next immediate operation is to detect the departure of the train from the level cross. The sensors IR3 and IR4 detects the departure of the train and the motor is then operated to open the gate. The servo motor is programmed to operate with the speci ed speed. Fig. 3 shows the the ow chart of the gate opening operation.

B. Hardware Requirements
The hardware components in Fig. 4, 5, 6, 7, 8 and 9 are used in the railway gate automation system: A buzzer is also connected at pin 3.
When IR1 detects the train coming, it sends a high signal to pin 3. As soon as the Arduino UNO detects a high signal, it raises the signal at pin 11 and the components connected to this pin shows an output i.e. the yellow LED glows and the buzzer buzzes. IR2 sends a high signal to pin 5 when the train is detected by it. This sends a high signal to pin 12 and pin 9. Hence, the red LED glows and servo motor rotates 90 degrees. When IR3 senses, it sends a high signal to pin 9 and pin 13. Thus, the green LED glows and the servo motor moves another 90 degrees. Fig. 11 shows the block diagram of the system.

Experimental Results
The proposed system is practically experimented as a working model of the real world level cross. The major components used in the model are an 80cm diameter railway track shown in Fig. 12, a toy train, four IR sensors, a stepper motor with which the gate operates, 4 LEDs as the tra c signals and buzzer to indicate the arrival of train to the tra c.
Gate operation: An IR sensor is placed at a distance of 30cm and another at 5cm from the level cross.
The toy train passes the rst sensor and when it is detected by the sensor, a yellow LED glows at the level cross indicating the tra c that the gate is about to close. When the second sensor placed at a distance of 20cm from the level cross detects the train, the buzzer is activated and the motor is completely closed and the signal turns red. The buzzer rings until the gate is placed at a distance of 20cm after the level cross detects the departure of the train and the motor is reactivated to open the gate.
Obstacle detection: Any obstacle on the track is detected by placing an RF module on the train and the presence of obstacle on the track is noti ed by a signal at the control room. The train movement is then controlled based on the presence of the obstacle on the track.

Conclusion
Automatic railway gate control system is centered on the idea of reducing human involvement for closing and opening the railway gate which allows and prevents cars and humans from crossing railway tracks. The railway gate is a cause of many deaths and accidents. Hence, automating the gate can bring about a ring of surety to controlling the gates. Human may make errors or mistakes so automating this process will reduce the chances of gate failures. Automation of the closing and opening of the railway gate using the switch circuit reduces the accidents to a greater extend. The obstacle detection system implemented reduces the accidents which are usually caused when the railway line passes through the forest. Most of the times greater loss has been caused when animals cross the tracks.
The limitation of this project is the use of IR sensors. Hence, any obstacle in the way of the sensor will be detected. Another important limitation is that this project does indeed close and open the gate but it cannot control the crossing of cars and vehicles. It only controls the gate. To combat this problem pressure sensors can be used as extension to the present work. We are using IR sensors but it is better to use load sensors. We have not used load sensors because it was not economically feasible. As a future scope of work, our system can be implemented in real time by xing the current limitations using new technologies.       Circuit diagram of the system Figure 10 Block Diagram of the System Figure 11 Model of railway level cross