Professional Documents
Culture Documents
INTRODUCTION
1.1 INTRODUCTION
The advent of new high-speed technology and the growing computer capacity
provided realistic opportunity for new robot controls and realization of new methods of
control theory. This technical improvement together with the need for high performance
robots created faster, more accurate and more intelligent robots using new robots control
devices, new drives and advanced control algorithms.
This Project deals with live personal detection robot is based on 8 bit
Microcontroller. This obot follows which is drawn over the surface. !ere we are using
P" sensor for detect the which are detect human. The project is mainly used in the
#$%"& for $arth 'ua(e rescue.
"nternally it consists of " sensors. The infrared sensors are used to sense the live
persons. )ll the above systems are controlled by the Microcontroller. "n our project we
are using the popular 8 bit microcontroller.
The Microcontroller is used to control the motors. "t gets the signals from the P"
sensors and it drives the motors according to the sensor inputs. Two #* +are motors are
used to drive the robot.
HARDWARE REQUIREMENTS
,. P-.$ &/PP01
2. M"*- *-3T-#00$ 4)T85&627
8. #* +)$ M-T-
9. $0)1&
6.P" &$3&-
SIMULATION
T--0: ;$"0 M"*-<"&"-3
0)3+/)+$: $M%$##$# =* =0)3+/)+$
1.2BLOCK DIAGRAM :
1.3 Flow c!"# !$% Al&o"'#(
ALGORITHM
&tep ,: &tart
&tep 2: "nitialize micro controller
&tep 8: "nitialize motors
&tep 9: "nitialize P" sensor
&tep 6: Monitor P" sensor
&tep >: "f person detected
%uzzer on
motor rotates in specified direction
&tep ?: Monitor P" sensor
&tep 8: &top
CHAPTER 2
DESCRIPTION OF HARDWARE COMPONENTS
2.1 AT)*S+2
2.1.1 A BRIEF HISTOR, OF )-+1
"n ,58,, "ntel corporation introduced an 8 bit microcontroller called 8@6,. this
microcontroller had ,28 bytes of )M, 9; bytes of chip -M, two timers, one serial
port, and four ports all on a single chip. )t the time it was also referred as = ) &1&T$M
-3 ) *!"PA
The 8@6, is an 8-bit processor meaning that the *P/ can wor( only on 8 bits data
at a time. #ata larger than 8 bits has to be bro(en into 8 bits pieces to be processed by the
*P/. The 8@6, has a total of four "B- ports each 8 bit wide.
There are many versions of 8@6, with different speeds and amount of on-chip
-M and they are all compatible with the original 8@6,. this means that if you write a
program for one it will run on any of them.
The 8@6, is an original member of the 8@6, family. There are two other
members in the 8@6, family of microcontrollers. They are 8@62 and 8@8,. )ll the three
microcontrollers will have the same internal architecture, but they differ in the following
aspects.
8@8, has ,28 bytes of )M, two timers and > interrupts.
8@6, has 9; -M, ,28 bytes of )M, two timers and >
interrupts.
8@62 has 8; -M, 26> bytes of )M, three timers and 8
interrupts.
-f the three microcontrollers, 8@6, is the most preferable. Microcontroller
supports both serial and parallel communication.
"n the concerned project 8@62 microcontroller is used. !ere microcontroller used
is )T85&62, which is manufactured by )TM$0 laboratories.
3$*$&&"T1 -C M"*-*-3T-00$&:
Microprocessors brought the concept of programmable devices and made many
applications of intelligent e'uipment. 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 re'uirements so,
sufficient )M and -M are used to satisfy most applications .The peripheral control
e'uipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the
design. %ecause of these additional peripherals cost will be comparatively high.
)n eDample:
8@86 chip needs:
)n )ddress latch for separating address from multipleD address and data.82-;%
)M and 82-;% -M to be able to satisfy most applications. )s also Timer E *ounter,
Parallel programmable port, &erial port, and "nterrupt controller are needed for its
efficient applications.
"n comparison a typical Micro controller 8@6, chip has all that the 8@6, board has
eDcept a reduced memory as follows.
9; bytes of -M as compared to 82-;%, ,28 %ytes of )M as compared to 82-;%.
%ul(y:
-n comparing a board full of chips 4Microprocessors7 with one chip with all
components in it 4Microcontroller7.
#ebugging:
0ots of Microprocessor circuitry and program to debug. "n Micro controller there
is no Microprocessor circuitry to debug.
&lower #evelopment time: )s we have observed Microprocessors need a lot of
debugging at board level and at program level, where as, Micro controller do not have the
eDcessive circuitry and the built-in peripheral chips are easier to program for operation.
&o peripheral devices li(e TimerE*ounter, Parallel programmable port, &erial
*ommunication Port, "nterrupt controller and so on, which were most often used were
integrated with the Microprocessor to present the Micro controller .)M and -M also
were integrated in the same chip. The -M size was anything from 26> bytes to 82;b or
more. )M was optimized to minimum of >9 bytes to 26> bytes or more.
Microprocessor has following instructions to perform:
,. eading instructions or data from program memory -M.
2. "nterpreting the instruction and eDecuting it.
8. Microprocessor Program is a collection of instructions stored in a 3onvolatile
memory.
9. ead #ata from "E- device
6. Process the input read, as per the instructions read in program memory.
>. ead or write data to #ata memory.
?. .rite data to "E- device and output the result of processing to -EP device.
2.1.2 I$#"o%.c#'o$ #o AT)*S+2
The system re'uirements and control specifications clearly rule out the use of ,>,
82 or >9 bit micro controllers or microprocessors. &ystems 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. /sing an
ineDpensive 8-bit Microcontroller will doom the 82-bit product failure in any competitive
mar(et place. *oming to the 'uestion of why to use 85&62 of all the 8-bit Microcontroller
available in the mar(et the main answer would be because it has 8(% Clash and 26> bytes
of data )M82 "E- lines, three ,>-bit timerEcounters, a $ight-vector two-level interrupt
architecture, a full dupleD serial port, on-chip oscillator, and cloc( circuitry.
"n addition, the )T85&62 is designed with static logic for operation down to zero
fre'uency and supports two software selectable power saving modes. The "dle Mode
stops the *P/ while allowing the )M, timerEcounters, serial port, and interrupt system
to continue functioning. The Power #own Mode saves the )M contents but freezes the
oscillator, disabling all other chip functions until the neDt hardware reset. The Clash
program memory supports both parallel programming and in &erial "n-&ystem
Programming 4"&P7. The 85&62 is also "n-)pplication Programmable 4")P7, allowing the
Clash program memory to be reconfigured even while the application is running.
%y combining a versatile 8-bit *P/ with Clash on a monolithic chip, the )tmel
)T85&62 is a powerful microcomputer which provides a highly fleDible and cost
effective solution to many embedded control applications.
2.1.3 FEATURES
*ompatible with M*&-6,F Products
G 8; %ytes of "n-&ystem Programmable 4"&P7 Clash Memory
H $ndurance: ,@@@ .riteE$rase *ycles
G 9.@< to 6.6< -perating ange
G Cully &tatic -peration: @ !z to 88 M!z
G Three-level Program Memory 0oc(
G 26> D 8-bit "nternal )M
G 82 Programmable "E- 0ines
G Three ,>-bit TimerE*ounters
G $ight "nterrupt &ources
G Cull #upleD /)T &erial *hannel
G 0ow-power "dle and Power-down Modes
G "nterrupt ecovery from Power-down Mode
G .atchdog Timer
G #ual #ata Pointer
-Power-off Clag
PIN DIAGRAM
FIG/2 PIN DIAGRAM OF )*S+2 IC
2.1.0 PIN DESCRIPTION
FIG/3 F.$c#'o$!l 1loc2 %'!&"!( o3 ('c"o co$#"oll4"
The 8@62 -scillator and *loc(:
The heart of the 8@6, circuitry that generates the cloc( pulses by which all the
internal all internal operations are synchronized. Pins IT)0, )nd IT)02 is provided
for connecting a resonant networ( to form an oscillator. Typically a 'uartz crystal and
capacitors are employed. The crystal fre'uency is the basic internal cloc( fre'uency of
the microcontroller. The manufacturers ma(e 8@6, designs that run at specific minimum
and maDimum fre'uencies typically , to ,> M!z.
M$M-"$&
Types of memory:
The 8@62 have three general types of memory. They are on-chip memory, eDternal
*ode memory and eDternal am. -n-*hip memory refers to physically eDisting memory
on the micro controller itself. $Dternal code memory is the code memory that resides off
chip. This is often in the form of an eDternal $P-M. $Dternal )M is the am that
resides off chip. This often is in the form of standard static )M or flash )M.
!5 Co%4 (4(o"6
*ode memory is the memory that holds the actual 8@62 programs that is to be run.
This memory is limited to >9;. *ode memory may be found on-chip or off-chip. "t is
possible to have 8; of code memory on-chip and >@; off chip memory simultaneously.
"f only off-chip memory is available then there can be >9; of off chip -M. This is
controlled by pin provided as $)
15 I$#4"$!l RAM
The 8@62 have a ban( of 26> bytes of internal )M. The internal )M is found
on-chip. &o it is the fastest am available. )nd also it is most fleDible in terms of reading
and writing. "nternal am is volatile, so when 8@6, is reset, this memory is cleared. 26>
bytes of internal memory are subdivided. The first 82 bytes are divided into 9 register
ban(s. $ach ban( contains 8 registers. "nternal )M also contains 26> bits, which are
addressed from 2@h to 2Ch. These bits are bit addressed i.e. each individual bit of a byte
can be addressed by the user. They are numbered @@h to CCh. The user may ma(e use of
these variables with commands such as &$T% and *0.
S74c'!l F.$c#'o$ "4&'8#4"4% (4(o"6:
&pecial function registers are the areas of memory that control specific
functionality of the 8@62 micro controller.
a7 )ccumulator 4@$@h7
)s its name suggests, it is used to accumulate the results of large no of
instructions. "t can hold 8 bit values.
b7 % registers 4@C@h7
The % register is very similar to accumulator. "t may hold 8-bit value. The b
register is only used by M/0 )% and #"< )% instructions. "n M/0 )% the higher byte
of the product gets stored in % register. "n div )% the 'uotient gets stored in % with the
remainder in ).
c7 &tac( pointer 48,h7
The stac( pointer holds 8-bit value. This is used to indicate where the
neDt value to be removed from the stac( should be ta(en from. .hen a value is to be
pushed onto the stac(, the 8@62 first store the value of &P and then store the value at the
resulting memory location. .hen a value is to be popped from the stac(, the 8@62
returns the value from the memory location indicated by &P and then decrements the
value of &P.
d7 #ata pointer
The &Cs #P0 and #P! wor( together wor( together to represent a ,>-bit value
called the data pointer. The data pointer is used in operations regarding eDternal )M
and some instructions code memory. "t is a ,>-bit &C and also an addressable &C.
e7 Program counter
The program counter is a ,> bit register, which contains the 2 byte address, which
tells the 8@62 where the neDt instruction to eDecute to be found in memory. .hen the
8@62 is initialized P* starts at @@@@h. )nd is incremented each time an instruction is
eDecutes. "t is not addressable &C.
f7 P*-3 4power control, 8?h7
The power control &C is used to control the 8@6,Js power control modes. *ertain
operation modes of the 8@6, allow the 8@6, to go into a type of =sleep modeA which
consumes much lee power.
g7 T*-3 4timer control, 88h7
The timer control &C is used to configure and modify the way in which the
8@6,Js two timers operate. This &C controls whether each of the two timers is running
or stopped and contains a flag to indicate that each timer has overflowed. )dditionally,
some non-timer related bits are located in T*-3 &C. These bits are used to configure
the way in which the eDternal interrupt flags are activated, which are set when an
eDternal interrupt occurs.
h7 TM-# 4Timer Mode, 85h7
The timer mode &C is used to configure the mode of operation of each of the
two timers. /sing this &C your program may configure each timer to be a ,>-bit timer,
or ,8 bit timer, 8-bit auto reload timer, or two separate timers. )dditionally you may
configure the timers to only count when an eDternal pin is activated or to count =eventsA
that are indicated on an eDternal pin.
i7 T- 4Timer @ lowEhigh, address 8)E8* h7
These two &Cs ta(en together represent timer @. Their eDact behavior depends
on how the timer is configured in the TM-# &CK however, these timers always count
up. .hat is configurable is how and when they increment in value.
j7 T, 4Timer , 0owE!igh, address 8%E 8# h7
These two &Cs, ta(en together, represent timer ,. Their eDact behavior depends on
how the timer is configured in the TM-# &CK however, these timers always count up..
(7 P@ 4Port @, address 5@h, bit addressable7
This is port @ latch. $ach bit of this &C corresponds to one of the pins on a micro
controller. )ny data to be outputted to port @ is first written on P@ register. Cor e.g., bit @
of port @ is pin P@.@, bit ? is pin p@.?. .riting a value of , to a bit of this &C will send a
high level on the corresponding "E- pin whereas a value of @ will bring it to low level.
l7 P, 4port ,, address 5@h, bit addressable7
This is port latch,. $ach bit of this &C corresponds to one of the pins on a micro
controller. )ny data to be outputted to port @ is first written on P@ register. Cor e.g., bit @
of port @ is pin P,.@, bit ? is pin P,.?. .riting a value of , to a bit of this &C will send a
high level on the corresponding "E- pin whereas a value of @ will bring it to low level
m7 P2 4port 2, address @)@h, bit addressable7:
This is a port latch2. $ach bit of this &C corresponds to one of the pins on a
micro controller. )ny data to be outputted to port @ is first written on P@ register. Cor e.g.,
bit @ of port @ is pin P2.@, bit ? is pin P2.?. .riting a value of , to a bit of this &C will
send a high level on the corresponding "E- pin whereas a value of @ will bring it to low
level.
n7 P8 4port 8, address %@h, bit addressable7 :
This is a port latch8. $ach bit of this &C corresponds to one of the pins on a
micro controller. )ny data to be outputted to port @ is first written on P@ register. Cor e.g.,
bit @ of port @ is pin P8.@, bit ? is pin P8.?. .riting a value of , to a bit of this &C will
send a high level on the corresponding "E- pin whereas a value of @ will bring it to low
level.
o7 "$ 4interrupt enable, @)8h7:
The "nterrupt $nable &C is used to enable and disable specific interrupts. The
low ? bits of the &C are used to enableEdisable the specific interrupts, where the M&%
bit is used to enable or disable all the interrupts. Thus, if the high bit of "$ is @ all
interrupts are disabled regardless of whether an individual interrupt is enabled by setting
a lower bit.
p7 "P 4"nterrupt Priority, @%8h7
The interrupt priority &C is used to specify the relative priority of each interrupt.
-n 8@6,, an interrupt maybe either low or high priority. )n interrupt may interrupt
interrupts. Cor e.g., if we configure all interrupts as low priority other than serial
interrupt. The serial interrupt always interrupts the system, even if another interrupt is
currently eDecuting. !owever, if a serial interrupt is eDecuting no other interrupt will be
able to interrupt the serial interrupt routine since the serial interrupt routine has the
highest priority.
'7 P&. 4Program &tatus .ord, @#@h7
The program &tatus .ord is used to store a number of important bits that are set
and cleared by 8@62 instructions. The P&. &C contains the carry flag, the auDiliary
carry flag, the parity flag and the overflow flag. )dditionally, it also contains the register
ban( select flags, which are used to select, which of the =A register ban(s currently in
use.
r7 &%/C 4&erial %uffer, 55h7
&%/C is used to hold data in serial communication. "t is physically two registers.
-ne is writing only and is used to hold data to be transmitted out of 8@62 via TI#. The
other is read only and holds received data from eDternal sources via I#. %oth mutually
eDclusive registers use address 55h.
I9O 7o"#8:
-ne major feature of a microcontroller is the versatility built into the inputEoutput
4"E-7 circuits that connect the 8@62 to the outside world. The main constraint that limits
numerous functions is the number of pins available in the 8@6, circuit. The #"P had 9@
pins and the success of the design depends on the fleDibility incorporated into use of
these pins. Cor this reason, 29 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 =programA the pins.
PORT -
Port @ pins may serve as inputs, outputs, or, when used together, as a bi directional
low-order address and data bus for eDternal memory. To configure a pin as input, , must
be written into the corresponding port @ latch by the program. .hen used for interfacing
with the eDternal memory, the lower byte of address is first sent via P-T@, latched using
)ddress latch enable 4)0$7 pulse and then the bus is turned around to become the data
bus for eDternal memory.
PORT 1
Port , is eDclusively used for inputEoutput operations. P-T& , pin have no dual
function. .hen a pin is to be configured as input, , is to be written into the
corresponding Port , latch.
PORT 2
Port 2 maybe used as an inputEoutput port. "t may also be used to supply a high H
order address byte in conjunction with Port @ low-order byte to address eDternal memory.
Port 2 pins are momentarily changed by the address control signals when supplying the
high byte a ,>-bit address. Port 2 latches remain stable when eDternal memory is
addressed, as they do not have to be turned around 4set to ,7 for data input as in the case
for Port @.
PORT 3
Port 8 may be used to input Eoutput port. The input and output functions can be
programmed under the control of the P8 latches or under the control of various special
function registers. /nli(e Port @ and Port 2, which can have eDternal addressing functions
and change all eight-port b se, each pin of port 8 maybe individually programmed to be
used as "E- or as one of the alternate functions. The Port 8 alternate uses are:
INTERRUPTS:
The )T85&62 has a total of siD interrupt vectors: two eDternal interrupts 4"3T@ and
"3T,7, three timer interrupts 4Timers@, ,, and 27, and the serial port interrupt. These
interrupts are all shown in Cigure ,@. $ach of these interrupt sources can be individually
enabled or disabled by setting or clearing a bit in &pecial Cunction egister "$. "$ also
contains a global disable bit, $), which disables all interrupts at once. 3ote that Table 6
shows that bit position "$.> is unimplemented.
Timer 2 interrupt is generated by the logical - of bits TC2 and $IC2 in register
T2*-3. 3either of these flags is cleared by hardware when the service routine is
vectored
to. "n fact, the service routine may have to determine whether it was TC2 or $IC2 that
generated the interrupt, and that bit will have to be cleared in software.The Timer @ and
Timer , flags, TC@ and TC,, are set at &6P2 of the cycle in which the timers overflow.
The values are then polled by the circuitry in the neDt cycle. !owever, the Timer 2 flag,
TC2, is set at &2P2 and is polled in the same cycle in which the timer overflows.
Pin 4&C7 )lternate /se
P8.@-I# 4&%/C7 &erial data input
P8.,-TI# 4&%/C7 &erial data output
P8.2-"3T- @ 4T*-3.,7 $Dternal interrupt @
P8.8 - "3T- , 4T*-3.87 $Dternal interrupt ,
P8.9 - T@ 4TM-#7 $Dternal Timer @ input
P8.6 H T, 4TM-#7 $Dternal timer , input
P8.> - . $Dternal memory write pulse
P8.? - # $Dternal memory read pulse
2.2 Pow4" S.77l6
2.2., "3T-#/*T"-3
There are many types of power supply. Most are designed to convert high
voltage )* mains electricity to a suitable low voltage supply for electronics circuits and
other devices. ) power supply can by bro(en down into a series of bloc(s, each of which
performs a particular function. Cor eDample a 6< regulated supply can be shown as
below
F'& 2.1: Bloc2 D'!&"!( o3 ! R4&.l!#4% Pow4" S.77l6 S68#4(
&imilarly, ,2v regulated supply can also be produced by suitable selection
of the individual elements. $ach of the bloc(s is described in detail below and the
power supplies made from these bloc(s are described below with a circuit
diagram and a graph of their output:
2.2.2 T"!$83o"(4":
) transformer steps down high voltage )* mains to low voltage )*. !ere we are
using a center-tap transformer whose output will be sinusoidal with 8>volts pea( to pea(
value.
F'&: 2.2.1 O.#7.# W!:43o"( o3 #"!$83o"(4"
The low voltage )* output is suitable for lamps, heaters and special )* motors. "t
is not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor. The transformer output is given to the rectifier circuit.
2.2.3 R4c#'3'4":
) rectifier converts )* to #*, but the #* output is varying. There are several
types of rectifiersK here we use a bridge rectifier.
The %ridge rectifier is a circuit, which converts an ac voltage to dc voltage using
both half cycles of the input ac voltage. The %ridge rectifier circuit is shown in the figure.
The circuit has four diodes connected to form a bridge. The ac input voltage is applied to
the diagonally opposite ends of the bridge. The load resistance is connected between the
other two ends of the bridge.
Cor the positive half cycle of the input ac voltage, diodes #, and #8 conduct,
whereas diodes #2 and #9 remain in the -CC state. The conducting diodes will be in
series with the load resistance
0
and hence the load current flows through
0.
Cor the negative half cycle of the input ac voltage, diodes #2 and #9 conduct
whereas, #, and #8 remain -CC. The conducting diodes #2 and #9 will be in series
with the load resistance
0
and hence the current flows through
0
in the same direction
as in the previous half cycle. Thus a bi-directional wave is converted into unidirectional.
F'&."4 2.3 R4c#'3'4" c'"c.'#
3ow the output of the rectifier shown in Cigure 8.8 is shown below in Cigure 8.9
F'&."4 2.2.0 O.#7.# o3 #4 R4c#'3'4"
The varying #* output is suitable for lamps, heaters and standard motors. "t is not
suitable for lamps, heaters and standard motors. "t is not suitable for electronic circuits
unless they include a smoothing capacitor.
S(oo#'$& o" 3'l#4"'$&:
The smoothing bloc( smoothes the #* from varying greatly to a small ripple
and the ripple voltage is defined as the deviation of the load voltage from its #* value.
&moothing is also named as filtering.
Ciltering is fre'uently effected by shunting the load with a capacitor. The action
of this system depends on the fact that the capacitor stores energy during the conduction
period and delivers this energy to the loads during the no conducting period. "n this way,
the time during which the current passes through the load is prolonging Ted, and the
ripple is considerably decreased. The action of the capacitor is shown with the help of
waveform.
1) Figure 2.2.5 Smoothing action of capacitor
F'&."42. 2.; W!:43o"( o3 #4 "4c#'3'4% o.#7.# 8(oo#'$&
2.2.0 R4&.l!#o":
egulator eliminates ripple by setting #* output to a fiDed voltage. <oltage
regulator "*s are available with fiDed 4typically 6<, ,2< and ,6<7 or variable output
voltages. 3egative voltage regulators are also available
Many of the fiDed voltage regulator "*s has 8 leads 4input, output and high
impedance7. They include a hole for attaching a heat sin( if necessary. Lener diode is an
eDample of fiDed regulator which is shown here.
F'&."4
2.< R4&.l!#o"
T"!$83o"(4" = R4c#'3'4" = S(oo#'$& = R4&.l!#o":
2.3
HELICAL GEAR MOTOR:
) unit which creates mechanical energy from electrical energy and which
transmits mechanical energy through the gearboD at a reduced speed.
) gearhead and motor combination to reduce the speed of the motor to obtain the
desired speed or tor'ue.
+earmotors of all types and sizes including single E multiphase, universal, servo,
induction and synchronous types. #* gearmotors are configured in many types and
sizes, including brushless and servo. ) #* gearmotor consists of a rotor and a permanent
magnetic field stator and an integral gearboD or gearhead. The magnetic field is
maintained using either permanent magnets or electromagnetic windings. #* motors are
most commonly used in variable speed and tor'ue applications. ) #* servomotor has an
output shaft that can be positioned by sending a coded signal to the motor. )s the input
to the motor changes, the angular position of the output shaft changes as well.
&ervomotors are generally small and powerful for their size, and easy to control.
*ommon types of #* servomotors include brushless or gearmotor types. &tepper motors
are a class of motors that provide incremental motion, or steps, in response to pulses of
current that alternately change the polarity of the stator polesK step motors do not re'uire
feedbac( and are sometimes used in M-pen 0oop,M or no-feedbac( applications.
"mportant performance specifications to consider when searching for gearmotors include
shaft speed, continuous tor'ue, continuous current, and continuous output power. The
terminal voltage is the design #* motor voltage. The continuous tor'ue is the output
tor'ue capability of the motor under constant running conditions. *ontinuous current is
the maDimum rated current that can be supplied to the motor windings without
overheating. *ontinuous output power is the mechanical power provided by the motor
output.
"mportant #* motor specifications to consider include terminal voltage, motor
construction and commutation. The terminal voltage is the design #* motor voltage.
Motor construction choices include permanent magnet, shunt wound, series wound,
compound wound, disc armature, and coreless or slotless. *ommutation choices include
brush or brushless.
"mportant gearing specifications to consider for gearmotors and gearheads
include the gearing arrangement, gearboD ratio, and gearboD efficiency. +earing
arrangement choices for gearmotors or gearheads include spur, planetary, harmonic,
worm, and bevel. +earboD ratio is the ratio of input speed to output speed. ) ratio
greater than one, therefore, indicates speed reduction, while a ratio less than one indicates
speed increase. $fficiency is the percentage of power or tor'ue that is transferred through
the gearboD. 0osses occur due to factors such as friction and slippage inside the
gearboD.
Ceedbac( choices for gearmotors include integral encoder, integral resolver, and
integral tachometer. -ther important parameters to consider when specifying gearmotors
include shaft orientation or type and number of shafts, design units, motor shape,
diameter or width, housing length, 3$M) frame size, enclosure options and special or
eDtreme environment construction. *ommon features include multi-speed, reversible,
integral driver electronics, integral bra(e, integral clutch, and bra(e and clutch
combination
2.0 RELA,
2.9., -verview
) relay is an electrically operated switch. *urrent flowing through the coil of the
relay creates a magnetic field which attracts a lever and changes the switch contacts. The
coil current can be -3 or -CC so relays have two switch position and they are double
throw 4changeover7 switches.
elays allow one circuit to switch a second circuit which can be completely
separate from the first. Cor eDample a low voltage battery circuit can use a relay to switch
a 28@< )* mains circuit. There is no electrical connection inside the relay between the
two circuitsK the lin( is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 8@m) for a ,2<
relay, but it can be as much as ,@@m) for relays designed to operate from lower voltages.
Most "*s 4chips7 can not provide this current and a transistor is usually used to amplify
the small "* current to the larger value re'uired for the relay coil. The maDimum output
current for the popular 666 timer "* is 2@@m) so these devices can supply relay coils
directly without amplification.
elays are usually &P#T or #P#T but they can have many more sets of switch
contacts, for eDample relay with 9 sets of changeover contacts are readily available. Most
relays are designed for P*% mounting but you can solder wires directly to the pins
providing you ta(e care to avoid melting the plastic case of the relay.
The supplierNs catalogue should show you the relayNs connection. The coil will be
obvious and it may be connected either way round. elay coils produce brief high voltage
Nspi(esN when they are switched off and this can destroy transistors and "*s in the circuit.
To prevent damage you must connect a protection diode across the relay coil.
The relayJs switch connections are usually contains *-M, 3* and 3-.
COM O *ommon, always connect to thisK it is the moving part of the switch.
NC O 3ormally *losed, *-M is connected to this when the relay coil is off.
NO O 3ormally -pen, *-M is connected to this when the relay coil is on.
*onnect to *-M and 3- if you want the switched circuit to be on when the relay coil is
on.
*onnect to *-M and 3* if you want the switched circuit to be on when the relay coil is
off.
Most relays are &P#T or #P#T which are often described as Msingle pole changeoverM
4&P*-7
-r Mdouble pole changeoverM4#P*-7.
This is a &ingle Pole #ouble Throw relay. *urrent
will flow between the movable contact and one fiDed contact when the coil is energized
and between the movable contact and the alternate fiDed contact when the relay coil is
energized. The most commonly used relay in car audio, the %osch relay, is a &P#T relay..
This relay is a #ouble Pole #ouble Throw relay. "t
operates li(e the &P#T relay but has twice as many contacts. There are two completely
isolated sets of contacts.
2.9.2 )dvantages of elay:
elays can switch AC !$% DC, transistors can only switch #*.
elays can switch '& :ol#!&48, transistors cannot.
elays are a better choice for switching l!"&4 c.""4$#8 4P 6)7.
elays can switch (!$6 co$#!c#8 at once.
2.+ ULN2--3
/03 is mainly suited for interfacing between low-level circuits and
multiple peripheral power loads,.The series /032@II high voltage, high current
darlington arrays feature continuous load current ratings. The driving circuitry in- turn
decodes the coding and conveys the necessary data to the stepper motor, this module aids
in the movement of the arm through steppers
The driver ma(es use of the /032@@8 driver "*, which contains an array
of ? power #arlington arrays, each capable of driving 6@@m) of current. )t an
approDimate duty cycle, depending on ambient temperature and number of drivers
turned on, simultaneously typical power loads totaling over 28@w can be controlled.
The device has base resistors, allowing direct connection to any common
logic family. )ll the emitters are tied together and brought out to a separate
terminal. -utput protection diodes are includedK hence the device can drive
inductive loads with minimum eDtra components. Typical loads include relays,
solenoids, stepper motors, magnetic print hammers, multipleDed 0$#, incandescent
displays and heaters.
2.+.1 D!"l'$&#o$ P!'"
) #arlington pair is two transistors that act as a single transistor but with a much
higher current gain.
W!# '8 c.""4$# &!'$>
Transistors have a characteristic called current gain. This is referred to as its hC$. The
amount of current that can pass through the load when connected to a transistor that is
turned on e'uals the input current D the gain of the transistor 4hC$7 The current gain
varies for different transistor and can be loo(ed up in the data sheet for the device.
Typically it may be ,@@. This would mean that the current available to drive the load
would be ,@@ times larger than the input to the transistor.