WIRELESS WARFARE ROBOT CHAPTER – 1 INTRODUCTION Manpower scarcity has been a perennial problem for many armed forces around the world. Over the years, there has been a decline in the absolute numerical make-up of these organizations, which, if not managed properly, can affect their operational capabilities. This scarcity is a situation that is unlikely to improve in the foreseeable future, given the current low birth rates and conflicting demands for manpower. From a numerical perspective, this constraint means that the armed forces cannot mass together the sheer number of ground troops as before. From a risk perspective, every soldier on the battlefield is now a precious resource which should not be exposed to unnecessary risks. This translates into further constraints for battle planners, who may not have the leeway to select the riskier but more expedient military options. Finally, from the skills perspective, smaller population bases make it difficult to find, select, train and develop specialized combatant resources like pilots and submariners. Thus, it is crucial that new avenues be explored to circumvent this prevalent trend of manpower shortages. One viable DEPARTMENT OF ECE, AEC. Page 1
Manpower scarcity has been a perennial problem for many armed forces around the world. Over the years, there has been a decline in the absolute numerical make-up of these organizations, which, if not managed properly, can affect their operational capabilities. This scarcity is a situation that is unlikely to improve in the foreseeable future, given the current low birth rates and conflicting demands for manpower.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
WIRELESS WARFARE ROBOT
CHAPTER – 1
INTRODUCTION
Manpower scarcity has been a perennial problem for many armed forces around the
world. Over the years, there has been a decline in the absolute numerical make-up of these
organizations, which, if not managed properly, can affect their operational capabilities. This
scarcity is a situation that is unlikely to improve in the foreseeable future, given the current low
birth rates and conflicting demands for manpower.
From a numerical perspective, this constraint means that the armed forces cannot mass
together the sheer number of ground troops as before. From a risk perspective, every soldier on
the battlefield is now a precious resource which should not be exposed to unnecessary risks. This
translates into further constraints for battle planners, who may not have the leeway to select the
riskier but more expedient military options. Finally, from the skills perspective, smaller
population bases make it difficult to find, select, train and develop specialized combatant
resources like pilots and submariners.
Thus, it is crucial that new avenues be explored to circumvent this prevalent trend of
manpower shortages. One viable solution lies in exploiting technology and pushing the limits of
force multipliers. Within the domain of force multipliers, there lies a relatively new discipline,
unmanned warfare.
The definition of 'unmanned' chosen for this article is fairly loose, as the emphasis is not
solely on taking men out of machines but also on how to employ technology to make better use
of its manpower. Thus, while the focus is on unmanned warfare in its literal sense, the article will
also touch on some equipment or systems which result in lower manpower usage (or higher
operational capability with the same manning). In doing so, please accept that some aspects of
this article border on technological innovation as opposed to unmanned warfare per se.
DEPARTMENT OF ECE, AEC. Page 1
WIRELESS WARFARE ROBOT
1.1 POTENTIAL OF UNMANNED WARFAREUnmanned warfare is a relatively new approach in the conduct of warfare, where the
boundaries are not well charted and limited largely by our imaginations. Unmanned warfare will
not only help overcome manpower and resource constraints but will also enhance operational
capabilities, since it can now move into areas where mankind has previously feared to tread.
With unmanned warfare, the competitive advantage can be swung such that human numerical
superiority is no longer an overwhelming advantage or a pre-requisite for victory.
1.2 NEED FOR UNMANNEDThe impetus to go unmanned include optimizing the deployment of manpower,
enhancing operational capabilities and being able to venture into territory once out-of-bounds to
mankind (e.g. deep ocean, space, etc). In particular, unmanned systems should be used to replace
humans where the work is dangerous, dirty or dull.
Some specific advantages in going unmanned include:
Reduction in manpower requirement: Developments in unmanned technology now
enables machines to perform tasks once undertaken by operators with equal if not better
precision. This direct substitution of manpower will lead to a corresponding reduction in
manpower needs.
Overcome fatigue and human error: Machines do not tire out as easily as men.
Operations that require constant alert or repetitive work over long durations are thus
potential areas where unmanned warfare can be profitably employed.
Minimize hazards: Risks to humans can be reduced as unmanned systems can take over
hazardous jobs previously done by human beings.
DEPARTMENT OF ECE, AEC. Page 2
WIRELESS WARFARE ROBOT
Cost savings: Besides manpower savings, there are also cost reductions in the form of
human cost (life) savings, training cost savings or even system cost savings as new
unmanned systems can enhance work flow and improve general work cycles.
Despite these advantages, there are several limitations which must be recognized and
reconciled. Some of the limitations include:
Decision making: Although unmanned systems are becoming increasingly sophisticated
and 'intelligent', it is still difficult to entrust machines with subjective decision making.
We must avoid careless delegation of responsibilities to technology that perform only
under programmed patterns.
Applicability: In certain areas and vocations, unmanned warfare acts merely as a catalyst
to facilitate achieving the ultimate goal. The claim that there is no victory until the
humble foot soldier occupies the objective is likely to remain valid for some time yet.
Diminution of esprit de corps: As manpower is increasingly scattered, we could witness
diminishing avenues for display of teamwork, leadership, valour and other human
qualities that make up a well trained and well-oiled armed force. This gradual 'erosion' of
values belonging to the profession of arms must be guarded against.
Department of Defense (DOD) Unmanned Ground Vehicles (UGV) save lives and
improve national defense capabilities by providing agencies of the Department of Defense
(DOD) with the control system architectures, advanced sensor systems, research services, and
standards to achieve autonomous mobility for unmanned ground vehicles.
1.3 UNMANNED GROUND VEHICLES (UGV)
Unmanned Ground Vehicles (UGV) are robotic platforms that are used as an extension of
human capability. This type of robot is generally capable of operating outdoors and over a wide
variety of terrain, functioning in place of humans.
DEPARTMENT OF ECE, AEC. Page 3
WIRELESS WARFARE ROBOT
UGVs have counterparts in aerial warfare (unmanned aerial vehicle) and naval warfare
(remotely operated underwater vehicles). Unmanned robotics is actively being developed for
both civilian and military use to perform dull, dirty, and dangerous activities. Some UGVs are
employed in War in Iraq.
There are two general classes of unmanned ground vehicles:
1. Tele-operated ones and
2. Autonomous ones.
An unmanned ground combat vehicle (UGCV) is an autonomous, all terrain unmanned
ground vehicle designed for combat.
1.3.1 TELE-OPERATED UGV:
A tele-operated UGV is a vehicle that is controlled by a human operator at a remote
location via a communications link. All cognitive processes are provided by the operator based
upon sensory feedback from either line-of-sight visual observation or remote sensory input such
as video cameras. A basic example of the principles of tele-operation would be a toy remote
control car. Each of the vehicles is unmanned and controlled at a distance via a wired or wireless
connection while the user provides all control based upon observed performance of the vehicle.
There are a wide variety of tele-operated UGVs in use today. Predominantly these
vehicles are used to replace humans in hazardous situations. Examples are warfare, explosives
and bomb disabling vehicles.
1.3.2 AUTONOMOUS UGV:
An autonomous UGV is essentially an autonomous robot but is specifically a vehicle that
operates on the surface of the ground.
DEPARTMENT OF ECE, AEC. Page 4
WIRELESS WARFARE ROBOT
A fully autonomous robot in the real world has the ability to:
Gain information about the environment.
Work for extended durations without human intervention.
Travel from point A to point B, without human navigation assistance.
Avoid situations that are harmful to people, property or itself, unless those are part of its
design specifications
Repair itself without outside assistance.
Detect objects of interest such as people and vehicles.
A robot may also be able to learn autonomously. Autonomous learning includes the ability
to:
Learn or gain new capabilities without outside assistance.
Adjust strategies based on the surroundings.
Adapt to surroundings without outside assistance.
Autonomous robots still require regular maintenance, as with all machines.
DEPARTMENT OF ECE, AEC. Page 5
WIRELESS WARFARE ROBOT
CHAPTER – 2
FUNCTIONAL DESCRIPTION
As mentioned in the introduction the unmanned warfare vehicles are either operated
autonomously or through tele-communications i.e., remote. The module constructed here is the
remote operated one. Through this remote the warfare vehicle is controlled to move in all
directions as well as firing of the gun. The remote is designed with control keys, micro-controller
and the RF transmitter. Out of these eight keys, four keys are used to control the warfare
vehicle’s direction i.e., to operate the in forward, backward, right and left directions. Two keys
are to switch ON and switch OFF the gun sound simulation IC that simulates that the bullets are
fired from the gun. Two keys are to adjust the gun direction upwards and downwards.
2.1 THE REMOTE CONTROL UNIT:
The remote control unit is nothing but the transmitter unit through which the warfare
vehicle is controlled. The main components present in this unit are the push buttons, micro
controller (89C2051), RF transmitter and a battery to provide power supply to all these
components. As mentioned earlier, a total of eight keys (push buttons) are used to control the
vehicle, and these are interfaced with the 89C2051 micro controller. Depending on the key
pressed, the controller generates a unique code which is fed to the RF transmitter for modulation.
The detailed explanation about the RF transmitter is provided below.
Radio frequency (RF) transmitters are widely used in radio frequency communications
system. With the increasing availability of efficient, low cost electronic modules, mobile
communication system are becoming more and more widespread.
DEPARTMENT OF ECE, AEC. Page 6
WIRELESS WARFARE ROBOT
A terminal apparatus used in the radio communications system receives a radio frequency
signal transmitted from a base station, by an antenna, inputs the signal to a receiving radio-
frequency unit via an antenna duplexer, high frequency amplifies the signal, removes
unnecessary waves outside the receiving band from the signal, converts the signal to an
intermediate frequency signal, demodulates the intermediate frequency signal by a demodulator,
and converts the signal into a base band signal.
Generally, a radio transmitter is used for performing a radio transmission operation,
whereby a high frequency signal is outputted from a modulator is transmitted to an antenna of
the radio transmitter and is transmitted there from to a remote radio transmitter thereby a signal
is transmitted.
The transmitting base band signal is subjected to a predetermined signal process, input to
a modulator, which modulates a carrier wave signal. The modulated carrier wave signal is
converted into a radio frequency by a transmitting radio-frequency circuit and amplified to a
predetermined transmitting power, and transmitted to the base station from the antenna via the
duplexer. Communication systems are known to support wireless and wire lined communications
between wireless and /or wire lined communication devices.
The function of a radio frequency (RF) transmitter is to modulate, up convert, and
amplify signals for transmission into free space. An RF transmitter generally includes a
modulator that modulates an input signal and a radio frequency power amplifier that is coupled
to the modulator to amplify the modulated input signal. The radio frequency power amplifier is
coupled to an antenna that transmits the amplified modulated input signal. Power amplifiers are
required in radio telecommunication system to amplify signals before transmitting, because a
radio signal attenuates on the radio path.
DEPARTMENT OF ECE, AEC. Page 7
WIRELESS WARFARE ROBOT
Fig. 2.1 Block Diagram of Vehicle Control Station
DEPARTMENT OF ECE, AEC. Page 8
WIRELESS WARFARE ROBOT
Fig. 2.2 Remote Control Circuit
2.1.1 Transmitter unit
For efficiently, the amplifier is often a non-linear amplifier operated near its peak
capacity. To avoid distortion of the transmitted signals due to the non-linearity, the signals are
pre-distorted by a pre-distorter before they are transmitted. The pre-distortion is required to
prevent transmitter from transmitting signals on channel bands other than the band assigned to
DEPARTMENT OF ECE, AEC. Page 9
WIRELESS WARFARE ROBOT
the transmitter. The pre-distortion values are chosen such that the product values entering the
power amplifier will be distorted by the power amplifier to return to a substantially linear
amplification of the modulated signals.
A direct conversion transmitter system to produce a transmission signal is generally
comprised of a low oscillator (LO), a phase locked loop (PLL), a quadarature generator, a
modulator, a power amplifier (PA), and one or more filters. The low oscillator, coupled to the
PLL, produces a signal with a frequency that is substantially equal to the frequency of a desired
RF transmission signal. The quadarature generator is coupled to the low oscillator and the
modulator.
The PA is coupled to the quadarature generator, and receives the transmission signal and
amplifies it. The amplified signal may go through a filter to reduce noise or spurious outputs
outside of the transmission band. High quality RF transmitters typically include band pass filters;
such as surface acoustic wave (SAW) filters provide excellent performance.
A typical system may employ a band pass filter following the power amplifier to reduce
undesired noise present at the antenna in different portion of RF spectrum to meet various
standards regulations and specifications.
Pin description of Transmitter
Pin 1: Ground (-5V)
Pin 2: input pin for data from encoder
Pin3: supply (+5V)
Pin4: pin for external RF antenna
DEPARTMENT OF ECE, AEC. Page 10
WIRELESS WARFARE ROBOT
Fig.2.3 Pin diagram of Transmitter
2.2 THE WARFARE VEHICLE UNIT
This unit consists of RF receiver, micro controller (89C51), H-bridge IC (L293D), relays,
gun sound simulator IC (UM3561), 3 DC motors and a battery for providing power supply to all
these devices.
Depending on the keys pressed from the remote, the data is modulated and transmitted by
the RF transmitter, which will be demodulated by the RF receiver present on the warfare vehicle
and is fed to the 89C51 micro controller. The controller decodes the data and takes the necessary
action depending on the program written in it. Thus whenever we find the enemies, through the
gun can target the point and fire. The vehicle movement can be controlled with the DC motors
that will be interfaced to the controller through the H-bridge IC L293D. By using this IC we will
be able to drive 2 DC motors and for the movement of the gun one more DC motor is used that
will be operated through the relays by the controller.
DEPARTMENT OF ECE, AEC. Page 11
WIRELESS WARFARE ROBOT
Fig. 2.4 Block Diagram of Warfare Vehicle
DEPARTMENT OF ECE, AEC. Page 12
WIRELESS WARFARE ROBOT
Fig.2.5 Receiver Circuit
2.2.1 Receiver Unit
DEPARTMENT OF ECE, AEC. Page 13
WIRELESS WARFARE ROBOT
Receivers for communication systems generally are designed such that they are tuned to
receive one of a multiplicity of signals having widely varying bandwidths and which may fall
within a particular frequency range.
The RF receiver receives an RF signal, converts the RF signal to an IF signal, and then
converts the IF signal to a base band signal, which it then provides to the base band processor.
As is also known, RF transceivers typically include sensitive components susceptible to noise
and interference with one another and with external sources.
The RF receiver is coupled to the antenna and includes a low noise amplifier, one or
more intermediate frequency stages, a filtering stage, and a data recovery stage. The low noise
amplifier receives an inbound RF signal via the antenna and amplifies it.
The one or more intermediate frequency stages mix the amplified RF signal with one or
more local oscillations to convert the amplified RF signal into a base band signal or an
intermediate frequency (IF) signal.
Fig.2.6 Pin diagram of receiver
DEPARTMENT OF ECE, AEC. Page 14
WIRELESS WARFARE ROBOT
Pin 1: ground (-5V)
Pin 2: output pin for digital data received
Pin 3: output pin for analog data received
Pin 4: supply (+5V)
Pin 6 & 7: ground (-5V)
Pin 8: pin for external RF Antenna
Fig.2.7 Receiver chip
2.2.2 L293D “H” BRIDGE
In this project, the dual H-bridge motor driver IC used is L293D. “The L293D is a
monolithic integrated, high voltage, high current, 4-channel driver”. The L293D supports two
DC motors. Pin 8 is voltage for the motors and pin 16 is the +5 voltage for the chip. So with one
IC we can interface two DC motors which can be controlled in both clockwise and counter
clockwise direction and if you have motor with fix direction of motion then we can make use of
all the four I/Os to connect up to four DC motors. First motor is connected between pin 3 and 6.
The motor is turned on by sending a high signal to both the enable (pin 1) pin and one of the two
direction pins, i.e. pin 2 or pin 7. To stop motor, the enable pin is high and both pin 2 and pin 7
are low. L293D has output current of 600mA and peak output current of 1.2A per channel.
DEPARTMENT OF ECE, AEC. Page 15
WIRELESS WARFARE ROBOT
Moreover for protection of circuit from back EMF output diodes are included within the IC. The
output supply (VCC2) has a wide range from 4.5V to 36V, which had made L293D a best choice
for DC motor driver.
Fig.2.8 DC Motor Control with H-Bridge
The same goes for the other side of the chip. When using two motors, the best practice is
to connect pins 2 and 15 togather and pin 7 and 10. above figure shows the control of the DC
motors with L293D and microcontroller signal.
Fig. 2.9. L293D H Bridge (Motor Driver)
DEPARTMENT OF ECE, AEC. Page 16
WIRELESS WARFARE ROBOT
Motor drivers are the simplest modules that provide power amplification for low-level
control singals like PWM and direction supplied by the user.
Depending on the input signals given from the remote, the controller decodes the
information and takes decisions appropriately. The DC motor is also to be rotated in the reverse
direction and by reversing the polarities, the motor rotates in the reverse direction that is done by
the controller through the H - Bridge IC.
2.2.3 DC Motor
Permanent magnet DC motor responds to both voltage and current. The steady state voltage
across a motor determines the motor’s running speed, and the current through its armature
windings determines the torque. Apply a voltage and the motor will start running in one
direction; reverse the polarity and the direction will be reversed. If you apply a load to the motor
shaft, it will draw more current, if the power supply does not able to provide enough current, the
voltage will drop and the speed of the motor will be reduced. However, if the power supply can
maintain voltage while supplying the current, the motor will run at the same speed. In general,
you can control the speed by applying the appropriate voltage, while torque is controlled by
current. In most cases, DC motors are powered up by using fixed DC power supply, therefore; it
is more efficient to use a chopping circuit.
Consider what happens when a voltage applied to a motor’s windings is rapidly turned
ON and OFF in such a way that the frequency of the pulses produced remains constant, but the
width of the ON pulse is varied. This is known as Pulse Width Modulation (PWM). Current only
flows through the motor during the ON portion of the PWM waveform. If the frequency of the
PWM input is high enough, the mechanical inertia of the motor cannot react to the ripple wave;
instead, the motor behaves as if the current were the DC average of the ripple wave. Therefore,
by changing the width of pulse, we can control the motor speed.
DC gear motors are configured in many types and sizes, including brushless and servo. A
DC gear motor consists of a rotor and a permanent magnetic field stator and an integral gearbox
or gear head. The magnetic field is maintained using either permanent magnets or
electromagnetic windings. DC motors are most commonly used in variable speed and torque
applications.
Motion and controls covers a wide range of components that in some way are used to
generate and/or control motion. Areas within this category include bearings and bushings,
clutches and brakes, controls and drives, drive components, encoders and resolvers, Integrated
motion control, limit switches, linear actuators, linear and rotary motion components, linear
position sensing, motors (both AC and DC motors), orientation position sensing, pneumatics and
pneumatic components, positioning stages, slides and guides, power transmission (mechanical),
seals, slip rings, solenoids, springs.
Motors are the devices that provide the actual speed and torque in a drive system. This
family includes AC motor types (single and multiphase motors, universal, servo motors,
induction, synchronous, and gear motor) and DC motors (brushless, servo motor, and gear
motor) as well as linear, stepper and air motors, and motor contactors and starters.
Permanent magnet DC motor responds to both voltage and current. The steady state
voltage across a motor determines the motor’s running speed, and the current through its
armature windings determines the torque. Apply a voltage and the motor will start running in one
direction; reverse the polarity and the direction will be reversed. If you apply a load to the motor
shaft, it will draw more current, if the power supply does not able to provide enough current, the
voltage will drop and the speed of the motor will be reduced. However, if the power supply can
maintain voltage while supplying the current, the motor will run at the same speed. In general,
you can control the speed by applying the appropriate voltage, while torque is controlled by
current. In most cases, DC motors are powered up by using fixed DC power supply, therefore; it
is more efficient to use a chopping circuit.
DEPARTMENT OF ECE, AEC. Page 34
WIRELESS WARFARE ROBOT
Consider what happens when a voltage applied to a motor’s windings is rapidly turned
ON and OFF in such a way that the frequency of the pulses produced remains constant, but the
width of the ON pulse is varied. This is known as Pulse Width Modulation (PWM). Current only
flows through the motor during the ON portion of the PWM waveform. If the frequency of the
PWM input is high enough, the mechanical inertia of the motor cannot react to the ripple wave;
instead, the motor behaves as if the current were the DC average of the ripple wave. Therefore,
by changing the width of pulse, we can control the motor speed.
5.1 Principles of operation
In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational
motion.
Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet
or winding with a "North" polarization, while green represents a magnet or winding with a
"South" polarization).
DEPARTMENT OF ECE, AEC. Page 35
WIRELESS WARFARE ROBOT
Fig. 5.1 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 magnets1. 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.
DEPARTMENT OF ECE, AEC. Page 36
WIRELESS WARFARE ROBOT
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. You can imagine
how with our example two-pole motor, if the rotor is exactly at the middle of its rotation
(perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole
motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes
touch both commutator contacts simultaneously). This would be bad for the power supply, waste
energy, and damage motor components as well. Yet another disadvantage of such a simple motor
is that it would exhibit a high amount of torque "ripple" (the amount of torque it could produce is
cyclic with the position of the rotor).
DEPARTMENT OF ECE, AEC. Page 37
WIRELESS WARFARE ROBOT
CHAPTER – 6
DESCRIPTION ABOUT MICROCONTROLLERS
A Micro controller consists of a powerful CPU tightly coupled with memory, various I/O
interfaces such as serial port, parallel port timer or counter, interrupt controller, data acquisition
interfaces-Analog to Digital converter, Digital to Analog converter, integrated on to a single
silicon chip. If a system is developed with a microprocessor, the designer has to go for external
memory such as RAM, ROM, EPROM and peripherals.
But controller is provided all these facilities on a single chip. Development of a Micro
controller reduces PCB size and cost of design. One of the major differences between a
Microprocessor and a Micro controller is that a controller often deals with bits not bytes as in the
real world application.
6.1 NECESSITY OF MICROCONTROLLERS
Microprocessors brought the concept of programmable devices and made many
applications of intelligent equipment. Most applications, which do not need large amount of data
and program memory, tended to be costly.
The microprocessor system had to satisfy the data and program requirements so;
sufficient RAM and ROM are used to satisfy most applications .The peripheral control
equipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the
design. Because of these additional peripherals cost will be comparatively high.
6.2 ADVANTAGES OF MICROCONTROLLERS
1. If system is developed with a microprocessor, the designer has to go for external memory such
as RAM, ROM or EPROM and peripherals and hence the size of PCB will be large enough to
hold all the required peripherals. But, the micro controller has got all this peripheral facility on a
DEPARTMENT OF ECE, AEC. Page 38
WIRELESS WARFARE ROBOT
single chip o development of a similar system with a micro controller reduces PCB size and cost
of the design.
2. One of the major differences between a micro controller and a microprocessor is that a
controller often deals with bits, not bytes as in the real world application, for example switch
contacts can only be open or close, indicators should be lit or dark and motors can be either
turned on or off and so forth.
Now we may be wondering about the non-mentioning of memory space meant for
the program storage, the most important part of any embedded controller. Originally this
8051 architecture was introduced with on-chip, ‘one time programmable’ version of
Program Memory of size 4K X 8.
Intel delivered all these microcontrollers (8051) with user’s program fused inside
the device. The memory portion was mapped at the lower end of the Program Memory
area. But, after getting devices, customers couldn’t change anything in their program
code, which was already made available inside during device fabrication.
6.3 FEATURES OF 8051 MICROCONTROLLER
The following are the features of 8051 micro controllers
1. Eight – bit CPU with registers
2. 16 – bit program counter and data pointer
3. 8 – bit program status word
4. 8 – bit stack pointer
5. Internal ROM or EPROM (4k)
6. Internal RAM of 128 bites
DEPARTMENT OF ECE, AEC. Page 39
WIRELESS WARFARE ROBOT
7. Four register banks, each containing eight registers
8. 16 bytes, which may be addressed at the bit level
9. 80 bytes of general purpose data memory
10. 32 input / output pins arranged as four 8 – bit ports
11. Two sixteen bit timer / counter
12. Full duplex serial data receiver / transmitter
13. Two external and three internal interrupt sources
14. Oscillator and clock circuits
15. Control registers
6.4 PIN DIAGRAM OF 89C51 MICROCONTROLLER
DEPARTMENT OF ECE, AEC. Page 40
WIRELESS WARFARE ROBOT
Fig. 6.1 Pin Diagram Of 89c51 Microcontroller
6.5 FUNCTIONAL BLOCK DIAGRAM OF MICROCONTROLLER
DEPARTMENT OF ECE, AEC. Page 41
WIRELESS WARFARE ROBOT
Fig. 6.2 Functional block diagram of micro controller
6.5.1 The 8051 Oscillator and Clock
The heart of the 8051 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 And XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 8051 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHz.
DEPARTMENT OF ECE, AEC. Page 42
WIRELESS WARFARE ROBOT
Fig. 6.3 Oscillator and timing circuit6.5.2 I/O Ports
One major feature of a microcontroller is the versatility built into the input/output (I/O)
circuits that connect the 8051 to the outside world. The main constraint that limits numerous
functions is the number of pins available in the 8051 circuit. The DIP had 40 pins and the
success of the design depends on the flexibility incorporated into use of these pins. For this
reason, 24 of the pins may each used for one of the two entirely different functions which
depend, first, on what is physically connected to it and, then, on what software programs are used
to “program” the pins.
Port 0
Port 0 pins may serve as inputs, outputs, or, when used together, as a bi directional low-
order address and data bus for external memory. To configure a pin as input, 1 must be written
into the corresponding port 0 latch by the program. When used for interfacing with the external
memory, the lower byte of address is first sent via PORT0, latched using Address latch enable
(ALE) pulse and then the bus is turned around to become the data bus for external memory.
Port 1
DEPARTMENT OF ECE, AEC. Page 43
WIRELESS WARFARE ROBOT
Port 1 is exclusively used for input/output operations. PORT 1 pins have no dual function.
When a pin is to be configured as input, 1 is to be written into the corresponding Port 1 latch.
Port 2
Port 2 maybe used as an input/output port. It may also be used to supply a high –order
address byte in conjunction with Port 0 low-order byte to address external memory. Port 2 pins
are momentarily changed by the address control signals when supplying the high byte a 16-bit
address. Port 2 latches remain stable when external memory is addressed, as they do not have to
be turned around (set to 1) for data input as in the case for Port 0.
Port 3
Port 3 may be used to input /output port. The input and output functions can be
programmed under the control of the P3 latches or under the control of various special function
registers. Unlike Port 0 and Port 2, which can have external addressing functions and change all
eight-port b se, each pin of port 3 maybe individually programmed to be used as I/O or as one of
the alternate functions. The Port 3 alternate uses are:
Port 3 Alternate Uses
Pin (SFR) Alternate Use
P3.0-RXD (SBUF) Serial data input
P3.1-TXD (SBUF) Serial data output
P3.2-INTO 0 (TCON.1) External interrupt 0
P3.3 - INTO 1 (TCON.3) External interrupt 1
P3.4 - T0 (TMOD) External Timer 0 input
P3.5 – T1 (TMOD) External timer 1 input
DEPARTMENT OF ECE, AEC. Page 44
WIRELESS WARFARE ROBOT
P3.6 - WR External memory write pulse
P3.7 - RD External memory read pulse
6.5.3 Memory unit
Memory is part of the micro controller whose function is to store data. The easiest way
to explain it is to describe it as one big closet with lots of drawers. If we suppose that we marked
the drawers in such a way that they cannot be confused, any of their contents will then be easily
accessible. It is enough to know the designation of the drawer and so we will know its contents
for sure.
Memory components are exactly like that. For a certain input we get the contents of a
certain addressed memory location and that’s all. Two new concepts are brought to us:
addressing and memory location. Memory consists of all memory locations, and addressing is
nothing but selecting one of them. This means that we need to select the desired memory
location on one hand, and on the other hand we need to wait for the contents of that location.
Besides reading from a memory location, memory must also provide for writing onto it.
Supplying an additional line called control line does this. We will designate this line as R/W
(read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite
is true then writing is done on the memory location. Memory is the first element, and we need a
few operation of our micro controller.
6.5.4 Central Processing Unit
Let add 3 more memory locations to a specific block that will have a built in capability to
multiply, divide, subtract, and move its contents from one memory location onto another. The
part we just added in is called “central processing unit” (CPU). Its memory locations are called
registers.
DEPARTMENT OF ECE, AEC. Page 45
WIRELESS WARFARE ROBOT
Registers are therefore memory locations whose role is to help with performing various
mathematical operations or any other operations with data wherever data can be found. Look at
the current situation. We have two independent entities (memory and CPU), which are
interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for
example, we wish to add the contents of two memory locations and return the result again back
to memory, we would need a connection between memory and CPU. Simply stated, we must
have some “way” through data goes from one block to another.
6.5.5 Program Status Word
The PSW register contains program status information as detailed in Table below: The
PSW consists of math flags, user program flag F0, and the register bank select bits that identify
which of the four general register banks is currently in use by the program.
6.5.6 Stack Pointer
The Stack Pointer register is 8 bits wide. It is incremented before data is stored during
PUSH and CALL executions. While the stack may reside anywhere in on-chip RAM, the Stack
Pointer is initialized to 07H after a reset. This causes the stack to begin at locations 08H.
6.5.7 Data Pointer:
The Data Pointer (DPTR) consists of a high byte (DPH) and a low byte (DPL). Its
intended function is to hold a 16-bit address. It may be manipulated as a 16-bit register or as two
independent 8-bit registers.
6.6 TIMERS AND COUNTERS
Timer 0 and Timer 1:
The “Timer” or “Counter” function is selected by control bits C/T in the Special Function
Register TMOD. These two Timer/Counters have four operating modes, which are selected by
DEPARTMENT OF ECE, AEC. Page 46
WIRELESS WARFARE ROBOT
bit-pairs (M1, M0). In TMOD Modes 0, 1, and 2 are the same for both Timers/Counters. Mode 3
is different. The four operating modes are described in the following text:
Mode 0:Timer, which is an 8-bit Counter with a divide-by-32 pre scalar. The Mode 0 operation as
it applies to Timer 1. In this mode, the Timer register is configured as a 13-bit register. As the
count rolls over from all 1s to all 0s, it sets the Timer interrupt flag TF1. The counted input is
enabled to the Timer when TR1 = 1 and either GATE = 0 or INT1 = 1. (Setting GATE = 1
allows the Timer to be controlled by Putting either Timer into Mode 0 makes it look like an 8048
external input INT1, to facilitate pulse width measurements). TR1 is a control bit in the Special
Function Register TCON (Figure 3).
GATE is in TMOD: The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits
of TL1. The upper 3 bits of TL1 are indeterminate and should be ignored. Setting the run flag
(TR1) does not clear the registers. Mode 0 operation is the same for the Timer 0 as for Timer 1.
Substitute TR0, TF0, and INT0 for the corresponding Timer 1 signals in Figure 2. There are two
different GATE bits, one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3).
Mode 1:
Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16
bits.
Mode 2:
Mode 2 configures the Timer register as an 8-bit Counter (TL1) with automatic reload,
as shown in Figure 4. Overflow from TL1 not only sets TF1, but also reloads TL1 with the
contents of TH1, which is preset by software. The reload leaves TH1 unchanged. Mode 2
operations are the same for Timer/Counter 0.
DEPARTMENT OF ECE, AEC. Page 47
WIRELESS WARFARE ROBOT
Mode 3:
Timer 1 in Mode 3 simply holds its count. The effect is the same as setting TR1 = 0.
Timer 0 in Mode 3 establishes TL0 and TH0 as two separate counters. The logic for Mode 3 on
Timer 0 is shown in Figure 5. TL0 uses the Timer 0 control bits: C/T, GATE, TR0, and TF0, as
well as the INT0 pin. TH0 is locked into a timer function (counting machine cycles) and takes
over the use of TR1 and TF1 from Timer 1. Thus, TH0 now controls the “Timer 1” interrupt.
Mode 3 is provided for applications requiring an extra 8-bit timer on the counter. With Timer 0
in Mode 3, an 80C51 can look like it has three Timer/Counters. When Timer 0 is in Mode 3,
Timer 1 can be turned on and off by switching it out of and into its own Mode 3, or can still be
used by the serial port as a baud rate generator, or in fact, in any application not requiring an
interrupt.
TCON and TMOD are the two registers used for setting the above modes. The format of
these registers is as shown in figure TMOD is dedicated solely to the timers and can be
considered to be two duplicate 4-bit registers, each of which controls the action of one of the
timers. TCON has control bits and flags for the timers in the upper nibble, and control bits and
flags for the external interrupts in the lower nibble.
6.7 INTERRUPTS:
Interrupts are hardware signals that are used to determine conditions that exist in external
and internal circuits. Any interrupt can cause the 8051 to perform a hardware call to an interrupt
–handling subroutine that is located at a predetermined absolute address in the program memory.
Five interrupts are provided in the 8051. Three of these are generated automatically by the
internal operations: Timer flag 0, Timer Flag 1, and the serial port interrupt (RI or TI) Two
DEPARTMENT OF ECE, AEC. Page 48
WIRELESS WARFARE ROBOT
interrupts are triggered by external signals provided by the circuitry that is connected to the pins
INTO 0 and INTO1. The interrupts maybe enable or disabled, given priority or otherwise
controlled by altering the bits in the Interrupt Enabled (IE) register, Interrupt Priority (IP)
register, and the Timer Control (TCON) register. . These interrupts are mask able i.e. they can be
disabled. Reset is a non maskable interrupt which has the highest priority. It is generated when a
high is applied to the reset pin. Upon reset, the registers are loaded with the default values.
Interrupts
Interrupt Address
RESET 0000
IE0 (External interrupt 0) 0003
TF0 (Timer 0 interrupt) 000B
IE1 (External interrupt 1) 0013
TF1 (Timer 1 interrupt) 001B
SERIAL 0023
DEPARTMENT OF ECE, AEC. Page 49
WIRELESS WARFARE ROBOT
DEPARTMENT OF ECE, AEC. Page 50
WIRELESS WARFARE ROBOT
CHAPTER –7
HARDWARE DETAILS
The IC’s and other important components used in this project work, procured from the
Hyderabad Electronics Market. The details or data sheets of the IC’s are down loaded from the
Internet. The following are the web sites that can be browsed for collecting the data sheets.
1. www. Texas Instruments.com
2. www. National semiconductors.com
3. www. Fairchild semiconductors.com
The following are the IC’s and other important components used in this project work
1. Atmel 89C2051 micro-controller
2. Atmel 89C51 micro-controller
3. L293D H – Bridge IC
4. UM3561 Gun sound simulator IC
5. 7805 Voltage Regulator
6. BC 547 NPN Transistor
The required PCB’S (Printed Circuit boards) for the project work fabricated by SUN
RISE CIRCUITS, Kushaiguda Industrial Estate, Hyderabad. Kushaiguda Industrial Estate is
very famous for fabricating the Industrial grade PCB’s
DEPARTMENT OF ECE, AEC. Page 51
WIRELESS WARFARE ROBOT
CHAPTER – 8
SOFWARE DETAILS Programming language- ASSEMBLY LANGUAGE PROGRAMMING,EMBEDDED C
Software Used-Keil µVisionSoftware Used To Dump-Proteus