Académique Documents
Professionnel Documents
Culture Documents
LOCATOR
OLADAPO, OPEOLUWA
AYOKUNLE EEG/2001/129
SUBMITTED TO
ENGINEERING
JANUARY 2008
1
CHAPTER 1
INTRODUCTION
There are numerous locating, tracking and monitoring protocols in use today,
for use in conjunction with physical boundaries and fences, as necessary to locate,
track and monitor the location and proximity of an object relative to the physical
because security is of paramount importance and the use of tracking systems is one of
technology.
Possible uses for this project include security surveillance for inside buildings
and surrounding areas. By using an infrared camera, the design can also have military
applications. The camera can be attached to a gun turret which could then track
moving targets.
2
1.1 OBJECTIVE
The aim of this project is to design and build a device that will track an object
(IR transmitter) in 3600 azimuth using an IR tracking system. The object position
process of the sweep dish and also determine the position of the target.
receives signal sent by the transmitter and sends it to the computer. Tracking is done
3
CHAPTER 2
LITERATURE REVIEW
The purpose of this project is to develop a motion tracking device, which will
be able to recognize an object, and follow its motion on a horizontal plane. To reach
this goal, the motion tracking algorithm must perform within certain limits to keep up
with the real-time. Therefore, the most important factors of the project in these
Commercially, past research on the project have been carried out using
engineering institutes in design. Normally, a suitable frequency band for the design
considered e.t.c. The Radio frequency design was first implemented using radio
frequency (RF) tags by Harry Stockman. He used the RF tags to reflect power
Radio path between the transmitter and receiver obstructed by surface with sharp
irregular objects even when line-of-sight (LOS) don’t exist, waves bend around the
objects by diffraction. It has an advantage of good enough range for most applications
4
but also has disadvantages which include issue of cost, multi-path, fading and
This is another very effective method used in tracking objects. The GPS is a
space-based radio-positioning and time transfer system developed in the early 1940’s
by Decca Navigator. The GPS has three major segments: Space Division, Control
provides several characteristics not found in other existing equipment which will
position, velocity and time (PVT) determination; a worldwide common grid easily
converted to other local data; passive, all weather operation; real-time and continuous
A GPS receiver's job is to locate four or more satellites in space, figure out the
distance to each, and use this information to deduce its own location. This operation is
of the GPS tracking method is that certain atmospheric factors (ionization) and other
that is too low in frequency (i.e., too long in wavelength) to be perceived by the
human eye, yet is still too high in frequency to be classed as microwave radio.
Infrared (IR) light that is just beyond the human visual limit (>1.0 × 1014 to 4.0 ×
1
A method of determining the relative position of object using geometry of triangles
5
1014 Hz) is termed near IR, while light farther from the visible spectrum is divided
into middle IR, far IR, and extreme IR. Military and security systems utilize mostly
near IR and a narrow band in the far IR centered on 3.0 × 1013 Hz, because the
cost effective and easy to manage. Its main limitation is in its signal strength coverage
in transmission.
The IR tracking will be improved using a dish to focus the IR radiation on the receiver
to enable a better reception of the infrared signals sent by the infrared transmitter.
6
2.3.1 PIC 16F877A MICROCONTROLLER
The core architecture is high-performance RISC CPU with only 33 in-out pins. Since
it follows the RISC architecture, all single cycle instructions take only one instruction
cycle except for program branches which take two cycles. 16F877A comes with 3
20 MHz clock input. Since each instruction cycle takes four operating clock cycles,
3
largest semiconductor company and inventor of the X86 series of microprocessors
7
Figure 2.1 PIC16F877A Microcontroller
read-write memory for data storage, read-only memory, such as flash for code
8
storage, EEPROM (Electrically Erasable Programmable Read Only Memory), for
speeds of 20MHz or even lower, microcontrollers often operate at very low speed
applications.
They consume relatively little power (milliwatts), and will generally have the
ability to sleep while waiting for a peripheral event such as a button press to wake
nanowatts, making them ideal for low power and long lasting battery applications.
following features:
other serial communications interfaces like I²C, Serial Peripheral Interface and
ROM, EPROM, 256 bytes of EEPROM, 8K flash memory for program and
pulses into discrete mechanical movements. The shaft or spindle of a stepper motor
9
rotates in discrete step increments when electrical command pulses are applied to it in
the proper sequence. The motors rotation has several direct relationships to these
applied input pulses. The sequence of the applied pulses is directly related to the
direction of motor shafts rotation. The speed of the motor shafts rotation is directly
related to the frequency of the input pulses and the length of rotation is directly
rather than continuously; typical steps are 30, 45, and 90°; the angular steps are
stepping relays. A stepper motor is a brushless, synchronous electric motor that can
divide a full rotation into a large number of steps, for example, 200 steps. Thus the
10
Figure 2.2 Stepper Motor
usually dc, a step motor can index in angular or linear increments. With proper
11
control, the output steps are always equal in number to the input command pulses.
According to Smith (1999), each pulse advances the rotor shaft one step increment
motors. These motors are found in many industrial control systems, and large
numbers are used in computer peripheral equipment, such as printers, tape drives,
capstan drives, and memory-access mechanisms. Step motors are also used in
numerical control systems, machine-tool controls, process control, and many systems
There are many types of step motors. Most of the widely used ones can be
types. A variable-reluctance step motor is simple to construct and has low efficiency.
The permanent-magnet types are more complex to construct and have a higher
efficiency
12
7. It is possible to achieve very low speed synchronous rotation with a load that is
little power as possible, and the IR signal should also be as strong as possible to
Many chips are designed to be used as IR transmitters. The older chips were
dedicated to only one of the many protocols that were invented. Nowadays very low
power microcontrollers are used in IR transmitters for the simple reason that they are
more flexible in their use. When no button is pressed they are in a very low power
sleep mode, in which hardly any current is consumed. The processor wakes up to
13
Figure2.3 Infrared Light Emitting Diode
14
2.3.4 PHOTOTRANSISTOR
bipolar transistor with an exposed base region. Here, light striking the base replaces
variations in the light striking it. Note that phototransistors may or may not have a
base lead (if they do, the base lead allows you to bias the phototransistor's light
response.)
15
Figure 2.4 Phototransistor
16
2.3.5 INFRARED RECEIVER
feet or so, and turn the signal into electrical impulses. These electrical impulses can be
carried around the home on wires and then turned back into infrared signals by
emitters.
Many different receiver circuits exist on the market. The most important
17
Figure 2.5 Block diagram representation of the Infrared receiver
18
Figure 2.5 is a typical block diagram of such an IR receiver; everything is built
The received IR signal is picked up by the IR detection diode on the left side of the
diagram. This signal is amplified and limited by the first 2 stages. The limiter acts as
an AGC circuit to get a constant pulse level, regardless of the distance to the handset
and the AC signal is sent to the Band Pass Filter. The Band Pass Filter is tuned to the
modulation frequency of the handset unit. Common frequencies range from 30 kHz to
The next stages are a detector, integrator and comparator. The purpose of these three
vacuum tube. Field-effect transistors operate more efficiently than bipolar types,
field to control the shape and hence the conductivity of a 'channel' in a semiconductor
amplifying wireless signals). The device can amplify analog or digital signals. It can
19
semiconductor path called the channel4. At one end of the channel, there is an
electrode called the source. At the other end of the channel, there is an electrode
called the drain. The physical diameter of the channel is fixed, but its effective
called the gate. The conductivity of the FET depends, at any given instant in time, on
the electrical diameter of the channel. A small change in gate voltage can cause a
large variation in the current from the source to the drain, thus the FET amplifies
signals.
4
Medium for transmission used in semiconductor devices
20
CHAPTER 3
METHODOLOGY
The various methods used in the implementation of the infrared (IR) position
locator include; the search algorithm, stepper motor controlling, IR transmitter and
receiver range detection and the interconnection of all the components. These
The algorithm being used for tracking involves the detection of the point of
maximum strength of the signal transmitted from the transmitter. The receiver in
conjunction with the program (written and executed by PIC 16F877A) used to detect
the point of maximum signal strength detects the point of maximum strength and the
program written for the proper stepping of the motor is executed so as to give the dish
instructions on the proper direction to point towards. A flowchart showing the control
21
Figure 3.1 The Control Process
22
Figure 3.2 Model plot of Signal Strength Vs Azimuth
23
START
Signal Input
Data
Acquisition
INITIALSIGNAL
strength = A
SIGNAL
strength 2 = B
IS
A>B
?
YESS
OUTPUT=A
STOP
24
The receiver sends various analogue inputs of the signal strengths into the
PIC’s analogue-to-digital (A/D) converter which converts the signals into digital form
that can be easily used for comparison and the detection of the maximum point of
signal strength. This same digital form is translated and used for the proper stepping
The sample of the code written for controlling the stepper motor and for
The stepper motor being used is the PJJQ113ZA-P Matsushita Line feed
motor which is a unipolar stepper motor having a step size of 7.5 degrees, 48 steps per
revolution, resistance of 36 ohms and a gear diametrical pitch of 50. The stepper
motor has six wires (out of which 2 are common) and four separate electromagnets
which were used to turn the motor. Each electromagnet was energized one at a time
Four of those wires were each connected to one end of one coil. The extra wire
(or 2) is called "common." To operate the motor, the "common" wires were connected
to the supply voltage, and the other four wires are connected to ground through
transistors, so the transistors control whether current flows or not. The microcontroller
To drive the motor forward by one step (7.5o) the following sequence of signals needs
Step Q1 Q2 Q3 Q4
25
1 1 0 0 0
2 0 0 1 0
3 0 1 0 0
4 0 0 0 1
Repeat step 1 etc.
Step Q1 Q2 Q3 Q4
1 1 0 0 0
2 0 0 0 1
3 0 1 0 0
4 0 0 1 0
Repeat step 1 etc.
26
IR
TRANSMITTER RECEIVER
3V IR LED
MICRO
Powered by CONTROLLER
Batteries
PIC16F877A
STEPPER
MOTORS
Figure 3.4 Block diagram showing the control movement of the sweep dish
27
3.3 INFRARED (IR) TRANSMITTER AND RECEIVER RANGE
DETECTION
The maximum permissible range of operation of the receiver was tested and
discovered to be 35 meters. The testing was carried out using the principle of line-of-
sight. The distance between the transmitter and receiver was increased gradually and
the signal strength received was detected. The maximum permissible range was
chosen as the distance at which the signal strength becomes so small that it becomes
After all the components had been tested, the connections were made
according to the design of the circuit shown in Figure 3.5 which had been simulated.
The infrared transmitter is driven with a +5 volts D.C power supply and the
transmitter transmits infrared signals continuously. The PIC is also driven with a +5
volts D.C power supply through terminals VDD and the VSS terminals connected to
ground. The emitter of the phototransistor is taken as an input to port Ra0 which is an
analogue input port and the A/D converter module is used to convert the signals into
its corresponding digital form. The PIC is clocked at 8MHz using a crystal oscillator
The output which is used to drive the stepper motor is taken from pins RD4,
RD5, RD6 and RD7 into the gate of each field effect transistor (FET). The output (i.e.
the source) of the FET is then an amplified voltage used to drive the stepper motor by
energizing the corresponding coil while the drain is grounded. The stepper motor is
28
Figure 3.5 The Schematic Design of an Object Position Locator
29
CHAPTER 4
RESULTS
The design was expected to be able to locate an object on the same platform
(same line-of-sight) with the receiver within a range 35 meters from the location of
the receiver and align itself to the direction of position of the object. This is to be done
4.2 LIMITATIONS
The design is not 100 percent perfect to perform all of its operations in all
conditions. It was observed that the design has some limitations as listed below;
The design will not be able to locate any object outside the range (35 meters)
The speed of movement of the object to be located should not be greater than
might be removed and this will cause the design not to perform its work.
Any blockage in the line-of-sight will make the device not functional.
4.3 RESULTS
After the design and construction, testing of the device was carried out to
ascertain the working conditions of the device. The design performed the operations
30
expected i.e. locate an object that has been tagged and point in the direction of
location. The transmitter and the receiver have to be on the same level for the device
to work and also the device works only for a distance of seven meters between the
31
CHAPTER 5
5.1 CONCLUSION
This project locates an object that has been tagged with an infrared transmitter
which is in the range of the receiver. The receiver upon location of the object turns the
dish mounted on the stepper motor in the direction of the location of the object. It can
5.2 RECOMMENDATION
32
REFERENCES
Campbell T.D, Naik A.L., Stone R.E (2002), "Biological Infrared Imaging and Sensing".
(English). IEEE
33
APPENDIX A1
if pir1.0 = 1 then
counter2 = counter2 + 1
pir1.0 = 0
end if
end sub
main:
pwm_init(5000)
trisb = %00000001
trisa = 255
portb = 0
pwm_change_duty(16)
pwm_start
adcon0 = 0
adcon1 = %00000110
intcon = %11000000
option_reg = 0
34
pie1 = 1
pir1 = 0
tmr1l = $e8
tmr1h = $fd
t1con = %00110001
intcon.4 = 1
while true
if counter2 = 1 then
intcon.4 = 0
t1con.0 = 0
if (counter >= 3) and (counter <= 7) then
nop
goto jade
else
do
counter2 = 0
counter = 0
t1con = %00110000
tmr1l = $58
tmr1h = $fc
pir1.0 = 0
t1con = %00110001
intcon.4 = 1
do
nop
loop until counter2 = 1
intcon.4 = 0
t1con.0 = 0
35
goto jade
else
select case counter3
case 0 portb = %00010000
delay_us(100)
portb = 0
case 1 portb = %00100000
delay_us(100)
portb = 0
case 2 portb = %01000000
delay_us(100)
portb = 0
case 3 portb = %10000000
delay_us(100)
portb = 0
end select
counter3 = counter3 + 1
if counter3 = 4 then
counter3 = 0
end if
counter = 0
counter2 = 0
end if
loop until (counter >= 1) and (counter <= 3)
end if
jade:
portd = 255
delay_us(100)
portd = 0
pie1 = 1
pir1 = 0
36
tmr1l = $e8
tmr1h = $fd
counter = 0
counter2 = 0
counter3 = 0
t1con = %00110001
intcon.4 = 1
end if
wend
end.
37
APPENDIX A2
PIC16F877A
+14V
38
and PORTD (combined)…………......................................................................200 mA
Note 2: Voltage spikes below Vss at the MCLR pin, inducing currents greater than 80
Thus, a series resistor of 50-100Ω should be used when applying a “low” level to the
39
APPENDIX A3
40
41
42
APPENDIX A4
43
44