You are on page 1of 22


The objective of this project is to provide an automatic railway gate at a level crossing 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 e isting system once the train leaves the station, the stationmaster informs the gatekeeper about the arrival of the train through the telephone. !nce the gatekeeper receives the information, he closes the gate depending on the timing at which the train arrives. "ence, 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. "ence, 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 re#uired. $ince, 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.

In this project we are concerned of providing an automatic railway gate control at unmanned level crossings replacing the gates operated by gate keepers and also the semi automatically 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 %km from the level crossing. !nce 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. $ubse#uently, bu&&er indication and light signals on either side are provided to the road users indicating the closure of gates. !nce, 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 '()*+ placed at about ,km and -./m,so as to bring it to halt well before the level crossing. 0hen no obstacle is sensed 1())2 light is indicated, and the train is to free to move. The departure of the train is detected by sensors placed at about -km from the gate. The signal about the departure is sent to the microcontroller, which in turn operates the motor and opens the gate. Thus, 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. Also reliability is high as it is not subjected to manual errors.

SG3 & SG4 . 3otor for gate operation. . B M L $ensors on the track.. placed at about . placed at about % km from the gate to detect the train arrival on either directions. 4ight signal to warn the road user. an audio signal to warn the road user about the approach of train. R1 & R2 R3 & R4 .km from the 1ate to detect the train departure on either directions $ignals placed by the side of the track to indicate the train driver about the closing of the gate Bu&&er.SG2. Sensors on the track. SG1.


(. senses the approach and (6 the departure respectively in the other direction of train arrival. The sensor comprises of an I( transmitter. In a particular direction of approach. $1. i)Initial Signal Display $ignals $1-. In the same way./m from the gate. ii) T!ain A!!i"al D#t#$ti%n *etection of a train approaching the gate can be sensed by means of sensors (-.The detailed description of the working of the above model can be e plained under various heads. $15 and $16 are placed near the gate each at a specified distance. and $15 are placed at -. (.. The road user signals are made 1())2 so that they can freely move through the gate bu&&er is made 8!FF9 since there is no approach of train and road users need not be warned.and $16 are placed at . The train may be approaching the gate in either used to sense the arrival while (5 senses the departure of train.. (. Based on the vibration of the track as the train approaches the sensor works.7m on either side of the gate whereas $1. $1. I( . (5 and (6 placed on either side of the gate. $o all four signals are made ()* initially to indicate that gate is open and vehicles are passing through the gate.

0hen light strokes on 4*( its resistance decreases and when light does not strike 4*( its resistance remains at normal value.?s. If there is no vehicle in between or beneath the gates. a transistor switch produces <%. signal is made 1())2 for the train to pass through . It reduces voltage drop across the receiver. then the laser light from the source falls on the 4*( since there is no obstacle. iv+S#nsing '%! )#*i$l#s> 4aser light is used as a source and 4*( as a tool for sensing purpose. This change of resistance of 4*( is used for sensing by the micro controller AT. a comparator and a transistor switch.. the comparator produces :-. Thus. iii) &a!ning '%! R%a( Us#!s> At the moment the train arrival is sensed on either side of the gate. A bu&&er is made !2 as a precautionary measure for the road user and that nobody should enter the gate at that moment. $ince there is no vehicle or obstacle. if not. =orrespondingly. This is transmitted employing F3 to the microcontroller. and /. ()* signal appears for the road user once the train cuts the relay sensor placed %7m before the gate.. If fre#uency increases its wavelength increases and thus reduces the resistance of the I( receiver. road users are warned about the train approach by ()* signals placed to caution the road users passing through the gate. Its output voltage is the difference between this voltage drop and input voltage to the sensor.%5 by the use of compensation. I( transmitter gives I( rays whose wavelength depends upon the vibration of track that corresponds to the input fre#uency. respectively. saturation when it senses a train and <-.receiver.. This is fed to the comparator whose reference voltage is based on the threshold fre#uency which is minimum fre#uency caused by a slow train.

respectively considering the directions of train approach. It indicates the presence of vehicle and the signal for train should be made ()* in order to slow down the train to avoid collision. vi+ Signal '%! T!ain> 0hen the path is clear inside the gate. signal is made ()* for the train in order to slow down its speed before % 7m from the gate. v+ Gat# Cl%sing Op#!ati%n> !nce the microcontroller senses that there is no vehicle inside. Actually rotary motion occurs in a motor. then the light from laser source does not fall on 4*(./ m before the gate. Then the obstacle should be warned to clear the path. 0hen any presence of obstacle is sensed. motor is operated to close the gate. vii+T!ain D#pa!t+!# D#t#$ti%n> *etection of train departure is also done using relay techni#ue as e plained under the head of train arrival detection. if there is a sudden breakdown of a vehicle between the gate . AT.. 1())2 signal is produced for the train when there is any obstacle . viii+ Gat# Op#ning . The same is applied for in the other direction and $15 and $16 are made 1())2 and gates are closed. This rotary motion is converted to linear motion of the gate using a gear.the gate. Train departure sensing is done by sensors (5 and (.?$. then it automatically produces the signal to operate the motor through relay circuit and hence close the gate for the passage of train. when it is still ()* when train approaches if then provisions if then provisions should be stop the train. *ue to some unavoidable circumstances. Another signal placed at -.%5 gives signal for obstacle to clear the path and once the path is cleaned.

signal is given to the 3icrocontroller which operates the motor in reverse direction and the gates are opened.0hen the train departure is sensed by the sensors.ig* Sp##( D#t#$ti%n The advantage of calculating the velocity of train is. which are installed on the railway track at about .second from which the speed of the vehicle can be calculated as follows> Sp##( -. if it is traveling at an over speed then the passengers are alerted using a by activating a bu&&er./p*) 0 Distan$#1Ti/# As distance between the sensors is known and constant. with the transmitter and the photodiode of each pair on the opposite sides of the track. !nce the gate is opened signal for road users are made 1())2 so that the vehicles can pass through the gate. i +. The system displays the time taken by the train in crossing this distance from one pair to the other with a resolution of /. The system basically comprises two I( 4)*: @hotodiode pairs. The installation is as shown in the block diagram./. the time is counted by the microcontroller and from this information. if the speed of the train crosses a limit i. .e. we can calculate the speed.meter apart.

?$./% • *iode • Battery 2i:=ad COM2ON3NTS D3TAILS MICROCONTROLL3R D3TAILS .COM2ON3NT US3D • 3icrocontroller AT.6 • !scillator • (esistors • I= A. *= 3otors • 6 I( $ensors pair • 4)*s • =omparator 435.%5 • (elay • ..

programmable input output lines.:bit Internal (A3 B 5.It is a low:power.The microcontroller used here is a common ./// 0riteD)rase =ycles B . high: performance =3!$ .6 3"& 'in .7 Bytes of In:$ystem @rogrammable 'I$@+ Flash @rogram 3emory C $@I $erial Interface for @rogram *ownloading C )ndurance> -/..:bit microcontroller with-. 3odes+ B Three:level @rogram 3emory 4ock B . bit Atmel microcontroller AT. '3ATUR3S B -. !perating (ange B Fully $tatic !peration> / "& to .and . to %.%E .A.%5.%./// 0riteD)rase =ycles B .7 bytes of In:$ystem @rogrammable 'I$@+ Flash program memory and . @rogrammable ID! 4ines B Three -E:bit TimerD=ounters B 2ine Interrupt $ources B )nhanced FA(T $erial @ort with Framing )rror *etection and Automatic Address (ecognition B )nhanced $@I '*ouble 0riteD(ead Buffered+ $erial Interface B @rogrammable 0atchdog Timer .?s.7 Bytes ))@(!3 *ata 3emory C )ndurance> -//..7 bytes of ))@(!3 data memory. It has 5.

Apparent motion is detected when an infrared source with one temperature. passes in front of an infrared source with another temperature. such as a human. All objects emit what is known as black body radiation. as shown below> .IR S3NSORS A Infra (ed sensor 'I( sensor+ is an electronic device that measures infrared 'I(+ light radiating from objects in its field of view.whatever signals it receives from the microcontroller on the basis of that it will drive the motors ":Bridge controls the direction of rotation of a *= motor. @I( sensors are often used in the construction of @I(:based motion detectors'see below+. Imagine an ":Bridge as an array of four switches. The term passive in this instance means that the @I( device does not emit an infrared beam but merely passively accepts incoming infrared radiation. infrared means below the energy level of the color red. and applies to many sources of invisible energy MOTOR DRI)3R "ere we used 4. Thus.?5* to drive the motors . It is usually infrared radiation that is invisible to the human eye but can be detected by electronic devices designed for such a purpose. such as a wall. and G(edH because this color represents the lowest energy level that our eyes can sense before it becomes invisible. GInfraH meaning below our ability to detect it visually.

$implified ":Bridge Iou can alter the states of these four switches in order to manipulate the voltage across the motor. This state will allow the motor to spin freely. In Fig you can see that all the switches are open. and through that the direction of current flow and rotation of the motor. $. and the motor terminals are disconnected from the circuit.and $6 closed .

and close $. the motor terminals are connected to the voltage supply. open while $5 and $6 are closedJ The motor terminals will be short circuited.. This will cause the motor to brake..and $.5. and a potential difference across the motor is created. 0hat happens if we leave $. if we open $.If we close two of the switches. and $5 as in figure .and $6 as show in Fig .. . and this will cause the opposite direction. and rapidly slow down.. the voltage across the motor is switched around. and $5 =lose 2ow. which will cause the motor to begin rotating in one direction.and $6 again. $. $.

?5* 3otor driver . wires.< to ground. or even e plodeLL This is dangerous. In a 3osfet ":Bridge. This is known as K$hoot ThroughK The motor will not spin. and you should avoid short circuiting your h:bridge like this ."ere is a simple motor driver circuit using the 4. .and $5 at the same timeJ This will cause a short circuit from . this can cause 3osfets and batteries to overheat and free trapped smoke. what will happen if we close $.$hort =ircuiting 2ow. and power supply. and e cessive current will flow through the switches.

which turns the motor. The voltage regulator I= maintains the output voltage at a constant value./% provides <%. indicates the fi ed output voltage it is designed to provide. IC 4567 4567 is a voltage regulator integrated circuit. A. which acts as an electromagnet. a *= motor re#uires two magnets of opposite polarity and an electric coil. At its most simple. The repellent and attractive electromagnetic forces of the magnets provide the tor#ue that causes the *= motor to turn.The above provided circuit can be controlled manually as well as by using microcontroller or a personal computer. The voltage source in a circuit may have fluctuations and would not give the fi ed voltage output. regulated power supply. . The in A. It is a member of A. =apacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels. DC MOTOR A direct current '*=+ motor is a fairly simple electric motor that uses electricity and a magnetic field to produce tor#ue. series of fi ed linear voltage regulator I=s.

They have several distinct advantages over standard operational amplifier types in single supply applications./ . to 5. .6 series are lowMcost. or as high as 5. thereby eliminating the necessity for e ternal biasing components in many applications. '#at+!#s B $hort =ircuited @rotected !utputs B True *ifferential $tage B $ingle $upply !peration> 5. The common mode input range includes the negative supply.'on a per amplifier basis+.Pin Diagram: C%/pa!at%! LM324 The 435. . The #uad amplifier can operate at supply voltages as low as 5./ . Input . The output voltage range also includes the negative power supply voltage. with #uiescent currents about oneMfifth of those associated with the 3=-A6. #uad operational amplifiers with true differential inputs.

"alogen FreeDBF( Free and are (o"$ =ompliant .• • • • • • • • • • 4ow Input Bias =urrents> -// mA 3a imum '435.6A+ Four Amplifiers @er @ackage Internally =ompensated =ommon 3ode (ange ) tends to 2egative $upply Industry $tandard @in outs )$* =lamps on the Inputs Increase (uggedness without Affecting device operation 2=. @refi for Automotive and !ther Applications (e#uiring Fni#ue $ite and =ontrol =hange (e#uirementsN A)=MO-// Oualified and @@A@ =apable These *evices are @bMFree.

!therwise repeat $T)@ ?. ST32 5> =hange the signal for the train. ST32 2> $et the variables. ST32 7> 3ake the warning signal for the road users and set the signal for the train. ST32 16> !pen the gate. If there is no obstacle go to $T)@ A. ST32 4> =heck for the arrival of the train in either direction by the sensors. ST32 9> =heck for the train departure by the sensors. ST32 11> 1o to $T)@ 5. .ALGORIT. ST32 4> =lose the gate and stop the bu&&er warning.If the train is sensed go to $T)@ % !therwise repeat $T)@ 6. ST32 12> $top. !therwise repeat $T)@ E. ST32 8> =heck for the presence of the obstacle using sensors. ST32 3> 3ake initial settings of the signals for the train and road users. If the rain sensed go to ne t $T)@.M ST32 1> $tart.

'LO& C.ART .


3icrocontroller AT. But still the power supply for the motor operation and signal lights.. T.'UTUR3 3N. The mechanism works on a simple principle and there is not much of comple ity needed in the circuit. . As it thinks in different angles or aspects.ANC3M3NT This project has satisfactorily fulfilled the basic things such as prevention of accidents inside the gate and the unnecessary of a gatekeeper. The obstacle detection part can be implemented using Fu&&y logic. It can be avoided and a battery charged by means of a solar cell.e. "ence this arrangement can be used in remote areas where the power supply can9t be e pected. It can be used directly during the daytime and by charging the battery during night.ANC3M3NT 'UTUR3 3N.?s. As the system is completely automated.. presence of a gatekeeper is not necessary and automatic operation of the gate through the motor action is achieved. the system works still more efficiently. sensing. By this mechanism.%5 performs the complete operation i.3 LAST &ORD: The idea of automating the process of railway gate operation in level crossings has been undertaken. it avoids manual errors and thus provides ultimate safety to road users. gate closing and opening operation is done by software coding written for the controller. .com httpDDwww.seminarprojects.electronicshub.R3'3R3NC3S httpDDwww.blogspot.