Kau Sal Robot Report
-
Upload
sakshi-tyagi -
Category
Documents
-
view
224 -
download
0
Transcript of Kau Sal Robot Report
-
7/27/2019 Kau Sal Robot Report
1/42
SUMMER INTERNSHIP REPORT
ON
DESIGN & DEVELOPMENT OF MICROCONTROLLER BASED IR TRACKING /
HEAT SEEKING ROBOT WITH FIRE ALARM
Submitted by
KAUSHAL JHA3RD YEAR (ECE)
HINDU COLLEGE OF ENGINEERING
Under the Guidance of
Hemant KumarScientist C
ISO 9001: 2008
Centre for Fire, Explosive and Environment Safety (CFEES),
Defence Research and Development Organization (DRDO),
Timarpur, Delhi - 110054
July, 2010
-
7/27/2019 Kau Sal Robot Report
2/42
2
Certificate
This is to certify that the Project entitled Design and Development of Micro-controller
Based IR Tracking /Heat seeking Robot with fire alarm is being submitted by
KAUSHAL JHA in partial fulfillment of summer training in CFEES, Timarpur, Delhi. It is
the original work carried out by him under my guidance and supervision.
Sh. Hemant Shukla
Date:
Place:
-
7/27/2019 Kau Sal Robot Report
3/42
3
Acknowledgement
I take this opportunity to acknowledge all those who have assisted me in this
thesis. First of all I express my earnest gratitude towards Sh. B.J MISHRA sir, CFEES,
Timarpur, Delhi for his constant support and guidance during my thesis work. His
motivations and suggestions were invaluable in successful completion of this thesis.
I am also grateful to the team of FASG who has been given valuable suggestions
for completion of this work. It is a pleasure to thank my training head SH. HEMANT
SHUKLA & group head Sh. A.K CHAWLA for their encouragement and interest in this
work.
I would like to thank Sh. Banwari Lal sir, Sh. Ashok sirand Sh. Paras sir for
their direct and indirect help for completion of this project work.
Finally I am grateful to GOD almighty and my parents for giving me the strength
and wisdom to carry out this work successful.
( Kaushal Jha )Date:
Place:
-
7/27/2019 Kau Sal Robot Report
4/42
4
LIST OF CONTENTS
1. About DRDO 52. About CFEES 63. Project Assigned 84. Introduction 95. Methodology of Design 106. Description of Proposed Circuit 137. Micro Controller 158. Crystal Oscillator 229. TIP 122 & 127 2410.Software Section
a. Flow Chart 25b. Program 27
11.Keil C51 Cross Compiler 2912.Photograph of Designed Robot 3813.Conclusion and Results. 3914.Implementations and Future Work 4015.References. 4116.List of Abbreviation Used. 42
-
7/27/2019 Kau Sal Robot Report
5/42
5
ABOUT: DEFENCE RESEARCH AND DEVELOPMENT ORGANISATION
The Defence Research and Development Organisation (DRDO)(Hindi: , Rak Anusandhneva Viks Sangahan) is an agency of the Republic of India,responsible for the development of technology for use by the military,headquartered in New Delhi, India. It was formed in 1958 by themerger of Technical Development Establishment and theDirectorate of Technical Development and Production with the Defence Science Organisation.
DRDO has a network of 52 laboratories which are deeply engaged in developing defence technologies
covering various fields, like aeronautics, armaments, electronic and computer sciences, human
resource development, life sciences, materials, missiles, combat vehicles development and navalresearch and development. The organization includes more than 5,000 scientists and about 25,000
other scientific, technical and supporting personnel.
http://en.wikipedia.org/wiki/Government_agencyhttp://en.wikipedia.org/wiki/Republic_of_Indiahttp://en.wikipedia.org/wiki/Technologyhttp://en.wikipedia.org/wiki/Military_of_Indiahttp://en.wikipedia.org/wiki/New_Delhihttp://en.wikipedia.org/wiki/Indiahttp://en.wikipedia.org/wiki/Mergerhttp://en.wikipedia.org/wiki/Mergerhttp://en.wikipedia.org/wiki/Indiahttp://en.wikipedia.org/wiki/New_Delhihttp://en.wikipedia.org/wiki/Military_of_Indiahttp://en.wikipedia.org/wiki/Technologyhttp://en.wikipedia.org/wiki/Republic_of_Indiahttp://en.wikipedia.org/wiki/Government_agency -
7/27/2019 Kau Sal Robot Report
6/42
6
ABOUT : CENTRE FOR FIRE, EXPLOSIVE AND ENVIRONMENT SAFETY
The Centre for Fire, Explosive and Environment Safety (CFEES)
is an Indian defense laboratory of the Defence Research and Development
Organization (DRDO). Located in Timarpur, Delhi, its main function is the
development of technologies and products in the area of explosive, fire
and environmental safety. CFEES is organized under the Armaments
Directorate of DRDO. The present director of CFEES is J.C. Kapoor.
The Centre for Explosive and Environment Safety (CEES) was established in 1992 by merging
three DRDO establishments; DRDO Computer Centre, Delhi, The Directorate of Explosives Safety,
DRDO HQ, and the Fire Advisers Office, DRDO HQ. In 2000 another DRDO lab, Defence Institute of
Fire Research (DIFR) was merged with CEES. In order to emphasize the importance of fire science,the Government renamed CEES as CFEES in 2003.
AREAS OF WORK
CFEES works in the area of Explosive safety, Fire protection and environmental safety. In addition to
developing technologies to protect against these threats, it also trains personnel in these areas, and
enforces safety standards in the use of hazardous materials- toxic, explosive and flammable. CFEES
also designs and develops sensors to detect these threats.
Explosive Safety - CFEES helps in the Siting of explosive processing and storage dumps and the
design, testing and evaluation of safe explosive storage houses. Additionally, it trains armed forces
personnel and DRDO scientists in the safe use of explosives and ordinance, and enforces compliance
of safety rules. Simulation and risk modeling is also carried out, in order to aid in Disaster Management.
Environment Safety - CFEES develops treatment and disposal techniques for hazardous Heavy Metal
Wastes, as well as Photodegradable Polyethylene for use as packaging material at high altitudes,
which prevents the pollution in mountainous areas where the Indian Army operates, such as Kargil and
Siachen.
http://en.wikipedia.org/wiki/Indiahttp://en.wikipedia.org/wiki/Defence_Research_and_Development_Organisationhttp://en.wikipedia.org/wiki/Defence_Research_and_Development_Organisationhttp://en.wikipedia.org/wiki/Delhihttp://en.wikipedia.org/wiki/Government_of_Indiahttp://en.wikipedia.org/wiki/Risk_modelinghttp://en.wikipedia.org/wiki/Indian_Armyhttp://en.wikipedia.org/wiki/Kargil_districthttp://en.wikipedia.org/wiki/Siachenhttp://en.wikipedia.org/wiki/Siachenhttp://en.wikipedia.org/wiki/Kargil_districthttp://en.wikipedia.org/wiki/Indian_Armyhttp://en.wikipedia.org/wiki/Risk_modelinghttp://en.wikipedia.org/wiki/Government_of_Indiahttp://en.wikipedia.org/wiki/Delhihttp://en.wikipedia.org/wiki/Defence_Research_and_Development_Organisationhttp://en.wikipedia.org/wiki/Defence_Research_and_Development_Organisationhttp://en.wikipedia.org/wiki/India -
7/27/2019 Kau Sal Robot Report
7/42
7
CFEES also plays an active role in formulating the phase-out strategy for halon and other ozone layer
threatening gases. The National Halon Management Programme, funded under bilateral programme, is
implemented by CFEES, supported by Ozone Cell, India. Halons are one of the six categories of
chemicals that are covered under the phase-out programme of the Montreal Protocol. The Montreal
Protocol, to which India is a signatory, has called upon the parties to phase out the CFCs, halons and
other man-made ozone-depleting chemicals.[4] In this regard, the lab is researching into alternative
chemicals for fire suppression and other uses.
Fire Safety - CFEES is involved in the development of automatic fire and explosion detection and
suppression systems for armoured vehicles, and water mist based fire protection Systems for various
applications. It also develops lightweight fire protection clothing. A smoke test tunnel for creating fire
signatures under various conditions has been installed.
http://en.wikipedia.org/wiki/Ozone_layerhttp://en.wikipedia.org/wiki/Montreal_Protocolhttp://en.wikipedia.org/wiki/Centre_for_Fire,_Explosive_and_Environment_Safety#cite_note-The_Hindu-3http://en.wikipedia.org/wiki/Centre_for_Fire,_Explosive_and_Environment_Safety#cite_note-The_Hindu-3http://en.wikipedia.org/wiki/Centre_for_Fire,_Explosive_and_Environment_Safety#cite_note-The_Hindu-3http://en.wikipedia.org/wiki/Fire_protectionhttp://en.wikipedia.org/w/index.php?title=Smoke_test_tunnel&action=edit&redlink=1http://en.wikipedia.org/w/index.php?title=Smoke_test_tunnel&action=edit&redlink=1http://en.wikipedia.org/wiki/Fire_protectionhttp://en.wikipedia.org/wiki/Centre_for_Fire,_Explosive_and_Environment_Safety#cite_note-The_Hindu-3http://en.wikipedia.org/wiki/Montreal_Protocolhttp://en.wikipedia.org/wiki/Ozone_layer -
7/27/2019 Kau Sal Robot Report
8/42
8
PROJECT ASSIGNED
Design and Development of Micro-controller Based
IR TRACKING /HEATSEEKING ROBOT WITH FIRE ALARM
27/07/2010
-
7/27/2019 Kau Sal Robot Report
9/42
9
INTRODUCTION
Automatic system like robots carry out specific tasks. These systems are usually employed in
environments where conditions keep changing. The robots described here sense the near infrared
radiation (.8m-1m) and moves toward that direction. This robot is designed keeping in mind mainlyfor two applications viz. Heat seeking missile and automatic fire extinguisher.
There are four sections, mainly sensor, comparator, Micro-controller, and DC Motor Driver.
The sensing section detects the infrared radiation. The controller section process the information from
the sensor and provide input to the driver section, which has DC motor for driving the robot, the output
of the sensors is fed to the comparator, which serves as the input to the micro controller. Depending on
the input sequence obtain the micro controller performs the sequential operations and gives output
decisions which is a sequence of bits to drive a DC motor.
As a heat seeking missile: The heat-seeking missile is a special kind of missile that not only reaches
the target emitting heat radiations (Aircraft, Ship or Boat) but also tracks it. As the target moves, it
follows the target and finally hits it. The missile is based on the concept of detecting and following the
heat-radiating source. The robot designed for two-dimensional motions, performs the task of a heat
seeking missile as it tracks heat radiating object.
As a Fire Extinguisher:
The robot can be used as a highly sophisticated fire extinguisher. The fire extinguisher, when it
detects fire, will move toward fire, deviating away from any obstacle, and extinguish the fire.
-
7/27/2019 Kau Sal Robot Report
10/42
10
Methodology of Design
Block Diagram
IR
Sensor
Left
IR
Sensor
Centre
IR
Sensor
Right
C
O
MP
C
O
M
P
C
O
MP
Micro
Controller
AT 89S52
R
E
LA
Y
C
K
T
D
C
MO
T
O
R
Wire less
Communication
Module
(Optional)
T
R
AN
S
I
S
T
O
R
D
R
I
V
E
R
Audio & visual indication
D
C
M
O
T
O
R
-
7/27/2019 Kau Sal Robot Report
11/42
11
In this method sensing of IR signal is been carried out by three IR sensor. It gives a negative
going signal when an IR radiation coming if front of the sensor. A comparator make this pulse to
positive going and feed to micro controller 89S52. The micro controller as per its software gives output
to the respective transistorized driver circuit. The driver circuit energies the relay and finally DC Motor
gets power from relay. When sensor start tracking the IR radiation a audio indication from alarm circuit
will also come. The Wireless message can also be send through RF by putting TX and Rx module. The
sensing circuit of ROBOT is as below.
-
7/27/2019 Kau Sal Robot Report
12/42
12
The complete Circuit diagram of this method is as follows
-
7/27/2019 Kau Sal Robot Report
13/42
13
DESCRIPTION OF PROPOSED CIRCUIT
There are three IR sensors located outside the body of the robot namely left side, right side
and at the center. These IR sensors after getting IR radiations from there respective sides gives a
negative going pulse to the comparator. For three sensors there are three respective comparators. The
output from left is connected to the PIN NO 21(P 2.0) of Microcontroller, output from centre and right
are connected to pin no 24,22 (P2.1,P 2.3)respectively. The output of microcontroller is fed to the
Darlington pair transistor TIP127. For motor one output is taken from pin 1 pin 2(P1.0,P1.1).For motor
two it is from PIN3 &4(P1.2&P1.3). A relay based D.C motor driver circuit is introduced as as follows:
-
7/27/2019 Kau Sal Robot Report
14/42
14
From the above truth table it is clear that both the motor can run either in clock wise or in counter clock
wise direction as per requirement. we are already given a +12V supply at the normally open point of
relay and Ground at normally close point of relay. When input of TIP127 i.e. port 1.0 gets high transistor
conduct and a ground goes to the coil of relay makes it energized. It results a +12v supply at common
point of relay. There are two similar relay for one DC motor to rotate in both direction. A reverse diode is
used across the coil of relay to avoid back emf of relay. So a two dimensional motion can be achieved
from robot by using two DC motor.
P1.1 RLY O/P1 RLY O/P2DC
MOTOR 1P 1.2 P 1.3
RLYO/P3
RLYO/P4
DCMOTOR 2
0 0 0V 0V STOP 0 0 0V 0V STOP
0 1 0V 12V RUN CW 0 1 0V 12V RUN CW1 0 12V 0V RUN CCW 1 0 12V 0V RUN CCW
1 1 12V 12V STOP 1 1 12V 12V STOP
A table for direction of Robot is as follows.
Motor Left Motor Right Direction of RobotClock wise Clock wise Forward motion
Clock wise Stop Turn right
Stop Clock wise Turn left
Counter clock wise Counter clock wise Reverse motion
-
7/27/2019 Kau Sal Robot Report
15/42
15
AT89S52 Micro-Controller
Features
Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory
o Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode)
-
7/27/2019 Kau Sal Robot Report
16/42
16
Description
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of
in-system programmable Flash memory. The device is manufactured using Atmels high-density
nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set
and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system
programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which
provides a highly-flexible and cost-effective solution to many embedded control applications.
The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM,32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level
interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the
AT89S52 is designed with static logic for operation down to zero frequency and supports two software
selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters,
serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con-
tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware
reset.
-
7/27/2019 Kau Sal Robot Report
17/42
17
Pin Configuration
Pin 1 to pin 8 Port1.0 to Port1.7
Pin 9 Reset
Pin 10 to pin 17 Port 3.0 to Port 3.7
Pin 18 &19 XTAL2 AND XTAL1
Pin 20 GROUND
Pin 21 to pin 28 Port 2.0 to Port 2.7
PIN 29, 30 & 31 PSEN, ALE/PROG & EA /VPP
Pin 32 to pin 39 Port O.7 to Port 0.0
PIN 40 VCC
-
7/27/2019 Kau Sal Robot Report
18/42
18
Pin Description
VCC Supplyvoltage.
GND Ground.
Port0 Port 0 is an 8-bit open drain bidirectional I/O port.As an output
port,eachpincansink eightTTL inputs.When1sarewritten to
port0pins, thepinscanbeusedashigh- impedanceinputs.
Port 0 can also be configured to be the multiplexed low-orderaddress/data bus during accesses to external program and data
memory.Inthismode,P0hasinternalpull-ups.
Port 0 also receives the code bytes during Flash programming
and outputs the code bytes during program verification.
Externalpull-upsarerequiredduringprogram verification.
Port1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The
Port 1 output buffers cansink/source fourTTL inputs.When1sare
writtentoPort1pins,theyarepulledhigh bytheinternalpull-upsand
canbeusedasinputs.Asinputs,Port1pinsthatareexternallybeing
pulledlowwillsourcecurrent(IIL)becauseoftheinternalpull-ups.
In addition, P1.0 and P1.1 can be configured to be the
timer/counter 2 external count input (P1.0/T2) and the
timer/counter 2 trigger input (P1.1/T2EX), respectively, as
showninthefollowingtable.
Port 1 also receives the low-order address bytes during Flash
programmingand verification.
-
7/27/2019 Kau Sal Robot Report
19/42
19
Port2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The
Port 2 output buffers cansink/source fourTTL inputs.When1sare
writtentoPort2pins,theyarepulledhigh bytheinternalpull-upsand
canbeusedasinputs.Asinputs,Port2pinsthatareexternallybeing
pulledlowwillsourcecurrent(IIL)becauseoftheinternalpull-ups.
Port 2 emits the high-order address byte during fetches from
externalprogrammemory and during accesses to external data
memory that use 16-bit addresses (MOVX @ DPTR). In this
application,Port2usesstrong internalpull-upswhenemitting1s.
During accessestoexternaldatamemorythatuse8-bitaddresses
(MOVX @ RI), Port 2 emits the contents of the P2 SpecialFunctionRegister.
Port 2 also receives the high-order address bits and some control
signalsduringFlash programmingandverification.
-
7/27/2019 Kau Sal Robot Report
20/42
20
Port3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The
Port 3 output buffers cansink/source fourTTL inputs.When1sare
writtentoPort3pins,theyarepulledhigh bytheinternalpull-upsand
can be used as inputs.As inputs, Port 3 pins that are exter- nally
beingpulledlowwillsourcecurrent(IIL)becauseofthepull-ups.
Port 3 receives some control signals for Flash programming and
verification.
Port 3 also serves the functions of various special features of the
AT89S52,asshownin thefollowingtable.
Port Pin Alternate FunctionsP3.0 RXD serial in ut ort
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR external data memor write strobe
P3.7 RD (external data memory read strobe)
RST Reset input.Ahighon thispin for twomachinecycleswhile the
oscillator is running resets thedevice.Thispindriveshigh for98
oscillatorperiodsaftertheWatchdogtimes out.TheDISRTObitin
SFRAUXR(address8EH)canbeused todisable this feature. In
the default state of bit DISRTO, the RESET HIGH out feature is
enabled.
-
7/27/2019 Kau Sal Robot Report
21/42
21
ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the
lowbyteoftheaddress duringaccessestoexternalmemory.This
pin is also the program pulse input (PROG) during Flash
programming.
In normal operation,ALE is emitted at a constant rate of 1/6 the
oscillator frequency and may be used fo r external timing or
clocking purposes. Note, however, that one ALE pulse is
skippedduringeachaccesstoexternaldatamemory.
Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFR
location8EH.Withthe bitset,ALE isactiveonlyduringaMOVX
or MOVC instruction. Otherwise, the pin is weakly pulled high.
Setting theALE-disable bithas noeffect if themicrocontroller is
in externalexecutionmode.
PSEN Program Store Enable (PSEN) is the read strobe to external
program memory. When the AT89S52 is executing code from
externalprogrammemory,PSEN isactivated twiceeachmachine
cycle, except that two PSEN activations are skipped during each
accesstoexternaldatamemory.
EA/VPP ExternalAccessEnable.EAmustbestrapped toGND inorder to
enable the device to fetch code from external program memory
locations starting at 0000H up to FFFFH. Note,however, that if
lockbit1isprogrammed,EAwillbeinternallylatchedonreset.
EAshouldbestrappedtoVCC forinternalprogramexecutions.
Thispinalso receives the12-voltprogrammingenablevoltage
(VPP)duringFlash programming.
XTAL1 Inputtotheinvertingoscillatoramplifierandinputtotheinternal
clockoperatingcircuit.
XTAL2 Outputfromtheinvertingoscillatoramplifier.
-
7/27/2019 Kau Sal Robot Report
22/42
22
Crystal Oscillator
CrystalSpecifications
The reference frequencies for Chrontel's products are derived from an on-chip Pierce oscillator
with an external crystal. The oscillator has been designed to function reliably with crystals that
conform to the following specifications
Table 1 Crystal Specifications
CrystalSpecifications Min Typical Max Comment
NominalFrequency(MHz)
14.31818
OscillationMode FundamentalHolderType HC-49,HC-50 NotImportantPintoPinCapacitance(CoinpF) 7 10 DependsonHolderTypeOperatingTemperature(C) 10 30 70
ApplicationDependent
FrequencyTolerance 30PPM ApplicationDependent
LoadCapacitance(CeqinpF)
12.5 17 20AffectsFrequencyTolerance
DriveLevel(PinW) 0.5 1 2* Calc.Valueby(4)MotionResistance(Rsin) 25 30 50 AffectsDriveLevel
SeriesandParallelResonance
Thereisnosuchthingasaseriescut
crystalasopposedtoa
parallelcut
crystal. Thesamecrystal
canbe made to oscillate in series resonance mode or parallel resonance mode. The frequency of
oscillation of a crystal is usually specified by the manufacturer as either the series resonance
frequency or the parallel resonancefrequency. Acrystalcanoscillate inseriesresonance,meaning
thatLsisresonatingwithCs,andthe resonancefrequencyisthensimply
f series = 1/2 Ls. Cs
-
7/27/2019 Kau Sal Robot Report
23/42
23
Some oscillator circuits are designed for series resonance and the oscillation frequency shall
equal the specified series resonance value. These series mode oscillators, however, are more
sensitive to temperature andcomponentvariations. In fact,mostcrystalsoscillators in today's ICsare
of theparallelresonance type. The oscillation frequency ofaparallel mode oscillator is alwayshigher
than fseries. The actual oscillation frequency of a parallel mode oscillator is dependent on the
equivalentcapacitanceseenbythecrystal.
where ceq = C0+C1(C2/(C1+C2))
At parallel resonance, the crystal behaves inductively and resonates with capacitance shunting the
crystal terminals. Depending on the application, especially in microprocessors where Pierce
oscillators are used predominantly,acrystalmanufacturermayspecifyparallel resonance frequency
insteadofseries resonance frequency. Since fparallel isa functionof the loadcapacitanceCeq, it
shouldalsobespecifiedalongwith fparallel. ForPCCPUclockandVGAclockapplications,the
frequencyaccuracyrequiredisusuallynotverystringent andcaneasilybesatisfiedwitha14.318MHz
crystalthathasbeenspecified foroperationineitherseriesor parallelresonancemodes
-
7/27/2019 Kau Sal Robot Report
24/42
24
TRANSISTOR TIP 122 & TIP 127
Plastic Medium-Power
Complementary Silicon Transistors
DARLINGTON 5 AMPERE COMPLEMENTARY SILICON POWER TRANSISTORS6080100 VOLTS 65 WATTS
. . . designed for generalpurpose amplifier and lowspeed switching
applications.
High DC Current Gain hFE = 2500 (Typ) @ IC
= 4.0 Adc
CollectorEmitter Sustaining Voltage @ 100 mAdcVCEO(sus) = 60 Vdc (Min) TIP120, TIP125
= 80 Vdc (Min) TIP121, TIP126= 100 Vdc (Min) TIP122, TIP127
Low CollectorEmitter Saturation Voltage VCE(sat) = 2.0 Vdc(Max)
@ IC = 3.0 Adc= 4.0 Vdc (Max) @ IC = 5.0 Adc
Monolithic Construction with BuiltIn BaseEmitter Shunt Resistors TO220AB Compact Package
-
7/27/2019 Kau Sal Robot Report
25/42
25
Software Section The software for Robot has been written in the C language and it is converted to
assembly language using cross complier Keil UV Vision.
FLOW CHART
EVALUATE THE TEST EXPRESSION
FOR STRAIGHT MOMENT
IS TRUE
start
Check the status of a each sensor
EVALUATE THE TEST EXPRESSIONFOR LEFT MOMENT
IS TRUE
EVALUATE THE TEST EXPRESSION
FOR RIGHT MOMENT
IS TRUE
CALL
SUBROUTINE
STRAIGHT
CALL
SUBROUTINE
STRAIGHT
CALL
SUBROUTINE
STRAIGHT
YES
YES
YES
NO
NO
NO
-
7/27/2019 Kau Sal Robot Report
26/42
26
SUBROUTINE STRAIGHT
SUBROUTINE LEFT
SUBROUTINE RIGHT
SUBROUTINE LEFT
DRIVE LEFT MOTOR ONLYCW , ALARM ON
RETURN
SUBROUTINE STRAIGHT
DRIVE BOTH MOTOR CW ,
ALARM ON
RETURN
SUBROUTINE LEFT
DRIVE RIGHT MOTOR ONLY
CW , ALARM ON
RETURN
-
7/27/2019 Kau Sal Robot Report
27/42
27
PROGRAM
#include
sbit right = P2^1; //sensor connection
sbit centre=P2^3;
sbit left=P2^0;
sbit alarm=P3^0; //alarm is connected
sbit mr1=P1^2; //right motor
sbit mr2=P1^3;
sbit ml1=P1^0; //left motor
sbit ml2=P1^1;
//definition of the main function
void delay()
{
unsigned int i=30000;
while(i--);}
//definition of main function
void main()
{
right=1;left=1;centre=1; //configure as input pin
ml1=1;ml2=1;mr1=1;mr2=1; //stop all the motors
alarm=0; //OFF the alarm
while(1)
{
if(left)
{
alarm=1;
-
7/27/2019 Kau Sal Robot Report
28/42
28
mr2=0; //forward the right motor
delay();
}
else
mr2=1; //stop the right motor
if(right)
{
alarm=1;
ml2=0; //forward left motor
delay();
}
else
ml2=1; //stop the left motor
if(centre)
{
alarm=1;
ml2=0; //forward
mr2=0; //forward
delay(); delay();
}
else
{
ml2=1;
mr2=1; //stop both the motors
}
if(!(left||right||centre))
{
alarm=0;
}}
}
-
7/27/2019 Kau Sal Robot Report
29/42
29
Keil C51 CROSS COMPILER :
The 8051 Family is one of the fastest growing Microcontroller Architectures. More than 500 device variants available.
Keil provides several development tools for these 8051 variants. C51 Compiler A51 Macro Assembler BL51 Linker/Locater
Software Development Cycle in Keil
1. Create a project, select the target chip from the device database, and configure the toolsettings.
2. Create source files in C.3. Build your application with the project manager.4. Correct errors in source files.5. Test the linked application
Create a Project File
To create a new project file select from the Vision menu ProjectNew Project. Thisopens a standard Windows dialog that asks you for the new project file name.
We suggest that you use a separate folder for each project
-
7/27/2019 Kau Sal Robot Report
30/42
30
Select a Device
When you create a new project Vision asks you to select a CPU for your project. The Select Device
dialog box shows the Vision device database. Just select the microcontroller you use
-
7/27/2019 Kau Sal Robot Report
31/42
31
Create New Source Files
You may create a new source file with the menu option File New. This opens an empty editor window
where you can enter your source code. Vision enables the C color syntax highlighting when you save
your file with the dialog FileSave As under a filename with the extension *.C.
-
7/27/2019 Kau Sal Robot Report
32/42
32
Add Source File to the Project
Once you have created your source file you can add this file to your project. For example, you can select the file group in the Project Workspace Files page and click
with the right mouse key to open a local menu. The option Add Files opens the standard files
dialog. Select the file MAIN.C you have just created
-
7/27/2019 Kau Sal Robot Report
33/42
33
Set Tool Options for Target
Vision lets you set options for your target hardware. The dialog Options for Target opens via the
toolbar icon or via the Project - Options for Target menu item. In the Target tab you specify all
relevant parameters of your target hardware and the on-chip components of the device you have
selected
-
7/27/2019 Kau Sal Robot Report
34/42
34
Build Project and Create a HEX File
You may translate all source files and line the application with a click on the Build Target
toolbar icon. When you build an application with syntax errors, Vision will display errors and
warning messages in the Output Window Build page.
A double click on a message line opens the source file on the correct location in a Vision
editor window
-
7/27/2019 Kau Sal Robot Report
35/42
35
Build Project and Create a HEX File
Once you have successfully generated your application you can start debugging using the
Vision Debugger.
After you have tested your application, it might be required to create an Intel HEX file and to
download the application software into the physical device using a Flash programming utility.
Vision creates HEX files with each build process when Create HEX file underOptions for
Target Output is enabled
-
7/27/2019 Kau Sal Robot Report
36/42
36
Output Files
The Cx51 Compiler generates a number of output files during compilation.
By default, each output file shares the same filename as the source file.
each has a different file extension.
Files with this extension are assembly source files generated fromyour C source code. These files can be assembled with the A51
Assembler.
.SRC
Image of the machine code generated, to be burnt onto the targetdevice.
.Hex
Files with this extension contain the source text as expanded by
the preprocessor. All macros are expanded and all comments aredeleted inthis listing.
.I
Files with this extension are object modules that containrelocatable object code. Object modules may be linked to an
absolute object module by the Lx51 Linker/Locator.
.OBJ
Files with this extension are listing files that contain the formattedsource text along with any errors detected by the compiler. Listingfiles may optionally contain the symbolsused and the assemblycode generated.
.LST
-
7/27/2019 Kau Sal Robot Report
37/42
37
Language Extensions
The Cx51 Compiler provides several extensions to ANSI Standard C to support the followingelements of the 8051 architecture.
o Memory Areaso Memory Typeso Memory Modelso Data Typeso Bit Variables and Bit-Addressable Datao Special Function Registerso Pointerso Function Attributes
-
7/27/2019 Kau Sal Robot Report
38/42
38
Photograph of Designed Robot
-
7/27/2019 Kau Sal Robot Report
39/42
39
Conclusion and Result
The Robot has been tested and evaluated successfully. The designed robot is capable to move in left ,
right and center direction when it gets a fire signal or IR radiation from their respective side. This robothas proved the tracking of fire and IR radiation. Robot is also capable of energizingfirealarm on getting
IR radiation. It can also interface with RF Transmitter and Receiver module and are able to directly
interface with computer for software up gradation and data logging purpose. Some better features can
be added to tackle more complex situation.
-
7/27/2019 Kau Sal Robot Report
40/42
40
Future Plan
This robot can be modified for its better performance and more technological advancement.
A block diagram on the future plan in shown below.
Pyro
detector
Photo
Diode
ADC
Micro
controller
A
D
C
Amp-
lifier
Opto
coupler
And
DC
Motor
Driver
Three Different Audio
Visual Alarm
DC MOTOR
LEFT
DC MOTOR
RIGHT
RF and GSM Interfacing Circuit
-
7/27/2019 Kau Sal Robot Report
41/42
41
References and DataSheet
1. The 8051 microcontroller and embedded system - By MA Mazidi, JC Mazidi and RDMckinlay.
2. Data Sheet of ATMEL AT89S523. Data Sheet of IC UM 35614. Data Sheet of TIP 122 & 127
-
7/27/2019 Kau Sal Robot Report
42/42
LIST OF ABBRIVIATION USED
CW Clock wise
CCW Counter clock wise
IC Integrated circuit
IR infrared
Comp Comparator