Sie sind auf Seite 1von 54

AUTO- PATH FINDER

&
OBSTACLE DETECTOR

The project chosen by us does simple obstacle


detection and avoidance. Moreover it would be able to
maneuver around and avoid obstacles by being
programmed. Our robot is capable of moving forward,
backward, turn left and turn right over level surfaces.
Due to complexity of the project our project was
divided into modules which will be built over time and
then assembled together to built the whole system.
Each system will be built independently and tested
before being put to use.
A robot is made up of the very same components. A
typical

robot

has

movable

physical structure, a motor of some sort, a sensor


system, a power supply and a computer "brain" that
controls all of these elements. Essentially, robots are

man-made versions of animal life -- they are machines


that replicate human and animal behavior.
In this project, we'll explore the basic concept of
robotics and find out how robots do what they do.
Joseph Engelberger, a pioneer in industrial robotics,
once remarked
"I can't define a robot, but I know one when I see one."
If you consider all the different machines people call
robots, you can see that it's nearly impossible to come
up with a comprehensive definition. Everybody has a
different idea of what constitutes a robot.

OBJECTIVE OF PROJECT
The primary design criteria for this robot were as
follows:
2

Minimal cost
Incorporate already owned components
Use cheap and easily worked materials

for

platforms
Minimize weight to make use of cheaper servos
Solid design and construction
Able to be implemented in stages
Modular design
Room for expansion

BLOCK DIAGRAM OF PROJECT

BRIEF DESCRIPTION
4

The above block diagram is explained in brief as


follows:
1.

A voltage regulator to supply regulated voltage to


the rover.

2.

A double motor drive to drive two small electric


motors forward/reverse/full stop.

3.

One infrared emitter and receiver to sense objects.

4.

Two infrared sensors side by side detect the path.

5.

The black strip absorbed the rays to process the


signal that path is there. So the robot will
automatically detect the path and should not
diverge from the Road. This is the practical
implementation of the Rover.

6.

A "brain" which is a 89c2051 Controller which will


drive the motors in reaction to the sensor readings.

CIRCUIT DIAGRAM OF PROJECT


5

Fig. Complete Circuit

DESCRIPTION OF CIRCUIT
In this project we use IC 89C2051 microcontroller as a
main processor. IC 89C2051 is a 20 pin microcontroller.
This IC is a 20 pin version of 40 pin main ATMEL IC
89C51 microcontroller. We program this IC with the help
of computer. Software is written in the assembly
language and then transfer into the blank IC with the
help of programmer kit. The robot is a small three wheel
robot that avoids obstacles which it senses with its
active infrared sensors. Each rear wheel has its own
motor; the single front wheel is not powered. The robot
steers "like a tank" by rotating the rear wheels in
opposite direction.
The

sensors

are

built

with

infrared

LEDs

and

photodiode receiving components. When the infrared


light from the LEDs is reflected by an object, one of the
receiver modules will be triggered, and the 89C2051
Controller will steer the ROBOT away from the objects
by reversing one of the motors.

COMPONENT-DESCRIPTION
Details of IC 4049
The MC14049B Hex Inverter/Buffer and MC14050B Non
inverting Hex Buffer are constructed with MOS P
Channel and NChannel enhancement mode devices in
a single monolithic structure. These complementary
MOS devices find primary use where low power
dissipation and/or high noise immunity is desired.
These devices provide logic level conversion using only
one supply voltage, VDD. The inputsignal high level
(VIH) can exceed the VDD supply voltage for logic level
conversions. Two TTL/DTL loads can be driven when
the devices are used as a CMOStoTTL/DTL converter
(VDD = 5.0 V, VOL _ 0.4 V, IOL 3.2 mA). Note that pins 13
and 16 are not connected internally on these devices;
consequently connections to these terminals will not
affect circuit operation.
a)

High Source and Sink Currents


9

b)
c)

HightoLow Level Converter


Supply Voltage Range = 3.0 V to 18 V can exceed

VDD

INFRARED SENSORS

In the schematic below, Infra red signal is reflected from


any surface (other than black). The signal is processed
and the microcontroller directly starts the motor or stop
the motor as per the program .The LED's and the
receiver point in the same direction.

To prevent false detections, the receivers must be


shielded from the LEDS by a small aluminum plate
which is glued in between as in the drawing below:

10

Fig: Infrared Sensors

Object Detection
Detecting objects without whiskers doesnt require
anything as sophisticated as machine vision. Some
robots use RADAR or SONAR (sometimes called
SODAR when used in air instead of water). An even
simpler system is to use infrared light to illuminate the
robots path and determine when the light reflects off an
object. The IR illuminators and detectors are readily
available and inexpensive.

Infrared as Headlights
The infrared object detection system well build on the
robot is like a cars headlights in several respects.
When the light from a cars headlights reflects off

11

obstacles, your eyes detect the obstacles and your


brain processes them and makes your body guide the
car accordingly. We will be using infrared LEDs for
headlights. They emit infrared, and in some cases, the
infrared reflects off objects and bounces back in the
direction of the robot. The eyes of the robot are the
infrared detectors. The infrared detectors send signals
to the Microcontroller indicating whether or not they
detect infrared reflected off an object. The brain of the
robot,

the

microcontroller

makes

decisions

and

operates the motors based on this sensor input.

More about IR - Detector


The IR detectors have built-in optical filters that allow
very little light except the 980 nm infrared that we want
to detect onto its internal photodiode sensor. The
infrared detector also has an electronic filter that only
allows signals around 38.5 kHz to pass through. In other
words, the detector is only looking for infrared thats
flashing on and off 38,500 times per second.
This prevents common IR interference sources such as
sunlight and indoor lighting. Sunlight is DC interference
(0 Hz), and indoor lighting tends to flash on and off at

12

either 100 or 120 Hz, depending on the main power


source in the region where you reside. Since 120 Hz is
way outside the electronic filters 38.5 kHz band pass
frequency, it is, for all practical purposes, completely
ignored by the IR detectors.
As the receiver detects only modulated signals we need
to have our IR LEDs modulated in 36 KHz to 40 KHz. We
can use 555 timers to make this 40 KHz pulse. The
simple circuit is given below. This circuit oscillates two
infrared LED's at 40 khz. We can use this as our
transmitter.

Fig: Receiver
Pin 1 is ground: Pin 2 is Vcc: Pin 3 is Data Pin gives
logic 0 when ever it detects IR Pulse

IC SERIES 78XX

13

The LM78xx series of devices is a family of selfcontained fixed linear voltage regulator integrated
circuits. The 78xx family is a very popular choice for
many electronic circuits which require a regulated
power supply, due to their ease of use and relative
cheapness. When specifying individual ICs within this
family, the xx is replaced with a two-digit number, which
indicates the output voltage the particular device is
designed to provide (for example, the 7805 has a 5 volt
output, while the 7812 produces 12 volts). The 78xx line
are positive voltage regulators, meaning that they are
designed to produce a voltage that is positive relative to
a common ground. There is a related line of 79xx
devices which are complementary negative voltage
regulators. 78xx and 79xx ICs can be used in
combination to provide both positive and negative
supply voltages in the same circuit, if necessary.
These devices typically support an input voltage which
can be anywhere from a couple of volts over the
intended output voltage, up to a maximum of 35 or 40
volts, and can typically provide up to around 1 or 1.5
amps of current.

14

Fig: Some 78xx series IC


There are many types of regulator IC and each type will
have different pin-outs and will need to be connected up
slightly differently. Therefore, this article will only look
at one of the common ranges of regulator, the 78xx
series.
There are seven regulators in the 78xx series, and each
can pass up to 1A to any connected circuit. There are
also regulators with similar type numbers that can pass
a higher or lower current, as shown in the table below.
Type
Number
78L05
78L12
78L15

Regulation
Voltage
+5V
+12V
+15V

Maximum
Current
0.1A
0.1A
0.1A

Minimum
Input Voltage
+7V
+14.5V
+17.5V

78M05
78M12

+5V
+12V

0.5A
0.5A

+7V
+14.5V

15

78M15

+15V

0.5A

+17.5V

7805
7806
7808

+5V
+6V
+8V

1A
1A
1A

+7V
+8V
+10.5V

Ripple Voltage
If you are using a regulator after the smoothing block of
the power supply, then you shouldn't need to worry
about the ripple voltage, since the whole point of using
a regulator is to get a stable, accurate, known voltage
for your circuits! However, if the ripple voltage is too
large and the input voltage to the regulator falls below
the regulated voltage of the regulator, then of course the
regulator will not be able to produce the correct
regulated voltage. In fact, the input voltage to a
regulator should usually be at least 2V above the
regulated voltage. In our power supply circuit, the input
to the 7805 regulator is around 12V, and the regulation
voltage is 5V, so there is plenty of headroom. The
maximum input voltage to any 78xx regulator is 30V.

78xx Pin-out
The 78xx, 78Mxx, and 78Sxx regulators all have the pinout shown in the left of figure 1 and are normally
supplied in a case style known as TO-220. The 78Lxx
series, shown in the right of figure 1, also has the same
pin-out but has a case style known as TO-92. They are
all connected to the rest of the power supply in the
same way, as shown in figure 2.

16

Optocouplers
We program the microcontroller so that microcontroller
monitor the input signal from the sensors when any
sensor reflect the rays then circuit acknowledge the
signal and due to that microcontroller changes its
output as per the program. In this program we take a
output from the IC.
We use a sinking logic of the circuit. Output from the
microcontroller is further connected to the optocoupler
circuit.
Optocoupler provide an optical isolation between the
microcontroller circuit and motor driver circuit. Here in

17

this project we use IC PC817 as an optocoupler to


provide a electrical isolation between processor and
motor driver circuit.
Output of the optocoupler is connected to the inverter
cum buffer circuit. Here in this project we use IC 4049 as
a inverter cum buffer circuit. IC 4049 is a hex buffer
circuit. Here in this project we use total 4 inverter of the
IC 4049. Output of the inverter is further connected to
the motor drive circuit. In this project we use H bridge
circuit to control the motion of the dc motor.

18

Figure 10: IC PC817

Microcontrollers(AT89C2051)

19

Look around. Notice the smart intelligent systems?


Be it the T.V, washing machines, video games,
telephones, automobiles, aero planes, power systems,
or any application having a LED or a LCD as a user
interface, the control is likely to be in the hands of a
micro controller! Measure and control, thats where the
micro controller is at its best. Micro controllers are here
to stay. Going by the current trend, it is obvious that
micro controllers will be playing bigger and bigger roles
in the different activities of our lives. So where does this
scenario leave us? Think about it
What

is

the

primary

difference

between

microprocessor and a micro controller? Unlike the


microprocessor, the micro controller can be considered
to be a true Computer on a chip .In addition to the
various features like the ALU, PC, SP and registers
found on a microprocessor, the micro controller also
incorporates features like the ROM, RAM, Ports, timers,
clock circuits, counters, reset functions etc. While the
microprocessor is more a general-purpose device, used
for read, write and calculations on data, the micro
controller, in addition to the above functions also
controls the environment.
20

Bits and Bytes


Before starting on the 8051, here is a quick run through
on the bits and bytes. The basic unit of data for a
computer is a bit. Four bits make a nibble. Eight bits or
two nibbles make a byte. Sixteen bits or four nibbles or
two

bytes

make

word.

1024 bytes make a kilobyte or 1KB , and 1024 KB make a


Mega Byte or 1MB. Thus when we talk of an 8-bit
register, we mean the register is capable of holding data
of 8 bits only.

The 8051
ROM, x=7, indicates EPROM and x=9 indicates EEPROM
or Flash. The 8051 developed and launched in the early
80`s, is one of the most popular micro controller in use
today. It has a reasonably large amount of built in ROM
and RAM. In addition it has the ability to access external
memory.
The generic term `8x51` is used to define the device. The
value of x defining the kind of ROM, i.e. x=0, indicates
21

none,

x=3,

indicates

mask.

Block

diagram

of

microcontroller is shown on next page.

Fig. block diagram of micro controller


22

A Note on ROM
The early 8051, namely the 8031 was designed without
any ROM. This device could run only with external
memory connected to it. Subsequent developments lead
to the development of the PROM or the programmable
ROM. This type had the disadvantage of being highly
unreliable. The next in line, was the EPROM or Erasable
Programmable ROM. These devices used ultraviolet
light erasable memory cells. Thus a program could be
loaded, tested and erased using ultra violet rays. A new
program could then be loaded again. An improved
EPROM was the EEPROM or the electrically erasable
PROM. This does not require ultra violet rays, and
memory can be cleared using circuits within the chip
itself.
Finally there is the FLASH, which is an improvement
over the EEPROM. While the terms EEPROM and flash
are sometimes used interchangeably, the difference lies
in the fact that flash erases the complete memory at one

23

stroke, and not act on the individual cells. This results


in reducing the time for erasure.

Understanding the basic features of 8051


core
Lets now move on to a practical example. We shall
work on a simple practical application and using the
example as a base, shall explore the various features of
the

8051

microcontroller.

Consider an electric circuit as follows,

The positive side (+ve) of the battery is connected to


one side of a switch. The other side of the switch is
connected to a bulb or LED (Light Emitting Diode). The
bulb is then connected to a resistor, and the other end
of the resistor is connected to the negative (-ve) side of

24

the battery. When the switch is closed or switched on


the bulb glows. When the switch is open or switched
off the bulb goes off. If you are instructed to put the
switch on and off every 30 seconds, how would you do
it? Obviously you would keep looking at your watch and
every time the second hand crosses 30 seconds you
would keep turning the switch on and off. Imagine if you
had to do this action consistently for a full day. Do you
think you would be able to do it? Now if you had to do
this for a month, a year?? No way, you would say! The
next step would be, then to make it automatic. This is
where we use the Microcontroller. But if the action has
to

take

place

every

30

seconds,

how

will

the

microcontroller keep track of time?

What are Crystal Oscillators


Crystal oscillators are oscillators where the primary
frequency determining element is a quartz crystal.
Because of the inherent characteristics of the quartz
crystal the crystal oscillator may be held to extreme
accuracy

of

frequency

stability.

Temperature

compensation may be applied to crystal oscillators to


improve the thermal stability of the crystal oscillator.
25

Crystal

oscillators

are

usually

fixed

frequency

oscillators where stability and accuracy are the primary


considerations. The frequency of the crystals used can
be improved by crystal grinding.
It is almost impossible to design a stable and accurate
LC

oscillator

for

the

higher

frequencies

without

resorting to some sort of crystal control.

Oscillator Characteristics
XTAL1 and XTAL2 are the input and output respectively,
of an inverting amplifier which can be configured for
use as an on-chip oscillator, as shown in Figure 1.
Either a quartz crystal or ceramic resonator may be
used. To drive the device from an external clock source,
XTAL2 should be left unconnected while XTAL1 is
driven as shown in Figure 2. There are no requirements
on the duty cycle of the external clock signal, since the
input to the internal clocking circuitry is through a
divide-by-two flip-flop, but minimum and maximum
voltage high and low time specifications must be
observed.

26

27

Fig: Oscillator Connections Notes: C1, C2 = 30 pF (+-)10


pF for Crystals = 40 pF (+-)10 pF for Ceramic Resonators

Types of computers for rover


An almost endless variety of computers can be used as
a robots brain.
(a) Microcontroller: These are programmed in assembly
language or a high level language such as Basic or C.
(b) Single-board computer: These are also programmed
either in assembly language or a high-level language,

28

but they generally offer more processing power than a


microcontroller.
(c) Personal computer

Types of Microcontrollers
Low-level

programmable:

Microcontrollers

are

programmable integrated circuits in which you define


how the innards of the chip are connected and how the
various connections interact with one another. The
microcontroller accepts input analyzes it in one way or
another and outputs some value.
Assembly

language

is

common

method

for

programming microcontrollers but it is by no means the


only method. A number of compilers are available that
convert the syntax of higher level language such as
Basic, C or other program into the machine code
required by the microcontroller. Once compiled the
program is downloaded from the PC to the controller.
Embedded-language programmable: In this popular
microcontroller flavor, the microcontroller contains a
high-level language interpreter that is permanently
stored on the chip. With this system, the compiler on
29

your

computer

converts

your

program

into

an

intermediate tokenized language. The interpreter in


the microcontroller finishes the job of translating the
tokens to the low level machine code needed by the
chip. There are various standard and semi-standard
variants of the Basic programming language permeate
microcontrollers available in the market.

PIN DIAGRAM OF AT89C2051

30

Fig. pin diagram of AT89C2051

Key Features

2K Bytes of Reprogrammable Flash Memory

With 1000 Write\Erase Cycles

2.7V to 6 V Operating Range

Two level Program memory Lock

128 x 8 Bits Internal RAM

15 Programmable I/O Lines

A Five vector two-level Interrupt Architecture

A precision analog comparator

On-chip oscillator and clock circuitry

Pin Configuration

31

The AT89C2051 is a low-voltage, high-performance


CMOS 8-bit microcomputer with 2 Kbytes of Flash
programmable

and

erasable

read

only

memory

(PEROM). The device is manufactured using Atmels


high density nonvolatile memory technology and is
compatible

with

the

industry

standard

MCS-

51instruction set and pin out. By combining a versatile


8-bit CPU with Flash on a monolithic chip, the Atmel
AT89C2051 is a powerful microcomputer which provides
a highly flexible and cost effective solution to many
embedded control applications.
The AT89C2051 provides the

following

standard

features: 2 Kbytes of Flash, 128 bytes of RAM, 15 I/O


lines, two 16-bit timer/counters, a five vector two-level
interrupt architecture, a full duplex serial port, a
precision analog comparator, on-chip oscillator and
clock circuitry.
In addition, the AT89C2051 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

32

freezes the oscillator disabling all other chip functions


until the next hardware reset.

Pin Description
Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to
P1.7 provide internal pull ups. P1.0 and P1.1 require
external pull ups. P1.0 and P1.1 also serve as the
positive input (AIN0) and the negative input (AIN1),
respectively,

of

the

on-chip

precision

analog

comparator. The Port 1 output buffers can sink 20 mA


and can drive LED displays directly. When 1s are written
to Port 1 pins, they can be used as inputs. When pins
P1.2 to P1.7 are used as inputs and are externally pulled
low, they will source current (IIL) because of the internal
pull ups. Port 1 also receives code data during Flash
programming and program verification. Port 3Port 3
pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins
with internal pull ups. P3.6 is hard-wired as an input to
the output of the on-chip comparator and is not
accessible as a general purpose I/O pin. The Port 3
output buffers can sink 20 mA. 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

33

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 AT89C2051 as listed below:
Port Pin Alternate Functions
P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
Port 3 also receives some control signals for Flash
programming and programming verification.
RST
Reset input. All I/O pins are reset to 1s as soon as RST
goes high. Holding the RST pin high for two machine
cycles while the oscillator is running resets the device.
Each machine cycle takes 12 oscillator or clock cycles.
XTAL1
34

Input to the inverting oscillator amplifier and input to the


internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.

BASIC SINGLE BIT INSTRUCTIONS.


SETB

BIT

SET THE BIT =1

CLR BIT

CLEAR THE BIT =0

CPL BIT

COMPLIMENT THE BIT 0 =1, 1=0

JB BIT,TARGET

JUMP TO TARGET IF BIT =1

JNB BIT, TARGET

JUMP TO TARGET IF BIT =0

JBC BIT, TARGET

JUMP TO

&THEN CLEAR THE

TARGET IF BIT =1
BIT

Working:
It is very simple, the programmer is switched on and the
circuit is connected to and switched on. The program is
executed the Intel Hex file is loaded and the program is
told it to upload it into the IC. This is done within a

35

minute. The programming cable is moved and then the


microcontroller starts to execute the code.
Special attention is to be paid to the reset function in
the ATMEL series of ICs which is reseted when the
voltage falls below 4.7V or when negative bias is applied
at the reset pins. A large number of cycles of write and
rewrites were to be avoided due to the limit set of
approximate 1000 write\erase cycles.

MOTORS
INTRODUCTION
DC and stepper motors are inherently open feedback
systems you give them juice and they spin. How much
they spin is not always known not even for a stepper
motor which turns by finite degrees based on the
number of pulses it gets. Servo motors on the other
36

hand are designed for closed feedback systems. The


output of the motor is coupled to a control circuit, as the
motor turns its speed and or position are relayed to the
control circuit.
Servo motors come in various shapes and sizes. They
are used for everything from controlling computer
operated lathes to copy machines to airplanes and cars.
Servo motors are a special subset of continuous motors
which in typical cases combines a DC motor with a
feedback loop to ensure the accurate positioning of
the motor. A common form of servo motor is the radiocontrolled (R/C) servo. R/C servos are in plentiful supply
and their cost is reasonable.
To make the robots mobile we need to have motors and
the control circuitry that could control the motors. There
are different kinds of motors available for different
application.
1.

DC motor

2.

Stepper motor

3.

Servo motor

37

DC Motors
These are the motors that are commonly found in the
toys and the tape recorders. These motors change the
direction of rotation by changing the polarity. Most
chips can't pass enough current or voltage to spin a
motor. Also, motors tend to be electrically noisy (spikes)
and can slam power back into the control lines when the
motor direction or speed is changed.
Specialized

circuits

(motor

drivers)

have

been

developed to supply motors with power and to isolate


the other ICs from electrical problems. These circuits
can be designed such that they can be completely
separate boards, reusable from project to project.

Stepper Motors
Stepper motors are special kind of heavy duty motors
having 2 or 4 coils. The motors will be stepping each time
when it get the pulse. As there are many coils in the

38

motors we need to energize the coils in a specific


sequence for the rotation of the motor. These motors are
mostly used in heavy machines. The figure shown below
consists of a 4 coil stepper motor and the arrow mark will
rotate when the coils are energized in the sequence.

Unlike DC motors stepper motors can be turned


accurately for the given degrees.

Servo Motors
Servo motors unlike the stepper motor it has to be
controlled by the timing signal. This motor has only one
coil. It is mostly used in robots for its lightweight and
low power consumption. The servo motors can also be
accurately rotated by the making the control signal of
the servo motor high for a specific time period. Actually
the servo motor will be having 3 wires where 2 are for
power supply and another one is for the control signal.
39

Driving the servomotors is so simple that you need to


make the control signal high for the specific amount of
time. The width of the pulse determines the output
position of the shaft

How Servos Work


Inside the servo is a motor, a series of gears to reduce
the speed of the motor, a control board and a
potentiometer.

The

motor

and

potentiometer

are

connected to the control board all three of which form a


closed feedback loop. To turn the motor a digital signal
is sent to the control board. This activates the motor
which is connected to the potentiometer. The position of
the potentiometers shaft indicates the position of the
output shaft of the servo .When the potentiometer has
reached the desired position the control board shuts
down the motor. When the potentiometer has reached
the desired position the control board shuts down the
motor. The primary use of servos is to achieve accurate
rotational positioning over a range of 90 degrees or 180
degrees. The precise angular rotation of a servo in
response to a digital signal has enormous uses in all
fields of robotics.
40

Motor Controller : The H-Bridge Circuitry

Fig: H-Bridge Circuit


This circuit known as the H-bridge (named for its
topological similarity to the letter "H") is commonly
used to drive motors. In this circuit two of four
transistors are selectively enabled to control current
flow through a motor. Opposite pair of transistors
(Transistor One and Transistor Three) is enabled,
allowing current to flow through the motor.
The other pair is disabled, and can be thought of as out
of the circuit. By determining which pair of transistors is
41

enabled, current can be made to flow in either of the two


directions through the motor. Because permanentmagnet motors reverse their direction of turn when the
current flow is reversed, this circuit allows bidirectional
control of the motor.

Fig: Current Flow in H-Bridge circuit


It should be clear that one would never want to enable
Transistors One and Two or Transistors Three and Four
simultaneously. This would cause current to flow from
Power + to Power - through the transistors, and not the
motors, at the maximum current-handling capacity of
either the power supply or the transistors. This usually

42

results in failure of the H-Bridge. To prevent the


possibility of this failure, enable circuitry as depicted in
Figure is typically used.
In this circuit, the internal inverters ensure that the
vertical

pairs

of

transistors

are

never

enabled

simultaneously. The Enable input determines whether or


not the whole circuit is operational. If this input is false,
then none of the transistors are enabled, and the motor
is free to coast to a stop.
By turning on the Enable input and controlling the two
Direction inputs, the motor can be made to turn in either
direction.

43

Fig. Gate Enabling System

Note that if both direction inputs are the same state


(either true or false) and the circuit is enabled, both
terminals will be brought to the same voltage (Power +
or Power - , respectively). This operation will actively
brake the motor, due to a property of motors known as
back emf, in which a motor that is turning generates a
voltage counter to its rotation. When both terminals of

44

the motor are brought to the same electrical potential,


the back emf causes resistance to the motor's rotate

The Motor Drive Circuit


Both motors are driven by an identical full bridge circuit.
The circuit of Motor1 will be used to explain the
functionality.Motor1 is driven by a full bridge built with
transistors Q1, Q2, Q3 and Q4.This full bridge is able to
drive the DC motor forward backward and full stop by
driving the base connections of Q1/Q4 and Q2/Q3 as in
the table on next page:

base Q1/Q4

base Q2/Q3

Motor1 action

0 Volt

0 Volt

STOP

0 Volt

5 Volt

REVERSE

5 Volt

0 Volt

FORWARD

5 Volt

5 Volt

STOP

The transistors are switched as "emitter followers"


which results in a voltage loss of 2 x 0.6 Volts. In this
case the voltage drop was very useful because the
45

motors were much too fast at robot voltage of 5 volt.


The base drive of the transistors limits the output
current to about 1-2 Amps typical at 5 volt: The
maximum current from the PIC Controller is 20mA at
5Volt .When the low operating voltage of 3.6 V is taken
into account the max 89c2051 current is even lower:
about1-2Amp.The motors use about 1 Ampere at 2.4
Volts

APPLICATIONS
It can be used for archeological surveys.
This technology can be used in space missions,
like on moon, as it can travel on uneven
surfaces.
It can be used for security purposes ( used by
army in detection of mines ).
It can be a useful toy for children.

46

BIBLIOGRAPHY
Infra Red:
Basic Stamp
Documentation for IR ranging system
www.Electronicsforu.com
-IR sensors and proximity detector
Atmel:

47

www.Atmel.com
Data sheets and avrasm for programming
http://www.avr-asm-tutorial.net
Documentation on various programming models and
interrupts
Components:
http://us.st.com/stonline/books/pdf/docs/2143.pdf
7805 5V Voltage Regulator-TO-220 package
www.Seattleroboticssociety.com
Various circuits
http://home.zonnet.nl/bvandam/voorpag.html
Artificial intelligence and machine learning
Compiler:
www.keil.com
Books Referred:

M.A. Mazidi, J.G. Mazidi, The 8051 Microcontroller


and embedded systems, Pearson Education,
Second Edition, Printed 2006

48

Ramesh Gaonkar, Microprocessor Architecture,


Programming

and

applications

with

8085,

Penram International Publishing (India) Private


Ltd.,5th Edition, Printed 2005

Floyd, Digital Fundamentals, Pearson Education,8th


Edition, Printed 2004

Ramakant

A.Gayakward,

integrated

circuits,

Op-Amps
Pearson

and

linear

Education,4th

Edition, Printed 2004

Sedra and Smith, Micro-Electronic Circuits, Oxford


University Press,5th edition, printed 2004

49

50

51

52

53

Das könnte Ihnen auch gefallen