Top Banner
PROJECT REPORT ON METRO TRAIN Submitted By: Pranav Khare B.Tech. 7 th Sem Roll no. 0622531037 Accurate Institute Of Management and Technology
39
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Project Report

PROJECT REPORT

ON

METRO TRAIN

Submitted By:Pranav KhareB.Tech. 7th SemRoll no. 0622531037 Accurate Institute Of Management and Technology

Page 2: Project Report

Preface

This training report is all about the embedded systems and its application in various fields of real world. We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television, Radio, CD player, Washing Machine or Microwave Oven in our kitchen, Card readers, Access Controllers, Palm devices of our work space enable us to do many of our tasks very effectively. Apart from all these, many controllers embedded in our car take care of car operations between the bumpers. All kinds of magazines and journals regularly dish out details about latest technologies, new devices; fast applications which make us believe that our basic survival is controlled by these embedded products. Now we can agree to the fact that these embedded products have successfully invaded into our world. What is this Embedded systems.?

Theoretically, an embedded controller is a combination of piece of microprocessor based hardware and the suitable software to undertake a specific task.

I have made a Project based on Microcontroller that is a Prototype of Metro Train. This training report covers all about the microcontroller and project description. In this project I have implemented the Prototype of Metro Train that is describing a small application of microcontroller.

Page 3: Project Report

Acknowledgement

Success is the fruit, which everyone strives to taste. To achieve this goal one has to put in a lot of physical and mental efforts. We could not have written this report without the help of many talented and dedicated people. So we wish to express our appreciation to those whose help has been most valuable.

I would like to express my sincere gratitude to DUCAT Noida for giving me an opportunity to undergo my Industrial Training for six week as well as for providing me the knowledge of Embedded System. I would also like to thank to all the technical experts, engineers and executives for explaining practical aspects of the theoretical knowledge.

Page 4: Project Report
Page 5: Project Report

Introduction to embedded systems

An embedded system employs a combination of hardware and software to perform a specific function

An embedded system is a special purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general purpose computer ,such as a PC, an embedded system performs the predefined tasks usually with a very specific task design enginners can optimize it reducing the size and cost of the product. Embedded systems are usually mass produced, so the cost savings may be multiplied by many times.

The core of any embedded system is formed by one or several microprocessors or microcontroller programmed to perform a small number of tasks. In contrast to the general purpose computers, which can run any software application, the user chooses, the software or embedded system is semi permanent, so it is often called firmware.

Examples of embedded systems(1) Automated teller machines (ATMs)(2) Avionic, such as inertial guidance systems(3) Cellular telephones and telephonic switches(4) Computer network equipments, including routers and firewalls(5) Computer printers (6) Disk drives (floppy disk drives and hard disk drives)(7) Engine controllers and antilock brake controllers for automobiles(8) Home automation products like thermostats, air condition sprinkles and

security monitoring systems(9) Household appliances like including microwave ovens, washing machine etc

Page 6: Project Report

(10) Medical equipments(11) Measurement equipments such as digital storage oscilloscopes,

logical analyzers and spectrum analyzers(12) Stationary video game controllers.

Microcontrollers versus Microprocessors Microcontroller differs from a microprocessor in many ways. First and the most important is its functionality. In order for a microprocessor to be used, other components such as memory, or components for receiving and sending data must be added to it. In short that means that microprocessor is the very heart of the computer. On the other hand, microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it. Thus, we save the time and space needed to construct devices.

Page 7: Project Report

Description of Project

INTRODUCTION:

Metro Train was first introduced in Kolkata in India . Metro Train facilitates

transportation within the city limits. It is only for the transportation from one

place to another place in a city, not from one city to another. It is faster than an

ordinary train, so people can reach their destination soon. It avoids traffic jam in

the city as it is always below the ground level or above the ground level. It avoids

accidents occurring in the city due to heavy traffic. More people can travel in

metro train. It can carry hundreds of people at a time. It saves fuel for future use.

People traveling in their own vehicles can also afford to travel in metro train. It

has announcement system for announcing the station names through which the

passengers can get to know their destination which is not available in buses and

auto. Also buzzer will make a beep sound to indicate the train is stopped or train

is leaving. It also displays the station name. It avoids pollution.

Initially it may involve more investments but later the output got will be

worth of the investment made. For a well planned city it is easy to plan for metro

train whereas for a city which is not well planned it is very difficult. It requires

more initial steps before it is started like survey of soil, digging the soil to

examine, etc. Many problems like destroying of properties for widening the road

will occur which will affect those people who are well settled.

Page 8: Project Report

Metro train is yet to be introduced in our Garden City BANGALORE. It is also

approved by the government. Initial works have been started. Within few years

even Bangalore will have metro train facility.

The Need

Delhi, the National Capital with a population of about 12 million is, perhaps, the only city of its size in the world, which depends almost entirely on buses on it sole mode of mass transport.bus services are inadequate and heavily over-crowded.. The result of extreme congestion on the road, ever slowing speeds, increasing accident rate, fuel wastage and

environmental pollution. Delhi has now become the fourth most city in the world, with automobiles contributing more than two thirds of the total atmospheric pollution. Pollution related health problems are reaching disconcerting levels.

Immediate steps are, therefore, needed to improve both the quality and availability of mass transport service. This is possible only if a rail-based mass transit system, which is non-polluting, is introduced in the city without further delay

My Prototype of metro train

I have made the prototype of Metro train using Microcontroller 89C51.The basic function of this project is given later. I have used a toy car to implementing it which has two DC motors. One is used for opening and closing the door and other is used for moving the car forward. The complete description of project is given below.

Page 9: Project Report

Circuit Diagram of Metro Train Prototype

. Following figure shows the complete Metro Train Prototype

diagram of Metro Train Prototype

Page 10: Project Report

PROJECT METHODOLOGY

Components:

Component Name Quantity

1. Power Supply Sectionplug with wire 1

Step down transformer (230v/12v a.c) 1

1N4007 diodes 4

LM7809 1

LM7805 1

100 μF 1

ON/OFF switch 1

Red LED 1

1K Resistor 1

2. Microcontroller SectionMicrocontroller IC (AT89C51) with base 1

Crystal Oscillator (11.0592 MHz) 1

Capacitor (30pF) 2

Capacitor (10µF) 1

Resistor (8.2K) 1

Page 11: Project Report

LCD Connector 1

3. Buzzer 14. LCD(16x2) 15. Load Driver (L293D) with base 16. A Car (toy-driven by a DC motor) 17. General Purpose Card 48. Single Core Connecting Wires9. Reset Switch (Push-on) 110. Old and Rough CD drive for making Door System 1

(We are to use only motor and Pulley system for door)

Softwares used:

1. Keil µVision3.2. Top-View Simulator

Equipments used:

1. Soldering iron, solder, flux. 2. Hex Blade

Procedure of building the Prototype of Metro Train

Step 1: Circuit diagram of the proposed system is designed and finalized.(Refer to Figure 6.1 )

Step 2: All the components and software platform to be used are selected which are also mentioned above.

Page 12: Project Report

Step 3: All the hardware components are soldered on their respective printed circuit boards with the help of soldering ion, solder and flux according to the hardware schematic shown in the Figure

Step 4: Code/program of the proposed system is developed using assembly language with the help of software platform (Keil u vision3).The coding could be seen in section

Step 5: The hex code of the program being created by the software platform is burnt into the flash code memory of our microcontroller IC 89C51.

Step 6: Testing is done at various levels to finalize the appropriate program for the most proper working of the system

Functional Description of the Project:

The main aim of this project is to make an automated place announcement

system for Train using voice IC and the radio frequency wireless card for tracking

the station data. In buses and train there are no facilities like automated place

announcement system or display system, so it is very difficult and inconvenient

for the passengers to know the respective area they are in at present especially to

those who are new to the place. So this project is designed in such a way that, it

will announce the place names automatically by sensing the RF signals

transmitted from each bus stop or the railway station. In our project the PCB and

the CIRCUIT diagram is designed using Express PCB software.

Page 13: Project Report

Working Principle of metro train:

The flow chart shown in figure 1 explains the working principle of the metro

train. The project consists of microcontroller with the RF receiver and the voice

recorder chip with speaker .The whole system is attached to the vehicle (BUS or

Train). When the project is powered the train moves, until it encounters a RF card

placed beneath the track. The encoded RF transmitters are placed in the BUS

stops or the railway stations. The microcontroller in the TRAIN is programmed in

such a way that every station name saved in the voice chip which is having a

unique code. So whenever the bus or train reaches the station, the receiver in the

bus or in the train receives the codes, which are transmitted form the transmitter

and the microcontroller receives this code and checks in the look up table, saved

in the chip. Which ever matches, the controller will send the command to the

voice chip to play that particular voice, the announcement can be done for 6

seconds with the station number and the place. At the same time the train stops

for about 10 seconds in the station and then before leaving the station, it will

again start to announce “THE TRAIN IS LEAVING” and the train starts to move to

next station. The voice chip will play the voice and this will be heard in the

speaker. This voice is repeated till the train leaves the station. In this module LCD

is used for the

Page 14: Project Report

Flow chart

Page 15: Project Report

display purpose, in the programming what we have stored it will be displayed in

the LCD. For E.g.: station number will be displayed when the train reaches the

station, even when the train is leaving it will display on the LCD even it will

announce it using the IC chip, the train is in which station and when it is leaving

also. Buzzer is used in this module; it will give beep sound when the train reaches

a station and when it is leaving station every time.

Another feature added to this project is:

The change of RF card numbers through serial port.

Voice recording by changing the jumper position in the module.

Block Diagram of Metro Train

The above figure shows the block diagram of the metro train. 8051 being

the main IC controls all the operations. The LCD, buzzer, voice chip and RF card

Page 16: Project Report

reader are interfaced to this IC. The components which are interfaced are

explained below:

Voltage Regulator (LM 7805):

Figure shows the block diagram of voltage regulator. The LM78XX series of

three terminal positive regulators are available in the TO-220 package and with

several fixed output voltages, making them useful in a wide range of applications.

Each type employs internal current limiting, thermal shut down and safe

operating area protection, making it essentially indestructible. If adequate heat

sinking is provided, they can deliver over 1A output current. Although designed

primarily as fixed voltage regulators, these devices can be used with external

components to obtain adjustable voltages and currents.

Block Diagram of Voltage Regulator.

Page 17: Project Report

DC OutputAC PowerAC/DC

AdapterRegulator (LM7805)

Filter

Features:

Output Current up to 1A.

Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24.

Thermal Overload Protection.

Short Circuit Protection.

Output Transistor Safe Operating Area Protection.

The micro controller and other devices get power supply from AC to DC

adapter through voltage regulator as shown in figure 4. The adapter output

voltage will be 12V DC non regulated. The 7805 voltage regulators are used to

convert 12 V to 5VDC.

Block Diagram of Power Supply

Page 18: Project Report

LCD 16x2:

Liquid crystal displays (LCDs) offer several advantages over traditional

cathode-ray tube displays that make them ideal for several applications. Of

course, LCDs are flat and they use only a fraction of the power required by

cathode-ray tubes.

Schematic Diagram of LCD 16x2

They are easier to read and more pleasant to work with for long periods of

time than most ordinary video monitors. There are several tradeoffs as well, such

as limited view angle, brightness, and contrast, not to mention high

manufacturing cost.

16x2 LCD which is shown in figure 5 is used in this project to display data to

user. There are two rows and 16 columns. It is possible to display 16 characters on

each of the 2 rows. It has two registers, command register and data register.

Page 19: Project Report

LCDs can add a lot to your application in terms of providing an useful

interface for the user, debugging an application or just giving it a "professional"

look. The most common type of LCD controller is the Hitachi 44780 which

provides a relatively simple interface between a processor and an LCD. Using this

interface is often not attempted by inexperienced designers and programmers

because it is difficult to find good documentation on the interface, initializing the

interface can be a problem and the displays themselves are expensive.

LCD has single line display, Two-line display, four line display. Every line

has 16 characters.

Pin No. Symbol Description

1 VSS Ground Terminal, 0V

2 VDD Supply Terminal, +5V

3 VLCD Power supply to control Contrast

4 RS Register Select:

RS = 0-Instrution Register

RS = 1-Data Register

5 R/W Read/Write:

R/W = 0 – Write

R/W = 1 – Read

Page 20: Project Report

P 0.5

P 0.4

P 0.3

P 0.2

P 0.1

P 0.0Micro controller

D7

D6

D5

D4LCDEN

RS

6 EN Enable

7-14 DB0-DB7 8-bit Data Bus

15-16 Backlight Supply In case of 15-pin modules,

pin-15 is the supply voltage

(+5V) for the LED.

In case of 16-pin modules,

pin-15 is the ground (0V)

and pin-16 is the supply

voltage (+5V) for the LED

Pin Details of LCD 16x2

8051 & LCD interface

Page 21: Project Report

LCD is interfaced to the microcontroller as shown in the above figure. It is

connected to the port 0. The EN and RS pins control the data transfer operations.

Microcontroller & LCD Interactions

Figure gives us the clear view of the interactions between microcontroller

and LCD.

1. RS, Register Select (Pin 4): This pin is used to select command register and

data register. If RS=0, instruction command register is selected, allowing the user

to send a command such as clear display, cursor at home, etc. If RS =1, the data

register is selected, allowing the user to send data to be displayed on the LCD.

Page 22: Project Report

2. EN Enable (Pin 6): The LCD to latch information presented to its data pins

uses the enable pin. When data is supplied to data pins, a high-to-low pulse must

be applied to this pin in order for the LCD to latch in the data present at the data

pins. This pulse must be a minimum of 450ns wide.

3. D4 – D7 (Pin 11 – Pin 14): Data to be displayed is sent to LCD on these pins.

First MSB is sent, followed by LSB.

4. D0 – D3 (Pin 7 – Pin 10): These pins are connected to ground, as they are not

used to display data.

5. Vcc (Pin 2): This pin is connected to +5v power supply.

6. Vss (Pin 1): This pin is connected to ground.

BUZZER:

The buzzer subsystem produces a 2 KHz audible tone when powered. The

buzzer will sound when the signal coming into the driver is high. It must be

connected to a transistor, Darlington or transducer driver subsystem.

Schematic diagram of buzzer

Page 23: Project Report

The buzzer is connected between the supply rail (+ V) and the input signal.

This acts as load on the driver. When the input signal coming into the buzzer

subsystem is low, a potential difference across the buzzer causes current to flow.

It is this flow of current that causes the buzzer to sound.

Buzzer is connected to microcontroller port pin, so microcontroller will give

high or low to switch on/off buzzer. In this project it is used to indicate the arrival

and departure of train.

FUTURE SCOPE

Page 24: Project Report

The new cars would feature the following:

Stainless steel exteriors instead of an aluminium car body. Thinner, stronger stainless steel seats that offer more leg room. Each car

would have 64 cloth-padded, taller seats with seat-back grab handles. A total end to carpeting. Floors would be rubberized. Interactive maps on LCD screens that would also likely display

advertisements Automated station announcements. So no more "Judishuwary Square". Security cameras on all rail cars.

The 7000 series won't be ready for service for at least five years. The latest models are in the 6000 series, which were introduced last year.

Page 25: Project Report

REFRENCES AND BIBLOGRAPHY

“THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM” by Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay.

“The 8051 MICROCONTROLLER” by K. J. Ayala. "Advanced Microprocessors and Microcontrollers" by B.P. Singh & Renu

Singh. "Let Us C" by Yashwant Kanitkar. "Data Structure through C" by Yashwant Kanitkar.

NET LINKS:

1. www.8051projects.net

2. www.atmel.com

3. www.electronicsforyou.com

4. www.encyclopedia.com

www.wikipedia.com

Page 26: Project Report

Coding:C Language Code

#include<reg51.h>

void lcd_data(char[]);

void lcd_ok(bit);

void delay(unsigned int);

void delay1(unsigned int);

void lcd_code(char);

void check();

void lcd_init();

sbit rs = P2^0;

sbit rw = P2^1;

sbit en = P2^2;

sbit busy = P1^7;

sbit mot1 = P2^3;

sbit mot2 = P2^4;

sbit door1 = P2^5;

sbit door2 = P2^6;

sbit buzz = P2^7;

#define lcd_port P1

main()

{

char index1;

Page 27: Project Report

char stations[][16] = {{"Kishan Ganj0"}, {"Pratap Nagar0"}, {"Shahadara0"}, {"Indraprashta0"}, {"Rohini West0"}};

mot1 = 0;

mot2 = 0;

buzz = 1;

door1 = 1;

door2 = 1;

lcd_init();

lcd_code(0x01);

lcd_data("Welcome To Metro0");

delay1(1000);

lcd_code(0x80);

for(index1 = 0; index1 != 5; index1++)

{

lcd_code(0x01);

lcd_code(0x80);

lcd_data("Current Station:0");

lcd_code(0xC0);

lcd_data(stations[index1]);

delay1(200);

buzz = 0;

delay1(200);

buzz = 1;

//------------------------------Door Open

door1 = 0;

delay1(500);

Page 28: Project Report

door1 = 1;

//------------------------------Door Open

delay1(3500);

//------------------------------Door Close

door2 = 0;

delay1(1000);

door2 = 1;

//------------------------------Door Close

delay1(300);

mot1 = 1;

mot2 = 0;

if(index1 < 4)

{

delay1(2000);

lcd_code(0x01);

lcd_code(0x80);

lcd_data("Next Station:0");

lcd_code(0xC0);

lcd_data(stations[index1+1]);

delay1(2000);

mot1 = 0;

mot2 = 0;

lcd_code(0x01);

}

else

Page 29: Project Report

{

lcd_code(0x01);

lcd_data("End Of Line0");

delay1(1000);

}

}

}

void lcd_data(char ch[])

{

int index1;

for(index1 = 0; ch[index1] != '0'; index1++)

{

check();

lcd_port = ch[index1];

lcd_ok(1);

}

return;

}

void lcd_ok(bit mybit)

{

if(mybit)

{

Page 30: Project Report

rs = 1;

}

else

{

rs = 0;

}

rw = 0;

en = 1;

delay(1);

en = 0;

return;

}

void delay1(unsigned int itime)

{

unsigned int i,j;

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

for(j = 0; j < 500; j++);

return;

}

void delay(unsigned int time)

{

int i = 0;

Page 31: Project Report

for(; time > 0; time--)

for(; i < 353; i++);

return;

}

void lcd_init()

{

lcd_code(0x38);

lcd_code(0x0C);

lcd_code(0x01);

lcd_code(0x06);

return;

}

void lcd_code(char ch)

{

check();

lcd_port = ch;

lcd_ok(0);

return;

Page 32: Project Report

}

void check()

{

rs = 0;

rw = 1;

while(busy == 1)

{

en = 0;

delay(1);

en = 1;

}

return;

}