Académique Documents
Professionnel Documents
Culture Documents
On
BY
Mr. S. BALAKRISHNA
Asst. Professor
Department of ECE
CERTIFICATE
i
DECLARATION
We, declare that, the result embodied in the Project work has not been submitted to
any other University or Institute for the award of any Degree.
iii
ACKNOWLEDGEMENT
The completion of this project work gives us an opportunity to convey our gratitude to
all those who have helped us to reach a stage where we have the confidence to launch
our career in the competitive world in the field of ELECTRONICS AND
COMMUNICATION ENGINEERING.
Our honest thankfulness to Mr. S. BALAKRISHNA, (Internal Guide) for his kind
help and for giving us the necessary guidance and valuable suggestions in completing
this project work and in preparing this report.
We take the opportunity to express gratitude to the Management, Teaching and Non
teaching Staff of “VISHWA BHARATHI INSTITUTE OF TECHNOLOGY AND
SCIENCES” for their kind co-operation during the period of my Study.
Finally, we would like to thank our parents & friends for their continuous
encouragement and support during the entire course of this project work.
iv
ABSTRACT
A rescue robot is a robot that has been designed for the purpose of aiding rescue
workers. Common situations that employ rescue robots are mining accidents, urban
disasters, hostage situations, and explosions. Rescue robots were used in the search
for victims and survivors after the September 11 attacks in New York. The benefits of
rescue robots to these operations include reduced personnel requirements, reduced
fatigue, and access to otherwise unreachable areas. Robotic search and rescue is
useful since robots may be deployed in dangerous environments without putting
human responders at risk. This project is a prototype which is widely used for military
applications.
PIR sensor is used to detect human. A Passive Infra Red sensor (PIR
sensor) is an electronic device which measures infrared light radiating from objects in
its field of view. Apparent motion is detected when an infrared source with one
temperature, such as a human, passes in front of an infrared source with another
temperature, it detects. It acts as a motion detector.
This robot uses Zigbee technology. This can be moved forward and
reverse direction using geared motors of 60RPM. Also this robot can take sharp
turnings towards left and right directions. This project uses AT89S52 MCU as its
controller. Also a wireless camera with voice is interfaced to the kit. This project uses
9V battery. This project is much useful for mines detection and surveillance
applications.
v
LIST OF CONTENTS
Certificate of Department i
Certificate of Organization ii
Declaration iii
Acknowledgement iv
Abstract v
List of contents vi
List of figures viii
List of tables x
CHAPTER-1 INTRODUCTION 1
CHAPTER-5 MICROCONTROLLER 26
5.1 Introduction 26
5.2 Features 26
5.3 Description 27
vi
5.4 Pin diagram of AT89S52 29
5.5 Pin description 30
5.6 8052 Microcontroller Memory Organization 34
5.7 Program Memory 34
5.8 Data Memory 35
CHAPTER-10 RESULT 56
11.1 Transmitter (input) 56
11.2 Receiver (output) 57
REFERENCES 59
APPENDIX 60
vii
LIST OF FIGURES
FIGURES PAGE NO
Fig: 3.2.Buzzer 8
viii
Fig: 6.1.PIR Sensor 36
ix
LIST OF TABLES
TABLES PAGE NO
x
SEARCH AND RESCUE ROBOT FOR THE VICTIMS OF EARTHQUAKE ECE
CHAPTER-1
INTRODUCTION
1.1. INTRODUCTION
A rescue robot is a robot that has been designed for the purpose of aiding
rescue workers. Common situations that employ rescue robots are mining accidents,
urban disasters, hostage situations, and explosions. Rescue robots were used in the
search for victims and survivors after the September 11 attacks in New York. The
benefits of rescue robots to these operations include reduced personnel requirements,
reduced fatigue, and access to otherwise unreachable areas. Robotic search and rescue
is useful since robots may be deployed in dangerous environments without putting
human responders at risk. This project is a prototype which is widely used for military
applications.
Many people use the term general-purpose computer to make this distinction
clear. As shipped, a general-purpose computer is a blank slate; the manufacturer does
not know what the customer will do wish it. One customer may use it for a network
file server another may use it exclusively for playing games, and a third may use it to
write the next great American novel.
CHAPTER-2
BLOCK DIAGRAM
Power
supply unit
Control
switches
A
T
8
9
Crystal S
5
2
RESET
BUZZER
Zigbee Geared
Receiver Motor
-I
AT H-
89S52 MCU Bridge
11.0592MHz
Crystal
Geared
Oscillator
Motor
- II
Power – On
Reset
PIR SENSOR
The block diagram consists of data transmitter and data receiver blocks.
Whenever any switch pressed from the control switches (sw0, sw1, sw2, sw3)
that is given to micro controller, through controller it is given to zigbee transmitter
and the same information will be passed to zigbee receiver through zigbee transmitter.
Whenever PIR sensor detects any object in the receiver block then automatically the
siren will be ON and the images which are captured through wireless camera will be
displayed on display screen.
Similarly, the data receiving unit contains five major units, they are: zigbee receiver,
AT89S52 microcontroller unit, PIR sensor, buzzer, wireless camera. From zigbee
transmitter the switch, which is pressed at transmitter, will be transmitted to the
zigbee receiver, depending on the zigbee receiver information the robot will be moved
forward, reverse, left and right directions using geared motors of 60 RPM. Whenever
PIR sensor detects any object the microcontroller makes the buzzer ON and
simultaneously the video will be viewed in the monitor.
CHAPTER-3
HARDWARE DETAILS
3.1. INTRODUCTION:
A rescue robot is a robot that has been designed for the purpose of aiding rescue
workers. Common situations that employ rescue robots are mining accidents, urban
disasters, hostage situations, and explosions. Rescue robots were used in the search
for victims and survivors after the September 11 attacks in New York. The benefits of
rescue robots to these operations include reduced personnel requirements, reduced
fatigue, and access to otherwise unreachable areas.
• Power supply
• Buzzer
• Motors
• Wireless camera.
• Zigbee
• Microcontroller
The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,
230V from the mains supply is step down by the transformer to 12V and is fed to a
rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order
to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to
remove any a.c components present even after rectification. Now, this voltage is given
to a voltage regulator to obtain a pure constant dc voltage.
Fig.3.1:Power supply
3.3.1. TRANSFORMER:
Usually, DC voltages are required to operate various electronic equipment and these
voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the
a.c input available at the mains supply i.e., 230V is to be brought down to the required
voltage level. This is done by a transformer. Thus, a step down transformer is
employed to decrease the voltage to a required level.
3.3.2. RECTIFIER:
The output from the transformer is fed to the rectifier. It converts A.C. into pulsating
D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge
rectifier is used because of its merits like good stability and full wave rectification.
3.3.3. FILTER:
Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until the
mains voltage and load is maintained constant. However, if either of the two is varied,
D.C. voltage received at this point changes. Therefore a regulator is applied at the
output stage.
As the name itself implies, it regulates the input applied to it. A voltage regulator is an
electrical regulator designed to automatically maintain a constant voltage level. In this
project, power supply of 5V and 12V are required. In order to obtain these voltage
levels, 7805 and 7812 voltage regulators are to be used. The first number 78
represents positive supply and the numbers 05, 12 represent the required output
voltage levels.
3.4. BUZZER:
Fig3.2: Buzzer
An electric coil is wound on a plastic bobbin, the latter having a central sleeve within
which a magnetic core is slide ably positioned. One end of the sleeve is closed and
projects beyond the coil. An inverted cup-shaped housing surrounds the coil and
bobbin and has a central opening through which the closed end of the sleeve projects.
The core projects into the closed end of the sleeve beyond the margin of the opening
in the housing to augment the magnetic coupling between the housing and the core.
The open end of the housing is attached to a support bracket of magnetic material,
there being a spring between the bracket and bobbin normally urging the core toward
the closed end of the sleeve.
Buzzers have a positive and a negative terminal, marked on their case. The positive
terminal should be connected to the positive voltage supply. The negative terminal
should be connected to the signal from the driver.
3.5. DC MOTOR:
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and all that
Beamers will see), the external magnetic field is produced by high-strength permanent
magnets. The stator is the stationary part of the motor -- this includes the motor
casing, as well as two or more permanent magnet pole pieces. The rotor (together with
the axle and attached commutator) rotates with respect to the stator. The rotor consists
of windings (generally on a core), the windings being electrically connected to the
commutator.The above diagram shows a common motor layout -- with the rotor
inside the stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor windings are
such that when power is applied, the polarities of the energized winding and the stator
magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the
stator's field magnets. As the rotor reaches alignment, the brushes move to the next
commutator contacts, and energize the next winding. Given our example two-pole
motor, the rotation reverses the direction of current through the rotor winding, leading
to a "flip" of the rotor's magnetic field, driving it to continue rotating. In real life,
though, DC motors will always have more than two poles (three is a very common
number). In particular, this avoids "dead spots" in the commutator.
So since most small DC motors are of a three-pole design, let's tinker with the
workings of one via an interactive animation.
You'll notice a few things from this -- namely, one pole is fully energized at a time
(but two others are "partially" energized). As each brush transitions from one commutator
contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly
charge up (this occurs within a few microsecond). We'll see more about the effects of this
later, but in the meantime you can see that this is a direct result of the coil windings' series
wiring:
Fig3.7: Dc motor
The use of an iron core armature (as in the Mabuchi, above) is quite common,
and has a number of advantages. First off, the iron core provides a strong, rigid
support for the windings -- a particularly important consideration for high-torque
motors. The core also conducts heat away from the rotor windings, allowing the
motor to be driven harder than might otherwise be the case.
Iron core construction is also relatively inexpensive compared with other
construction types. But iron core construction also has several disadvantages.
The iron armature has a relatively high inertia which limits motor acceleration.
This construction also results in high winding inductances which limit brush and
commutator life.
In small motors, an alternative design is often used which features a 'coreless'
armature winding. This design depends upon the coil wire itself for structural
integrity. As a result, the armature is hollow, and the permanent magnet can be
mounted inside the rotor coil. Coreless DC motors have much lower armature
inductance than iron-core motors of comparable size, extending brush and
commutator life.
3.6. H-BRIDGE:
An H-bridge is an electronic circuit which enables DC electric motors to be run
Forward,Backwards. These circuits are often used in robotics. H-bridges are available
as integrated circuits, or can be built from discrete components. The two basic states
of a H-bridge. The term "H-bridge" is derived from the typical graphical
representation of such a circuit. An H-bridge is built with four switches (solid-state or
mechanical). When the switches S1 and S4 (according to the first figure) are closed
(and S2 and S3 are open) a positive voltage will be applied across the motor. By
opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed,
allowing reverse operation of the motor.
Using the nomenclature above, the switches S1 and S2 should never be closed at the
same time, as this would cause a short circuit on the input voltage source. The same
applies to the switches S3 and S4. This condition is known as shoot-through.
3.6.1. OPERATION:
The H-Bridge arrangement is generally used to reverse the polarity of the motor, but
can also be used to 'brake' the motor, where the motor comes to a sudden stop, as the
motors terminals are shorted, or to let the motor 'free run' to a stop, as the motor is
effectively disconnected from the circuit. The following table summarizes operation.
S1 S2 S3 S4 Result
Motor moves
1 0 0 1
right
Motor moves
0 1 1 0
left
Motor free
0 0 0 0
runs
0 1 0 1 Motor brakes
3.6.3. FEATURES:
3.6.4. DESCRIPTION:
The Device is a monolithic integrated high voltage, high current four channel driver
designed to accept standard DTL or TTL logic levels and drive inductive loads (such
as relays solenoids, DC and stepping motors) and switching power transistors. To
simplify use as two bridges each pair of channels is equipped with an enable input. A
separate supply input is provided for the logic, allowing operation at a lower voltage
and internal clamp diodes are included. This device is suitable for use in switching
applications at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic
package which has 4 center pins connected together and used for heat sinking The
L293DD is assembled in a 20 lead surface mount which has 8 center pins connected
together and used for heat sinking.
3.8. ZIGBEE:
The relationship between IEEE 802.15.4 and ZigBee is similar to that between
IEEE 802.11 and the Wi-Fi Alliance. For non-commercial purposes, the ZigBee
specification is available free to the general public.
An entry level membership in the ZigBee Alliance, called Adopter, costs US$ 3500
annually and provides access to the as-yet unpublished specifications and permission
to create products for market using the specifications. ZigBee is one of the global
standards of communication protocol formulated by the relevant task force under the
IEEE 802.15 working group. The fourth in the series, WPAN Low Rate/ZigBee is the
newest and provides specifications for devices that have low data rates, consume very
low power and are thus characterized by long battery life. Other standards like
Bluetooth and IrDA address high data rate applications such as voice, video and LAN
communications.
3.9. MICROCONTROLLERS:
The Intel 8052 is Harvard architecture, single chip microcontroller (µC) which
was developed by Intel in 1980 for use in embedded systems. It was popular in the
1980s and early 1990s, but today it has largely been superseded by a vast range of
enhanced devices with 8052-compatible processor cores that are manufactured by
more than 20 independent manufacturers including Atmel, Infineon Technologies and
Maxim Integrated Products.8052 is an 8-bit processor, meaning that the CPU can
work on only 8 bits of data at a time. Further description of microcontroller will be
explained in chapter-4.
CHAPTER-4
WIRELESS COMMUNICATION
4.1. INTRODUTION:
In the world today, everything would be incredibly different if it were not for wireless
communication devices. The fact that we can communicate with people in other parts
of our own country and the world is amazing and has led to lots of changes in human
history.
Wi-Fi is a wireless local area network that enables portable computing devices
to connect easily to the internet. Standardized as IEEE 802.11a, b, g, n, Wi-
Fi approaches speeds of some types of wired Ethernet. Wi-Fi has become the de facto
standard for access in private homes, within offices, and at public hotspots. Some
businesses charge customers a monthly fee for service, while others have begun
offering it for free in an effort to increase the sales of their goods.
Cellular data service offers coverage within a range of 10-15 miles from the
nearest cellsite. Speeds have increased as technologies have evolved, from earlier
technologies such as GSM, CDMA and GPRS, to3G networks
Mobile Satellite Communications may be used where other wireless connections are
unavailable, such as in largely rural areas or remote locations Satellite
Communication are especially important for transportation, aviation, maritime and
military.
4.3. ZIGBEE:
ZigBee module. The €1 coin, shown for size reference, is about 23 mm (0.9 inch) in
diameter. ZigBee is a specification for a suite of high level communication protocols
using small, low-power digital radios based on the IEEE 802.15.4-2003 standard for
wireless personal area networks (WPANs), such as wireless headphones connecting
with cell phones via short-range radio. The technology defined by the ZigBee
specification is intended to be simpler and less expensive than other WPANs, such as
Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that require a low
data rate, long battery life, and secure networking. The ZigBee Alliance is a group of
companies that maintain and publish the ZigBee standard.
• Home Automation
• Telecommunication Applications
• Personal Home
The relationship between IEEE 802.15.4 and ZigBee is similar to that between IEEE
802.11 and the Wi-Fi Alliance. For non-commercial purposes, the ZigBee
specification is available free to the general public. An entry level membership in the
ZigBee Alliance, called Adopter, costs US$ 3500 annually and provides access to the
as-yet unpublished specifications and permission to create products for market using
the specifications.
The specified maximum range of operation for ZigBee devices is 250 feet (76m),
substantially further than that used by Bluetooth capable devices, although security
concerns raised over "sniping" Bluetooth devices remotely, may prove to hold true for
ZigBee devices as well. Due to its low power output, ZigBee devices can sustain
themselves on a small battery for many months, or even years, making them ideal for
install-and-forget purposes, such as most small household systems. Predictions of
ZigBee installation for the future, most based on the explosive use of ZigBee in
automated household tasks in China, look to a near future when upwards of sixty
ZigBee devices may be found in an average American home, all communicating with
one another freely and regulating common tasks seamlessly. The goal is “to provide
the consumer with ultimate flexibility, mobility, and ease of use by building wireless
intelligence and capabilities into every day devices. With acceptance and
implementation of ZigBee, interoperability will be enabled in multi-purpose, self-
organizing mesh networks.
The focus of network applications under the IEEE 802.15.4 / ZigBee standard include
the features of low power consumption, needed for only two major modes (Tx/Rx or
Sleep), high density of nodes per network, low costs and simple implementation.
These features are enabled by the following characteristics,
• 2.4GHz and 868/915 MHz dual PHY modes. This represents three license-free
bands: 2.4-2.4835 GHz, 868-870 MHz and 902-928 MHz the number of channels
allotted to each frequency band is fixed at sixteen (numbered 11-26), one (numbered
0) and ten (numbered 1-10) respectively. The higher frequency band is applicable
worldwide, and the lower band in the areas of North America, Europe, Australia and
New Zealand.
• Low power consumption, with battery life ranging from months to years.
Considering the number of devices with remotes in use at present, it is easy to see that
more numbers of batteries need to be provisioned every so often, entailing regular (as
well as timely), recurring expenditure. In the ZigBee standard, longer battery life is
achievable by either of two means: continuous network connection and slow but sure
battery drain, or intermittent connection and even slower battery drain.
• Maximum data rates allowed for each of these frequency bands are fixed as 250
kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz
• High throughput and low latency for low duty cycle applications (<0.1%)
• Channel access using Carrier Sense Multiple Access with Collision Avoidance
(CSMA - CA)
4.3.2. ARCHITECTURE:
It may be helpful to think of IEEE 802.15.4 as the physical radio and ZigBee
as the logical network and application software. Following the standard Open Systems
Interconnection (OSI) reference model, ZigBee's protocol stack is structured in layers.
The first two layers, physical (PHY) and media access (MAC), are defined by the
IEEE 802.15.4 standard. ZigBee-compliant products operate in unlicensed bands
worldwide, including 2.4GHz (global), 902 to 928MHz (Americas), and 868MHz
(Europe). Raw data throughput rates of 250Kbps can be achieved at 2.4GHz (16
channels), 40Kbps at 915MHz (10 channels), and 20Kbps at 868MHz (1 channel).
The transmission distance is expected to range from 10 to 75m, depending on power
output and environmental characteristics.
Like Wi-Fi, Zigbee uses direct-sequence spread spectrum in the 2.4GHz band,
with offset-quadrature phase-shift keying modulation. Channel width is 2MHz with
5MHz channel spacing. The 868 and 900MHz bands also use direct-sequence spread
spectrum but with binary-phase-shift keying modulation.
4.3.3. PROTOCOLS:
The protocols build on recent algorithmic research (Ad-hoc On-demand Distance
Vector, neuRFon) to automatically construct a low-speed ad-hoc network of nodes. In
most large network instances, the network will be a cluster of clusters. It can also
form a mesh or a single cluster. The current profiles derived from the ZigBee
protocols support beacon and non-beacon enabled networks.
Beacon intervals may range from 15.36 milliseconds to 15.36 ms * 214 = 251.65824
seconds at 250 Kbit/s, from 24 milliseconds to 24 ms * 214 = 393.216 seconds at 40
kbit/s and from 48 milliseconds to 48 ms * 214 = 786.432 seconds at 20 kbit/s.
However, low duty cycle operation with long beacon intervals requires precise timing,
which can conflict with the need for low product cost.
4.3.5. USES:
Zigbee protocols are intended for use in embedded applications requiring low data
rates and low power consumption. ZigBee's current focus is to define a general-
purpose, inexpensive, self-organizing mesh network that can be used for industrial
control, embedded sensing, medical data collection, smoke and intruder warning,
building automation, home automation, etc. The resulting network will use very small
amounts of power — individual devices must have a battery life of at least two years
to pass Zigbee certification.
4.4.1. TRANSMITTER:
The above figure, shows the interfacing of zigbee transmitter with microcontroller in
which zigbee transmitter is connected to Port3.Whenever any switch pressed from the
control switches (sw0, sw1, sw2, sw3) that is given to micro controller, through
controller it is given to zigbee transmitter.
4.4.2. RECEIVER:
The above figure, shows the interfacing of zigbee receiver with microcontroller in
which zigbee receiver is connected to Port3.From zigbee transmitter, the information
will be transmitted to the zigbee receiver.
CHAPTER-5
MICROCONTROLLER
5.1. INTRODUCTION:
5.2. FEATURES:
5.3. DESCRIPTION:
5.5.1. VCC:
Supply voltage.
5.5.2. GND:
Ground.
5.5.3. Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can
sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high
impedance inputs. Port 0 can also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode,
P0 has internal pull-ups. Port 0 also receives the code bytes during Flash
programming and outputs the code bytes during program verification. External pull-
ups are required during program verification.
5.5.4. Port 1:
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins
that are externally being pulled low will source current (IIL) because of the internal
pull-ups.
5.5.5. Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins
that are externally being pulled low will source current (IIL) because of the internal
pull-ups. Port 2 emits the high-order address byte during fetches from external
program memory and during accesses to external data memory that uses 16-bit
addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups
when emitting 1s. During accesses to external data memory that use 8-bit addresses
(MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2
also receives the high-order address bits and some control signals during Flash
programming and verification.
5.5.6. Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins
that are externally being pulled low will source current (IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89S52, as shown
in the following table. Port 3 also receives some control signals for Flash
programming and verification.
5.5.7. RST:
Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives High for 96 oscillator periods after the Watchdog
times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this
feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.
5.5.8. ALE/PROG:
Address Latch Enable (ALE) is an output pulse for latching the low byte of the
address during accesses to external memory. 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 for external timing or clocking
purposes. Note, however, that one ALE pulse is skipped during each access to
external data memory. If desired, ALE operation can be disabled by setting bit 0 of
SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC
instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has
no effect if the microcontroller is in external execution mode.
5.5.9. PSEN:
Program Store Enable (PSEN) is the read strobe to external program memory. When
the AT89S52 is executing code from external program memory, PSEN is activated
twice each machine cycle, except that two PSEN activations are skipped during each
access to external data memory.
5.5.10. EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on
reset.
EA should be strapped to VCC for internal program executions. This pin also
receives the 12-volt programming enable voltage (VPP) during Flash programming.
5.5.11. XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
5.5.12. XTAL2
The microcontroller memory is divided into Program Memory and Data Memory.
Program Memory (ROM) is used for permanent saving program being executed,
while Data Memory (RAM) is used for temporarily storing and keeping intermediate
results and variables. Depending on the model in use (still referring to the whole 8052
microcontroller family) at most a few Kb of ROM and 128 or 256 bytes of RAM can
be used. However All 8052 microcontrollers have 16-bit addressing bus and can
address 64 kb memory. It is neither a mistake nor a big ambition of engineers who
were working on basic core development. It is a matter of very clever memory
organization which makes these controllers a real “programmers’ tidbit“.
The oldest models of the 8052 microcontroller family did not have any internal
program memory. It was added from outside as a separate chip. These models are
recognizable by their label beginning with 803 (for ex. 8031 or 8032). All later
models have a few Kbytes ROM embedded, Even though it is enough for writing
most of the programs, there are situations when additional memory is necessary. A
typical example of it is the use of so called lookup tables. They are used in cases when
something is too complicated or when there is no time for solving equations
describing some process. The example of it can be totally exotic (an estimate of self-
guided rockets’ meeting point) or totally common (measuring of temperature using
non-linear thermo element or asynchronous motor speed control).
EA=0 In this case, internal program memory is completely ignored, only a program
stored in external memory is to be executed.
EA=1 In this case, a program from built-in ROM is to be executed first (to the last
location). Afterwards, the execution is continued by reading additional memory.
in both cases, P0 and P2 are not available to the user because they are used for data
and address transmission. Besides, the pins ALE and PSEN are used too.
CHAPTER-6
6.1. SENSOR:
A sensor is a device that measures a physical quantity and converts it into a signal
which can be read by an observer or by an instrument. For example, a mercury-in-
glass thermometer converts the measured temperature into expansion and contraction
of a liquid which can be read on a calibrated glass tube. A thermocouple converts
temperature to an output voltage which can be read by a voltmeter.
This Passive Infrared Sensor (PIR) module is used for motion detection. It can be uses
as motion detector on your robot. It can work from 5V to 9V DC and gives digital
output. It requires 10-60 seconds of settling time before starting its operation. It
consists of pyroelectric sensor that detects motion by measuring change in the infrared
levels emitted by the objects. It can detect motion up to 6 meters.
PIR sensors are made of pyro electric (or thermoelectric) materials and usually
contain lenses or mirrors in order to focus the infrared light for maximum reception.
As infrared light comes in contact with the pyro electric material, which is usually a
thin sheet, it creates an electrical current that can be measured to determine the
intensity of the infrared light (depth perception) and the direction that it came from.
Because of these properties, PIR sensors are able to determine not how far away a
person is, but also whether or not he/she is approaching the sensor.
6.4.APPLICATIONS:
PIR sensors are used for a wide variety of applications. For example, PIR sensors are
used on television sets and television accessory devices, such as VCRs and DVD
players, to receive infrared light coming from a television remote. PIR sensors are
also used as motion detectors for most public doorways in grocery stores, hospitals,
and libraries. PIR sensors can also be used for military applications in the form of
laser range finding, night vision, and heat-seeking missiles.
6.5.ADVANTAGES:
PIR sensors have several important advantages. For example, PIR sensors are able to
detect infrared light from between several feet and several yards away, depending on
how the device is calibrated. PIR sensors are generally compact and can be fitted into
virtually any electronic device. PIR sensors also do not need an external power source
as they generate electricity as they absorb infrared light.
6.6.DISADVANTAGES:
Although PIR sensors can be advantageous, they also have several disadvantages. For
example, PIR sensors are only capable of receiving infrared light and cannot emit it
like other types of infrared sensors. PIR sensors can also be expensive not only to
purchase, but to install and calibrate as well.
6.7.SPECIFICATIONS:
Note: The sensor is active high when the jumper (shown in the upper left) is in either
position.
The Passive Infrared Sensor (PIR) sensor module is used for motion detection. It can
be used as motion detector for security systems or robotics. It works from 3.3V to 5V
DC and gives TTL output which can be directly given to microcontroller or to relay
through a transistor. It consists of pyroelectric sensor and Fresnel lens that detects
motion by measuring change in the infrared levels emitted by the objects. It can detect
motion up to 20ft. This module is very sensitive to change in infrared levels subjected
by human movement.
6.9. FEATURES:
• Supply: 3.3V Dc to 5V DC
• Detection range: 6meters
• Output: 5V TTL
• Adjustable sensitivity levels (High or Low)
• Settling time: 60 seconds
• Size: Length 32mm, Width 24mm, Height 26mm
6.11. CALIBRATION:
The PIR Sensor requires a ‘warm-up’ time in order to function properly. This is due to
the settling time involved in ‘learning’ its environment. This could be anywhere from
10-60 seconds. During this time there should be as little motion as possible in the
sensors field of view.
6.12. SENSITIVITY:
The PIR Sensor has a range of approximately 20 feet. This can vary with
environmental conditions. The sensor is designed to adjust to slowly changing
conditions that would happen normally as the day progresses and the environmental
conditions change, but responds by making its output high when sudden changes
occur, such as when there is motion.
CHAPTER-7
SOFTWARE DETAILS
9. The most widely used vendor is Atmel. So click on Atmel and now the family
of microcontrollers manufactured by Atmel opens. You can select any one of
the microcontrollers according to the requirement.
10. When you click on any one of the microcontrollers, the features of that
particular microcontroller will be displayed on the right side of the page. The
most appropriate microcontroller with which most of the projects can be
implemented is the AT89S52. Click on this microcontroller and have a look at
its features. Now click on “OK” to select this microcontroller.
11. A small window opens asking whether to copy the startup code into the file
you have created just now. Just click on “No” to proceed further.
12. Now you can see the TARGET and SOURCE GROUP created in the project
workspace.
13. Now click on “File” and in that “New”. A new page opens and you can start
writing program in it.
14. After the program is completed, save it with any name but with the .asm or .c
extension. Save the program in the file you have created earlier.
15. You can notice that after you save the program, the predefined keywords will
be highlighted in bold letters.
16. Now add this file to the target by giving a right click on the source group. A
list of options open and in that select “Add files to the source group”. Check
for this file where you have saved and add it.
17. Right click on the target and select the first option “Options for target”. A
window opens with different options like device, target, output etc. First click
on “target”.
18. Since the set frequency of the microcontroller is 11.0592 MHz to interface
with the PC, just enter this frequency value in the Xtal (MHz) text area and put
a tick on the Use on-chip ROM. This is because the program what we write
here in the keil will later be dumped into the microcontroller and will be stored
in the inbuilt ROM in the microcontroller.
19. Now click the option “Output” and give any name to the hex file to be created
in the “Name of executable” text area and put a tick to the “Create HEX file”
option present in the same window. The hex file can be created in any of the
drives. You can change the folder by clicking on “Select folder for Objects”.
20. Now to check whether the program you have written is errorless or not, click
on the icon exactly below the “Open file” icon which is nothing but Build
Target icon. You can even use the shortcut key F7 to compile the program
written.
21. To check for the output, there are several windows like serial window,
memory window, project window etc. Depending on the program you have
written, select the appropriate window to see the output by entering into debug
mode.
22. The icon with the letter “d” indicates the debug mode.
23. Click on this icon and now click on the option “View” and select the
appropriate window to check for the output.
24. After this is done, click the icon “debug” again to come out of the debug
mode.
25. The hex file created as shown earlier will be dumped into the microcontroller
with the help of another software called Proload.
:
15. Click on the file option from menu bar and select “new”
16. The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.
17. For a program written in Assembly, then save it with extension “. asm” and
for “C” based program save it with extension “ .C”
18. Now right click on Source group 1 and click on “Add files to Group Source”
20. Now you will get another window, on which by default “C” files will appear.
19. Now select as per your file extension given while saving the file
20. Click only one time on option “ADD”
21. Now Press function key F7 to compile. Any error will appear if so happen.
26. Drag the port a side and click in the program file.
27. Now keep Pressing function key “F11” slowly and observe.
28. You are running your program successfully
7.3. PROLOAD:
Proload is software which accepts only hex files. Once the machine code is converted
into hex code, that hex code has to be dumped into the microcontroller placed in the
programmer kit and this is done by the Proload. Programmer kit contains a
microcontroller on it other than the one which is to be programmed. This
microcontroller has a program in it written in such a way that it accepts the hex file
from the keil compiler and dumps this hex file into the microcontroller which is to be
programmed. As this programmer kit requires power supply to be operated, this
power supply is given from the power supply circuit designed above. It should be
noted that this programmer kit contains a power supply section in the board itself but
in order to switch on that power supply, a source is required. Thus this is
accomplished from the power supply board with an output of 12volts or from an
adapter connected to 230 V AC.
CHAPTER-8
SCHEMATIC REPRESENTATION
CHAPTER -9
9.1. ADVANTAGES:
9.2. DISADVANTAGE:
The coverage area of our PIR sensor is limited and it can be increased in real
time applications when it is actually implemented in rescuing living objects.
9.3. APPLICATIONS:
CHAPTER-10
RESULT
CHAPTER-11
CONCLUSION
This project presents the Search and Rescue robot for victims of earthquake and other
natural calamities is been designed and implemented with Atmel 89S52 MCU in
embedded system domain. Experimental work has been carried out carefully. The
result shows that higher efficiency is indeed achieved using the embedded system
according to requirement of the user.
FUTURE SCOPE
In future, we can do this project using GSM, by using GSM modem we can send
message to the ambulance, PS, etc.
REFERENCES
SOURCECODE:
TRANSMITTER:
#include<reg52.h>
Sbit key1 = P0^4;
sbit key2 = P0^5;
sbit key3 = P0^6;
sbit key4 = P0^7;
Void send_com (unsigned char arr_ch)
{
SBUF=arr_ch;
While (TI==0);//
TI=0;
}
Void main ()
{
TMOD=0X20;
TH1=0XFD;
SCON=0X50;
TR1=1;
while (1)
{
If (key1==0)
{
send_com ('1');
}
If (key2==0)
{
send_com ('2');
}
If (key3==0)
{
send_com ('3');
}
If (key4==0)
{
send_com ('4');
}
}
}
RECEIVER:
#include"reg52.h"
sbit ip1 = P2^0; //H-Bridge
sbit ip2 = P2^1;
sbit ip3 = P2^2;
sbit ip4 = P2^3;
Void serial_int ();
Void stop (void);
Void DelayMs (unsigned int count);
Unsigned char i;
Void main()
{
serial_int ();
While (1)
{
If (RI==1)
{
If (SBUF == '2')
{
ip1=1;
ip2=0;
ip3=1;
ip4=0;
}
If (SBUF == '4')
{
for (i=0;i<=20;i++)
{
ip1=1;
ip2=0;
ip3=0;
ip4=1;
DelayMs(15);
stop ();
DelayMs(1);
}
}
If (SBUF == '6')
{
for (i=0;i<=20;i++)
{
ip1=0;
ip2=1;
ip3=1;
ip4=0;
DelayMs(15);
stop();
DelayMs(1);
}
state=0;
}
If (SBUF == '8')
{
ip1=0;
ip2=1;
ip3=0;
ip4=1;
}
if (SBUF == '0')
{
stop ();
}
RI = 0;
}
}
}