Microcontroller Based Automatic Missile Detection and Destroy System
Microcontroller Based Automatic Missile Detection and Destroy System
CHAPTER-I: INTRODUCTION
1.1 Introduction
1.2 Abstract
1.3 Block Diagram proposal for the system
2.1 AT89S52
2.1.1 Introduction to AT89S52
2.1.2 Features
2.1.3 Architectural overview
2.1.4 Pin description for AT89S52
2.1.5 Memories
2.2 LCD
2.3 L293D (DRIVER MOTOR)
2.4 DC MOTOR
2.5 ULTRA SONIC SENSOR
2.6 STEPPER MOTOR
If an embedded system is designed well, the existence of the processor and software could
be completely unnoticed by the user of the device. Such is the case for a microwave oven, VCR, or
alarm clock. In some cases, it would even be possible to build an equivalent device that does not
contain the processor and software. This could be done by replacing the combination with a custom
integrated circuit that performs the same functions in hardware. However, a lot of flexibility is lost
when a design is hard-cooled in this way. It is much easier, and cheaper, to change a few lines of
software than to redesign a piece of custom hardware.
Application Areas
Nearly 99 per cent of the processors manufactured end up in embedded systems. The
embedded system market is one of the highest growth areas as these systems are used in very
market segment- consumer electronics, office automation, industrial automation, biomedical
engineering, wireless communication, data communication, telecommunications, transportation,
military and so on.
Consumer appliances:
At home we use a number of embedded systems which include digital camera, digital
diary, DVD player, electronic toys, microwave oven, remote controls for TV and air-conditioner,
VCO player, video game consoles, video recorders etc. Today’s high-tech car has about 20
embedded systems for transmission control, engine spark control, air-conditioning, navigation etc.
Even wristwatches are now becoming embedded systems. The palmtops are powerful embedded
systems using which we can carry out many general-purpose tasks such as playing games and word
processing.
Office automation:
The office automation products using embedded systems are copying machine, fax machine,
key telephone, modem, printer, scanner etc.
Industrial automation:
Today a lot of industries use embedded systems for process control. These include
pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and
transmission. The embedded systems for industrial use are designed to carry out specific tasks such
as monitoring the temperature, pressure, humidity, voltage, current etc., and then take appropriate
action based on the monitored levels to control other devices or to send information to a centralized
monitoring station. In hazardous industrial environment, where human presence has to be avoided,
robots are used, which are programmed to do specific jobs. The robots are now becoming very
powerful and carry out many interesting and complicated tasks such as hardware assembly.
Medical electronics
Almost every medical equipment in the hospital is an embedded system. These equipments
include diagnostic aids such as ECG, EEG, blood pressure measuring devices, X-ray scanners;
equipment used in blood analysis, radiation, colonscopy, endoscopy etc. Developments in medical
electronics have paved way for more accurate diagnosis of diseases.
Computer networking:
Computer networking products such as bridges, routers, Integrated Services Digital
Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches are
embedded systems which implement the necessary data communication protocols. For example, a
router interconnects two networks. The two networks may be running different protocol stacks. The
router’s function is to obtain the data packets from incoming pores, analyze the packets and send
them towards the destination after doing necessary protocol conversion. Most networking
equipments, other than the end systems (desktop computers) we use to access the networks, are
embedded systems.
Telecommunications:
In the field of telecommunications, the embedded systems can be categorized as subscriber
terminals and network equipment. The subscriber terminals such as key telephones, ISDN phones,
terminal adapters, web cameras are embedded systems. The network equipment includes
multiplexers, multiple access systems, Packet Assemblers Dissemblers (PADs), sate11ite modems
etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded systems that provide very low-
cost voice communication over the Internet.
Wireless technologies
`Advances in mobile communications are paving way for many interesting applications
using embedded systems. The mobile phone is one of the marvels of the last decade of the 20’h
century. It is a very powerful embedded system that provides voice communication while we are on
the move. The Personal Digital Assistants and the palmtops can now be used to access multimedia
services over the Internet. Mobile communication infrastructure such as base station controllers,
mobile switching centers are also powerful embedded systems.
Security
Security of persons and information has always been a major issue. We need to protect our
homes and offices; and also the information we transmit and store. Developing embedded systems
for security applications is one of the most lucrative businesses nowadays. Security devices at
homes, offices, airports etc. for authentication and verification are embedded systems. Encryption
devices are nearly 99 per cent of the processors that are manufactured end up in~ embedded
systems. Embedded systems find applications in . every industrial segment- consumer electronics,
transportation, avionics, biomedical engineering, manufacturing, process control and industrial
automation, data communication, telecommunication, defense, security etc. Used to encrypt the
data/voice being transmitted on communication links such as telephone lines. Biometric systems
using fingerprint and face recognition are now being extensively used for user authentication in
banking applications as well as for access control in high security buildings.
Finance
Financial dealing through cash and cheques are now slowly paving way for transactions
using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money)
machines. Smart card, of the size of a credit card, has a small micro-controller and memory; and it
interacts with the smart card reader! ATM machine and acts as an electronic wallet. Smart card
technology has the capability of ushering in a cashless society. Well, the list goes on. It is no
exaggeration to say that eyes wherever you go, you can see, or at least feel, the work of an
embedded system!
What are microcontrollers and what are they used for?
Like all good things, this powerful component is basically very simple. It is made by mixing
tested and high- quality “ingredients” (components) as per following receipt:
1. The simplest computer processor is used as the “brain” of the future system.
2. Depending on the taste of the manufacturer, a bit of memory, a few A/D converters, timers,
input/output lines etc. are added
3. All that is placed in some of the standard packages.
4. A simple software able to control it all and which everyone can easily learn about has been
developed.
On the basis of these rules, numerous types of microcontrollers were designed and they
quickly became man’s invisible companion. Their incredible simplicity and flexibility conquered us
a long time ago and if you try to invent something about them, you should know that you are
probably late, someone before you has either done it or at least has tried to do it.
The following things have had a crucial influence on development and success of the
microcontrollers:
Powerful and carefully chosen electronics embedded in the microcontrollers can illiseconds or
via input/output devices (switches, push buttons, sensors, LCD displays, relays etc.), control
various processes and devices such as industrial automation, electric current, temperature,
engine performance etc.
Very low prices enable them to be embedded in such devices in which, until recent time it was
not worthwhile to embed anything. Thanks to that, the world is overwhelmed today with cheap
automatic devices and various “smart” appliances.
Prior knowledge is hardly needed for programming. It is sufficient to have a PC (software in use
is not demanding at all and is easy to learn) and a simple device (called the programmer) used
for “loading” raedy-to-use programs into the microcontroller.
1.2 Abstract
This project is to design and construct automatic missile detection and destroying system.
The system is designed to detect the target (missile) moving in multiple directions. The destroying
system moves automatically in the direction of missile and fires it upon fixing the target. This
system consists of a SONAR based object tracking system that continuously monitors the target.
Upon detecting the target it sends the target's location to a Central Control System. The Central
Control System takes the action of moving the firing mechanism in the direction of target missile.
Upon fixing the direction, it sends the control command to firing system to attack the target.
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 of the three microcontrollers, 8051 is the most preferable. Microcontroller supports both
serial and parallel communication.
In the concerned project 8052 microcontroller is used. Here microcontroller used is
AT89S52, which is manufactured by ATMEL laboratories. The 8051 is the name of a big family of
microcontrollers. The device which we are going to use along this tutorial is the 'AT89S52' which is
a typical 8051 microcontroller manufactured by Atmel™. Note that this part doesn't aim to explain
the functioning of the different components of AT89S52 microcontroller, but rather to give you a
general idea of the organization of the chip and the available features, which shall be explained in
detail along this tutorial.
The block diagram provided by Atmel™ in their datasheet showing the architecture the
89S52 device can seem very complicated, and since we are going to use the C high level language
to program it, a simpler architecture can be represented as the figure 1.2.A.
This figures shows the main features and components that the designer can interact with.
You can notice that the 89S52 has 4 different ports, each one having 8 Input/output lines providing
a total of 32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to
read the state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning
that they can be used for two different functions: the fist one is to perform input/output operations
and the second one is used to implement special features of the microcontroller like counting
external pulses, interrupting the execution of the program according to external events, performing
serial data transfer or connecting the chip to a computer to update the software.
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.
An Address latch for separating address from multiplex address and data.32-KB RAM and 32-
KB ROM to be able to satisfy most applications. As also Timer / Counter, Parallel programmable
port, Serial port, and Interrupt controller are needed for its efficient applications.
In comparison a typical Micro controller 8051 chip has all that the 8051 board has except a
reduced memory as follows.
4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.
Slower Development time: As we have observed Microprocessors need a lot of debugging
at board level and at program level, where as, Micro controller do not have the excessive circuitry
and the built-in peripheral chips are easier to program for operation.
So peripheral devices like Timer/Counter, Parallel programmable port, Serial
Communication Port, Interrupt controller and so on, which were most often used were integrated
with the Microprocessor to present the Micro controller .RAM and ROM also were integrated in the
same chip. The ROM size was anything from 256 bytes to 32Kb or more. RAM was optimized to
minimum of 64 bytes to 256 bytes or more.
Introduction to AT89S52
The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit
micro controllers or microprocessors. Systems using these may be earlier to implement due to large
number of internal features. They are also faster and more reliable but, the above application is
satisfactorily served by 8-bit micro controller. Using an inexpensive 8-bit Microcontroller will
doom the 32-bit product failure in any competitive market place. Coming to the question of why to
use 89S52 of all the 8-bit Microcontroller available in the market the main answer would be
because it has 8kB Flash and 256 bytes of data RAM32 I/O lines, three 16-bit timer/counters, a
Eight-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 contents but freezes the oscillator, disabling all other chip
functions until the next hardware reset. The Flash program memory supports both parallel
programming and in Serial In-System Programming (ISP). The 89S52 is also In-Application
Programmable (IAP), allowing the Flash program memory to be reconfigured even while the
application is running.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a
powerful microcomputer which provides a highly flexible and cost effective solution to many
embedded control applications.
FEATURES
Compatible with MCS-51 Products
8K Bytes of In-System Reprogrammable Flash Memory
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
Programmable Serial Channel
Low-power Idle and Power-down Modes
4.0V to 5.5V Operating Range
Full Duplex UART Serial Channel
Interrupt Recovery from Power-down Mode
Watchdog Timer
Dual Data Pointer
Power-off Flag
Fast Programming Time
Flexible ISP Programming (Byte and Page Mode)
PIN DIAGRAM
PIN DIAGRAM OF 89S52 IC
2.1.4 PIN DESCRIPTION
Pin Description
VCC
Supply voltage.
GND
Ground.
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.
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
pullups 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 pullups. 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 shown in the following table. Port 1 also receives the low-order
address bytes during Flash programming and verification.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups 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 pullups. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data memory
that use 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.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pullups. 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.
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. 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.
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.
FIG-3 Functional block diagram of micro controller
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.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
The 8052 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.
b) B registers (0F0h)
The B register is very similar to accumulator. It may hold 8-bit value. The b register is only used by
MUL AB and DIV AB instructions. In MUL AB the higher byte of the product gets stored in B
register. In div AB the quotient gets stored in B with the remainder in A.
a) Stack pointer (81h)
The stack pointer holds 8-bit value. This is used to indicate where the next value to be
removed from the stack should be taken from. When a value is to be pushed onto the stack, the
8052 first store the value of SP and then store the value at the resulting memory location. When a
value is to be popped from the stack, the 8052 returns the value from the memory location indicated
by SP and then decrements the value of SP.
d) Data pointer
The SFRs DPL and DPH work together work together to represent a 16-bit value called the
data pointer. The data pointer is used in operations regarding external RAM and some instructions
code memory. It is a 16-bit SFR and also an addressable SFR.
e) Program counter
The program counter is a 16 bit register, which contains the 2 byte address, which tells the
8052 where the next instruction to execute to be found in memory. When the 8052 is initialized PC
starts at 0000h. And is incremented each time an instruction is executes. It is not addressable SFR.
f) PCON (power control, 87h)
The power control SFR is used to control the 8051’s power control modes. Certain operation
modes of the 8051 allow the 8051 to go into a type of “sleep mode” which consumes much lee
power.
g) TCON (timer control, 88h)
The timer control SFR is used to configure and modify the way in which the 8051’s two
timers operate. This SFR controls whether each of the two timers is running or stopped and contains
a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are
located in TCON SFR. These bits are used to configure the way in which the external interrupt flags
are activated, which are set when an external interrupt occurs.
2.2 LCD
To display interactive messages we're using LCD Module. We take a look at an smart LCD
show of lines, sixteen characters in keeping with line this is interfaced to the controllers. The
protocol (handshaking) for the display is as proven. Whereas D0 to D7th bit is the Data strains, RS,
RW and EN pins are the control pins and last pins are +5V, -5V and GND to offer supply. Where
RS is the Register Select, RW is the Read Write and EN is the Enable pin.
The display consists of internal byte-wide registers, one for instructions (RS=zero) and the
second for characters to be displayed (RS=1). It additionally includes a user-programmed RAM
vicinity (the man or woman RAM) that may be programmed to generate any favored character that
can be fashioned the usage of a dot matrix. To distinguish among these two facts regions, the hex
command byte 80 could be used to indicate that the display RAM deal with 00h can be
selected.Port1 is used to grant the command or statistics type, and ports 3.2 to3.4 provide register
pick and study/write ranges.
The show takes various quantities of time to perform the features as listed. LCD bit 7 is
monitored for common sense high (busy) to ensure the display is overwritten.
Liquid Crystal Display also called as LCD may be very useful in offering user interface in addition
to for debugging purpose. The most not unusual sort of LCD controller is HITACHI 44780 which
provides a easy interface between the controller & an LCD. These LCD's are quite simple to
interface with the controller as well as are price effective.
2.3 L293D
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either
direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any
direction. It means that you can control two DC motor with a single L293D IC. Dual H-
bridge Motor Driver integrated circuit (IC).
The l293d can drive small and quiet big motors as well, check the Voltage Specification at
the end of this page for more info.
Concept
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be
flown in either direction. As you know voltage need to change its direction for being able to rotate
the motor in clockwise or anticlockwise direction, Hence H-bridge IC are ideal for driving a DC
motor.
In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate two dc
motor independently. Due its size it is very much used in robotic application for controlling DC
motors. Given below is the pin diagram of a L293D motor controller.
There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the
pin 1 and 9 need to be high. For driving the motor with left H-bridge you need to enable pin 1 to
high. And for right H-Bridge you need to make the pin 9 to high. If anyone of the either pin1 or
pin9 goes low then the motor in the corresponding section will suspend working. It’s like a switch.
Voltage Specification
VCC is the voltage that it needs for its own internal operation 5v; L293D will not use this
voltage for driving the motor. For driving the motors it has a separate provision to provide motor
supply VSS (V supply). L293d will use this to drive the motor. It means if you want to operate a
motor at 9V then you need to provide a Supply of 9V across VSS Motor supply. The maximum
voltage for VSS motor supply is 36V. It can supply a max current of 600mA per channel. Since it
can drive motors Up to 36v hence you can drive pretty big motors with this l293d.
2.4 DC MOTOR
DC motors are configured in many types and sizes, including brush less, servo, and gear
motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic
field is maintained using either permanent magnets or electromagnetic windings. DC motors are
most commonly used in variable speed and torque.
Motion and controls cover 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 resolves, 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 (brush less, servo motor, and
gear motor) as well as linear, stepper and air motors, and motor contactors and starters.
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).
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, and 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. 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).
2.5 ULTRA SONIC SENSOR
An ultrasonic sensor is an electronic device that measures the distance of a target object by
emitting ultrasonic sound waves and converts the reflected sound into an electrical
signal. Ultrasonic waves travel faster than the speed of audible sound (i.e. the sound that humans
can hear).
Ultrasonic sensors have two main components: the transmitter (which emits the sound using
piezoelectric crystals) and the receiver (which encounters the sound after it has traveled to and from
the target).
To calculate the distance between the sensor and the object, the sensor measures the time it takes
between the emission of the sound by the transmitter to its contact with the receiver. The formula
for this calculation is D = ½ T x C (where D is the distance, T is the time, and C is the speed of
sound ~ 343 meters/second).
Brushed DC motors rotate continuously when DC voltage is applied to their terminals. The stepper
motor is known for its property of converting a train of input pulses (typically square waves) into a
precisely defined increment in the shaft’s rotational position. Each pulse rotates the shaft through a
fixed angle.
Stepper motors effectively have multiple "toothed" electromagnets arranged as a stator around a
central rotor, a gear-shaped piece of iron. The electromagnets are energized by an external driver
circuit or a micro controller. To make the motor shaft turn, first, one electromagnet is given power,
which magnetically attracts the gear's teeth. When the gear's teeth are aligned to the first
electromagnet, they are slightly offset from the next electromagnet. This means that when the next
electromagnet is turned on and the first is turned off, the gear rotates slightly to align with the next
one. From there the process is repeated. Each of the partial rotations is called a "step", with
an integer number of steps making a full rotation. In that way, the motor can be turned by a precise
angle.
The circular arrangement of electromagnets is divided into groups, each group called a phase, and
there is an equal number of electromagnets per group. The number of groups is chosen by the
designer of the stepper motor. The electromagnets of each group are interleaved with the
electromagnets of other groups to form a uniform pattern of arrangement. For example, if the
stepper motor has two groups identified as A or B, and ten electromagnets in total, then the
grouping pattern would be ABABABABAB.
Electromagnets within the same group are all energized together. Because of this, stepper motors
with more phases typically have more wires (or leads) to control the motor.
Chapter-3
CIRCUIT DIAGRAM
3.1 Circuit diagram
6.1 Conclusion
The project has been successfully designed and tested. Integrating features of all the
hardware components used have developed it. Presence of every module has been reasoned out and
placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced
IC’s and with the help of growing technology the project has been successfully implemented