Вы находитесь на странице: 1из 68

AN ISO 9001:2000 CERTIFIED TRAINING INSITTUTION

NETTUR TECHNICAL TRAINING FOUNDATION

PC BASED OBJECT TRACER

A THESIS

Submitted by

VISWANATHAN V M
SANTHOSH BABU C
SANTHANAVEL M
NAVEEN KUMAR P
RAMAKANTH G
AJAY KUMAR B

DIPLOMA IN ELECTRONICS

NTTF TECHNICAL TRAINING CENTRE


KELTRON EQUIPMENT COMPLEX, KARAKULAM
TRIVANDRUM - 695564

2006 - 2009
PC Based Object Tracer

AN ISO 9001:2000 CERTIFIED TRAINING INSITTUTION

NETTUR TECHNICAL TRAINING FOUNDATION

CERTIFICATE

This is to certify that project work entitled

PC BASED OBJECT TRACER

is a bonafide record of the project work done by VISWANATHAN V M,


SANTHOSH BABU C, SANTHANAVEL M, NAVEEN KUMAR P,
RAMAKANTH G, AJAY KUMAR B in partial fulfillment of the requirement
for the award of DIPLOMA IN ELECTRONICS under the institution Nettur
Technical Training Foundation, Keltron NTTF Training Centre during the
Academic year 2008 – 2009.

PROJECT GUIDE EXTERNAL EXAMINER PRINCIPAL

Dept of Electronics 2
PC Based Object Tracer

ACKNOWLEDGEMENT

We are obliged to holiness GOD who molded us for making our activity complete.

We take this opportunity to express our deep sense of gratitude to our internal project
guide Mrs. JASMI K K, Training officer, Keltron NTTF Training Centre, Trivandrum for
her valuable advice and guidance in the designing of our project.

We are grateful to our coordinator Mr. BABU PRAKASH S for coordinating the
project and the support and encouragement that he gave.

Also we wish to record our sincere thanks for the valuable helps and guidance
Mr. BALAJI J, Academic in-charge. His useful guidance has gone long way in making this
project as a great success.

We are very much obliged to The Principal Mr. KURIEN KOSHI K, Keltron NTTF
Training Centre, Trivandrum for giving us an opportunity and for rendering the facilities for
doing this project.

I also thank our staff members for their efforts and ideas put to succeed our project.

We render our heartfelt thanks to our friends and colleagues who help us in collecting
the sources for the project.

Dept of Electronics 3
PC Based Object Tracer

SYNOPSIS

PC Based Object Tracer is a project based on wireless interactive communication,


in which we can able to control over a movable object with help of the Personal Computer.

Today’s most devices are being controlled wirelessly such as Television, Mobile,
Air conditioner, Wireless camera and all other remote controlled appliances, likewise this
project also allows controlling the device wirelessly.

This system works with the PC, Transmitter, Receiver, Camera, Microphone, FM
Transmitter, FM Receiver, Video card and Movable Object.

Administrator can able to get the Video and Audio in PC and also he/she can give the
instruction accordingly. He/she can able to control the car using Keyboard and Mouse in PC.

Dept of Electronics 4
PC Based Object Tracer

CONTENTS

1. Introduction……………………………………………………………………08

2. Project Brief
2.1 Objective……………………………………………………….……....…..09
2.2 Motivation………………………………………………………………….10
2.3 Principle……………………………………………………….……………11

3. Block Diagram………………………………………………………….….…..12
3.1 Front end (Personal Computer) …………………………….……………..13
3.2 Target System (Movable Object) …………………………………………..14

4. Block Description
4.1 Front End Block Description…………………………………….………….15
4.1.1 Parallel Port …………………………………….……………………….16
4.1.2 Parallel to Serial Converter…………………………………….………..19
4.1.3 RF Transmitter…………………………………….…………………….21
4.1.4 PC TV Tuner card & Microphone……………….………………………22
4.1.5 FM Transmitter……………….…………………………….……………22
4.2 Target System Block Description
4.2.1 RF Receiver……………….……………………………………………..23
4.2.2 Serial to Parallel Converter……………….……………………………..24
4.2.3 Motor Switching……………….…………………………….…….….…26
4.2.4 CCTV Camera ……………….…………………………….……….…...27
4.2.5 FM Receiver……………….…………………………….……………....28

Dept of Electronics 5
PC Based Object Tracer

5. Software Section

5.1 About Language/Package……………….……………………………..….…30


5.2 Development of Visual Basic Programme……………….…………….….....32

5.3 Software Installation and Requirement……………….……………...….…...34


5.3.1 Requirements of system……………….…………………………….…...47
5.3.2 Installation of PBOT Software ……………….…………………......…...48
5.3.3 Installation of TV Tuner Card Software ……………….……………......49

6. Usage of Software
6.1 Security……………….…………………………….………….……..….…..50
6.2 Keyboard Control……………….…………………………….………….….50

7. Circuit Diagram
7.1 Transmitter Circuit……………….…………………………….………….....52
7.2 Receiver Circuit……………….…………………………….……………….53

8. PCB layout……………………………………………………………………….55.

9. Features……………….…………………………….……………….……….…..57

10. Sample forms / screenshots……………….…………………………….….……58

11. Conclusion……………….…………………………….………………...….…...67

12. Reference….……………….……………….……………….…………..……….68

13. Datasheet………………………………………………………………………...69

Dept of Electronics 6
PC Based Object Tracer

LIST OF FIGURES

3.1 Front end block diagram………………………………………………………...13


3.2 Target system block diagram…………………………………………………....14
4.1.1 Parallel port pin configuration………………………………………………..15
4.1.2 Flow chart of HT12E………………………………………………………….20
4.2.1 RF receiver module………………………………………………………….…23
4.2.2 Flow chart of HT12D……………………………………………………….…25
4.2.3 L293 motor control……………………………………………………………26
5.1.1 Visual basic IDE……………………………………………………………….31
5.3.1 Installation of PBOT…………………………………………………………..48
5.3.2 Installation of TV tuner card………………………………………………….49
6.1 Keyboard control………………………………………………………………..50
7.1 Transmitter schematic…………………………………………………………..52
7.2 Receiver schematic………………………………………………………………53
8.1 Transmitter layout……………………………………………………………….56
8.2 Receiver layout…………………………………………………………………..56
10.1 VB development environment………………..……………………………….59
10.2 VB form load…………………...………………..……………………………..60
10.3 Welcome screen…………………………………..…………………………….61
10.4 Logon Screen………………………………………..………………………….62
10.5 TV tuner card setting………………………………..……….……………….....63
10.6 Hardware setting……………………………………..……….………………...64
10.7 TV tuner card composite setting………………………..…….………………..65
10.8 PBOT control screen…………………………..……………….……………….66

Dept of Electronics 7
PC Based Object Tracer

1. INTRODUCTION

PBOT – Pc Based Object Tracer

Electronics playing a vital role in the modern world. Computer system have been
around for more than a decade and today they have are used to support stock trade
transaction, make travel arrangements, and managed bank accounts. Most today’s
surveillance and security equipment were developed in order to have a touch with modern
electronic system.

PBOT is relatively new idea aimed to integrate computer and wireless


communication we find number of wireless system in daily walk of life giving various types
information to administrators. All this can be implemented using wireless RF receiver and
transmitter module. Parallel port pins are used to communicate from host to target system.

As regard capability of this module, it can perform modulation using ASK, at the
reliable range of level.

Dept of Electronics 8
PC Based Object Tracer

2. OBJECTIVE

The main aim of our project is to achieve the wireless administrative system
interfaced to PC and also to achieve full duplex communication.

Dept of Electronics 9
PC Based Object Tracer

MOTIVATION

Wireless communication plays a vital role in the present communication


scenario. Software programming helps us to keep in touch with VB programming languages.
Thus this project helps to keep in touch with the latest technology.

Dept of Electronics 10
PC Based Object Tracer

PRINCIPLE

Wireless switching of motors is done using PC and wireless data communication


is achieved using RF modules. This modules use amplitude shift keying with frequency of
433 MHz.

Wireless transmissions of audio and video signals are performed using FM


modulation.

Dept of Electronics 11
PC Based Object Tracer

3. BLOCK DIAGRAM

Dept of Electronics 12
PC Based Object Tracer

FRONT END
(Connected with PC)

Figure 3.1

Dept of Electronics 13
PC Based Object Tracer

TARGET SYSTEM (CAR)

Figure 3.2

Dept of Electronics 14
PC Based Object Tracer

4. BLOCK DIAGRAM DESCRIPTION


4.1 FRONT END
PARALLEL PORT:

Parallel port is a simple and inexpensive tool for building computer controlled
devices and projects. The simplicity and ease of programming makes parallel port popular in
electronics hobbyist world. The parallel port is often used in Computer controlled robots,
Atmel/PIC programmers, home automation, etc... Here a simple tutorial on parallel port
interfacing and programming with some examples.

Everybody knows what is parallel port, where it can be found, and for what it is being
used. the primary use of parallel port is to connect printers to computer and is specifically
designed for this purpose. Thus it is often called as printer Port or Centronics port (this name
came from a popular printer manufacturing company 'Centronics' who devised some
standards for parallel port). You can see the parallel port connector in the rear panel of your
PC. It is a 25 pin female (DB25) connector (to which printer is connected). On almost all the
PCs only one parallel port is present, but you can add more by buying and inserting ISA/PCI
parallel port cards

PINOUT:

Figure 4.1.1

Dept of Electronics 15
PC Based Object Tracer

HARDWARE:

The lines in DB25 connector are divided in to three groups, they are

1. Data lines (data bus)


2. Control lines
3. Status lines

As the name refers, data is transferred over data lines, Control lines are used to
control the peripheral and of course, the peripheral returns status signals back 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.

PARALLEL PORT REGISTERS:


The registers found in standard parallel port are,

1. Data register
2. Status register
3. Control register

As there names specifies, Data register is connected to Data lines, Control register is
connected to control lines and Status register is connected to Status lines. (Here the word
connection does not mean that there is some physical connection between data/control/status
lines. The registers are virtually connected to the corresponding lines.). So what ever you
write to these registers, will appear in corresponding lines as voltages, Of course, you can
measure it with a multimeter. And What ever you give to Parallel port as voltages can be read
from these registers (with some restrictions). For example, if we write '1' to Data register, the
line Data0 will be driven to +5v. Just like this, we can programmatically turn on and off any
of the data lines and Control lines.

Dept of Electronics 16
PC Based Object Tracer

WHERE THESE REGISTERS ARE?

We have to find these addresses to work with parallel port. For a typical PC, the base
address of LPT1 is 0x378 and of LPT2 is 0x278. The data register resides at this base
address, status register at baseaddress +1 and the control register is at baseaddress + 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) 0x378 0x278
Status Register (base address + 0) 0x379 0x279
Control Register (base address + 0) 0x37a 0x27a

Dept of Electronics 17
PC Based Object Tracer

PARALLEL PORT PIN CONFIGURATION

PIN NO Pin Name Pin Description and Function


1 /STROBE Strobe
2 D0 Data Bit 0
3 D1 Data Bit 1
4 D2 Data Bit 2
5 D3 Data Bit 3
6 D4 Data Bit 4
7 D5 Data Bit 5
8 D6 Data Bit 6
9 D7 Data Bit 7
10 /ACK Acknowledge
11 BUSY Busy
12 PE Paper End
13 SEL Select
14 /AUTOFD Autofeed
15 /ERROR Error
16 /INIT Initialize
17 /SELIN Select In
18 GND Strobe Ground
19 GND Data bit 1 and 2 Ground
20 GND Data bit 3 and 4 Ground
21 GND Data bit 5 and 6 Ground
22 GND Data bit 7 and 8 Ground
23 GND Busy and Fault Ground
24 GND Paper out, Select, and Acknowledge Ground
25 GND AutoFeed, Select input and Initialize Ground

Dept of Electronics 18
PC Based Object Tracer

PARALLEL TO SERIAL CONVERTER

FUNCTIONAL DESCRIPTION OF HT12E:


In this project wireless serial communication is used for transmission, so HT12E IC is
used to convert the parallel data to serial data before the actual transmission.
The 2 12 series of encoders begin a 4-word transmission cycle upon receipt of a
transmission enable (TE for the HT12E or D8~D11 for the HT12A, active low). This cycle
will repeat itself as long as the transmission enable (TE or D8~D11) is held low. Once the
transmission enable returns high the encoder output completes its final cycle and then stops.

ADDRESS/DATA PROGRAMMING (PRESET):


The status of each address/data pin can be individually pre-set to logic _high_ or
_low_. If a transmission- enable signal is applied, the encoder scans and transmits the status
of the 12 bits of address/ data serially in the order A0 to AD11 for the HT12E encoder and
A0 to D11 for the HT12A encoder. During information transmission these bits are
transmitted with a preceding synchronization bit. If the trigger signal is not applied, the chip
enters the standby mode and consumes a reduced current of less than 1_A for a supply
voltage of 5V.

ADDRESS/DATA SEQUENCE
The following provides the address/data sequence table for various models of the 2 12
series of encoders. The correct device should be selected according to the individual address
and data requirements.

ADDRESS/DATA BITS:
0 1 2 3 4 5 6 7 8 9 10 11
HT12E A0 A1 A2 A3 A4 A5 A6 A7 AD8 AD9 AD10 AD11

Dept of Electronics 19
PC Based Object Tracer

TRANSMISSION ENABLE:

For the HT12E encoders, transmission is enabled by applying a low signal to the TE
pin. For theHT12A encoders, transmission is enabled by applying a low signal to one of the
data pins D8~D11.

FLOW CHART OF HT12E:

TE is the transmission enable of the HT12E.

Figure 4.1.2

Dept of Electronics 20
PC Based Object Tracer

RF TRANSMITTER

TRANSMITTER GENERAL DESCRIPTION:

TX01 is transmitter with amplitude shift scheme with frequency range of 315 to 433
MHZ. ST-TX01-ASK is a hybrid transmitter module, with a low cost, small size and simple
to use for designing. It is biased with the supply range of 3 to 12 volt. Output power of
4-16dBm. By using TX01 200 to 3Kbps is achieved.

AMPLITUDE SHIFT KEYING:

ASK signal may be generated by simply applying the incoming binary data and the
sinusoidal carrier to the two inputs of a product modulator. The resulting output will be the
ASK waveform. ASK signal is basically the product of the binary sequence and the carrier
signal has power spectral density same as that of the base band on-off signal but shifted in
the frequency domain by ±fc. The spectrum of ASK shows that it has infinite bandwidth, it
is been proved that bandwidth of ASK is reduced by using smoothed versions of the pulse
waveform instead of rectangular pulse waveform.

TRANSMITTER MODULE
Figure 4.1.3

Dept of Electronics 21
PC Based Object Tracer

TV TUNER CARD

With help of the TV Tuner card we can give video and audio input to the personal
computer and also we can able to see the TV by giving cable or antenna wire to the card.
This TV Tuner card is connected to the PC with the USB port and audio out from the card we
want connect to the audio input jack which is at back panel of the system, Jack colored blue
in color.
Video which is transmitting by camera will be received through wireless receiver
that output will be given to TV Tuner card to get the video and audio in the PC using PBOT
software.

MICROPHONE:
With using the microphone we can able to generate the audio signal. So Mic wants to
be connected to the computer Mic-In audio jack which is colored red. Whatever the
administrator want to give information to subordinates he can speech in the microphone.

FM TRANSMITTER:
Frequency Modulation is the modulation technique which is used for sending voice
signal for a particular distance.
Here in this project we used this FM transmitter to transmit the voice signal because
the quality of voice signal in this modulation is high.
In this we can able to set the frequency for the voice signal which is to be transmitted.

Dept of Electronics 22
PC Based Object Tracer

4.2 TARGET SYSTEM (CAR) DESCRIPTION

RF RECEIVER:
ST-RX04-ASK is a superset receiver module with PLL synthesizer and crystal
oscillator, receiver frequency is from 315-433MHz. Typical sensitivity of receiver is
105dBm, with the input bias current of 2.3mA. The receiver is low power consumption, easy
for application, with on chip PLL using crystal oscillator reference. An RX04 include IF and
data filters, so external filter section is required.

AMPLITUDE SHIFT KEYING:

ASK signal may be generated by simply applying the incoming binary data and the
sinusoidal carrier to the two inputs of a product modulator. The resulting output will be the
ASK waveform. ASK signal is basically the product of the binary sequence and the carrier
signal has power spectral density same as that of the base band on-off signal but shifted in
the frequency domain by ±fc. The spectrum of ASK shows that it has infinite bandwidth, it
is been proved that bandwidth of ASK is reduced by using smoothed versions of the pulse
waveform instead of rectangular pulse waveform.

RECEIVER MODULE
Figure 4.2.1

Dept of Electronics 23
PC Based Object Tracer

SERIAL TO PARALLEL CONVERTOR

Functional description HT12D:

The 2 12 series of decoders provides various combinations of addresses and data pins
in different packages so as to pair with the 2 12 series of encoders. The decoders receive data
that are transmitted by an encoder and interpret the first N bits of code period as addresses
and the last 12_N bits as data, where N is the address code number. A signal on the DIN pin
activates the oscillator which in turn decodes the incoming address and data. The decoders
will then check the received
Address three times continuously. If the received address codes all match the contents of the
decoders local address, the 12_N bits of data are decoded to activate the output pins and the
VT pin is set high to indicate a valid transmission. This will last unless the address code is
incorrect or no signal is received.
The output of the VT pin is high only when the transmission is valid. Otherwise it is always
low.

OUTPUT TYPE:
Of the 2 12 series of decoders, the HT12F has no data output pin but its VT pin can
be used as a momentary data output. The HT12D, on the other hand, provides 4 latch type
data pins whose data remain unchanged until new data are received.

Dept of Electronics 24
PC Based Object Tracer

FLOWCHART OF HT12D:

The oscillator is disabled in the standby state and activated when a logic _high_
signal applies to the DIN pin. That is to say, the DIN should be kept low if there is no signal
input.

Figure 4.2.2

Dept of Electronics 25
PC Based Object Tracer

MOTOR SWITCHING

LM293:
It is Push-Pull Four Channel Driver IC. This IC can able to drive two dc motor. It is
a monolithic IC which able to handle 600mA of current maximum per motor and also it
provide 1.2A of output current with non repetitive per channel.

This IC needed only 5v to close the switch and to open 0v and the switch can able to
withstand up to 120v. So this IC needed two supplies one is for switching as per the input
and another supply is for driving the motor.

It has internal clamp diode to the protect the switch from the back EMF produced
from the inductive load like dc motor.

Figure 4.2.3

Dept of Electronics 26
PC Based Object Tracer

CCTV CAMERA DESCRIPTION

The closed circuit television (CCTV) system issued on orbit to provide support to
orbiter and payload activities. This support includes transmitting real-time and recorded
video from the orbiter to MCC through either the S-band FM or Ku-band communications
systems. Mission requirements for CCTV and camera configurations are specified in the
Flight Requirements Document for each shuttle flight. The CCTV system consists of video
processing equipment, TV cameras (and lens assemblies), pan/tilt units (PTUs), camcorders,
video tape recorders (VTRs), color television monitors (CTVMs), and all the cabling and
accessories required to make these components work together. All CCTV operations can be
controlled by the crew. Most CCTV configuration commands can be executed by the
Instrumentation and Communications Officer (INCO) at Mission Control. Among the
commands MCCann uplink are those to configure and operate loose CCTV equipment, such
as camcorders and VTRs, and selection of inputs to the color monitors. Standard CCTV
components are powered via circuit breakers located on panel R14. Flight specific keel
cameras (prox ops or berthing) are usually powered from a cabin payload bus.

CCTV pushbuttons on panel A7U have lights that illuminate to provide visual
feedback on camera and CCTV routing configuration. These lights are powered via the
ANNUNCIATOR light switches located on panel A6U.

Dept of Electronics 27
PC Based Object Tracer

FM RECEIVER

Frequency Modulation is the modulation technique which is used for sending voice
signal for a particular distance.

Here in this project we used this FM receiver to receive the voice signal which as
been transmitted by the FM transmitter is connected to PC. In this we can able to change the
frequency for the voice signal according to the frequency set in the transmitter.

FM receiver is a small compact one which can able to keep inside the small toy car
and we can set the volume and frequency.

In the project we had provided a separate FM receiver that we can able to connect to
the Public addressing system.

Dept of Electronics 28
PC Based Object Tracer

5. SOFTWARE SECTION

ABOUT LANGUAGE:
MICROSOFT VISUALBASIC 6.0

As Microsoft releases the eight version of award winning development tool, more
than 70 percent of all professional developers are using visual basic language.
VISUAL BASIC 6.0 is a highly productive tool for creating high performance
enterprise and web based applications .Integrated visual database tools and RAD
environment promote productivity while native code compilation provides fast applications.

BENEFITS

Use the visual basic 6.0 integrated visual data tools and new data environment
designer to visually design Oracle and Microsoft SQL server databases and create reusable
data access queries all without leaving visual basic environment.

Build server side web applications that are easily accessible from any browser on
any platform with visual basic 6.0 web classes. Program highly interactive web pages easily
as a visual basic form with the new Dynamic HTML page designer.

Quickly develop rich data forms, or use the new integrated report writer to develop
Sophisticated, hierarchal reports, all with drag and drop ease.

Dept of Electronics 29
PC Based Object Tracer

INTELLIGENT FEATURES

DRAG-AND-DROP-PROGRAMMING:
Create user interface simply by simply dragging and dropping the rebuilt
ActiveX Controls into place.

APPLICATION AND SETUP WIZARD:


Become more productive than ever by using wizards to simplify applications
creation and distribution.

MSDN LIBRARY:
Find answers to your questions easily and quickly. Using this comprehensive
Online documentation, fully indexed for easy searching.

CODEWINDOW:

Visual basic reference code specifies use the code window to write, display and
edits visual basic code .you can open as many code windows as you have modules, so you
can easily view the codes in different forms and copy and paste between them.

PROJECT EXPLORER WINDOW:

Displays the hierarchical list of solution and a list of entire collection of


Projects, and all of the items contained in each project. Each project type determines
the specific hierarchy structure.

Dept of Electronics 30
PC Based Object Tracer

PROPERTIES WINDOW:
Use of this window to view and change the design time properties and
events of selected objects that are located in editors and designers. You can also use the
properties window to edit and view file, project, and solution properties.

TOOLBOX:
Use of tool box is made easier in vb because w can easily create anything by
just drag dropping the tools into the form.

IMMEDIATE AND WATCH WINDOW:


Debug is a keyword used to show the indicated message at the immediate window.
While executing the program the watch windows is used monitoring the values of the
variables

Figure 5.1.1

Dept of Electronics 31
PC Based Object Tracer

DEVELOPMENT OF PBOT PROGRAMME

ACCESSING OF PARALLEL PORT IN VB:

Here in order to access the parallel port in VB we have to call the .DLL
files to the vb . Not all the DLL files are used, the DLL files which is used to configure the
parallel port is being called to the programme. The name of DLL file which is used to
configure the parallel port is INPOUT16.DLL else INPOUT32.DLL either can be called
according to application. 16 and 32 represents number of bits.

INPOUT32.DLL:

The functions in the DLL are implemented in two source files, "inpout32drv.cpp"
and "osversion.cpp". osversion.cpp checks the version of operating system.
"inpout32drv.cpp" does installing the kernel mode driver, loading it, writing/ reading parallel
port etc... The two functions exported from inpout32.dll are

1) Inp32 (), reads data from a specified parallel port register.


2) Out32 (), writes data to specified parallel port register.

Dept of Electronics 32
PC Based Object Tracer

The other functions implemented in Inpout32.dll are

1) DllMain (), called when DLL is loaded or unloaded. When the DLL is loaded, it
checks the OS version and loads hwinterface.sys if needed.

2) Close driver (), close the opened driver handle. called before unloading the driver

3) Open driver (), open a handle to hardware interface driver.

4) Inst (), Extract 'hwinterface.sys' from binary resource to 'system root\drivers'


directory and creates a service. This function is called when 'Open driver'
function fails to open a valid handle to 'hardware interface' service.

5) Start (), starts the hardware interface service using Service Control Manager
APIs.

6) System Version () Checks the OS version and returns appropriate code.

Dept of Electronics 33
PC Based Object Tracer

SOFTWARE SECTION

We utilized Visual Basic6.0 as software platform for our project, since it has IDE
(Integrated Development Environment) and also VB is a graphical user support, through
which we achieved the output graphical screen for our program without much complication.
VB has drag and drop option, hence programming is bit easier than C. The all that we need
timers to create proper delays in the program. VB has predefined timers, which is accessible.
In our project the role of VB program is, it checks the key press event in the keyboard, and
then it will generate particular ASCII value. The ASCII data generated will be sent to the
parallel port by accessing the inpout32.dll file. This file gives the address or the path to
access the parallel port.

Programming in VB
'Cmd0-frwd
'Cmd1-rev
'Cmd2-right
'Cmd3-left
'Cmd4-up
'Cmd5-dwn
'Cmd6-fwdLeft
'Cmd7-fwdRight
'Cmd8-refright
'Cmd9-revleft

Dept of Electronics 34
PC Based Object Tracer

VB CODE

Private Sub Command1_DragOver(Index As Integer, Source As Control, x As Single,


y As Single, State As Integer)

Select Case Index


Case 0
Form1.BackColor = vbGreen 'Forward
Out &H378, &HF1 'Forward
Debug.Print "Forward OUT-&HF1"
Case 1
Form1.BackColor = vbRed 'Reverse
Out &H378, &HF2 'reverse
Debug.Print "Forward OUT-&HF2"
Case 2
Form1.BackColor = vbYellow 'Right
Out &H378, &HF4 'right
Debug.Print "Forward OUT-&HF3"
Case 3
Form1.BackColor = vbCyan 'Left
Out &H378, &HF8 'left
Debug.Print "Forward OUT-&HF4"
Case 4
Form1.BackColor = vbWhite 'Forward Right
Out &H378, &HF5 'forward right
Debug.Print "Forward OUT-&HF5"
Case 5
Form1.BackColor = vbBlue 'Reverse Right
Out &H378, &HF6 'rev right
Debug.Print "Forward OUT-&HF6"

Dept of Electronics 35
PC Based Object Tracer

Case 6
Form1.BackColor = &HC000C0 'Reverse Left
Out &H378, &HFA 'rev left
Debug.Print "Forward OUT-&HF7"
Case 7
Form1.BackColor = &H80880 'Forward Left
Out &H378, &HF9 'forward left
Debug.Print "Forward OUT-&HF8"
Case 8
Out &H378, &HFF 'stop
Form1.BackColor = &H80FF&
Debug.Print "Forward OUT-&HF0"

End Select
End Sub

Private Sub Command1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)


Select Case KeyCode
Case 104
Form1.BackColor = vbGreen 'Forward
Out &H378, &HF1 'Forward
Debug.Print "Forward OUT-&HF1"
Case 98
Form1.BackColor = vbRed 'Reverse
Out &H378, &HF2
Debug.Print "Forward OUT-&HF2"
Case 102
Form1.BackColor = vbYellow 'Right
Out &H378, &HF4

Dept of Electronics 36
PC Based Object Tracer

Debug.Print "Forward OUT-&HF3"


Case 100
Form1.BackColor = vbCyan 'Left
Out &H378, &HF8
Debug.Print "Forward OUT-&HF4"
Case 105
Form1.BackColor = vbWhite 'Forward Right
Out &H378, &HF5
Debug.Print "Forward OUT-&HF5"
Case 99
Form1.BackColor = vbBlue 'Reverse Right
Out &H378, &HF6
Debug.Print "Forward OUT-&HF6"
Case 97
Form1.BackColor = &HC000C0 'Reverse Left
Out &H378, &HFA
Debug.Print "Forward OUT-&HF7"
Case 103
Form1.BackColor = &H80880 'Forward Left
Out &H378, &HF9
Debug.Print "Forward OUT-&HF8"
Case 37 'left arrow
Form1.BackColor = vbCyan 'Left
Out &H378, &HF8
Debug.Print "Forward OUT-&HF4"
Case 38 'up arrow
Form1.BackColor = vbGreen 'Forward
Out &H378, &HF1
Debug.Print "Forward OUT-&HF1"

Dept of Electronics 37
PC Based Object Tracer

Case 39 'right arrow


Form1.BackColor = vbYellow 'Right
Out &H378, &HF4
Debug.Print "Forward OUT-&HF3"
Case 40 'down arrow
Form1.BackColor = vbRed 'Reverse
Out &H378, &HF2
Debug.Print "Forward OUT-&HF2"
Case 101 'down arrow
Out &H378, &HFF 'stop
Debug.Print "Forward OUT-&HF2"
Form1.BackColor = &H80FF&

End Select
End Sub

Private Sub Command1_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)


Out &H378, &HFF 'stop
End Sub

Private Sub Command1_MouseDown(Index As Integer, Button As Integer, Shift As Integer,


x As Single, y As Single)
Select Case Index
Case 0
Form1.BackColor = vbGreen 'Forward
Out &H378, &HF1 'Forward
Debug.Print "Forward OUT-&HF1"

Dept of Electronics 38
PC Based Object Tracer

Case 1
Form1.BackColor = vbRed 'Reverse
Out &H378, &HF2 'reverse
Debug.Print "Forward OUT-&HF2"
Case 2
Form1.BackColor = vbYellow 'Right
Out &H378, &HF4 'right
Debug.Print "Forward OUT-&HF3"
Case 3
Form1.BackColor = vbCyan 'Left
Out &H378, &HF8 'left
Debug.Print "Forward OUT-&HF4"
Case 4
Form1.BackColor = vbWhite 'Forward Right
Out &H378, &HF5 'forward right
Debug.Print "Forward OUT-&HF5"
Case 5
Form1.BackColor = vbBlue 'Reverse Right
Out &H378, &HF6 'rev right
Debug.Print "Forward OUT-&HF6"
Case 6
Form1.BackColor = &HC000C0 'Reverse Left
Out &H378, &HFA 'rev left
Debug.Print "Forward OUT-&HF7"
Case 7
Form1.BackColor = &H80880 'Forward Left
Out &H378, &HF9 'forward left
Debug.Print "Forward OUT-&HF8"

Dept of Electronics 39
PC Based Object Tracer

Case 8
Out &H378, &HFF 'stop
Form1.BackColor = &H80FF&
Debug.Print "Forward OUT-&HF0"

End Select
End Sub

Private Sub Command1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x


As Single, y As Single)
out &H378, &HFF 'stop
Form1.BackColor = &H80FF&
End Sub

Private Sub Command2_Click()


Out &H378, &HFF
Form1.BackColor = &H80FF&
ClosePreviewWindow
End
End Sub

Private Sub picCapture_Click()


picCapture.Width = 10815
picCapture.Height = 0
picCapture.Left = 240
picCapture.Top = 2400
End Sub

Dept of Electronics 40
PC Based Object Tracer

Private Sub picCapture_DblClick()


picCapture.Height = 11520
picCapture.Width = 15360
picCapture.Left = 0
picCapture.Top = 0
End Sub

Private Sub picCapture_Resize()


picCapture.Height = 11520
picCapture.ScaleHeight = 11520
End Sub

Private Sub Picture2_Click()


Out &H378, &HFF
Form1.BackColor = &H80FF&
Picture2.Drag
Command1(Index).SetFocus
End Sub

Private Sub Picture2_GotFocus()


Command1(Index).SetFocus
End Sub

Private Sub Timer1_Timer()


Label1.Caption = Time
Label2.Caption = Date
End Sub

Dept of Electronics 41
PC Based Object Tracer

Private Sub Form_Load()


LoadDeviceList
OpenPreviewWindow 'start capture Video
Out &H378, &HFF
Form1.BackColor = &H80FF&
End Sub

Private Sub OpenPreviewWindow()


' Open Preview window in picturebox
hHwnd = capCreateCaptureWindowA(iDevice, WS_VISIBLE Or WS_CHILD, 0, 0, 660, _
550, picCapture.hwnd, 0)
' Connect to device
If SendMessage(hHwnd, WM_CAP_DRIVER_CONNECT, iDevice, 0) Then '
'Set the preview scale
SendMessage hHwnd, WM_CAP_SET_SCALE, True, 0
'Set the preview rate in milliseconds
SendMessage hHwnd, WM_CAP_SET_PREVIEWRATE, 66, 0
'Start previewing the image from the camera
SendMessage hHwnd, WM_CAP_SET_PREVIEW, True, 0
' Resize window to fit in picturebox
SetWindowPos hHwnd, HWND_BOTTOM, 0, 0, picCapture.ScaleWidth,

picCapture.ScaleHeight, _SWP_NOMOVE Or SWP_NOZORDER

Else
' Error connecting to device close window
End If
End Sub

Dept of Electronics 42
PC Based Object Tracer

Private Sub ClosePreviewWindow()


‘Disconnect from device
SendMessage hHwnd, WM_CAP_DRIVER_DISCONNECT, iDevice, 0
' close window
DestroyWindow hHwnd
End Sub

Private Sub Form_Unload(Cancel As Integer)


ClosePreviewWindow 'close capturing
End Sub

Private Sub LoadDeviceList()


Dim strName As String
Dim strVer As String
Dim iReturn As Boolean
Dim x As Long
x=0
strName = Space(100)
strVer = Space(100)
‘Load name of all available devices into the lstDevices
Do
' Get Driver name and version
iReturn = capGetDriverDescriptionA(x, strName, 100, strVer, 100)
' If there was a device add device name to the list
If iReturn Then lstDevices.AddItem Trim$(strName)
x=x+1
Loop Until iReturn = False
End Sub

Dept of Electronics 43
PC Based Object Tracer

CAMERA CAPTURE MODULE

Public Const WM_CAP As Integer = &H400

Public Const WM_CAP_DRIVER_CONNECT As Long = WM_CAP + 10


Public Const WM_CAP_DRIVER_DISCONNECT As Long = WM_CAP + 11
Public Const WM_CAP_EDIT_COPY As Long = WM_CAP + 30

Public Const WM_CAP_SET_PREVIEW As Long = WM_CAP + 50


Public Const WM_CAP_SET_PREVIEWRATE As Long = WM_CAP + 52
Public Const WM_CAP_SET_SCALE As Long = WM_CAP + 55
Public Const WS_CHILD As Long = &H40000000
Public Const WS_VISIBLE As Long = &H10000000
Public Const SWP_NOMOVE As Long = &H2
Public Const SWP_NOSIZE As Integer = 1
Public Const SWP_NOZORDER As Integer = &H4
Public Const HWND_BOTTOM As Integer = 1

Public iDevice As Long ' Current device ID


Public hHwnd As Long ' Handle to preview window

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _


(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long

Dept of Electronics 44
PC Based Object Tracer

Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _


ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Public Declare Function DestroyWindow Lib "user32" (ByVal hndw As Long) As Boolean

Public Declare Function capCreateCaptureWindowA Lib "avicap32.dll" _


(ByVal lpszWindowName As String, ByVal dwStyle As Long, _
ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, _
ByVal nHeight As Integer, ByVal hWndParent As Long, _
ByVal nID As Long) As Long

Public Declare Function capGetDriverDescriptionA Lib "avicap32.dll" (ByVal wDriver As


Long, _
ByVal lpszName As String, ByVal cbName As Long, ByVal lpszVer As String, _
ByVal cbVer As Long) As Boolean

Dept of Electronics 45
PC Based Object Tracer

PARALLEL PORT INOUT32.DLL MODULE

#If Win32 Then


Public Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal Portaddress As Integer) As Integer
Public Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal Portaddress As Integer, ByVal value As Integer)

#Else

Public Declare Function Inp Lib "inpout16.dll" _


Alias "Inp16" (ByVal Portaddress As Integer) As Integer
Public Declare Sub Out Lib "inpout16.dll" _
Alias "Out16" (ByVal Portaddress As Integer, ByVal value As Integer)
#End If

Dept of Electronics 46
PC Based Object Tracer

REQUIREMENTS OF SYSTEM

Operating System : Windows 98,NT,2000,2003,Windows XP Professional

Language : English (Regional Setting: English)

Processor : AMD Athlon(tm) XP 2100+ or Intel Pentium 4

Chipset : Intel, VIA

Memory : 256MB RAM

DirectX Version : DirectX 9.0c

Video Card : USB 2.0, TV Tuner card

PORT : Parallel Port 16Bit , D25

Input Devices : Keyboard, Mouse, Microphone

Output Devices : Speaker

Dept of Electronics 47
PC Based Object Tracer

INSTALLATION OF PBOT SOFTWARE

PBOT software will be given with the project.

1. To install double click on setup and click ok


2. To continue click on setup icon.

Figure 5.3.1

3. Driver for TV Tuner card will be created in c:\program files\PBOT\


4. Then install nero and activate using serial key.
5. Open the TV tuner driver Image, by right clicking and select image
6. Install as per instruction given below.

Dept of Electronics 48
PC Based Object Tracer

INSTALLATION OF TV TUNER CARD

The image of the TV tuner card driver is attached to the PBOT software package.
First install the PBOT setup and follow the installation instruction.

1. Run the autorun file in the TV tuner card Driver created in the installation drive.
2. Plug the USB device to the system port.

Figure 5.3.2

3. Install DirectX 9.0, USB-Driver, and Install APP as per instruction given by the
software.
4. Then Click Exit.
5. Reboot the system.

Dept of Electronics 49
PC Based Object Tracer

6. USAGE OF SOFTWARE

SECURITY:
1) Username and password are required to control the system.
2) Only system administrator can able to change the password.
3) Password is protected due to encryption.

KEYBORAD CONTROLS:

NUMPAD DESIRED DIRECTION


Figure 6.1

MOUSE CONTROL:
To control the direction of the car through mouse is simple, Just click on this
Icon and get the control and then just move the icon over the required direction to move the
car.

Note:- PBOT software windows are attached at the last of this thesis.

Dept of Electronics 50
PC Based Object Tracer

7.CIRCUIT DIAGRAM

Dept of Electronics 51
PC Based Object Tracer

TRANSMITTER

Figure 7.1

Dept of Electronics 52
PC Based Object Tracer

RECEIVER

Figure 7.2

Dept of Electronics 53
PC Based Object Tracer

8. PCB LAYOUT

Dept of Electronics 54
PC Based Object Tracer

TRANSMITTER

Figure 8.1

RECEIVER

Figure 8.2

Dept of Electronics 55
PC Based Object Tracer

9. FEATURES

1. Administrator can control the PBOT by sitting in front of PC.


2. Less Power consumption.
3. Cost efficient.
4. 100 meters range.
5. 4.5v rechargeable battery to driver motor.
6. 9v battery for camera in wireless.
7. Less distortion in RF communication.
8. High quality voice transmission.
9. User friendly software.
10. Reliable.

ADDITIONAL FEATURES:

1. Duplex communication.

2. Possible to see video in TV and control through keypad.

3. Wireless public addressing system.

4. Administrator can control the PBOT anywhere from the world via

Internet.
5. Home security system.

Dept of Electronics 56
PC Based Object Tracer

10. SAMPLE FORMS / SCREENSHOTS

Dept of Electronics 57
PC Based Object Tracer

VB
DEVELOPMENT ENVIRONMENT

Figure 10.1

Dept of Electronics 58
PC Based Object Tracer

Figure 10.2

Dept of Electronics 59
PC Based Object Tracer

PROCESS OF ENTERING PBOT


WELCOME SCREEN

Figure 10.3

Dept of Electronics 60
PC Based Object Tracer

LOGON SCREEN

Figure 10.4

Dept of Electronics 61
PC Based Object Tracer

TV TUNER CARD SETTING SCREEN

Figure 10.5

Dept of Electronics 62
PC Based Object Tracer

Figure 10.6

Dept of Electronics 63
PC Based Object Tracer

SETTING AS
COMPOSITE

Figure 10.7

Dept of Electronics 64
PC Based Object Tracer

PBOT CONTROL SCREEN

Figure 10.8

Dept of Electronics 65
PC Based Object Tracer

11. CONCLUSION

Finally we completed our project PC BASED OBJECT TRACER , the wireless data
transfer using ASK is successfully achieved.

Dept of Electronics 66
PC Based Object Tracer

12. REFERENCE

Websites:
1. WWW.Radiotronix.com
2. WWW.JMKproducts.com
3. WWW.Taltechinstruments.com

Books:
Envangelos Pentroutsos. 1999, ‘Mastering Visual Basic 6’, IEEE Trans, Edition 5,
BPB publications, New Delhi.

Anokh Singh.1991, ‘Principle of Communication Engineering’, S. Chand Group


publications, pages 672, Mumbai.

Dept of Electronics 67
PC Based Object Tracer

13. DATASHEET

Dept of Electronics 68

Вам также может понравиться