go to main index know about us who we are and what we are provide ? we provide training on how to reach us send e-mail us
   

 

 

PC CONTROL METRO TRAIN

 

 

 

Introduction:

In this project we will control metro train with our PC. We will send data from parallel port to microcontroller and microcontroller will control metro train.

This project is very important for PC communication with machinery. We know that today is the world of automation. There is increasing competition making it necessary to make it necessary to use reliable, low cost and accurate automatic system. With the help of this project we can control the all our metro train with our PC with out the need of any control panel there will a small control panel for control of different switches. We need to make a small  program in C_++ . in this program we will control the appliances with parallel port moreover we will use wireless  technology.we will use optocoupler  at the end of PC parallel port.

 

 

 

In this project we use ic 89c51 microcontroller to control all the logic , movement of vehicle, stoppage of vehicle, and reverse action of vehicle with the help of this microcontroller and different sensor’s.

DRIVE MOTOR.

In this project we use dc gear motor  to run the vehicle to and fro automatically. We use slow speed dc motor to increase the  torque and slow the speed of vehicle, this DC motor is  run by a 5 volt to 12 volt dc voltage. We use additional gear box if we want to slow down the speed.

 

In this project we use infra red sensor to stop the train and infra red sensor to reverse  and again forward the train.

So we use three pair of infra red reflective sensor in this project. One at the bottom of this train, second in the front of this train and third at the reverse of this train.

By using three sensor  we not only stop the train but also reverse the train.

 

As per logic in concern we use three  inputs in this project,  one from the  ground sensor and two from the front and back sensor.. Three input and one motor.

 

Here in this project we use dc motor to run the vehicle, for the dc motor we use H bridge  circuit in this project. H bridge circuit not only drive a sufficient power to dc motor but also provide a  forward and reverse logic to the motor .

 

 

 

 

Introduction:

 

This project is very important for PC communication with machinery. We know that today is the world of automation. There is increasing competition making it necessary to make it necessary to use reliable, low cost and accurate automatic system. With the help of this project we can control the all our metro train with our PC with out the need of any control panel there will a small control panel for control of different switches. We need to make a small  program in C_++ . in this program we will control the appliances with parallel port moreover we will use wireless  technology.we will use optocoupler  at the end of PC parallel port.

 

 

 

In this project we use ic 89c51 microcontroller to control all the logic , movement of vehicle, stoppage of vehicle, and reverse action of vehicle with the help of this microcontroller and different sensor’s.

DRIVE MOTOR.

In this project we use dc gear motor  to run the vehicle to and fro automatically. We use slow speed dc motor to increase the  torque and slow the speed of vehicle, this DC motor is  run by a 5 volt to 12 volt dc voltage. We use additional gear box if we want to slow down the speed.

 

In this project we use infra red sensor to stop the train and infra red sensor to reverse  and again forward the train.

So we use three pair of infra red reflective sensor in this project. One at the bottom of this train, second in the front of this train and third at the reverse of this train.

By using three sensor  we not only stop the train but also reverse the train.

 

As per logic in concern we use three  inputs in this project,  one from the  ground sensor and two from the front and back sensor.. Three input and one motor.

 

Here in this project we use dc motor to run the vehicle, for the dc motor we use H bridge  circuit in this project. H bridge circuit not only drive a sufficient power to dc motor but also provide a  forward and reverse logic to the motor .

 

The original IBM-PC's Parallel Printer Port had a total of 12 digital outputs and 5 digital inputs accessed via 3 consecutive 8-bit ports in the processor's I/O space.

25-way Female D-Type Connector

Lets begin straightaway with an argument….The world is moving towards RS-232, USB, Fire-wire and other serial bus standards, so why do I still bother using the parallel port?

For starters we are talking about controlling motors here. When it comes to controlling such devices, it’s always the legendary parallel port that hobbyists have been resorting to, since minimizing the required hardware, facilitating simple operation and a faster development cycle are some of the advantages that the parallel port has to offer.

So, without wasting anytime, lets start our session…your development time starts here…..

The Hardware:

Here is how the standard DB25 connector (parallel port connector) at the back-side of your CPU cabinet is configured:

 

Fig: Parallel port pin configuration

As the name refers, your data is transferred over data lines (bidirectional), Control lines are used to control the peripherals and of course, the peripherals return status signals back to computer through Status lines. These lines are connected to Data, Control and Status registers internally.

The details of parallel port signal lines are given below:

Pin No (DB25)

Register – bit

Direction

Inverted

1

Control-0

Out

Yes

2

Data-0

In/Out

No

3

Data-1

In/Out

No

4

Data-2

In/Out

No

5

Data-3

In/Out

No

6

Data-4

In/Out

No

7

Data-5

In/Out

No

8

Data-6

In/Out

No

9

Data-7

In/Out

No

10

Status-6

In

No

11

Status-7

In

Yes

12

Status-5

In

No

13

Status-4

In

No

14

Control-1

Out

Yes

15

Status-3

In

No

16

Control-2

Out

No

17

Control-3

Out

Yes

18-25

-

-

-

You don’t generally need to bother about the control and status lines unless you are writing a parallel port driver.

And there is no great point in ‘reinventing the wheel’, so I guess you won’t bother to write the driver all over again unless it’s a device driver assignment given by your prof…

The data line is what will be of utmost importance to us, since we will either need to send out some navigational command (OUT) to our motor, or acquire some sensor input (IN).

Programming:

Before we start talking about programming, the register addresses are what we need to be aware of. Also downloading a port monitoring software would be a good idea to confirm our results when we are done.

Here is a link to download one such application:

http://www.geekhideout.com/parmon.shtml

Fig: Screenshot of parmon (parallel port monitor)

The numbers ‘378’, ‘379’ and ‘37A’ seen out here in the screen shot are parallel port register addresses. For a typical PC, the base address of LPT1 is 0×378 and of LPT2 is 0×278. The data register resides at this base address, status register at base address + 1 and the control register is at base address + 2. So once we have the base address, we can calculate the address of each registers in this manner. The table below shows the register addresses of LPT1 and LPT2

Register

LPT1

LPT2

data register (base address + 0)

0×378

0×278

status register (base address + 1)

0×379

0×279

control register (base address + 2)

0×37a

0×27a

 

 

 

Components Required:-

 

IC 89C051

Relays 120 ohm 12 volt

Transistors 548

In4001 diodes

Parllel connector

Connecting wire:

 

7805 voltage regulator

transformer 12 v

cap 1000µf,470µf

crystal 11.0592Mhz

8.2 k and 330 ohm resist.

Push to on switch

Universal Programmer

 

Software Required:

Keil

 

 

Pc interface circuit

 

Programming used- Assembly Language or C language

 

Software used- Keil compiler

                         ORCAD for PCB design

 

 

u

Applications :

Controlling machines from PC

Communication of machines from parallel port

Advanced robotics

 

 

Bibliography:

 

www.mcuprojects.com

 

www.ludhianaprojects.com/projects.htm

 

http://www.kmitl.ac.th/~kswichit%20/#8051