You are on page 1of 43

1

AUTOMATIC RAILWAY GATE CONTROL
(USING MICROCONTROLLERS)

2

ACKNOWLEDGEMENT
The basic motto of our project is to show the importance of electronics field in controlling techniques. We have taken Microcontrollers as our key area to do our project work.

First of all we like to thank our honourable principal Mr.Ramachandran for providing us base to do our project. We hereby dedicate our project work to everyone who rendered their valuable support to us. We wish to express our profound thanks to all those who helped in making this project a reality. Much needed support and encouragement is provided by our HOD and our faculties.

We wish to thank Mr.Sanjeev kumar, Mr.Basheer.Mr. Kanagavel, Mr.Caran and Mr. Vinoth from Caliber Embedded Technologies who all guided us in an excellent manner. We express our heart felt thanks to Mr.Shiva who helped us to assemble our project effectively. Our project is dedicated to all the above.

By, G.Valarumathi, P.Valarmathi, M.Vasanthamani,

3

CONTENTS

CHAPTER NO.
1 2 3 4 5 a b c d ABSTRACT

NAME OF THE CHAPTER

PAGE NO.
4 5 8 9

BLOCK DIAGRAM & DESCRIPTION CIRCUIT DIAGRAM CIRCUIT DESCRIPTION HARDWARE DESCRIPTION 1.PIC 16F873 2.STEPPER MOTOR 3.SENSORS 5.OTHERS

10 12 18 20

6 7 8 9

COMPONENT SPECIFICATIONS APPLICATIONS DETAILED BUDGET BIBILIOGRAPHY

4

CHAPTER-1 ABSTRACT

Railways being the cheapest mode of transportation are preferred over all the other means .When we go through the daily newspapers we come across many railway accidents occurring at unmanned railway crossings. This is mainly due to the carelessness in manual operations or lack of workers. We, in this project have come up with a solution for the same. Using simple electronic components we have tried to automate the control of railway gates. As a train approaches the railway crossing from either side, the sensors placed at a certain distance from the gate detects the approaching train and accordingly controls the operation of the gate. Also an indicator light has been provided to alert the motorists about the approaching train.

5 . CHAPTER-2 BLOCK DIAGRAM & DESCRIPTION .

Both are positive ULN2003 the current driver chip. The supply of 12v is given to drive the stepper motor for the purpose of gate control .1 shows the general block diagram of unmanned railway gate control. So the regulator is required to reduce the voltage..6 Block diagram introduction: The FIG2. Power supply unit 2. But the voltage may consist of ripples or harmonics. to 9V or 18V ac this value depends on the transformer inner winding. This rectifier converts ac voltage to dc voltage. The Block diagram consists of the power supply. which is of single-phase 230V ac. the various blocks of this are: 1. Gate control unit This project use PIC16F873 microcontroller for programming and operation along withULN2003 driver. To avoid these ripples. This should be given to step down transformer to reduce the 230V ac voltage to lower value. the output of the rectifier is connected to filter.e. i. Regulator 7805 produces 5V dc and regulator 7812 produces 12V dc. The output of the transformer is given to the rectifier circuit. But the controller operates at 5V dc and the relays and driver operates at 12V dc voltage.

such that the IR LED should glow till the timer works in quasi state i.. When train reaches the sensor.e. it is detected by IR sensors placed 9 cm before the station and led in the sensor will glow because the 555 timer works into quasi state of operation.This project utilizes two powerful IR transmitters and two receivers. one pair of transmitter and receiver is fixed at up side (from where the train comes) at a level higher than a human being in exact alignment and similarly the other pair is fixed at down side of the train direction. Sensor activation time is so adjusted by calculating the time taken at a certain speed to cross at least one compartment of standard minimum size The gate controlling unit consists of two pairs of infrared sensors placed at two sides of gate. and a stepper motor is used for the purpose of the gate closing and opening. when train passes away the sensors it again into normal state then it receives 5v at terminals that pin at the PIC 16F873 terminal goes high which enables the power to the stepper motor to rotate in steps which drives gate to close similarly when it reaches the second pair of sensors it senses and send the signal to the .7 OPERATION: The above figure shows the view model of the project. Interfaced to the ULN2003. They should keep at a distance of 9 cm (2km in usual case) from the gate.

Train may be approaching gate at either direction so all four signals are made RED initially to indicate gate is OPENED and vehicles are going through gate.RED signal appears for the road user. road users are warned about the train approach by RED signal placed to caution the road users passing through the gate . Train arrival and departure sensing can be achieved by means of relay technique. Warning for road users: At that moment the train arrival is sensed on either of the gate. R1 is used to sense the arrival. These sensors are placed five kilometers before the gate. As wheels of the train. A message is displayed on LCD when train reaches the platform. R3 is used to sense the departure of the train. is made up of aluminum which is a conducting material. The train detection in the other direction is done in the same way by the sensors R1 & R4. When the wheels of the train moves over it.8 microcontroller to enable the current driver to open the gate by rotating the stepper motor in steps to get back in to original position Train arrival detection: Detection of train approaching the gate can be sensed by means of sensors R1. once the train cuts the relay sensor placed before the 5Kms before the gate .A buzzer is for train. R2. Initial signal display: Signals are placed near gate each at a specified distance. Train departure detection: Detection of train is also done using relay techniques as explained the head of train arrival detection. The road user signals are made . In particular direction of approach. R3&R4 placed on either side of the gate. Sensed by IR sensors. Sensor R3&R2 respectively considering direction of train approach do train departure. when there is any obstacle. In the same way R4&R2 senses arrival and departure in the other direction. signal is made RED for train in order to slow done its speed before 5km from gate. A confined part of parallel track is supplied with positive voltage and ground. both tracks are shorted to ground and this acts as a signal to PIC 16F873 microcontroller indicating train arrival. it shorts two parallel tracks.

Buzzer is OFF since there is no approach of train and users need not be warned.9 GREEN so that they freely move through gate. CHAPTER-3 CIRCUIT DIAGRAM .

Then it energises the stepper motor to rotate 90 reverse. switching OFF the red signal. allowing the road users to cross the track.17. So the gate opens and the green signal begin to glow.16 & 15th pins) pins correspondingly. first pin with the supply of 5v. As a result the PIC controller energises the stepper motor to rotate 90 forward which closes the gate.the sensor output goes low. Thus the circuit works. The PIC waits until the sensor2 output goes high again. . The LEDs indicating the traffic signals are connected to port B ± 2nd & 3rd pins(22 & 23rd pins). The reset switch is connected to the port A.20 of PIC 16F73. The two sensors IR1 & IR2 are connected to the port C . The crystal oscillator of 4Mhz is connected to the pins 9 & 10 with two capacitors of 22pF in parallel. The input pins 1.3 &4 0f ULN2003A are connected to port C ± 7.6. WORKING: Initially the green signal glows. The buzzer beeps for three times indicating the closure of the gate.1st & 2nd pins(11th & 12th pins).5 & 4th (18. When the train reaches the sensor2 mounted on the sides of the track a few meters behind the gate the sensor output goes low. Simultaneously green signal turns OFF and red signal begins to glow. The buzzer is connected to the port B ± 1st pin(21st pin).10 CHAPTER-4 CIRCUIT DIAGRAM DESCRIPTION The supply +5v is given to the pin no.2. The 8th & 19th pins are grounded. When train arrives between the transmitter & receiver of a sensor1 which is mounted on sides of the track few meters infront of the gate .

PIC 16F873 PIN DIAGRAM: .11 CHAPTER-5 HARDWARE DESCRIPTION 5a.

12 PIN DESCRIPTION: .

. . EASY TO CALIBRATE AND STILL. like in industry or in tachometers. This sensor can be used for most indoor applications where no important ambient light is present.13 5b. However.. this sensor doesn't provide ambient light immunity.INFRARED SENSORS Infra-Red Proximity Sensor (I) USING AN IR LED AS A SENSORS Overview BASED ON A SIMPLE BASIC IDEA. ambient light ignoring sensor. which rely on sending 40 Khz pulsed signals cannot be used because there are time gaps between the pulses where the sensor is 'blind'. In such applications. THIS PROXIMITY SENSOR. IT PROVIDES A DETECTION RANGE OF 35 CM (RANGE CAN CHANGE DEPENDING ON THE AMBIENT LIGHT INTENSITY). For simplicity. ambient light ignoring sensor should be discussed in a coming article. but a more complicated. this sensor can be used to measure the speed of object moving at a very high speed. IS EASY TO BUILD.

to detect the IR light that was emitted from another led of the exact same type! This is an electrical property of Light Emitting Diodes (LEDs) which is the fact that a led Produce a voltage difference across its leads when it is subjected to light. which is then reflected by any object in front of the sensor. the voltage generated by the leds can't be . As if it was a photo-cell. In need. photo-transistors. Due to that fact. an Op amp. that's why as you will notice in the schematic. like photo-diodes. The electronic Circuit Two different designs are proposed. It can barely be detected. the circuit is extremely simple. a transistor and a couple of resistors.in any way . only a couple if IR leds. a standard IR led is used for the purpose of detection. but with much lower output current. we are going to use a very original technique: we are going to use another IR-LED. and any novice electronics hobbyist can easily understand and build it. as the title says.used to generate electrical power from light. each one of them is more suitable for different applications. In other words. The . The basic idea is to send infra red light through IR-LEDs. or IR receiver ICs. For detecting the reflected IR light. Then all you have to do is to pick-up the reflected IR light. we are going to use a Op-Amp (operational Amplifier) to accurately detect very small voltage changes. Object Detection using IR light It is the same principle in ALL Infra-Red proximity sensors.14 The solution proposed doesn't contain any special components.

or counting revolutions of a rotating object. that may be of the order of 15.5V at the anode of the IR LED (here. depending on the ambient light conditions. meaning that the IR led is constantly emitting light. yielding a forward current of 7. As you can see the schematic is divided into 2 parts the sender and the receiver. The receiver part is more complicated. depending on the light intensity. Design 1: Low range. The sender is composed of an IR LED (D2) in series with a 470 Ohm resistor.000 rpm or much more. Always ON As the name implies.5 mA.4V or more.15 main difference between the 2 designs is the way infra-red (IR) light is sent on the object. range can be from 1 to 10 cm. They are separated in the schematics for simplification. the sensor is always ON. However this design is more power consuming and is not optimized for high ranges. The receiver part of the circuit is exactly the same in both designs. the cathode's voltage of D1 may go as low as 1. this led will be used as a sensor). Note: Both the sender and the receiver are constructed on the same board. This voltage drop can be . the voltage drop increases. When IR light falls on the LED (D1). in this design. the 2 resistors R5 and R6 form a voltage divider which provides 2. this design of the circuit is suitable for counting objects.

otherwise. You will have to adjust the variable resistor (POT.) R8 so the the voltage at the positive input of the Op-Amp (pin No. velocity or even acceleration. 5) would be somewhere near 1. providing the microcontroller with precious information that can be used to calculate displacement. if you understand the functioning of Op-Amps. then the output of the Op-Amp goes to Low (0V). you will notice that the output will go High when the volt at the cathode of D1 drops under 1. the output goes High (5v. if the +ve input's voltage is lower than the -ve input's voltage.6. the +ve input. to achieve accurate results. It is now clear that this kind of sensor has to be Always ON. given that the object has a reflective stripe glued on it. In case you're not familiar with op-amps. If the +ve input's voltage is higher than the -ve input's voltage.0001 volts difference will be detected. which is the purpose of the receiver. what you need to know to understand how this sensor functions: The op-amp has 2 input. this will result in a series of electrical pulses as the wheel is rotating. the IR leds are encapsulated to protect them from ambient light. that counts the revolutions per minute of a rotating object.6 Volt. giving a pulse per revolution. while black ones will absorb it. and the the output will swing to 0v or 5v according to which input has a higher voltage. So the output will be High when IR light is detected. here is shortly and in a very simplified manner. Some applications of the 'low range Always ON' Design: Notice how in both devices. that will pass in front of the IR sensor for each and every revolution. given the supply voltage in the schematic). It doesn't matter how big is the difference between the +ve and -ve inputs. and the ve input. Many commercial contact-less tachometers. Wheel Encoder This is a simple wheel encoder based on the idea that white stripes will reflect IR light. that are sold for more than $200 rely on this simple idea! [Build your own one for less than $20 in this . this kind of encapsulation was totally sufficient to overcome all noise due to ambient light for indoor applications. Contact-Less tachometer This is a tachometer. Again a microcontroller will have to be used to 'understand' the data provided by the sensor and display it. to detect every single white stripe passing in front of it. even a 0.16 detected using an Op-Amp (operational Amplifier LM358).

17 article. as we need to send pulses of IR instead of constant IR emission. A low duty cycle will enable us to inject in the LED high instantaneous currents while shutting it OFF for enough time to cool down . The duty cycle is the ratio between the ON duration of the pulse and the total period.. our primary target is to reach high ranges. The range of the sensor is extended by increasing the current flowing in the led.The duty cycle of the pulses turning the LED ON and OFF have to be calculated with precision. which is oriented to obstacle detection in robots. Pulsed IR In this design. from 25 to 35 cm..] Design 2: High range. This is a delicate task. depending on ambient light conditions. so that the average current flowing into the LED never exceeds the LED's maximum DC current (or 10mA as a standard safe value).

stands for Control. and the mathematical relations between the ON time. whether it is a microcontroller or an LM555 timer that generates the pulses. Those 2 graphs shows the meaning of the duty cycle. DUTY CYCLE. The first Op-amp will provide voltage buffer. the Total period. The calculations yielded that a 10 ohm resistor is series with the LED D2. and this pin should be connected to the source of the low duty cycle pulses discussed above. Now. to enable any kind of device to control the . would destroy the LED if applied for a long period of time (some dozens of seconds). A current this high. and the average current. In the second graph. but real calculations would yield a much smaller average current. this is why we have to send low duty cycle pulses. AVERAGE AND INSTANTANEOUS CURRENT. hands on the circuit that will put all this theory into practice. The CTRL input in the figure. would cause a current of approximately 250 mA to flow through the LED. PULSED IR.18 from the previous cycle. the average current in blue is exaggerated to be visible.

also. you can benefit from the High and Low pulses to be able to detect any false readings due to ambient light. When the sensor is controlled by a microcontroller to generate the low duty cycle pulses. 'ALLWAYS ON' design for a detailed description. refer to the first. The calculation of the the base resistor R3 depends on the type of transistor you use. Software based ambient light detection.19 sensor. one of them during the ON pulse (the sensor is emitting infra red light) and the other during the OFF time. This is done by recording 2 different outputs of the sensor. thus on how much current you need on the base to drive the required collector current. it will provide the 30mA base current required to drive the base of the transistor. The receiver part of this schematic functions in the exact same way as in the first design. . and compare the results.

there is something wrong with the sensor.20 The Idea is enlightened by this graph. there is low ambient noise. the way is clear This reading is un logical. meaning that an object reflected the emitted IR Light. 1 1 0 0 0 1 . where in the first period. Output recorded during: Software based deduction On pluse 1 Off time 0 There is definitely an Obstacle in front of the sensor The sensor is saturated by ambient light. which is logic because the emitter LED was OFF. it didn't receive anything. The following table show the possible outcomes of this method. thus we can't know if there is an obstacle There is definitely Nothing in front of the sensor. so the microcontroller records a "1" during the on cycle. and then the microcontroller records a "0" meaning that during the OFF time.

// Pin 3 of PORT 2 will go HIGH turning ON a LED. // The way is clear in front of the sensor.ir2. } } } .1 IR output pin coming from the sensor while(1){ P2_0 = 1. delay(20).21 Example C Code for 8051 microcontrollers #include <REGX51. ir2 = P2_1.i++){. algorithm delay(y){ unsigned int i.i<y.h> unsigned char ir. ir1 = P2_1.0 IR control pin going to the sensor //P2. for(i=0. // Sensor is saturated by ambient light }else{ ir = 0. // Obstacle detected P2_3 = 1.h> #include <math. if ((ir1 == 1)&(ir2 == 1)){ ir = 2. //send IR //stop IR // to store the final result // the 2 recording point required for our // simple delay function if ((ir1 == 1)&(ir2 == 0)){ ir = 1. P2_0 = 0.} } void main(){ //P2. bit ir1. delay(98).

while preventing any IR light to be picked up by the receiver LED before it hit and object and returns back. .along with the original signal .22 Components positioning: The correct positioning of the sender LED. The easiest way to do that is to put the sender(s) LED(s) from one side of the PCB. It is also clear that this way of positioning the LEDs prevent the emitted IR light to be detected before hitting an eventual obstacle. the amplifier will amplify . you can notice that the receiver LED is positioned under the PCB. The green plate is the PCB holding the electronic components of the sensor. Another important issue about components positioning. is the distance between the receiver LED and the Op-Amp. this way. otherwise. as shown in the 3D model below. which should be as small as possible.a lot of noise picked up form the electromagnetic waves traveling the surrounding. the receiver LED with regard to each other and to the OpAmp can also increase the performance of the sensor. and the receiver LED from the other side. This 3D model shows the position of the LEDs. as ambient light usually comes from the top. there wont be ambient light falling directly on it. First. in such a way they are as near as possible to each others . Generally speaking. the length of wires or PCB tracks before an amplifier should be reduced. we need to adjust the position of the sender LED with respect to the receiver LED.

when I design the PCB. to save some space. but trying to reduce this distance will Always give you better results. Pulsed IR proximity sensor.23 Here is an example PCB where the distance between the LED and the OpAmp is shown. the LM358 Op-Amp is mounded on the copper side. Actually. You can download here the project folder containing the schematic. it can be up to 35mm without causing serious problems. then continue the rest of the design. Sure this distance is not as critical as you may think. Testing the High range Pulsed IR sensor . the sender and receiver LEDs are on both sides of the PCB. and an example code for 8051 microcontroller to send the low duty cycle pulses. the PCB design. I start by placing the receiver LED and the Op-Amp. As explained before. as near to each others as possible. An example PCB construction Here is an example construction of the PCB for the High Range. In this design. The POT is the potentiometer used to adjust sensitivity.

the final output of the sensor appears on the pin P2_3 of the microcontroller. at a frequency of 3Khz. you can start testing the range of the sensor. loaded with a program to generate pulses with a duty cycle of approximately 1. LEDs are deigned to operate at very high frequencies.24 The last step. there is probably something wrong. In the example C code above. in order to decrease the average current flowing into the LED. I connected the sensor to a 89S52 microcontroller. as explained before. then everything is alright. but the potentiometer may have to be adjusted carefully. to cope with ambient light. to an extent that you can feel it. To do this. and experiment it in different ambient light conditions. let the sensor running for a minute. so you don't have to worry about the response time. On the other hand. To make sure your duty cycle calculations are correct. if the LED is getting hot.6. and check with your fingers the temperature of the IR sender LED. If its not hot. is to test the performance of the pulsed IR proximity sensor. . you should then try to decrease the duty cycle. or increase the series resistor. Then.

The electromagnets are energized by an external control circuit. Stepper motors are similar to switched reluctance motors (which are very large stepping motors with a reduced pole count. and generally are closedloop commutated). Stepper motors. without any feedback mechanism (see open loop control). Fundamentals of Operation : Stepper motors operate differently from normal DC motors. on the other hand.25 5b. which rotate when voltage is applied to their terminals.STEPPER MOTOR Description: A stepper motor (or step motor) is a brushless. synchronous electric motor that can divide a full rotation into a large number of steps. such . The motor's position can be controlled precisely. effectively have multiple "toothed" electromagnets arranged around a central gear-shaped piece of iron.

" with an integral number of steps making a full rotation. When the gear's teeth are thus aligned to the first electromagnet. 7. first one electromagnet is given power. as the discrete step tends to snap the rotor from one position to another. In that way. the gear rotates slightly to align with the next one. or using a micro-stepping driver. physically damping the system. or there is widely varying load. Motors with a greater number of phases also exhibit smoother operation than those with fewer phases. they are slightly offset from the next electromagnet.3 Stepper motor characteristics Stepper motors are constant power devices. A new development in stepper control is to incorporate a rotor position feedback (eg. so that the commutation can be made optimal for . So when the next electromagnet is turned on and the first is turned off. Each of those slight rotations is called a "step. which makes the gear's teeth magnetically attracted to the electromagnet's teeth.26 as a microcontroller. the driver has no feedback on where the rotor actually is. the motor can be turned by a precise angle.e.5. This vibration can become very bad at some speeds and can cause the motor to lose torque. The torque curve may be extended by using current limiting drivers and increasing the driving voltage. Stepper motor systems must thus generally be over engineered. i. As motor speed increases. To make the motor shaft turn. and from there the process is repeated. especially if the load inertia is high. torque decreases. The effect can be mitigated by accelerating quickly through the problem speed range. so that there is no possibility that the motor will lose steps. an encoder or resolver). Steppers exhibit more vibration than other motor types. Open-loop versus closed-loop commutation : Steppers are generally commutated open loop. This has often caused the system designer to consider the trade-offs between a closely sized but expensive servomechanism system and an oversized but relatively cheap stepper.

Types: There are three main types of stepper motors: ‡ Permanent Magnet Stepper ‡ Hybrid Synchronous Stepper ‡ Variable Reluctance Stepper Two-phase stepper motors There are two basic winding arrangements for the electromagnetic coils in a two phase stepper motor: bipolar and unipolar. with exceptional low speed torque and position resolution. a common servo problem. This turns the stepper motor into a high pole count brushless servo motor. Unipolar motors : A unipolar stepper motor has logically two windings per phase. An advance on this technique is to normally run the motor in open loop mode. one for each direction of magnetic field. the commutation circuit can be .this will allow the system to avoid hunting or oscillating.27 torque generation according to actual rotor position. Since in this arrangement a magnetic pole can be reversed without switching the direction of current. and only enter closed loop mode if the rotor position error becomes too large -.

Specific color code may also be given. yellow is third (L3). leaving half of the windings unused [diagram needed]. a single transistor) for each winding.g. Typically. one end of each winding is made common: giving three leads per phase and six leads for a typical two phase motor. So all these three things just depends on applied pulses. One end of each coil is tide together and it gives common terminal which is always connected with positive terminal of supply. these two phase commons are internally joined. black is fourth (L4) and red for common terminal. and driving the two windings of each phase together [diagram needed]. Double coil excitation 3. Unipolar stepper motor coils In the construction of unipolar stepper motor there are four coils. By means of controlling a stepper motor operation we can 1. Change its direction means rotate it clockwise or anticlockwise To vary the RPM of motor we have to vary the PRF (Pulse Repetition Frequency). . half coil excitation Unipolar stepper motors with six or eight wires may be driven using bipolar drivers by leaving the phase commons disconnected. Like in my motor orange is first coil (L1). given a phase. so the motor has only five leads.28 made very simple (e. Number of applied pulses will vary number of rotations and last to change direction we have to change pulse sequence. Now there are three different modes to rotate this motor 1. Often. It is also possible to use a bipolar driver to drive only one winding of each phase. The other ends of each coil are given for interface. brown is second (L2). Increase or decrease number of revolutions of it 3. Increase or decrease the RPM (speed) of it 2. Single coil excitation 2.

8-lead stepper: An 8 lead stepper is wound like a unipolar stepper. taking care that they have no common denominator. This requires higher current but can perform better as the winding inductance is reduced. ‡ Bipolar with a single winding per phase. This method will run the motor on only half the available windings. but the leads are not joined to common internally to the motor. typically with an H-bridge arrangement. ‡ Bipolar with parallel windings. so the driving circuit must be more complicated. none are common. ‡ Bipolar with series windings.29 Bipolar motor : Bipolar motors have logically a single winding per phase. This kind of motor can be wired in several configurations: ‡ Unipolar. There are two leads per phase. they are more powerful than a unipolar motor of the same weight. The current in a winding needs to be reversed in order to reverse a magnetic pole. soft magnetic material with many teeth on the rotor and . This gives higher inductance but lower current per winding. Theory : A step motor can be viewed as a synchronous AC motor with the number of poles (on both rotor and stator) increased. Static friction effects using an Hbridge have been observed with certain drive topologies Because windings are better utilized. Additionally. which will reduce the available low speed torque but require less current.

thus reducing motor torque. and this Pull-In torque must overcome friction and inertia. To achieve full rated torque. At low speeds the stepper motor can synchronize itself with an applied step frequency. drive current and current switching techniques.30 stator cheaply multiplies the number of poles (reluctance motor). Modern steppers are of hybrid design. the current will not reach the rated value. Pull-out torque : The stepper motor Pull-Out torque is measured by accelerating the motor to the desired speed and then increasing the torque loading until the motor stalls or "pulls Out of synchronism" with the step frequency. having both permanent magnets and soft iron cores. Pull-in torque : This is the measure of the torque produced by a stepper motor when it is operated without an acceleration state. As speeds further increase. This measurement is taken across a wide range of speeds and the results are used to generate the stepper motor's dynamic performance curve. Winding inductance and reverse EMF generated by a moving rotor tend to resist changes in drive current. It is normally recommended to use a safety factor of between 50% and 100% when comparing your desired torque output to the published "pull-Out" torque performance curve of a step motor. less and less time is spent at full current -. As noted below this curve is affected by drive voltage. Detent torque : . so that as the motor speeds up. and eventually the motor will cease to produce torque. the coils in a stepper motor must reach their full rated current during each step.

The rated voltage will produce the rated winding current at DC: but this is mostly a meaningless rating. and sometimes included in the specifications) when not driven electrically. as all modern drivers are current limiting and the drive voltages greatly exceed the motor rated voltage.31 Synchronous electric motors using permanent magnets have a remnant position holding torque (called detent torque. Steppers should be sized according to published torque curve. How quickly the torque falls off at faster speeds depends on the winding inductance and the drive circuitry it is attached to. A stepper's low speed torque will vary directly with current. Soft iron reluctance cores do not exhibit this behavior. Stepper motor ratings and specifications : Stepper motors nameplates typically give only the winding current and occasionally the voltage and winding resistance. especially the driving voltage. which is specified by the manufacturer at particular drive voltages and/or using their own drive .

and positioning of valve pilot stages for fluid control systems. 5. plotters and many more devices. And delay will be 5 milli second (ms). and are simpler and more rugged than closed loop servo systems. 3. Now 200 pulses in 1 sec means the PRF is 200 Hz.6. It is not guaranteed that you will achieve the same performance given different drive circuitry. * So 100 pulses will be given in 1 sec * Motor will complete 1 revolution in 2 second * So the RPM will be 30. rotation stages.32 circuitry. Now 1 rev. flatbed scanners. They are typically digitally controlled as part of an open loop system. 4. Fig 7.0 RPM calculation:One can calculate the exact RPM at which motor will run. Industrial applications are in high speed pick and place equipment and multiaxis machine CNC machines often directly driving lead screws or ball screws. and mirror mounts. * If delay is 10 ms then PRF will be 100 Hz. so the pair should be chosen with great care. in 1 minute. Now let¶s see it reverse. Means if 200 pulses applied in 1 second motor will complete 1 revolution in 1 second. That will give us 60 RPM.In same manner as you change delay the PRF will be changed and it will change RPM\ Applications 1. Commercially. . In the field of lasers and optics they are frequently used in precision positioning equipment such as linear actuators. Computer-controlled stepper motors are one of the most versatile forms of positioning systems. We know that motor needs 200 pulses to complete 1 revolution. stepper motors are used in floppy disk drives. Other uses are in packaging machinery.5. 2. in 1 sec means 60 rev. computer printers. goniometers. linear stages.

IR transmitter circuit 2.33 5C. consists of two parts: 1. IR receiver unit . INFRARED SENSORS Introduction: This infrared sensor also called as IR sensors.

Input Max:5V ‡ Voltage. CMOS 5V . Min:-20°C ‡ Temp. Op. No. Output Max:50V . of:7 ‡ Current. Output Max:500mA ‡ IC Generic Number:2003 ‡ Input Type:TTL. Operating Range:-20°C to +85°C ‡ Transistors. ULN2003A description: ‡ Pins. No. Op. of:16 ‡ Temperature.34 5d.OTHERS ULN 2003A Relay drivers Introduction: IC. Output Type: Open Collector ‡ Logic Function Number:2003 ‡ Transistor Type: Power Darlington ‡ Device Marking:ULN2003A ‡ Voltage. of:7 ‡ Transistor Polarity:NPN ‡ Case Style:DIP-16 ‡ Temp. No. Max:85°C ‡ Base Number:2003 ‡ Channels.

LED displays filament lamps. ULN2002A. Each channel rated at 500mAand can withstand peak currents of 600mA. ULN2003 and ULN2004Aare high Voltage. high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. . thermal print heads and high power buffers. relays DC motors. These versatile devices are useful for driving a wide range of loads including solenoids.Suppressiondiodesare included for inductive load driving and the inputs are pinned opposite the outputs to simplify board layout. They are available also in small outline package (SO-16) as ULN2001D/2002D/2003D/2004D. The ULN2001A/2002A/2003A and 2004A are supplied in 16 pin plastic DIP packages with a copper lead frame to reduce thermal resistance.35 PIN CONNECTIONS OF ULN2003: The ULN2001A.

Thus the conversion from AC to DC is essential. Full-Wave and bridge Rectifiers available for this specific function.36 POWER SUPPLY UNIT Power supply unit consists of following units i) ii) iii) iv) v) Step down transformer Rectifier unit Input filter Regulator unit Output filter STEPDOWN TRANSFORMER : The Step down Transformer is used to step down the main supply voltage from 230V AC to lower value. The most important and simple device used in Rectifier circuit is the diode. To reduce or step down the voltage. the ripples from the obtained DC voltage are removed using other circuits available. thus it is stepped down. The output voltage of the rectifier is in rippled form. . The efficient circuit used is the Full wave Bridge rectifier circuit. There are Half-Wave. RECTIFIER UNIT: The Rectifier circuit is used to convert the AC voltage into its corresponding DC voltage. The Transformer consists of primary and secondary coils. This conversion is achieved by using the Rectifier Circuit/Unit. This 230 AC voltage cannot be used directly. The circuit used for removing the ripples is called Filter circuit. The Forward Bias is achieved by connecting the diode¶s positive with positive of the battery and negative with battery¶s negative. the transformer is designed to contain less number of turns in its secondary core. The simple function of the diode is to conduct when forward biased and not to conduct in reverse bias. The output from the secondary coil is also AC waveform.

37 INPUT FILTER: Capacitors are used as filter. The output at this stage is 5V and is given to the Microcontroller . the DC voltage also changes. The primary action performed by capacitor is charging and discharging. REGULATOR UNIT Regulator regulates the output voltage to be always constant. This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in the output received finally. So it allows only AC voltage and does not allow the DC voltage. The principle of the capacitor is to charge and discharge. Further they can also be classif i) Positive regulator 1---> input pin 2---> ground pin 3---> output.1µF capacitor. So it allows only AC voltage and does not allow the DC voltage. It charges in positive half cycle of the AC voltage and it will discharge in negative half cycle. It regulates the OUTPUT FILTER: The Filter circuit is often fixed after the Regulator circuit. The regulators are mainly classified for low voltage and for high voltage. Thus the output is free from ripples. This filter is fixed before the regulator. Here we used 0. It regulates the positive volt ii) Negative regulator 1---> ground pin 2---> input pin 3---> output pin negative voltage. the output gets affected. The ripples from the DC voltage are removed and pure DC voltage is obtained. Capacitor is most often used as filter. It charges during the positive half cycle of the AC voltage and discharges during the negative half cycle. Also when the internal resistance of the power supply is greater than 30 ohms. As and then the AC voltage changes. Thus this can be successfully reduced here. And also these capacitors are used to reduce the harmonics of the input voltage. The output voltage is maintained irrespective of the fluctuations in the input AC voltage. Thus to avoid this Regulators are used.

12. 15. 9. COMPONENTS RANGE PIC 16F73 Stepper motor Transformer 28 pin 1kg 15-0-15 0-15-0 4. 10. 14. 13. Reset switch Train OP-amp Bridge rectifiers Regulator 4mhz 16 pin 5mm IC741 IC7805 IC7812 IC7912 QUANTITY 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 2 1 1 1 .NO 1. 7. Crystal oscillator ULN2003A 28 pin base 16 pin base IR sensor pair Buzzer LED Red LED Green 11. 2. 8. 5. 3. 6.38 CHAPTER-6 COMPONENT SPECIFICATIONS S.

Capacitor 10µf 1000µf 22pf 3 3 2 2 3 15 2 5 1 1 2 17.39 16. Resistor 1k 330 10k 1m 18. 19. Transistor GP board PC board Tripot BC547 - . 21. 20.

This circuit can be expanded and used in a station with any number of platforms as per the usage. this project can be further extended to meet the demands according to situation. . 3. Additional modules can be added with out affecting the remaining modules. A regular assessment of safety performance should be done. This allows the flexibility and easy maintenance of the developed system 6. Based on the responses and reports obtained as a result of the significant development in the working system of INDIAN RAILWAYS. by eliminating some of the loopholes existing in it. 8. 4.40 CHAPTER-7 APPLICATIONS 1. A new approach for improving safety at Level crossings on Indian Railways has been suggested. 7. This approach should be able to bring down the rising trend in accidents at Level Crossings. This project is developed in order to help the INDIAN RAILWAYS in making its present working system a better one. This can be further implemented to have control room to regulate the working of the system. 2. Thus becomes the user friendliness. 5. Each Level crossing should be assigned a hazard rating and the priority of safety enhancement works be decided accordingly.

19.NO 1.LED Green Reset switch Train OP-amp Bridge rectifiers Regulator Capacitors & Resistors Transistors GP board & PC board Tripot COST(Rs) 180 180 . 15. 7. 10. COMPONENTS PIC 16F73 Stepper motor Transformer Crystal oscillator ULN2003A 28 pin base 16 pin base IR sensor pair Buzzer LED Red. 12. 11. 13.41 CHAPTER-8 DETAILED BUDGET S. 6. 3. 2. 16. 4. 8. 18. 5. 9. 17. 14.

com 2.www.google.42 CHAPTER-9 BIBLIOGRAPHY SITES: 1.www.com .scribd.

43 .