You are on page 1of 40

ABSTRACT

Now-a-days public is facing many threats from the railway department by which they are hesitating to plan a train journey. The main reason for this is due to the accidents that occur due to negligence of train drivers. Though the railway department is trying to take actions to reduce such informal things but couldnt see the face of success. To help out the department, we have designed our system. This project is introduced to monitor drivers condition and to alert him. The main functionality of this system is to monitor the drivers action for some time and if he fails to do any defined action within a specific period, the train will be stopped immediately. Here the drivers actions can be defined as blowing the horn or applying brake or accelerating the train etc. If the driver fails to do any of the above actions for every 2 minutes, our system gives a siren sound which the driver should switch off with in the defined time, if failed the train will stop immediately. This system also checks for the stop signal or red light signal irrespective of drivers action and status and stops the train. In this way by monitoring the common parameters continuously, we have every chance to reduce accidents. For demonstration, we will be providing switches for each parameter so that we can simulate and show the result of our system effectively.

The RF transmitter, fixed to the train, continuously transmits the data to the RF receiver. The RF receiver section, as soon as it receives the data from the transmitter, closes the railway gate by rotating the stepper motor fixed to the gate and opens it after a predetermined delay.

CONTENT

1 CHAPTER 1 1.1 INTRODUCTION 1.2 INTELLIGENT TRAIN 1.3 RAILWAY CONTROL

2 CHAPTER 2 2.1 BLOCK DIAGRAM 2.2 CIRCUIT DIAGRAM 2.3 WORKING PROCEDURE

3 CHAPTER 3 3.1 COADING 3.2 ADVANTAGES 3.3 DIS ADVANTAGES 3.4 APPLICATIONS

4 5

CONCLUSION REFERENCES

1.1 INTRODUCTION We know that the railway network of India is the biggest in south Asia and perhaps the most complicated in all over the world. There are so many different types of trains local, fast, super fast, passenger, goods. etc. and their so many multiple routs. Although the time table is perfectit is not at all possible to maintain it. And thats why the train accidents are becoming more andmore usual. So why not we add a kind of intelligence to the train engines itself so that it tries toavoid accidents. The idea is whenever any engine observes a red signal on its track it will start decreasing itsspeed gradually and stops automatically at some distance from the signal pole. After then when itgets green signal the driver can manually start the train and go on. In the mean time when trainhas not stopped yet and a red signal becomes green then it crosses the signal pole with low speedand then driver can slowly increase the speed. So now before the driver observes the red signal the engine itself observes it and automaticallystarts decreasing speed and then stops. The driver can feel relax in driving because he doesnthave to take care about red signal. Even if he forgets to take any action on red signal then alsowe can avoid accidents by the implementation of this idea.General description:What we have to do is we have to attach a transmitter with signal pole which will starttransmitting signals only when the red light is on. If there is green light no transmission. Theengine has a receiver which catches these transmitted signals and takes desire actions.Both the transmitter and receiver are of RF type with minimum range of 2 Km. so that train canget enough time to decrease its speed and stop before the signal pole with minimum swappingdistance of 100-200 mt.Here in our project we have used IR transmitter and receiver instead of RF for demo purpose. But same idea can be easily implemented with RF also with a little more cost.Lets first discuss the demonstration model. Demonstration Model: The train engine runs on 24V DC motor so that we can easily vary its speed by varying appliedvoltage. The switching voltage is applied in step of 18 V, 15 V, 12 V and 9 V (min

speed). The230 VAC is step-down to 24 VAC by 12-0-12, 2 Ampere step down transformer. As shown in figure this 24 VAC line runs parallel with track at the top of the train. Movable tapping are taken from this line and fed to the internal circuit of engine. These tapping slides as the train runs on the track and give continuous supply to circuit. The IR sensor is placed at the top of the engine, senses the signals transmitted by IR transmitter attached to signal pole. Train track is straight and 20 ft long. Signal pole is placed at the end of track and train starts from farther end . Model of Intelligent Train Engines The project is divided in two parts Transmitter Receiver The transmitter is housed in signal pole and it is activated only when red light is ON. The receiver is housed in engine which senses the IR signals and takes suitable action.Signal Pole IR Transmitter: Now-a-days public is facing many threats from the railway department by which they are hesitating to plan a train journey. The main reason for this is due to the accidents that occur due to negligence of train drivers. Though the railway department is trying to take actions to reduce such informal things but couldnt see the face of success. To help out the department, we have designed our system. This project is introduced to monitor drivers condition and to alert him. The main functionality of this system is to monitor the drivers action for some time and if he fails to do any defined action within a specific period, the train will be stopped immediately. Here the drivers actions can be defined as blowing the horn or applying brake or accelerating the train etc. If the driver fails to do any of the above actions for every 2 minutes, our system gives a siren sound which the driver should switch off with in the defined time, if failed the train will stop immediately. This system also checks for the stop signal or red light signal irrespective of drivers action and status and stops the train. In this way by monitoring the common parameters continuously, we have every chance to reduce accidents. For demonstration, we will be providing switches for each parameter so that we can simulate and show the result of our system effectively.

1.2 INTELLIGENT TRAIN ENGINE

Intelligent train engine consists of RF transmitter and RF receiver The idea is whenever any engine observes a red signal on its track it will start decreasing its speed gradually and stops automatically at some distance from the signal pole. After then when it gets green signal the driver can manually start the train and go on. In the mean time when train has not stopped yet and a red signal becomes green then it crosses the signal pole with low speed and then driver can slowly increase the speed. So now before the driver observes the red signal the engine itself observes it and automatically starts decreasing speed and then stops. The driver can feel relax in driving because he doesnt have to take care about red signal. Even if he forgets to take any action on red signal then also we can avoid accidents by the implementation of this idea. General description: What we have to do is we have to attach a transmitter with signal pole which will start transmitting signals only when the red light is on. If there is green light no transmission. The engine has a receiver which catches these transmitted signals and takes desire actions. Both the transmitter and receiver are of RF type with minimum range of 2 Km. so that train can get enough time to decrease its speed and stop before the signal pole with minimum swapping distance of 100-200 mt. Here in our project we have used IR transmitter and receiver instead of RF for demo purpose. But same idea can be easily implemented with RF also with a little more cost. Demonstration Model:

The train engine runs on 24V DC motor so that we can easily vary its speed by varying applied voltage. The switching voltage is applied in step of 18 V, 15 V, 12 V and 9 V (min speed). The 230 VAC is step-down to 24 VAC by 12-0-12, 2 Ampere step down transformer. As shown in figure this 24 VAC line runs parallel with track at the top of the train. Movable tapping are taken from this line and fed to the internal circuit of engine. These tapping slides as the train runs on the track and give continuous supply to circuit. The IR sensor is placed at the top of the engine, senses the signals transmitted by IR transmitter attached to signal pole. Train track is straight and 20 ft long. Signal pole is placed at the end of track and train starts from farther end.

1.3 RAILWAY GATE CONTROL

This system also checks for the stop signal or red light signal irrespective of drivers action and status and stops the train. In this way by monitoring the common parameters continuously, we have every chance to reduce accidents. For demonstration, we will be providing switches for each parameter so that we can simulate and show the result of our system effectively.

The project is divided in two parts Transmitter Receiver The transmitter is housed in signal pole and it is activated only when red light is ON. The receiver is housed in engine which senses the IR signals and takes suitable action. Signal Pole IR Transmitter:-

INTRODUCTION TO KIEL SOFT WARE

Many companies provide the 8051 assembler, some of them provide shareware version of their product on the Web, Kiel is one of them. We can download them from their Websites. However, the size of code for these shareware versions is limited and we have to consider which assembler is suitable for our application.

Kiel u Vision2:
Kiel uVision2is an IDE (Integrated Development Environment) that helps you write, compile, and debug embedded programs. It encapsulates the following components: A project manager. A make facility. Tool configuration. Editor. A powerful debugger.

To help you get started, several example programs

Building an Application in uVision2:


To build (compile, assemble, and link) an application in uVision2, you must: Select ProjectOpen Project (for example, \C166\EXAMPLES\HELLO\HELLO.UV2). Select Project - Rebuild all target files or Build target. UVision2 compiles, assembles, and links the files in your project.

Creating Your Own Application in uVision2:


To create a new project in uVision2, you must: Select Project - New Project. Select a directory and enter the name of the project file. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the Device Database

Create source files to add to the project. Select Project - Targets, Groups, and Files. Add/Files, select Source Group1, and add the source files tothe project. Select Project - Options and set the tool options. Note when you select the target device from the Device Database all-special options are set automatically. You typically only need to configure the memory map of your target hardware. Default memory model settings are optimal for most

Applications:
Select Project - Rebuild all target files or Build target.

Debugging an Application in uVision2:


To debug an application created using uVision2, you must: Select Debug - Start/Stop Debug Session. Use the Step toolbar buttons to single-step through your program. You may enter G, main in the Output Window to execute to the main C function. Open the Serial Window using the Serial #1 button on the toolbar. Debug your program using standard options like Step, Go, Break, and so on. Limitations of Evaluation Software: The following limitations apply to the evaluation versions of the C51, C251, or C166 tool chains. C51 Evaluation Software Limitations: The compiler, assembler, linker, and debugger are limited to 2 Kbytes of object code but source Code may be any size. Programs that generate more than 2 Kbytes of object code will not compile, assemble, or link the startup code generated includes LJMP's and cannot be used in single-chip devices supporting Less than 2 Kbytes of program space like the Philips 750/751/752. The debugger supports files that are 2 Kbytes and smaller. Programs begin at offset 0x0800 and cannot be programmed into singlechip devices. No hardware support is available for multiple DPTR registers. No support is available for user libraries or floating-point arithmetic.

The following components, which are present in the PK51 Full Version, are not included in the C51 Evaluation Software: Code-Banking Linker/Locator. Library Manager. RTX-51 Tiny Real-Time Operating System. C251 Evaluation Software Limitations: The compiler, assembler, linker, and debugger are limited to 4 Kbytes of object code but sourcecode may be any size. Programs that generate more than 4 Kbytes of object code will not compile, assemble, or link. The debugger supports files that are 4 Kbytes and smaller. C166 Evaluation Software Limitations: The compiler, assembler, linker, and debugger are limited to 4 Kbytes of object code but source Code may be any size. Programs that generate more than 4 Kbytes of object code will not compile, Assemble, or link The debugger supports files that are 4 Kbytes and smaller.

Peripheral Simulation:
The uvision2 debugger provides complete simulation for the CPU and on chip peripherals of most embedded devices. To discover which peripherals of a device are supported, in u vision2. Select the Simulated Peripherals item from the Help menu. You may also use the web-based device database. We are constantly adding new devices and simulation support for on-chip peripherals so be sure to check Device Database often.

BLOCK DIAGRAM TRANSMITTER SIDE:

Microcontroller is used to control the entire circuit a controlling switch is used to make the railway gate on/off condition. transmitter and receiver

RECEIVER BLOCK DIAGRAM:

1 Simple 5V power supply for digital circuits

Brief description of operation: Gives out well regulated +5V output, output current capability of 100 mA

Circuit protection: Built-in overheating protection shuts down output when regulator IC gets too hot

Circuit complexity: Very simple and easy to build Circuit performance: Very stable +5V output voltage, reliable operation Availability of components: Easy to get, uses only very common basic components

Design testing: Based on datasheet example circuit, I have used this circuit successfully as part of many electronics projects

Applications: Part of electronics devices, small laboratory power supply Power supply voltage: Unregulated DC 8-18V power supply Power supply current: Needed output current + 5 mA Component costs: Few dollars for the electronics components + the input transformer cost

2.2 CRICUIT DIAGRAM TRANSMITTER

The transmitter is housed in signal pole and it is activated only when red light is ON. The receiver is housed in engine which senses the IR signals and takes suitable action. Signal Pole IR Transmitter:-

The figure shows the schematic diagram of IR transmitter.

Schematic diagram of IR transmitter.

RF TRANSMITTER MODULE:

RF transmitter

Functional block of Tx section where 1,2,3,4 are the pins 1 - Antenna 2 - Data input 3 - Ground 4 - VCC

In this transmitting section the 1st pin is the antenna pin where we can able to fix the antenna for transmitting the data in the Radio Frequency, the 2nd pin is the data input pin in which the output of the

encoder is given; the 3rd pin is the ground and the 4th pin is the VCC which is given to operate the transmitter section.

The heart of the circuit is IC555. The main component of the circuit is only IC555. Connections: Both ICs are connected in astable mode. The frequency of U2 is 0.5 Hz and U1 is 38 KHz. This is decided by RC components connected with it. The output of U2 is connected with reset pin (4) of U1. Thus the output of U2 controls the operation of U1 means it will switch on or off the output of U1. The output of U1 is fed to two IR LEDs through Darlington pair made up of Q1, Q2 and R5. The 9V DC battery is connected with circuit through SPDT switch SW1 as shown. Operation: As shown in figure when SW1 is in position as shown the transmitter is On and also the red LED is also ON. When switch changes its position the red LED and transmitter is off and only green LED will on. When the circuit is energized U2 will start generating high pulse at every 1 sec. as this pulse is fed to reset pin of U1 it will generate 38 KHz square wave and give it to IR leds. IR leds will generate IR beam of 38 KHz for the same time. Thus after every one second the IR beam of 38 KHz is generated for one second only. This cycle repeats till the red light is on. Note: The range of this transmitter is limited to 10 ft only.

RECEIVER

RF RECEIVER MODULE:

Functional block of Rx section where 1,2,3,4 are the pins 1 - Antenna 2 - Data input 3 - Ground 4 - VCC

In this receiving section the 1st pin is the antenna pin where we can able to fix the antenna to receive the data in the Radio Frequency, the 2nd pin is the data output pin to the decoder circuit, the 3rd pin is the ground and the 4th pin is the VCC which is given to operate the receiver section.

The main components of the circuit are IR sensor TSOP 1738, microcontroller 89C51, current driver chip ULN2003A and all voltage regulator ICs (78XX series). Connections: 24 VAC is rectified by diode bridge D1 and filtered through C1 and given to all the regulated ICs as input. The output of 7805 is connected to 89C51 and TSOP and also to all the LEDs. Output of 7812 (last one) is connected to common coil terminal and to ULN The outputs of middle four regulated ICs are connected to DC motor through relay contacts. Output of TSOP is connected with pin P3.3 (INT1) of microcontroller All five leds are connected with port P0 as shown Input of ULN is connected with Port 1 pins P1.0-P1.3, and outputs are connected with second terminal of relay coil. Operation: TSOP will detect the 38 KHz IR beam and gives the interrupt to 89C51. 89C51 will indicate the interrupt event on first (green) LED and energizes only one particular relay through ULN chip. When any of the four relay get energized the motor will get supply from it and it will start running As voltage is less it will run with less speed So now its the function of microcontroller to receive signal from IR sensor, decrease the speed of train gradually in four steps and then stop it. And this is done by software embedded in to 89C51.

EXPLANATION This project is introduced to monitor drivers condition and to alert him. The main functionality of this system is to monitor the drivers action for some time and if he fails to do any defined action within a specific period, the train will be stopped immediately. Here the drivers actions can be defined as blowing the horn or applying brake or accelerating the train etc. If the driver fails to do any of the above actions for every 2 minutes, our system gives a siren sound which the driver should switch off with in the defined time, if failed the train will stop immediately. This system also checks for the stop signal or red light signal irrespective of drivers

action and status and stops the train. In this way by monitoring the common parameters continuously, we have every chance to reduce accidents. For demonstration, we will be providing switches for each parameter so that we can simulate and show the result of our system effectively.

The RF transmitter, fixed to the train, continuously transmits the data to the RF receiver. The RF receiver section, as soon as it receives the data from the transmitter, closes the railway gate by rotating the stepper motor fixed to the gate and opens it after a predetermined delay. We know that the railway network of India is the biggest in south Asia and perhaps the most complicated in all over the world. There are so many different types of trains local, fast, super fast, passenger, goods. etc. and their so many multiple routs. Although the time table is perfectit is not at all possible to maintain it. And thats why the train accidents are becoming more andmore usual. So why not we add a kind of intelligence to the train engines itself so that it tries toavoid accidents. The idea is whenever any engine observes a red signal on its track it will start decreasing itsspeed gradually and stops automatically at some distance from the signal pole. After then when itgets green signal the driver can manually start the train and go on. In the mean time when trainhas not stopped yet and a red signal becomes green then it crosses the signal pole with low speedand then driver can slowly increase the speed. So now before the driver observes the red signal the engine itself observes it and automaticallystarts decreasing speed and then stops. The driver can feel relax in driving because he doesnthave to take care about red signal. Even if he forgets to take any action on red signal then alsowe can avoid accidents by the implementation of this idea.General description:What we have to do is we have to attach a transmitter with signal pole which will starttransmitting signals only when the red light is on. If there is green light no transmission. Theengine has a receiver which catches these transmitted signals and takes desire actions.Both the transmitter and receiver are of RF type with minimum

range of 2 Km. so that train canget enough time to decrease its speed and stop before the signal pole with minimum swappingdistance of 100-200 mt.Here in our project we have used IR transmitter and receiver instead of RF for demo purpose. But same idea can be easily implemented with RF also with a little more cost.Lets first discuss the demonstration model. Demonstration Model: The train engine runs on 24V DC motor so that we can easily vary its speed by varying appliedvoltage. The switching voltage is applied in step of 18 V, 15 V, 12 V and 9 V (min speed). The230 VAC is step-down to 24 VAC by 12-0-12, 2 Ampere step down transformer. As shown infigure this 24 VAC line runs parallel with track at the top of the train. Movable tapping are takenfrom this line and fed to the internal circuit of engine. These tapping slides as the train runs onthe track and give continuous supply to circuit. The IR sensor is placed at the top of the engine,senses the signals transmitted by IR transmitter attached to signal pole. Train track is straight and 20 ft long. Signal pole is placed at the end of track and train starts from farther end . Model of Intelligent Train EnginesThe project is divided in two partsTransmitter Receiver The transmitter is housed in signal pole and it is activated only when red light is ON. The receiver is housed in engine which senses the IR signals and takes suitable action.Signal Pole IR Transmitter: Now-a-days public is facing many threats from the railway department by which they are hesitating to plan a train journey. The main reason for this is due to the accidents that occur due to negligence of train drivers. Though the railway department is trying to take actions to reduce such informal things but couldnt see the face of success. To help out the department, we have designed our system. This project is introduced to monitor drivers condition and to alert him. The main

functionality of this system is to monitor the drivers action for some time and if he fails to do any defined action within a specific period, the train will be stopped immediately. Here the drivers actions can be defined as blowing the horn or applying brake or accelerating the train etc. If the driver fails to do any of the above actions for every 2 minutes, our system gives a siren sound which the driver should switch off with in the defined time, if failed the train will stop immediately. This system also checks for the stop signal or red light signal irrespective of drivers action and status and stops the train. In this way by monitoring the common parameters continuously, we have every chance to reduce accidents. For demonstration, we will be providing switches for each parameter so that we can simulate and show the result of our systemeffectively. Intelligent train engine consists of RF transmitter and RF receiver The idea is whenever any engine observes a red signal on its track it will start decreasing its speed gradually and stops automatically at some distance from the signal pole. After then when it gets green signal the driver can manually start the train and go on. In the mean time when train has not stopped yet and a red signal becomes green then it crosses the signal pole with low speed and then driver can slowly increase the speed. So now before the driver observes the red signal the engine itself observes it and automatically starts decreasing speed and then stops. The driver can feel relax in driving because he doesnt have to take care about red signal. Even if he forgets to take any action on red signal then also we can avoid accidents by the implementation of this idea. General description:

What we have to do is we have to attach a transmitter with signal pole which will start transmitting signals only when the red light is on. If there is green light no transmission. The engine has a receiver which catches these transmitted signals and takes desire actions. Both the transmitter and receiver are of RF type with minimum range of 2 Km. so that train can get enough time to decrease its speed and stop before the signal pole with minimum swapping distance of 100-200 mt. Here in our project we have used IR transmitter and receiver instead of RF for demo purpose. But same idea can be easily implemented with RF also with a little more cost. Demonstration Model: The train engine runs on 24V DC motor so that we can easily vary its speed by varying applied voltage. The switching voltage is applied in step of 18 V, 15 V, 12 V and 9 V (min speed). The 230 VAC is step-down to 24 VAC by 12-0-12, 2 Ampere step down transformer. As shown in figure this 24 VAC line runs parallel with track at the top of the train. Movable tapping are taken from this line and fed to the internal circuit of engine. These tapping slides as the train runs on the track and give continuous supply to circuit. The IR sensor is placed at the top of the engine, senses the signals transmitted by IR transmitter attached to signal pole. Train track is straight and 20 ft long. Signal pole is placed at the end of track and train starts from farther end. Intelligent train engine consists of RF transmitter and RF receiver The idea is whenever any engine observes a red signal on its track it will start decreasing its speed gradually and stops automatically at some distance from the signal pole. After then when it gets green signal the driver can manually start the train and go on. In the mean time when train has not stopped yet and a red signal becomes green then it crosses the signal pole with low speed and then driver can slowly increase the speed. So now before the driver observes the red signal the engine itself observes it and automatically starts decreasing speed and then stops. The driver can feel relax in driving because he doesnt have to take care about red signal. Even if he forgets to take any action on red signal then also we can avoid accidents by the implementation of this idea.

General description: What we have to do is we have to attach a transmitter with signal pole which will start transmitting signals only when the red light is on. If there is green light no transmission. The engine has a receiver which catches these transmitted signals and takes desire actions. Both the transmitter and receiver are of RF type with minimum range of 2 Km. so that train can get enough time to decrease its speed and stop before the signal pole with minimum swapping distance of 100-200 mt. Here in our project we have used IR transmitter and receiver instead of RF for demo purpose. But same idea can be easily implemented with RF also with a little more cost. Demonstration Model: The train engine runs on 24V DC motor so that we can easily vary its speed by varying applied voltage. The switching voltage is applied in step of 18 V, 15 V, 12 V and 9 V (min speed). The 230 VAC is step-down to 24 VAC by 12-0-12, 2 Ampere step down transformer. As shown in figure this 24 VAC line runs parallel with track at the top of the train. Movable tapping are taken from this line and fed to the internal circuit of engine. These tapping slides as the train runs on the track and give continuous supply to circuit. The IR sensor is placed at the top of the engine, senses the signals transmitted by IR transmitter attached to signal pole. Train track is straight and 20 ft long. Signal pole is placed at the end of track and train starts from farther end. The transmitter is housed in signal pole and it is activated only when red light is ON. The receiver is housed in engine which senses the IR signals and takes suitable action. Signal Pole IR Transmitter:-

The figure shows the schematic diagram of IR transmitter.

Schematic diagram of IR transmitter.

The heart of the circuit is IC555. The main component of the circuit is only IC555. Connections: Both ICs are connected in astable mode. The frequency of U2 is 0.5 Hz and U1 is 38 KHz. This is decided by RC components connected with it. The output of U2 is connected with reset pin (4) of U1. Thus the output of U2 controls the operation of U1 means it will switch on or off the output of U1. The output of U1 is fed to two IR LEDs through Darlington pair made up of Q1, Q2 and R5. The 9V DC battery is connected with circuit through SPDT switch SW1 as shown. Operation: As shown in figure when SW1 is in position as shown the transmitter is On and also the red LED is also ON. When switch changes its position the red LED and transmitter is off and only green LED will on. When the circuit is energized U2 will start generating high pulse at every 1 sec. as this pulse is fed to reset pin of U1 it will generate 38 KHz square wave and give it to IR leds. IR leds will generate IR beam of 38 KHz for the same time. Thus after every one second the IR beam of 38 KHz is generated for one second only. This cycle repeats till the red light is on. Note: The range of this transmitter is limited to 10 ft only.

RECEIVER The main components of the circuit are IR sensor TSOP 1738, microcontroller 89C51, current driver chip ULN2003A and all voltage regulator ICs (78XX series). Connections: 24 VAC is rectified by diode bridge D1 and filtered through C1 and given to all the regulated ICs as input. The output of 7805 is connected to 89C51 and TSOP and also to all the LEDs. Output of 7812 (last one) is connected to common coil terminal and to ULN The outputs of middle four regulated ICs are connected to DC motor through relay contacts.

Output of TSOP is connected with pin P3.3 (INT1) of microcontroller All five leds are connected with port P0 as shown Input of ULN is connected with Port 1 pins P1.0-P1.3, and outputs are connected with second terminal of relay coil. Operation: TSOP will detect the 38 KHz IR beam and gives the interrupt to 89C51. 89C51 will indicate the interrupt event on first (green) LED and energizes only one particular relay through ULN chip. When any of the four relay get energized the motor will get supply from it and it will start running As voltage is less it will run with less speed So now its the function of microcontroller to receive signal from IR sensor, decrease the speed of train gradually in four steps and then stop it. And this is done by software embedded in to 89C51.

COADING

#include<reg51.h> #include<intrins.h> #include<lcddisplay.h>

sbit rf

= P3^0;

sbit ip1 = P2^0; sbit ip2 = P2^1;

sbit buz

= P2^7;

//*************************************************************************** //************** MAIN PROGRAM********************************** //*************************************************************************** void main() { lcd_init(); lcd_init(); st: lcdcmd(0x1); msgdisplay(" WELCOME"); delay(300);

while(rf==0); buz=0; lcdcmd(0x1); //while(ir==1);

lcdcmd(1); msgdisplay("GATE CLOSING..");

ip1=1; ip2=0; delay(700); ip1=0; ip2=0;

buz=1; while(rf==1); buz=0; lcdcmd(1); msgdisplay("GATE OPENING..");

ip1=0; ip2=1; delay(700); ip1=0;

ip2=0;

buz=1 delay(500);

goto st; } INTELLIGENT TRAIN FUNCTION PROGRAM #include<reg51.h> #include"lcddisplay.h" sbit sw1 = P2^0; sbit sw2 = P2^1; sbit sw3 = P2^2; sbit sw4 = P2^3;

sbit alertsw = P2^4; sbit led = P2^5;

sbit motor = P3^7;

sbit buz = P2^7;

unsigned char a=0; unsigned int i; void main() { lcd_init(); delay(10); lcd_init(); led =1; motor = 0;

start:

lcdcmd(1); msgdisplay(" WELCOME ");

while(1) {

for(i=0;i<2000;i++)

{ delay(1);

if(sw1==0) /// start { i=0; motor = 1;

while(sw1==0); //wait till switch is pressed lcd_init(); delay(10); lcd_init(); msgdisplay(" WELCOME ");

} else if(sw2==0) ///stop { motor = 0; lcd_init();

delay(10); lcd_init(); msgdisplay(" WELCOME ");

i=0; } else if(sw3==0) /// lights { led = ~led; while(sw3==0);

lcd_init(); delay(10); lcd_init(); msgdisplay(" WELCOME ");

i=0; } else if(sw4==0) /// horn

{ buz = ~buz; while(sw4==0); i=0;

lcd_init(); delay(10); lcd_init(); msgdisplay(" WELCOME ");

else; } buz=0;

lcd_init(); lcd_init();

lcdcmd(1); msgdisplay("Alert time!!");

for(i=0;i<1000;i++) { delay(1); if(alertsw==0) { buz=1; goto start; } }

lcd_init(); lcd_init();

lcdcmd(1); msgdisplay("Train stopped!"); motor = 0;

while(1); } }

ADVANTAGES
Prevent Accidents Safety to the Peoples Automatic Operation Fault analyze is easy Less expensive

APPLICATIONS RAILWAYS Faster Amendments Convenient Web Access Faster Track Access Streamlined Communications Longer Term Planning

CONCLUSION To be a world class railway, one of the MTR corporate strategies is to provide the highest quality service to the general public with the best safety performance for passengers and engineering staff. MTR has consistently outperformed other operators world wide on these measures year after year. Engineering work management provided by ETMS directly supports this corporate strategy. An effective and efficient management of engineering works brings along a high standard of service quality and safety. A safe and reliable train service is essential for MTR to remain a leading and competitive transportation company. Since MTR is renowned internationally for its safe and reliable railway service, MTR is diversifying her business and extending to more and more consulting services worldwide. The knowledge of engineering work management and the use of AI in MTR interest other metro companies around the world. ETMS an Conclusion 7 Application of AI for a Computerized Maintenance Scheduling System end-to-end planning and implementation application for engineering works serves as a reference model in the MTR consulting business.

REFERENCES Chun, H.W., Yeung, W.M., Lam, P.S., Daniel Lai, Richard Keefe, Jerome Lam, Helena Chan, "Scheduling Engineering Works for the MTR Corporation in Hong Kong," In Proceedings of the 17th Conference on Innovative Applications of Artificial Intelligence, Pittsburgh, July, 2005. What is Web 2.0? http://oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html AJAX: A New Approach to Web Applications http://www.adaptivepath.com

You might also like