Vous êtes sur la page 1sur 106

DESIGN AND FABRICATION OF UNDERWATER ROBOT

A PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF


THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF
BACHELOR OF TECHNOLOGY
In
MECHANICAL ENGINEERING
By
J.AJAY KUMAR B.ROHITH REDDY N.KRISHNA CHAITANYA
T.PRIYANKA M.PURNA CHANDER S.NAVEEN
Under te !"#d$n%e &'
A.JOHNSON
Assistant Professor of Mechanical Engineering
DEPARTMENT OF MECHANICAL ENGINEERING
KAMALA INSTITUTE OF TECHNOLOGY AND SCIENCE
SINGAPUR( HU)URABAD*+,+-./
0,,-*0,,/
ACKNOWLEDGEMENT
We express our sincere gratitude to our external guide BALAJI.S.RAO of NTHRYS
ROBOTRONICS, Hyderabad for a!ing been a source of constant inspiration, !aluable
guidance and generous assistance troug out te period of our pro"ect #or$%
We #ould li$e to tan$ our internal guide A JOHNSON, &ssistant 'rofessor of
(ecanical )ngineering *epart+ent for is !aluable and intellectual suggestions apart
fro+ te ade,uate guidance, constant encourage+ent rigt trougout our #or$%
We #is to express our sincere tan$s to our 'rincipal
Dr.P.INDRESWARAIAH for pro!iding te college facilities for co+pletion of te
pro"ect%
We profoundly express tan$s to Mr.M.V.SATISH KUMAR, Head of
(ecanical )ngineering *epart+ent, for is cooperation and encourage+ent%
We express our gratitude to our pro"ect coordinator Mr.G.MALLAIAH,
&ssociate 'rofessor of (ecanical )ngineering *epart+ent for is encouraging re+ar$s
and !aluable guide lines all troug our pro"ect%
-inally, #e #ould li$e to tan$ all te faculty +e+bers, supporting staff of te
*epart+ent of (ecanical )ngineering and friends for teir cooperation and !aluable
elp for co+pleting tis pro"ect%
AJAY KUMAR J
KRISHNA CHAITANYA N
ROHITH REDDY B
PURNA CHANDER M
PRIYANKA T
NAVEEN S
ABSTRACT
OBJECTIVE: Te ai+ of tis pro"ect is to &uto+ate un+anned rail#ay gate
using +ecatronics%
PROJECT DEFINATION:
Te ob"ecti!e of tis pro"ect is to +anage te control syste+ of rail#ay gate
using te +icrocontroller% Wen train arri!es at te sensing point alar+ is
triggered at te rail#ay crossing point so tat te people get inti+ation tat gate is
going to be closed% Ten te control syste+ acti!ates and closes te gate on eiter
side of te trac$% once te train crosses te oter end control syste+ auto+atically
lifts te gate% -or +ecanical operation of te gates .%/ step angle stepper +otors
are e+ployed% Here #e are using e+bedded controller built around te /01.
fa+ily 2&T/3C145 for te control according to te data pattern produced at te
input port of te +icro controller, te appropriate selected action #ill be ta$en%%
Te logic is produced by te progra+ #ritten in )+bedded C language%
Te soft#are progra+ is #ritten, by using te 6)I7 +icro !ision en!iron+ent%
Te progra+ #ritten is ten con!erted in H)8 code after si+ulation and burned
on to +icrocontroller using -7&SH +icro !ision%
WORKING METHODOLOGY:
'resent pro"ect is designed using /01. +icrocontroller to a!oid rail#ay
accidents appening at unattended rail#ay gates, if i+ple+ented in spirit% Tis
pro"ect utili9es t#o po#erful IR trans+itters and t#o recei!ers: one pair of
trans+itter and recei!er is fixed at up side 2fro+ #ere te train co+es5 at a le!el
iger tan a u+an being in exact align+ent and si+ilarly te oter pair is fixed
at do#n side of te train direction% Sensor acti!ation ti+e is so ad"usted by
calculating te ti+e ta$en at a certain speed to cross at least one co+part+ent of
standard +ini+u+ si9e of te Indian rail#ay% We a!e considered 1 seconds for
tis pro"ect% Sensors are fixed at .$+ on bot sides of te gate% We call te sensor
along te train direction as ;foreside sensor< and te oter as ;after side sensor<%
Wen foreside recei!er gets acti!ated, te gate +otor is turned on in one direction
and te gate is closed and stays closed until te train crosses te gate and reaces
aft side sensors% Wen aft side recei!er gets acti!ated +otor turns in opposite
direction and gate opens and +otor stops% Bu99er #ill i++ediately sound at te
fore side recei!er acti!ation and gate #ill close after 1 seconds, so gi!ing ti+e to
dri!ers to clear gate area in order to a!oid trapping bet#een te gates and stop
sound after te train as crossed%
GATE CONTROL
Rail#ays being te ceapest +ode of transportation are preferred o!er all te
oter +eans %Wen #e go troug te daily ne#spapers #e co+e across +any
rail#ay accidents occurring at un+anned rail#ay crossings% Tis is +ainly due to
te carelessness in +anual operations or lac$ of #or$ers% We, in tis pro"ect as
co+e up #it a solution for te sa+e% =sing si+ple electronic co+ponents #e
a!e tried to auto+ate te control of rail#ay gates% &s a train approaces te
rail#ay crossing fro+ eiter side, te sensors placed at a certain distance fro+ te
gate detects te approacing train and accordingly controls te operation of te
gate% &lso an indicator ligt as been pro!ided to alert te +otorists about te
approacing train%
HARDWARE DESCRIPTION
Te pro"ect consists of tree +ain parts>
/01. +icrocontroller
IR Trans+itter
IR Recei!er
Stepper (otor Circuit
/01. CONTRO77)R

Te I?O ports of te /01. are expanded by connecting it to an /411 cip% Te /411
is progra++ed as a si+ple I?O port for connection #it de!ices suc as 7)*s,
stepper +otors and sensors%
Te follo#ing bloc$ diagra+ so#s te !arious de!ices connected to te
different ports of an /411% Te ports are eac /@bit and are na+ed &, B and C% Te
indi!idual ports of te /411 can be progra++ed to be input or output, and can be
canged dyna+ically% Te control register is progra++ed in si+ple I?O +ode #it
port &, port B and port C 2upper5 as output ports and port C 2lo#er5 as an input
port%
IR CIRCUITS
Tis circuit as t#o stages> a trans+itter unit and a recei!er unit% Te
trans+itter unit consists of an infrared 7)* and its associated circuitry%
IR TRANSMITTER
Te IR 7)* e+itting infrared ligt is put on in te trans+itting unit% To
generate IR signal, 111 IC based astable +ulti!ibrator is used% Infrared 7)* is
dri!en troug transistor BC 1A/% IC 111 is used to construct an astable
+ulti!ibrator #ic as t#o ,uasi@stable states% It generates a s,uare #a!e of
fre,uency B/$H9 and a+plitude 1Colts% It is re,uired to s#itc ;ON< te IR 7)*%
IR RECEIVER:
Te recei!er unit consists of a sensor and its associated circuitry% In recei!er
section, te first part is a sensor, #ic detects IR pulses trans+itted by IR@7)*%
Wene!er a train crosses te sensor, te output of IR sensor +o+entarily transits
troug a lo# state% &s a result te +onostable is triggered and a sort pulse is
applied to te port pin of te /01. +icrocontroller% On recei!ing a pulse fro+ te
sensor circuit, te controller acti!ates te circuitry re,uired for closing and
opening of te gates and for trac$ s#itcing% Te IR recei!er circuit is so#n in
te figure belo#%
STEP MOTOR ADVANTAGES
Step +otors con!ert electrical energy into precise +ecanical +otion%
Tese +otors rotate a specific incre+ental distance per eac step% Te nu+ber of
steps executed controls te degree of rotation of te +otor<s saft% Tis
caracteristic +a$es step +otors excellent for positioning applications% -or
exa+ple, a .%/D step +otor executing .00 steps #ill rotate exactly ./0D #it so+e
s+all a+ount of non@cu+ulati!e error% Te speed of step execution controls te
rate of +otor rotation% & .%/D step +otor executing steps at a speed of 400 steps
per second #ill rotate at exactly . re!olution per second%
Step +otors can be !ery accurately controlled in ter+s of o# far and o# fast
tey #ill rotate% Te nu+ber of steps te +otor executes is e,ual to te nu+ber of
pulse co++ands it is gi!en% & step +otor #ill rotate a distance and at a rate tat is
proportional to te nu+ber and fre,uency of its pulse co++ands%
Step +otors a!e se!eral ad!antages o!er oter types of +otors% One of te +ost
i+pressi!e is teir ability to position !ery accurately% N(B<s standard step +otors
a!e an accuracy of E?@1F% Te error does not accu+ulate fro+ step to step% Tis
+eans tat a standard step +otor can ta$e a single step and tra!el .%/D E?@0%03D%
Ten it can ta$e one +illion steps and tra!el .,/00,000D E?@0%03D% Tis
caracteristic gi!es a step +otor al+ost perfect repeatability% In +otor ter+s,
repeatability is te ability to return to a pre!iously eld position% & step +otor can
acie!e te sa+e target position, re!olution after re!olution%
Conc!"#on":
Hence te =n+anned rail#ay gates operate according to te data input
fro+ sensors to +icrocontroller% -irst an alar+ is triggered and ten te gate is
operated%
S$%c#&#c'(#on":
(ecanical gate arrange+ent
&t+el /3C1. an /01. fa+ily +icrocontroller
SNGA0A for +icrocontroller interfacing%
IR sensors for sensing train
Stepper +otor to operate gates
=7N 4/0B for dri!ing Stepper +otor
C#rc!#( D#')r'* :
EMBEDDED SYSTEMS
In(ro+!c(#on
&n )+bedded syste+ is a co+bination of co+puter ard#are and soft#are, and peraps
additional +ecanical or oter parts, designed to perfor+ a specific function%
)+bedded syste+s are usually a part of larger, co+plex syste+% *edicated applications,
designed to execute specific acti!ities, are i+ple+ented and e+bedded in syste+s% Tese
e+bedded applications are re,uired to collaborate #it te oter co+ponents of an
enclosed syste+% )+bedded application co+ponents interact +ostly #it te non@u+an
external en!iron+ent% Tey continuously collect data fro+ sensors or oter co+puter
co+ponents and process data #itin real@ti+e constraints% )+bedded syste+s are usually
associated #it dedicated ard#are and specific soft#are%
)+bedding an application into syste+
&pplication and syste+ are closely tied togeter
Collaborati!e application
*edicated H?W and specific S?W
Interaction #it non@u+an external en!iron+ent
Real@ti+e syste+s are e+bedded syste+s
E*,%++%+ Pro+!c( +%-%o$*%n( L#&% C.c%
=nderstand user
re,uire+ents
=nderstand user
re,uire+ents
Coose opti+u+
electronic cip
Coose opti+u+
electronic cip
H77?&77
H77?&77
&lgorit+
&lgorit+
Coding?)diting
Co+piling?&sse+bling
Coding?)diting
Co+piling?&sse+bling
*ebugging
*ebugging
Testing
Testing
Si+ulator
Si+ulator
S?W
S?W
'CB 7ayout design
'CB 7ayout design
&sse+bling
co+ponents
&sse+bling
co+ponents
Testing
Testing
H?W
H?W
IC) 2In Circuit
)+ulator5
IC) 2In Circuit
)+ulator5
)+bedded 'roduct
)+bedded 'roduct
S?W Side H?W Side
*o#nload
Processor
Processor
Memory
Memory
Inputs
Inputs
Outputs
Outputs
D%"#)n Con"#+%r'(#on" &or 'n E*,%++%+ S."(%*
In(ro+!c(#on
=nli$e soft#are designed for general@purpose co+puters, e+bedded soft#are cannot
usually be run on oter e+bedded syste+ #itout significant +odification% Tis is +ainly
because of te incredible !ariety in te underlying ard#are% Te ard#are in eac
e+bedded syste+ is tailored specifically to te application, in order to $eep syste+ costs
lo#% &s a result, unnecessary circuitry is eli+inated and ard#are resources are sared
#ene!er possible%
In order to a!e soft#are, tere +ust be a place to store te executable code and
te+porary storage for runti+e data +anipulation% Tese ta$e te for+ of RO( and R&(,
respecti!ely% &ll e+bedded syste+s also contain so+e type of inputs and outputs% It is
al+ost al#ays te case tat te outputs of te e+bedded syste+ are a function of its
inputs and se!eral oter factors% Te inputs to te syste+ usually ta$e te for+ of sensors
and probes, co++unication signals, or control $nobs and buttons% Te outputs are
typically displays, co++unication signals, or canges to te pysical #orld%


E/'*$% o& 'n E*,%++%+ S."(%*
Oter co++on design re,uire+ent include @
'rocessing po#er
(e+ory
*e!elop+ent cost
Nu+ber of =nits
)xpected 7ifeti+e
Reliability
Proc%""#n) $o0%r
Tis is te a+ount of processing po#er necessary to get te ob done% & co++on #ay to
co+pare processing po#er is te (I'S 2+illions of instructions per second5 rating% Oter
i+portant features of te processor need to be consider is register #idt, typically ranges
fro+ / to HA bits%
M%*or.
Te a+ount of +e+ory 2RO( and R&(5 re,uired olding te executable soft#are and
data it +anipulates% Te a+ount of +e+ory re,uired can also affect te processor
selection% In general, te register #idt off a processor establises te upper li+it of te
a+ount of +e+ory it can access%
D%-%o$*%n( co"(
Te de!elop+ent cost of te ard#are and soft#are design processes is a fixed, one@ti+e
cost, so it +igt be tat +oney is no ob"ect or tat tis is te only accurate +easure of
syste+ cost%
N!*,%r o& !n#("
Te tradeoff bet#een production cost and de!elop+ent cost is affected +ost by te
nu+ber of units expected to be produced and sold%
E/$%c(%+ #&%(#*%
Tis indicates o# long +ust te syste+ continue to functionI Tis affects all sorts of
design decisions fro+ te selection of ard#are co+ponents to o# +uc te syste+
+ay cost to de!elop and produce%
R%#',##(.
Ho# reliable +ust te final product beI If it is a cildren<s toy, it doesn<t al#ays a!e to
#or$ rigt, but if it is part of a space suttle or a car, it ad sure better do #at it is
supposed to eac and e!ery ti+e%
T1% B'"#c D%"#)n 2 REALTIME
*esigning )+bedded syste+s is a callenging tas$% (ost of te callenge co+es fro+
te fact tat )+bedded syste+s a!e to interact #it real #orld entities% Tese
interactions can get fairly co+plex% & typical )+ebbed syste+ +igt be interacting #it
tousands of suc entities at te sa+e ti+e% -or exa+ple, a telepone s#itcing syste+
routinely andles calls fro+ tens of tousands of subscriber% Te syste+ as to connect
eac call differently% &lso, te exact se,uence of e!ents in te call +igt !ary a lot%
)+bedded syste+s a!e to respond to external interactions in a predeter+ined a+ount of
ti+e% Successful co+pletion of an operation depends upon te correct and ti+ely
operation of te syste+% *esign te ard#are and te soft#are in te syste+ to +eet te
Realti+e re,uire+ents% -or exa+ple, a telepone s#itcing syste+ +ust feed dial tone to
tousands of subscribers #itin a reco++ended li+it of one second% To +eet tese
re,uire+ents, te off oo$ detection +ecanis+ and te soft#are +essage
co++unication in!ol!ed a!e to #or$ #itin te li+ited ti+e budget% Te syste+ as to
+eet tese re,uire+ents for all te calls being set up at any gi!en ti+e%
Te designers a!e to focus !ery early on te Realti+e response re,uire+ents% *uring
te arcitecture design pase, te ard#are and soft#are engineers #or$ togeter to
select te rigt syste+ arcitecture tat #ill +eet te re,uire+ents% Tis in!ol!es
deciding inter connecti!ity of te processors, lin$ speeds, processor speeds, etc%
Te +ain ,ueries to be as$ed are>
Is te arcitecture suitableI If +essage co++unication in!ol!es too +any
nodes, it is li$ely tat te syste+ +ay not be able to +eet te Realtime
re,uire+ent due to e!en +ild congestion% Tus a si+pler arcitecture as a better
cance of +eeting te Realtime re,uire+ents%
&re te processing co+ponents po#erful enougI & C'= #it really ig
utili9ation #ill lead to unpredictable Realtime bea!ior% &lso, it is possible tat
te ig priority tas$s in te syste+ #ill star!e te lo# priority tas$s of any C'=
ti+e% Tis can cause te lo# priority tas$s to +isbea!e%
Is te Operating Syste+ suitableI &ssign ig priority to tas$s tat are in!ol!ed
in processing Realtime critical e!ents% Consider pree+pti!e sceduling if
Realtime re,uire+ents are stringent% Wen coosing te operating syste+, te
interrupt latency and sceduling !ariance sould be !erified%
o Sceduling !ariance refers to te predictability in tas$ sceduling ti+es%
-or exa+ple, a telepone s#itcing syste+ is expected to feed dialtone in
less tan 100 +s% Tis #ould typically in!ol!e sceduling tree to fi!e
tas$s #itin te stipulated ti+e% (ost operating syste+s #ould easily +eet
tese nu+bers as far as te +ean dialtone delay is concerned% But general
purpose operating syste+s #ould a!e +uc iger standard de!iation in
te dialtone nu+bers%
o Interrupt 7atency refers to te delay #it #ic te operating syste+ can
andle interrupts and scedule tas$s to respond to te interrupt% &gain,
)+bedded Syste+s based on real@ti+e operating syste+s #ould a!e
+uc lo#er interrupt latency%

MICROCONTROLLER
In(ro+!c(#on
(icrocontrollers are Je+beddedJ inside so+e oter de!ice 2often a consu+er product5 so
tat tey can control te features or actions of te product% &noter na+e for a
+icrocontroller, terefore, is Je+bedded controller%J
(icrocontrollers are dedicated to one tas$ and run one specific progra+% Te
progra+ is stored in RO( 2read@only +e+ory5 and generally does not cange%
(icrocontrollers are often lo#@po#er de!ices%
& +icrocontroller as a dedicated input de!ice and often 2but not al#ays5 as a
s+all 7)* or 7C* display for output% & +icrocontroller also ta$es input fro+ te
de!ice it is controlling and controls te de!ice by sending signals to different
co+ponents in te de!ice%
-or exa+ple, te +icrocontroller inside a TC ta$es input fro+ te re+ote control
and displays output on te TC screen% Te controller controls te cannel selector,
te spea$er syste+ and certain ad"ust+ents on te picture tube electronics suc as
tint and brigtness% Te engine controller in a car ta$es input fro+ sensors suc as
te oxygen and $noc$ sensors and controls tings li$e fuel +ix and spar$ plug
ti+ing% & +icro#a!e o!en controller ta$es input fro+ a $eypad, displays output on
an 7C* display and controls a relay tat turns te +icro#a!e generator on and off%
& +icrocontroller is often s+all and lo# cost% Te co+ponents are cosen to
+ini+i9e si9e and to be as inexpensi!e as possible%
& +icrocontroller is often, but not al#ays, ruggedi9ed in so+e #ay%
Te +icrocontroller controlling a carKs engine, for exa+ple, as to #or$ in
te+perature extre+es tat a nor+al co+puter generally cannot andle% & carKs
+icrocontroller in &las$a as to #or$ fine in @B0 degree - 2@BA C5 #eater, #ile
te sa+e +icrocontroller in Ne!ada +igt be operating at .40 degrees - 2A3 C5%
Wen you add te eat naturally generated by te engine, te te+perature can go as
ig as .10 or ./0 degrees - 2H1@/0 C5 in te engine co+part+ent%
On te oter and, a +icrocontroller e+bedded inside a CCR asnKt been
ruggedi9ed at all%
The actual processor used to implement a microcontroller can vary widely.
At1e2 /3%+4 M#%r&%&ntr&22er D%"cr#$(#on
/0CB. (icrocontroller is #it A6 bytes -las%
Te &T/3C1. is a lo#@po#er, ig@perfor+ance C(OS /@bit +icroco+puter #it A6
bytes of -las progra++able and erasable read only +e+ory 2')RO(5 based on te
fa+ous /01. arcitecture% Te de!ice is +anufactured using &t+el<s ig@density
non!olatile +e+ory tecnology and is co+patible #it te industry@standard (CS@1.
instruction set and pinout% Te on@cip -las allo#s te progra+ +e+ory to be
reprogra++ed in@syste+ or by a con!entional non!olatile +e+ory progra++er% By
co+bining a !ersatile /@bit C'= #it -las on a +onolitic cip, te &t+el &T/3C1. is a
po#erful +icroco+puter #ic pro!ides a igly@flexible and cost@effecti!e solution to
+any e+bedded control applications%
F%'(!r%"
Te &T/3C1. pro!ides te follo#ing standard features>
Co+patible #it (CS@1. 'roducts
)ndurance> .,000 Write?)rase Cycles
A6 Bytes of In@Syste+ Reprogra++able -las (e+ory
.4/ bytes of Internal R&( 2.4/ x /@bit5
B4 'rogra++able I?O 7ines
T#o .H@bit Ti+er?Counters
-i!e !ector t#o@le!el interrupt arcitecture
& full duplex serial port
Tree@le!el 'rogra+ (e+ory 7oc$
Six Interrupt Sources
On@cip oscillator and cloc$ circuitry
-ully Static Operation> 0 H9 to 4A (H9
'rogra++able Serial Cannel
7o#@po#er Idle and 'o#er@do#n (odes
In addition, te &T/3C1. is designed #it "('(#c o)#c for operation do#n to 9ero
fre,uency and supports t#o soft#are selectable po#er sa!ing +odes%
Te I+% Mo+% stops te C'= #ile allo#ing te R&(, ti+er?counters, serial
port and interrupt syste+ to continue functioning%
Te Po0%r2+o0n (ode sa!es te R&( contents but free9es te oscillator
disabling all oter cip functions until te next ard#are reset%
Boc3 D#')r'*
-igure> Bloc$ *iagra+ of &T/3c1. (icrocontroller
P#n Con&#)!r'(#on"
-igure> '*I' Type &T/3c1. 'in *iagra+
P#n D%"cr#$(#on
VCC Supply !oltage%
GND Lround%
Por( 4
'ort 0 is an /@bit open@drain bi@directional I?O port%
&s an output port, eac pin can sin$ eigt TT7 inputs% Wen .s are #ritten to port 0 pins,
te pins can be used as ig i+pedance inputs% 'ort 0 +ay also be configured to be te
+ultiplexed lo# order address?data bus during accesses to external progra+ and data
+e+ory% In tis +ode '0 as internal pull@ups% 'ort 0 also recei!es te code bytes during
-las progra++ing, and outputs te code bytes during progra+ !erification% )xternal
pull@ups are re,uired during progra+ !erification%
Por( 5
'ort . is an /@bit bi@directional I?O port #it internal pull@ups%
Te 'ort . output buffers can sin$?source four TT7 inputs% Wen .s are #ritten to 'ort .
pins tey are pulled ig by te internal pull@ups and can be used as inputs% &s inputs,
'ort . pins tat are externally being pulled lo# #ill source current 2II75 because of te
internal pull@ups% 'ort . also recei!es te lo#@order address bytes during -las
progra++ing and !erification%
Por( 6
'ort 4 is an /@bit bi@directional I?O port #it internal pull@ups%
Te 'ort 4 output buffers can sin$?source four TT7 inputs% Wen .s are #ritten to 'ort 4
pins tey are pulled ig by te internal pull@ups and can be used as inputs% &s inputs,
'ort 4 pins tat are externally being pulled lo# #ill source current 2II75 because of te
internal pull@ups% 'ort 4 e+its te ig@order address byte during fetces fro+ external
progra+ +e+ory and during accesses to external data +e+ory tat uses .H@bit addresses
2(OC8 M *'TR5% In tis application, it uses strong internal pull@ups #en e+itting .s%
*uring accesses to external data +e+ory tat uses /@bit addresses 2(OC8 M RI5: 'ort 4
e+its te contents of te '4 Special -unction Register% 'ort 4 also recei!es te ig@order
address bits and so+e control signals during -las progra++ing and !erification%
Por( 7
'ort B is an /@bit bi@directional I?O port #it internal pull@ups%
Te 'ort B output buffers can sin$?source four TT7 inputs% Wen .s are #ritten to 'ort B
pins tey are pulled ig by te internal pull@ups and can be used as inputs% &s inputs,
'ort B pins tat are externally being pulled lo# #ill source current 2II75 because of te
pull@ups%
'ort B also ser!es te functions of !arious special features of te &T/3C1. as listed
belo#>
Por( P#n A(%rn'(% F!nc(#on"
'B%0 R8* 2serial input port5
'B%. T8* 2serial output port5
'B%4 INT0 2external interrupt 05
'B%B INT. 2external interrupt .5
'B%A T0 2ti+er 0 external input5
'B%1 T. 2ti+er . external input5
'B%H
WR 2external data +e+ory Write
strobe5
'B%G
R* 2external data +e+ory read
strobe5
'ort B also recei!es so+e control signals for -las progra++ing and !erification%
RST
Reset input% & ig on tis pin for t#o +acine cycles #ile te oscillator is running
resets te de!ice%
ALE8PROG
&ddress 7atc )nable output pulse for latcing te lo# byte of te address during
accesses to external +e+ory% Tis pin is also te progra+ pulse input 2'ROL5 during
-las progra++ing%
In nor+al operation &7) is e+itted at a constant rate of .?H te oscillator fre,uency, and
+ay be used for external ti+ing or cloc$ing purposes% Note, o#e!er, tat one &7) pulse
is s$ipped during eac access to external *ata (e+ory% If desired, &7) operation can be
disabled by setting bit 0 of S-R location /)H% Wit te bit set, &7) is acti!e only during
a (OC8 or (OCC instruction% Oter#ise, te pin is #ea$ly pulled ig% Setting te
&7)@disable bit as no effect if te +icrocontroller is in external execution +ode%
PSEN
'rogra+ Store )nable is te read strobe to external progra+ +e+ory% Wen te &T/3C1.
is executing code fro+ external progra+ +e+ory, PSEN is acti!ated t#ice eac
+acine cycle, except tat t#o PSEN acti!ations are s$ipped during eac access to
external data +e+ory%
EA 8VPP
)xternal &ccess )nable +ust be strapped to LN* in order to enable te de!ice to fetc
code fro+ external progra+ +e+ory locations starting at 0000H up to ----H% Note,
o#e!er, tat if loc$ bit . is progra++ed, EA #ill be internally latced on reset% EA
sould be strapped to CCC for internal progra+ executions% Tis pin also recei!es te .4@
!olt progra++ing enable !oltage 2C''5 during -las progra++ing, for parts tat re,uire
.4@!olt C''%
9TAL5
Input to te in!erting oscillator a+plifier and input to te internal cloc$ operating circuit%
9TAL6
Output fro+ te in!erting oscillator a+plifier
O"c#'(or C1'r'c(%r#"(#c"
8T&7. and 8T&74 are te input and output, respecti!ely, of an in!erting a+plifier
#ic can be configured for use as an on@cip oscillator, as so#n in -igure .% )iter a
,uart9 crystal or cera+ic resonator +ay be used%
To dri!e te de!ice fro+ an external cloc$ source, 8T&74 sould be left unconnected
#ile 8T&7. is dri!en as so#n in -igure 4% Tere are no re,uire+ents on te duty cycle
of te external cloc$ signal, since te input to te internal cloc$ing circuitry is troug a
di!ide@by@t#o flip@flop, but +ini+u+ and +axi+u+ !oltage ig and lo# ti+e
specifications +ust be obser!ed%
F#)!r%5: O"c#'(or Conn%c(#on"
Note> C., C4 N B0 p- O.0 p- for Crystals
N A0 p- O.0 p- for Cera+ic Resonators
F#)!r% 6: E/(%rn' Coc3 Dr#-% Con&#)!r'(#on
Ho0 O"c#'(or 0or3"
Wen ,uart9 crystal is sub"ected to +ecanical pressure, tey produce
a +easurable electrical !oltage con!ersely #en an electric current is applied to a crystal,
it #ill induce +ecanical +o!e+ent% If an ac is passed troug te crystal plate te
carges oscillate bac$ and front at te resonant fre,uency of crystal%

fN./4 (22.EC?C'5?27C555

Puart9 crystal exibits a property called te pie9o@electric effect tat is tey produce an
electric !oltage% Wen sub"ected to pressure along certain direction of te crystal
because of tis property ,uart9 crystal as i+portant application in electronics industry
for controlling te fre,uency of radio #a!es%Wen pie9o@electric crystal is used in place
of 7C circuit for iger fre,uency stability, te oscillator is called as crystal oscillator%
Crystal oscillator is used for stability fre,uency for a long period of ti+e% Te resolution
of 0%0. n+?s can be obtained% Crystal operates bet#een fp and fs fre,uency 2a !ery narro#
band#idt5%
Te +ain disad!antages of crystal oscillator are it is a fixed fre,uency oscillator%
I+% Mo+%
In idle +ode, te C'= puts itself to sleep #ile all te on cip periperals re+ain acti!e%
Te +ode is in!o$ed by soft#are% Te content of te on@cip R&( and all te special
functions registers re+ain uncanged during tis +ode% Te idle +ode can be ter+inated
by any enabled interrupt or by a ard#are reset% It sould be noted tat #en idle is
ter+inated by a ard #are reset, te de!ice nor+ally resu+es progra+ execution, fro+
#ere it left off, up to t#o +acine cycles before te internal reset algorit+ ta$es
control% On@cip ard#are inibits access to internal R&( in tis e!ent, but access to te
port pins is not inibited% To eli+inate te possibility of an unexpected #rite to a port pin
#en Idle is ter+inated by reset, te instruction follo#ing te one tat in!o$es Idle
sould not be one tat #rites to a port pin or to external +e+ory%
Po0%r2+o0n Mo+%
In te po#er@do#n +ode, te oscillator is stopped, and te instruction tat in!o$es
po#er@do#n is te last instruction executed% Te on@cip R&( and Special -unction
Registers retain teir !alues until te po#er@do#n +ode is ter+inated% Te only exit fro+
po#er@do#n is a ard#are reset% Reset redefines te S-Rs but does not cange te on@
cip R&(% Te reset sould not be acti!ated before CCC is restored to its nor+al
operating le!el and +ust be eld acti!e long enoug to allo# te oscillator to restart and
stabili9e%
S('(!" o& E/(%rn' P#n" +!r#n) I+% 'n+ Po0%r2+o0n Mo+%"
Pro)r'* M%*or. Loc3 B#("
On te cip are tree loc$ bits #ic can be left un@progra++ed 2=5 or can be
progra++ed 2'5 to obtain te additional features listed in te table belo#% Wen loc$ bit
. is progra++ed, te logic le!el at te )& pin is sa+pled and latced during reset% If te
de!ice is po#ered up #itout a reset, te latc initiali9es to a rando+ !alue, and olds
tat !alue until reset is acti!ated% It is necessary tat te latced !alue of )& be in
agree+ent #it te current logic le!el at tat pin in order for te de!ice to function
properly%
Loc3 B#( Pro(%c(#on Mo+%"
Pro)r'* Loc3 B#("
Pro(%c(#on T.$%
7B. 7B4 7BB
. = = = No progra+ loc$ features
4 ' = =
(OCC instructions executed fro+ external
progra+ +e+ory are disabled fro+ fetcing code
bytes fro+ internal +e+ory, )& is sa+pled and
latced on reset, and furter progra++ing of te
-las is disabled
B ' ' = Sa+e as +ode 4, also !erify is disabled
A ' ' '
Sa+e as +ode B, also external execution is
disabled
Pro)r'**#n) (1% F'"1
Mo+%
Pro)r'*
M%*or.
ALE PSEN Por( 4 Por( 5 Por( 6 Por(7
Idle Internal . . *ata *ata *ata *ata
Idle )xternal . . -loat *ata &ddress *ata
'o#er@
do#n
Internal 0 0 *ata *ata *ata *ata
'o#er@
do#n
)xternal 0 0 -loat *ata *ata *ata
Te &T/3C1. is nor+ally sipped #it te on@cip -las +e+ory array in te erased
state 2tat is, contents N --H5 and ready to be progra++ed% Te progra++ing interface
accepts eiter a ig@!oltage 2.4@!olt5 or a lo#@!oltage 2CCC5 progra+ enable signal%
Te lo#@!oltage progra++ing +ode pro!ides a con!enient #ay to progra+ te &T/3C1.
inside te user<s syste+, #ile te ig@!oltage progra++ing +ode is co+patible #it
con!entional tird@party -las or )'RO( progra++ers%
Te &T/3C1. is sipped #it eiter te ig@!oltage or lo#@!oltage progra++ing +ode
enabled% Te respecti!e top@side +ar$ing and de!ice signature codes are listed in te
follo#ing table%
VPP : 56V VPP : ;V
Top@side
(ar$
&T/3C1.
xxxx
Yy##
&T/3C1.
xxxx@1
yy##
Signature
20B0H5 N
.)H
20B.H5 N
1.H
20B4H5 N-
-H
20B0H5 N
.)H
20B.H5 N
1.H
20B4H5 N
01H
Te &T/3C1. code +e+ory array is progra++ed byte@by byte in eiter progra++ing
+ode% To progra+ any nonblan$ byte in te on@cip -las (e+ory, te entire +e+ory
+ust be erased using te Cip )rase (ode%
Pro)r'**#n) A)or#(1*
Before progra++ing te &T/3C1., te address, data and control signals sould be set up
according to te -las progra++ing +ode table and -igure B and -igure A% To progra+
te &T/3C1., ta$e te follo#ing steps%
.% Input te desired +e+ory location on te address lines%
4% Input te appropriate data byte on te data lines%
B% &cti!ate te correct co+bination of control signals%
A% Raise )&?C'' to .4C for te ig@!oltage progra++ing +ode%
1% 'ulse &7)?'ROL once to progra+ a byte in te -las array or te loc$ bits% Te byte@
#rite cycle is self@ti+ed and typically ta$es no +ore tan .%1+s% Repeat steps . troug
1, canging te address and data for te entire array or until te end of te ob"ect file is
reaced%
D'(' Po#n): Te &T/3C1. features *ata polling to indicate te end of a #rite cycle%
*uring a #rite cycle, an atte+pted read of te last byte #ritten #ill result in te
co+ple+ent of te #ritten datu+ on 'O%G% Once te #rite cycle as been co+pleted, true
data are !alid on all outputs, and te next cycle +ay begin% *ata 'olling +ay begin any
ti+e after a #rite cycle as been initiated%
R%'+.8B!".: Te progress of byte progra++ing can also be +onitored by te R*Y?BSY
output signal% 'B%A is pulled lo# after &7) goes ig during progra++ing to indicate
B=SY% 'B%A is pulled ig again #en progra++ing is done to indicate R)&*Y%
Pro)r'* V%r#&.: If loc$ bits 7B. and 7B4 a!e not been progra++ed, te progra++ed
code data can be read bac$ !ia te address and data lines for !erification% Te loc$ bits
cannot be !erified directly% Cerification of te loc$ bits is acie!ed by obser!ing tat teir
features are enabled%
C1#$ Er'"%: Te entire -las array is erased electrically by using te proper co+bination
of control signals and by olding &7)?'ROL lo# for .0 +s% Te code array is #ritten
#it all Q.Rs% Te cip erase operation +ust be executed before te code +e+ory can be
re@progra++ed%
R%'+#n) (1% S#)n'(!r% B.(%": Te signature bytes are read by te sa+e procedure as a
nor+al !erification of locations 0B0H, 0B.H, and 0B4H, except tat 'B%H and 'B%G +ust
be pulled to a logic lo#% Te !alues returned are as follo#s%
20B0H5 N .)H indicates +anufactured by &t+el
20B.H5 N 1.H indicates /3C1.
20B4H5 N --H indicates .4C progra++ing
20B4H5 N 01H indicates 1C progra++ing
Pro)r'**#n) In(%r&'c%
)!ery code byte in te -las array can be #ritten and te entire array can be erased by
using te appropriate co+bination of control signals% Te #rite operation cycle is self
ti+ed and once initiated, #ill auto+atically ti+e itself to co+pletion% &ll +a"or
progra++ing !endors offer #orld#ide support for te &t+el +icrocontroller series%
'lease contact your local progra++ing !endor for te appropriate soft#are re!ision%
F'"1 Pro)r'**#n) Mo+%"
Mo+% RST PSEN ALE8PROG
EA ?
VPP
P6.< P6.= P7.< P7.=
Write Code *ata H 7 H?.4C 7 H H H
Read Code *ata H 7 H H 7 7 H H
Write
7oc$
Bit@. H 7 H?.4C H H H H
Bit@4 H 7 H?.4C H H 7 7
Bit@B H 7 H?.4C H 7 H 7
Cip )rase H 7 H?.4C H 7 7 7
Read Signature
Byte
H 7 H H 7 7 7 7
Note> Cip )rase re,uires a .0 +s 'ROL pulse%
-igure B> 'rogra++ing te -las
-igure A> Cerifying te -las
E/(%rn' Pro)r'* M%*or. R%'+ C.c%
E/(%rn' D'(' M%*or. R%'+ C.c%
E/(%rn' D'(' M%*or. Wr#(% C.c%
E/(%rn' Coc3 Dr#-% W'-%&or*"
E/(%rn' Coc3 Dr#-%
S.*,o P'r'*%(%r M#n M'/ Un#("
.?tC7C7 Oscillator -re,uency 0 4A (H9
tC7C7 Cloc$ 'eriod A.%H ns
tCHC8 Hig Ti+e .1 ns
tC7C8 7o# Ti+e .1 ns
tC7CH Rise Ti+e 40 ns
tCHC7 -all Ti+e 40 ns
STEPER MOTOR
In(ro+!c(#on
Stepper +otors con!ert electrical energy into precise +ecanical +otion% Tese
+otors rotate a specific incre+ental distance per eac step% Te nu+ber of steps executed
controls te degree of rotation of te +otor<s saft% Tis caracteristic +a$es step +otors
excellent for positioning applications% -or exa+ple, a .%/D step +otor executing .00 steps
#ill rotate exactly ./0D #it so+e s+all a+ount of non@cu+ulati!e error% Te speed of
step execution controls te rate of +otor rotation% & .%/D step +otor executing steps at a
speed of 400 steps per second #ill rotate at exactly . re!olution per second%
Stepper +otors can be !ery accurately controlled in ter+s of o# far and o# fast
tey #ill rotate% Te nu+ber of steps te +otor executes is e,ual to te nu+ber of pulse
co++ands it is gi!en% & step +otor #ill rotate a distance and at a rate tat is proportional
to te nu+ber and fre,uency of its pulse co++ands%
B'"#c S(%$$%r Mo(or S."(%*
Te diagra+ abo!e so#s a typical step +otor based syste+% &ll of tese parts
+ust be present in one for+ or anoter% )ac co+ponent<s perfor+ance #ill a!e an
effect on te oters% -irst is te pulse generator, also $no#n as a controller or indexer%
Te pulse generator #ill output co++and pulses tat te +otor #ill follo#%
By altering te fre,uency of te pulse train, te pulse generator can instruct te
+otor to accelerate, run at a speed, decelerate or stop% & pulse generator +ust be present
oter#ise te +otor #ill not +o!e% Next is te +otor dri!er% Te dri!er<s function is to
control te +agnitude and direction of current flo# into te +otor #indings%
Te dri!er ta$es te pulses fro+ te pulse generator and deter+ines o# and
#en te #indings sould be energi9ed% Te #indings +ust be energi9ed in a specific
se,uence to generate +otion% -inally tere is te step +otor itself% & step +otor as t#o
pri+ary parts: te rotor, te +o!ing piece, and te stator, te stationary piece% Te stator
contains coils of #ire called #indings% Te rotor spins on bearings or busings inside te
stator% &ll step +otors operate troug te principle of te rotor follo#ing a rotating
+agnetic field created by se,uencing te flo# of current troug te stator #indings%
)ac N(B step +otor as t#o pases, #ic are groups of electrically connected
#indings% &s current is passed troug eac pase, te +otor ta$es QstepsR or s+all
+o!e+ents to $eep in syncronis+ #it te +agnetic field% Te degree of rotation per
step depends on te style of dri!er used and te construction of te +otor%
S(%$ Mo(or A+-'n(')%"
Step +otors a!e se!eral ad!antages o!er oter types of +otors% One of te +ost
i+pressi!e is teir ability to position !ery accurately% N(B<s standard step +otors a!e
an accuracy of E?@1F% Te error does not accu+ulate fro+ step to step% Tis +eans tat a
standard step +otor can ta$e a single step and tra!el .%/D E?@0%03D% Ten it can ta$e one
+illion steps and tra!el .,/00,000D E?@0%03D% Tis caracteristic gi!es a step +otor al+ost
perfect repeatability% In +otor ter+s, repeatability is te ability to return to a pre!iously
eld position% & step +otor can acie!e te sa+e target position, re!olution after
re!olution%
S(%$ Mo(or A+-'n(')%":
S &ccuracy T Repeatability U &bility to position accurately%
S Responsi!eness T Puic$ &cceleration U Step +otors a!e lo# rotor inertia,
allo#ing te+ to get up to speed ,uic$ly% Tis +a$es step +otors an excellent coice for
sort, ,uic$ +o!es%
S )xcellent tor,ue for teir si9e U Step +otors a!e te igest tor,ue per cubic
inc of any +otor%
S 'ositioning Stability U =nli$e oter types of +otors, step +otors can be eld
co+pletely +otionless in teir stopped position%
S Open 7oop Control U Open loop control is si+pler, +ore reliable and less
expensi!e tan feedbac$ based 2closed loop5 control% In closed loop syste+s, encoders
are used to count te nu+ber of steps ta$en by te +otor% Te nu+ber of steps ta$en is
co+pared to te nu+ber of step co++ands gi!en% Tis feedbac$ is used to +a$e position
corrections or initiate alar+ signals% )ncoders and teir associated electronics add
additional cost to a +otion control syste+% &ssu+ing tat a step +otor is properly si9ed
for its load, it sould ne!er +iss a step, +a$ing an encoder unnecessary%
S Cost and Reliability U Step +otor tecnology is reliable and pro!en% It is te
+ost cost effecti!e +etod of precision position control%
Con"(r!c(#on 'n+ O$%r'(#n) (1% H.,r#+ STEP MOTOR
-igure .a depicts a .%/D ybrid step +otor% Te rotor contains a per+anent +agnet
si+ilar to tose found in per+anent +agnet step +otors% Hybrid rotors are axially
+agneti9ed, one end polari9ed nort and te oter polari9ed sout% Bot te rotor and te
stator asse+blies of ybrid +otors a!e toot@li$e pro"ections% Tese QteetR align in
!arious configurations during rotation% To understand te rotor<s interaction #it te
stator, exa+ine te construction of a .%/D 2te +ost co++on resolution5 ybrid step
+otor% -irst, te rotor is co+posed of t#o 10@toot rotor cups enclosing a per+anent
+agnet% Te t#o cups are oriented so tat te teet of te top cup are offset to te teet of
te botto+ cup by B%HD% Second, te stator as a t#o@pase construction% Te #inding
coils, 30D apart fro+ one anoter, +a$e up eac pase% )ac pase is #ound so tat te
poles ./0D apart are te sa+e polarity, #ile te poles 30D apart are te opposite polarity%
Wen te current in a pase is re!ersed, is te polarity, +eaning tat any #inding coil can
be eiter a nort pole or a sout pole% &s so#n in fig% .b belo#, #en pase & is
energi9ed, te #indings at .4 o<cloc$ and H o<cloc$ are nort poles and te #indings at B
o<cloc$ and 3 o<cloc$ are sout poles%
Te #indings at .4 and H #ould attract te teet of te +agnetically sout end of
te rotor, and #indings at B and 3 #ould attract te teet of te +agnetically nort end of
te rotor%
Te desired direction of tra!el deter+ines te next set of poles to be energi9ed%
Te dri!er controls tis pase se,uencing% Because tere are 10 teet on te rotor, te
pitc bet#een teet is G%4D% &s te +otor +o!es, so+e rotor teet are in align+ent #it
te stator teet% Te oter rotor teet are out of align+ent #it te stator teet by B?A, .?4
or .?A of a toot pitc% Wen te +otor ta$es a step, it #ill +o!e to te next closest
position #ere te rotor and stator teet are aligned% Te rotor #ill +o!e .?A of G%4D% Te
+otor #ill +o!e .%/D #it eac step%


CAPACITORS
&n %%c(ro.(#c c'$'c#(or is a type of capacitor typically #it a larger capacitance
per unit !olu+e tan oter types, +a$ing te+ !aluable in relati!ely ig@current and
lo#@fre,uency electrical circuits% Tis is especially te case in po#er@supply filters,
#ere tey store carge needed to +oderate output !oltage and current fluctuations, in
rectifier output, and especially in te absence of recargeable batteries tat can pro!ide
si+ilar lo#@fre,uency current capacity% Tey are also #idely used as coupling capacitors
in circuits #ere &C sould be conducted but *C sould not: te large !alue of te
capacitance allo#s te+ to pass !ery lo# fre,uencies%
Te electrolytic capacitor #as in!ented in .//H by Carles 'olla$% It #as largely
responsible for te de!elop+ent of +ains@po#ered radio recei!ers, since it per+itted te
filtering of te 10@H0 ert9 po#er supplied to residences, after it #as rectified to po#er
te radio tubes% Tis #as not practical #itout te s+all !olu+e and lo# cost of
electrolytic capacitors%
Construction
&lu+iniu+ electrolytic capacitors are constructed fro+ t#o conducting alu+iniu+ foils,
one of #ic is coated #it an insulating oxide layer, and a paper spacer soa$ed in
electrolyte% Te foil insulated by te oxide layer is te anode #ile te li,uid electrolyte
and te second foil act as catode% Tis stac$ is ten rolled up, fitted #it pin connectors
and placed in a cylindrical alu+iniu+ casing% Te t#o +ost popular geo+etries are axial
leads co+ing fro+ te center of eac circular face of te cylinder, or t#o radial leads or
lugs on one of te circular faces% Bot of tese are so#n in te picture
Polarity
In alu+inu+ electrolytic capacitors, te layer of insulating alu+inu+ oxide on te
surface of te alu+inu+ plate acts as te dielectric, and it is te tinness of tis layer tat
allo#s for a relati!ely ig capacitance in a s+all !olu+e% Te alu+inu+ oxide layer can
#itstand an electric field strengt of te order of .0
3
!olts per +eter% Te co+bination of
ig capacitance and ig !oltage result in ig energy density%
=nli$e +ost capacitors, electrolytic capacitors a!e a !oltage polarity re,uire+ent% Te
correct polarity is indicated on te pac$aging by a stripe #it +inus signs and possibly
arro#eads, denoting te ad"acent ter+inal tat sould be +ore negati!e tan te oter%
Tis is necessary because a re!erse@bias !oltage #ill destroy te center layer of dielectric
+aterial !ia electroce+ical reduction 2see redox reactions5% Witout te dielectric
+aterial te capacitor #ill sort circuit, and if te sort circuit current is excessi!e, ten
te electrolyte #ill eat up and eiter lea$ or cause te capacitor to explode%
(odern capacitors a!e a safety !al!e, typically eiter a scored section of te can, or a
specially designed end seal to !ent te ot gas?li,uid, but ruptures can still be dra+atic%
)lectrolytics can #itstand a re!erse bias for a sort period of ti+e, but tey #ill conduct
significant current and not act as a !ery good capacitor% (ost #ill sur!i!e #it no re!erse
*C bias or #it only &C !oltage, but circuits sould be designed so tat tere is not a
constant re!erse bias for any significant a+ount of ti+e% & constant for#ard bias is
preferable, and #ill increase te life of te capacitor%
Tese are te different sce+atic sy+bols for electrolytic capacitors% Te +inus or N
+ar$ed side of te pysical capacitor is e,ui!alent to te node opposite to te plus sign
on its sy+bolic e,ui!alent% T#$: Ta$e notice of te sape of te sy+bols and te
place+ent of te positi!e and negati!e nodes, because +ost sce+atics do not print te
JEJ, but rely on te sy+bol itself instead%
note> caps in +etal can a!e te color +ar$ at te +inus side V
'olarity of caps #it #ires>
axial> te +inus #ire is connected to te case, te plus #ire is isolated%
radial N single ended> a !ertical color stripe indicates te +inus side%
-or te polarity of S(* caps see pic>
Electrolyte
Te electrolyte is usually boric acid or sodiu+ borate in a,ueous solution togeter #it
!arious sugars or etylene glycol #ic are added to retard e!aporation% Care sould be
ta$en to a!oid ingestion of or eye contact #it te electrolyte, and any areas of te body
#ere s$in contact as occurred sould be #ased in good ti+e% It is i+portant to follo#
safe #or$ing practice and to use appropriate protecti!e e,uip+ent, notably glo!es and
safety glasses, #en #or$ing #it te electrolyte% So+e !ery old tantalu+ electrolytics,
often called JWet@slugJ, contain te +ore a9ardous sulfuric acid, o#e!er +ost of tese
are no longer in ser!ice due to corrosion%
Electrical behavior of electrolytics
& co++on +odeling circuit for an electrolytic capacitor as te follo#ing sce+atic>
#ere Rlea$age is te lea$age resistance, R)SR is te e,ui!alent series resistance, 7)S7 te
e,ui!alent series inductance 27 being te con!entional sy+bol for inductance5%
R)SR +ust be as s+all as possible since it deter+ines te loss po#er #en te capacitor is
used to s+oot !oltage% 7oss po#er scales ,uadratically #it te ripple current flo#ing
troug and linearly #it R)SR% 7o# )SR capacitors are i+perati!e for ig efficiencies
in po#er supplies%
It sould be pointed out tat tis is only a si+ple +odel and does not include dielectric
absorption 2soa$age5 and oter non@ideal effects associated #it real electrolytic
capacitors%
Since te electrolytes e!aporate, design life is +ost often rated in ours at a set
te+perature% -or exa+ple, typically as 4000 ours at .01 degrees Celsius 2#ic is te
igest #or$ing te+perature5% *esign life doubles for eac .0 degrees lo#er, reacing .1
years at A1 degrees%
Capacitance
Te capacitance !alue of any capacitor is a +easure of te a+ount of electric carge
stored per unit of potential difference bet#een te plates% Te basic unit of capacitance is
a farad, o#e!er tis unit as been too large for general use until te in!ention of te
*ouble@layer capacitor, so +icrofarad, nanofarad and picofarad are +ore co++only
used% Tese are usually abbre!iated to W- or u-, n- and p-%
(any conditions deter+ine a capacitorKs !alue, suc as te tic$ness of te dielectric and
te plate area% In te +anufacturing process, electrolytic capacitors are +ade to confor+
to a set of preferred nu+bers% By +ultiplying tese base nu+bers by a po#er of ten, any
practical capacitor !alue can be acie!ed, #ic is suitable for +ost applications%
& standardi9ed set of capacitor base numbers #as de!ised so tat te !alue of any
+odern electrolytic capacitor could be deri!ed fro+ +ultiplying one of te +odern
con!entional base nu+bers 5.4, 5.;, 6.6, 7.7, >.= or <.? by a po#er of ten% Terefore, it is
co++on to find capacitors #it !alues of .0, .1, 44, BB, AG, H/, .00, 440, and so on%
=sing tis +etod, !alues ranging fro+ 0%. to AG00 are co++on in +ost applications%
Calues are generally in +icrofarads 2X-5%
(ost electrolytic capacitors a!e a tolerance range of 40 F, +eaning tat te
+anufacturer is stating tat te actual !alue of te capacitor lies #itin 40 F of its
labeled !alue% Selection of te preferred series ensures tat any capacitor can be sold as a
standard !alue, #itin te tolerance%
Variants
)lectrolytic capacitors of se!eral si9es
=nli$e capacitors tat use a bul$ dielectric +ade fro+ an intrinsically insulating +aterial,
te dielectric in electrolytic capacitors depends on te for+ation and +aintenance of a
+icroscopic +etal oxide layer% Co+pared to bul$ dielectric capacitors, tis !ery tin
dielectric allo#s for +uc +ore capacitance in te sa+e unit !olu+e, but +aintaining te
integrity of te dielectric usually re,uires te steady application of te correct polarity of
direct current else te oxide layer #ill brea$ do#n and rupture, causing te capacitor to
fail% In addition, electrolytic capacitors generally use an internal #et ce+istry and tey
#ill e!entually fail if te #ater #itin te capacitor e!aporates%
)lectrolytic capacitance !alues are not as tigtly@specified as #it bul$ dielectric
capacitors% )specially #it alu+inu+ electrolytics, it is ,uite co++on to see an
electrolytic capacitor specified as a!ing a Jguaranteed +ini+u+ !alueJ and no upper
bound on its !alue% -or +ost purposes 2suc as po#er supply filtering and signal
coupling5, tis type of specification is acceptable%
&s #it bul$ dielectric capacitors, electrolytic capacitors co+e in se!eral !arieties>
A!*#n!* %%c(ro.(#c c'$'c#(or> co+pact but lossy, tese are a!ailable in te
range of Y. X- to . - #it #or$ing !oltages up to se!eral undred !olts *C% Te
dielectric is a tin layer of alu+inu+ oxide% Tey contain corrosi!e li,uid and can
burst if te de!ice is connected bac$#ards% Te oxide insulating layer #ill tend to
deteriorate in te absence of a sufficient re"u!enating !oltage, and e!entually te
capacitor #ill fail if !oltage is not applied% Bipolar electrolytics contain t#o
capacitors connected in series opposition and are used for coupling &C signals%
Bad fre,uency and te+perature caracteristics +a$e te+ unsuited for ig@
fre,uency applications% Typical )S7 !alues are a fe# nH%
T'n('!*> co+pact, lo#@!oltage de!ices up to se!eral undred X-, tese a!e a
lo#erI energy density and are +ore accurate tan alu+inu+ electrolytics%
Tantalu+ capacitors are also polari9ed because of teir dissi+ilar electrodes% Te
catode electrode is for+ed of sintered tantalu+ grains, #it te dielectric
electroce+ically for+ed as a tin layer of oxide% Te tin layer of oxide and ig
surface area of te porous sintered +aterial gi!es tis type a !ery ig capacitance
per unit !olu+e% Te catode electrode is for+ed eiter of a li,uid electrolyte
connecting te outer can or of a ce+ically deposited se+i@conducti!e layer of
+anganese dioxide, #ic is ten connected to an external #ire lead% &
de!elop+ent of tis type replaces te +anganese dioxide #it a conducti!e
plastic poly+er 2polypyrrole5 tat reduces internal resistance and eli+inates a
self@ignition failure%
Co+pared to alu+inu+ electrolytics, tantalu+ capacitors a!e !ery stable
capacitance, little *C lea$age, and !ery lo# i+pedance at ig fre,uencies%
Ho#e!er, unli$e alu+inu+ electrolytics, tey are intolerant of !oltage spi$es and
are destroyed 2often exploding !iolently5 if connected in te circuit bac$#ards or
exposed to spi$es abo!e teir !oltage rating%
Tantalu+ capacitors are +ore expensi!e tan alu+inu+@based capacitors and
generally only usable at lo# !oltage, but because of teir iger capacitance per
unit !olu+e and lo#er i+pedance at ig fre,uencies, tey are popular in
+iniature applications suc as cellular telepones%
S"5er%$5$%#t&r
(C and BC series supercapacitors 2up to B000 farad capacitance5 produced by (ax#ell
Tecnologies
S!$%rc'$'c#(or", also $no#n as !(r'c'$'c#(or" or %%c(roc1%*#c' +o!,% '.%r
c'$'c#(or" 2)*7C5, are electroce+ical capacitors tat a!e an unusually ig energ
density #en co+pared to co++on capacitors, typically on te order of tousands of
ti+es greater tan a ig@capacity electrolytic capacitor% -or instance, a typical *@cell
si9ed electrolytic capacitor #ill a!e a storage capacity +easured in +icrofarads, #ile
te sa+e si9e supercapacitor #ould store se!eral farads, an i+pro!e+ent of about .0,000
ti+es% 7arger co++ercial supercapacitors a!e capacities as ig as 1,000 farads%
Supercapacitors a!e a !ariety of co++ercial applications, notably in Jenergy
s+ootingJ and +o+entary@load de!ices% So+e of te earliest uses #ere +otor startup
capacitors for large engines in tan$s and sub+arines, and as te cost as fallen tey a!e
started to appear on diesel truc$s and railroad loco+oti!es% (ore recently tey a!e
beco+e a topic of so+e interest in te green energy #orld, #ere teir ability to ,uic$ly
soa$ up energy +a$es te+ particularly suitable for regenerati!e bra$ing applications,
#ereas batteries a!e difficulty in tis application due to slo# carging ti+es% If te
7))S or ))Stor de!ices can be co++erciali9ed, tey #ill +a$e an excellent replace+ent
for batteries in all@electric cars and plug@in ybrids, as tey co+bine ,uic$ carging,
te+perature stability and excellent safety properties%
Concept
Co+parison of construction diagra+s of tree capacitors% 7eft> Jnor+alJ capacitor,
+iddle> electrolytic, rigt> supercapacitor
In a con!entional capacitor, energy is stored by te re+o!al of carge carriers, typically
electrons, fro+ one +etal plate and depositing te+ on anoter% Tis carge separation
creates a potential bet#een te t#o plates, #ic can be arnessed in an external circuit%
Te total energy stored in tis fasion is a co+bination of te nu+ber of carges stored
and te potential bet#een te plates% Te for+er is essentially a function of si9e and te
+aterial properties of te plates, #ile te latter is li+ited by te dielectric brea$do#n
bet#een te plates% Carious +aterials can be inserted bet#een te plates to allo# iger
!oltages to be stored, leading to iger energy densities for any gi!en si9e%
In contrast #it traditional capacitors, supercapacitors do not a!e a con!entional
dielectric, as suc% Tey are based on a structure tat contains an electrical double layer%
In a double layer, te effecti!e tic$ness of te JdielectricJ is exceedingly tinZon te
order of nano+etersZand tat, co+bined #it te !ery large surface area, is responsible
for teir extraordinarily ig capacitances in practical si9es%
In an electrical double layer, eac layer by itself is ,uite conducti!e, but te pysics at te
interface #ere te layers are effecti!ely in contact +eans tat no significant current can
flo# bet#een te layers% Ho#e!er, te double layer can #itstand only a lo# !oltage,
#ic +eans tat supercapacitors rated for iger !oltages +ust be +ade of +atced
series@connected indi!idual supercapacitors, +uc li$e series@connected cells in iger@
!oltage batteries%
In general, supercapacitors i+pro!e storage density troug te use of a nanoporous
+aterial, typically acti!ated carcoal, in place of te con!entional insulating barrier%
&cti!ated carcoal is a po#der +ade up of extre+ely s+all and !ery JrougJ particles, in
bul$ tey for+ a lo#@density !olu+e of particles #it oles bet#een te+ tat rese+bles
a sponge% Te o!erall surface area of e!en a tin layer of suc a +aterial is +any ti+es
greater tan a traditional +aterial li$e alu+inu+, allo#ing +any +ore electrons to be
stored in any gi!en !olu+e% Te do#nside is tat te carcoal is ta$ing te place of te
i+pro!ed insulators used in con!entional de!ices, so in general supercapacitors use lo#
potentials on te order of 4 to B C%
&cti!ated carcoal is not te JperfectJ +aterial for tis application% -ree electrons are
actually 2in effect5 ,uite large, often larger tan te oles left in te carcoal, #ic are
too s+all to accept te+, li+iting te storage% Recent researc in supercapacitors as
generally focused on i+pro!ed +aterials tat offer e!en iger usable surface areas%
)xperi+ental de!ices de!eloped at (IT replace te carcoal #it carbon nanotubes,
#ic a!e si+ilar carge storage capability as carcoal 2#ic is al+ost pure carbon5
but are +ecanically arranged in a +uc +ore regular pattern tat exposes a +uc
greater suitable surface area% Oter tea+s are experi+enting #it custo+ +aterials +ade
of acti!ated polypyrrole, and e!en nanotube@i+pregnated papers%
& co+pletely different approac is being pioneered by ))Stor, #o clai+ to a!e
de!eloped a dra+atically i+pro!ed insulator based on bariu+ titanate tat i+pro!es te
per+issi!ity of te insulator by se!eral orders of +agnitude, i+pro!ing energy density
not troug electron capacity but !ia +uc iger potentials% ))Stor clai+s tat teir
capacitors can operate at extre+ely ig !oltages, on te order of se!eral tousand !olts%
In ter+s of energy density, existing co++ercial supercapacitors range around 0%1 to .0
W[?$g, #it te standardi9ed cells a!ailable fro+ (ax#ell Tecnologies rated at H
W[?$g% )xperi+ental supercapacitors fro+ te (IT 7))S pro"ect a!e de+onstrated
densities of B0 W[?$g and appear to be scalable to H0 W[?$g in te sort ter+, #ile
))Stor clai+s teir exa+ples #ill offer capacities on te order of 400 to B00 W[?$g% -or
co+parison, a con!entional lead@acid battery is typically B0 to A0 W[?$g, +odern
litiu+@ion batteries are about .40 W[?$g, and in an auto+obile applications gasoline
as a net calorific !alue 2NCC5 of around .4,000 W[?$g operating at a 40F tan$@to@
#eel efficiency%
&dditionally, supercapacitors offer +uc iger po#er density tan batteries% 'o#er
density co+bines te energy density #it te speed tat te energy can be dra#n out of
te de!ice% Batteries, #ic are based on te +o!e+ent of carge carriers in a li,uid
electrolyte, a!e relati!ely slo# carge and discarge ti+es% Capacitors, on te oter
and, can be carged or discarged at a rate tat is typically li+ited by current eating te
electrodes% So #ile existing supercapacitors a!e energy densities tat are peraps .?.0
t tat of a con!entional battery, teir po#er density is generally ten to one@undred
ti+es as great 2see diagra+, rigt5%
History
Te supercapacitor effect #as first noticed in .31G by Leneral )lectric engineers
experi+enting #it de!ices using porous carbon electrode% It #as belie!ed tat te
energy #as stored in te carbon pores and it exibited Jexceptionally ig capacitanceJ,
altoug te +ecanis+ #as un$no#n at tat ti+e%
Leneral )lectric did not i++ediately follo# up on tis #or$, and it #as Standard Oil of
Oio tat e!entually de!eloped te +odern !ersion of te de!ices in .3HH after
accidentally re@disco!ering te effect #ile #or$ing on experi+ental fuel cell designs%
Teir cell design used t#o layers of acti!ated carcoal separated by a tin porous
insulator, and tis basic +ecanical design re+ains te basis of +ost supercapacitors to
tis day%
Standard Oil also failed to co++erciali9e teir in!ention, licensing te tecnology to
N)C, #o finally +ar$eted te results as QsupercapacitorsR in .3G/, to pro!ide bac$up
po#er for +aintaining co+puter +e+ory% Te +ar$et expanded slo#ly for a ti+e, but
starting around te +id@.330s !arious ad!ances in +aterials science and si+ple
de!elop+ent of te existing syste+s led to rapidly i+pro!ing perfor+ance and an e,ually
rapid reduction in cost% In 4001, te ultracapacitor +ar$et #as bet#een =S \4G4 +illion
and \A00 +illion, depending on te source% It is rapidly gro#ing, especially in te
auto+oti!e sector%
Recently, all solid state +icro+eter@scale supercapacitors based on ad!anced superionic
conductors ad been recogni9ed as critical electron co+ponent of future sub@!oltage and
deep@sub@!oltage nanoelectronics and related tecnologies 244 n+ tecnological node of
C(OS and beyond5%
Technology advantages
*ue to te capacitorKs ig nu+ber of carge@discarge cycles 2+illions or +ore
co+pared to 400U.000 for +ost co++ercially a!ailable recargeable batteries5 tere
#ere no disposable parts during te #ole operating life of te de!ice, #ic +a$es te
de!ice en!iron+entally friendly% Batteries #ear out on te order of a fe# years, and teir
igly reacti!e ce+ical electrolytes represent a serious disposal and safety a9ard% Tis
can be i+pro!ed by only carging under fa!orable conditions, carging at an ideal rate
and as rarely as possible% Supercapacitors can elp in tis regard, acting as a carge
conditioner, storing energy fro+ oter sources for load balancing purposes and ten using
any excess energy to carge te batteries only at opportune ti+es%
Oter ad!antages of supercapacitors co+pared #it recargeable batteries are extre+ely
lo# internal resistance or )SR, ig efficiency 2up to 3G@3/F5, ig output po#er,
extre+ely lo# eating le!els, and i+pro!ed safety% &ccording to ITS 2Institute of
Transportation Studies, *a!is, C&5 test results, te specific po#er of supercapacitors can
exceed H $W?$g at 31F efficiency
Te idea of replacing batteries #it capacitors in con"unction #it no!el alternati!e
energy sources beca+e a conceptual u+brella of te Lreen )lectricity 2L)75 Initiati!e,
introduced by *r% &lexander Bell% One particular successful i+ple+entation of te L)7
Initiati!e concept #as a +uscle@dri!en autono+ous solution #ic e+ploys a +ulti@farad
supercapacitor 2ecto@ and $ilofarad range capacitors are no# a!ailable5 as an
inter+ediate energy storage to po#er a !ariety of portable electrical and electronic
de!ices suc as ('B players, &(?-( radios, flasligts, cell pones, and e+ergency
$its%&s te energy density of supercapacitors is bridging te gap #it batteries, it is oped
tat in te near future te auto+oti!e industry #ill start to deploy ultracapacitors as a
replace+ent for ce+ical batteries%
Transportation applications
Cina is experi+enting #it a ne# for+ of electric bus 2capabus5 tat runs #itout
po#erlines using po#er stored in large onboard supercapacitors, #ic are ,uic$ly
recarged #ene!er te electric bus stops at any bus stop 2under so@called %%c(r#c
!*,r%'"5, and fully carged in te ter+inus% & fe# prototypes #ere being tested in
Sangai in early 4001% In 400H, t#o co++ercial bus routes began to use supercapacitor
buses: one of te+ is route .. in Sangai%
In 400. and 4004, C&L, te public transport operator in Nure+berg, Ler+any tested a
bus #ic used a diesel@electric dri!e syste+ #it supercapacitors%
Since 400B (annei+ Stadtban in (annei+, Ler+any as operated an 7RC 2ligt@rail
!eicle5 #ic uses supercapacitors%
Oter co+panies fro+ te public transport +anufacturing sector are de!eloping
supercapacitor tecnology> Te Transportation Syste+s di!ision of Sie+ens &L is
de!eloping a +obile energy storage based on double@layer capacitors called Sibac )nergy
Storage and also Sitras S)S, a stationary !ersion integrated into te trac$side po#er
supply% Te co+pany Cegelec is also de!eloping a supercapacitor@based energy storage
syste+%
'roton 'o#er Syste+s as created te #orldKs first triple ybrid -or$lift Truc$, #ic
uses fuel cells and battery as pri+ary energy storage and supercapacitors to supple+ent
tis o!erall energy efficient storage solution%
Technology
Carbon nanotubes and certain conducti!e poly+ers, or carbon aerogels, are practical for
supercapacitors>
Carbon nanotubes a!e excellent nanoporosity properties, allo#ing tiny spaces
for te poly+er to sit in te tube and act as a dielectric% (ITKs 7aboratory of
)lectro+agnetic and )lectronic Syste+s 27))S5 is researcing using carbon
nanotubes%
So+e poly+ers 2eg% polyacenes5 a!e a redox 2reduction@oxidation5 storage
+ecanis+ along #it a ig surface area%
Supercapacitors are also being +ade of carbon aerogel% Tis is a uni,ue +aterial
pro!iding extre+ely ig surface area of about A00@.000 +]?g% Te electrodes of
aerogel supercapacitors are usually +ade of non@#o!en paper +ade fro+ carbon
fibers and coated #it organic aerogel, #ic ten undergoes pyrolysis% Te paper
is a co+posite +aterial #ere te carbon fibers pro!ide structural integrity and
te aerogel pro!ides te re,uired large surface% S+all aerogel supercapacitors are
being used as bac$up electricity storage in +icroelectronics, but applications for
electric !eicles are expected% Te !oltage of an aerogel capacitor is li+ited to a
fe# !olts% Higer !oltages #ill lead to ioni9ation of te carbon, #ic #ill
da+age te capacitor%
Te co+pany Reticle Carbon clai+s to be able to +a$e supercapacitors fro+
acti!ated carbon in solid for+% Tis substance is called Reticle Carbon% It as a
larger surface area tan aerogel and sould be ceaper to produce% Tis #ould
result in a capacitor #it an energy density of G%1 $W[?$g%
Te co+pany Tartu Tecnologies 7td% de!eloped te supercapacitors fro+
+ineral based carbon% Tese nonacti!ated carbon are syntesised fro+ te +etal@
or +etalloid carbides, e%g SiC, TiC, &lACB, etc% Te syntesised nanostructured
porus carbon, often called Carbide *eri!ed Carbon 2C*C5, a!e surface area
about A00 +]?g to 4000 +]?g #it specific capacitance up to .00 -?c+^ 2in organic
electrolyte5% Te supercapacitor #it te !olu+e of .B1 +7 and 400 g #eigt
a!e capacitance .H00 -% Te energy density is +ore tan .B W[?7 at 4%/1 C and
outstanding po#er caracteristics, o!er 40 $W?$g%
In &ugust 400G, a researc tea+ at R'I de!eloped a paper battery #it aligned carbon
nanotubes, designed to function as bot a litiu+@ion battery and a supercapacitor 2called
bacitor5, using an ionic li,uid, essentially a li,uid salt, as te electrolyte% Te seets can
be rolled, t#isted, folded, or cut into nu+erous sapes #it no loss of integrity or
efficiency, or stac$ed, li$e printer paper 2or a Coltaic pile5, to boost total output% &s #ell,
tey can be +ade in a !ariety of si9es, fro+ postage sta+p to broadseet% Teir ligt
#eigt and lo# cost +a$e te+ attracti!e for portable electronics, aircraft, auto+obiles,
and toys 2suc as +odel aircraft5, #ile teir ability to use electrolytes in blood +a$e
te+ potentially useful for +edical de!ices suc as pace+a$ers% In addition, tey are
biodegradable%
Wire Wound Resistor tied as a Reostat Wire Wound Resistor tied as a Coltage *i!ider
Color@coding of tis for+ is beco+ing rarer% In ne#er e,uip+ent, +ost passi!e
co+ponents co+e in surface +ount pac$ages% (any of tese pac$ages are unlabeled, and
tose tat are nor+ally labeled #it alpanu+eric codes, not colors% In one popular
+ar$ing +etod, te +anufacturer prints B digits on co+ponents> 4 !alue digits follo#ed
.?A Watt J-ixedJ % Single Turn Tri++er J'otJ (ulti@turn Tri++er
%
-ixed Sy+bol % 'otentio+eter Sy+bol 'otentio+eter
by te po#er of ten +ultiplier% Tus te !alue of a resistor +ar$ed >=6 is A,G00 _ and a
capacitor +ar$ed 54> is .00 n- 2.00,000 p-5% Tis can be confusing: a resistor +ar$ed
>=6 +igt see+ to be a AG4 _ unit, and #e +ust rely upon experience to interpret
+ar$ings% &noter #ay is to use te J$ilo@J or J+ega@J prefixes in place of te deci+al
point>
.64 N .%4 $_ N .,400 _
A(G N A%G (_ N A,G00,000 _
-or .F resistors, a tree@digit alpanu+eric code is so+eti+es used, #ic is not
ob!iously related to te !alue at all% -or instance, a resistor +ar$ed <?C is A332<?5 `
.002C5 N A3,300 _%
It is so+eti+es not ob!ious #eter a color coded co+ponent is a resistor, capacitor, or
inductor, and tis +ay be deduced by $no#ledge of its circuit function, pysical sape or
by +easure+ent 2capacitors a!e nearly infinite resistance: unfortunately, so do faulty
open@circuit resistors and inductors5%
Resistors, capacitors and inductors
Resistor !alues are al#ays coded in o+s, capacitors in picofarads 2p-5, inductors in
+icroenries 2XH5, and transfor+ers in !olts%
band A is first significant figure of co+ponent !alue
band B is te second significant figure
band C is te deci+al +ultiplier
band D if present, indicates tolerance of !alue in percent 2no color +eans 40F5
-or exa+ple, a resistor #it bands of yellow, violet, red, and gold #ill a!e first digit A
2yello# in table belo#5, second digit G 2!iolet5, follo#ed by 4 2red5 9eros> A,G00 o+s%
Lold signifies tat te tolerance is a1F, so te real resistance could lie any#ere
bet#een A,AH1 and A,3B1 o+s%
Resistors +anufactured for +ilitary use +ay also include a fift band #ic indicates
co+ponent failure rate 2reliability5: refer to (I7@H*B6@.33 for furter details%
Tigt tolerance resistors +ay a!e tree bands for significant figures rater tan t#o,
and?or an additional band indicating te+perature coefficient, in units of pp+?6%
&ll coded co+ponents #ill a!e at least t#o !alue bands and a +ultiplier: oter bands are
optional 2italicised belo#5%
Te Standard )I& Color Code Table per )I&@RS@4G3 is as follo#s>
Coor 5
"(
,'n+ 6
n+
,'n+ 7
r+
,'n+ @*!(#$#%rA >
(1
,'n+ @(o%r'nc%A T%*$. Co%&&#c#%n(
Blac$ 0 0 `.0
0

Bro#n . . `.0
.
a.F 2-5 .00 pp+
Red 4 4 `.0
4
a4F 2L5 10 pp+
OrangeB B `.0
B
.1 pp+
Yello# A A `.0
A
41 pp+
Lreen 1 1 `.0
1
a0%1F 2*5
Blue H H `.0
H
a0%41F 2C5
Ciolet G G `.0
G
a0%.F 2B5
Lrey / / `.0
/
a0%01F 2&5
Wite 3 3 `.0
3

Lold `0%. a1F 2b5
Sil!er `0%0. a.0F 265
None a40F 2(5
Note> red to !iolet are te colors of te rainbo# #ere red is lo# energy and !iolet is
iger energy%
Mnemonics
& useful +ne+onic for re+e+bering te first ten color codes +atces te first letter of
te color code, by order of increasing +agnitude% Tere are +any !ariations>
Bad Beer Rots Our Young Guts But Vod$a Goes Well
Brigt Boys Ra!e O!er Young Girls But Veto Getting Wed
B% B% R O Y of Great Britain as a Very Good Wife
Big Boys Race Our Young Girls But Violet Generally Wins
Better Be Rigt Or Your Great Big Venture Goes West
Blac$ Beauty Ran O!er Yello# Grass By Violent Grey Waters
Bad Boys Race O!er Yonder Green But Victory Goes Wanting
Blac$ Birds Roa+ O!er Your Garden But Vultures Go West
Bye Bye Rosie Off You Go Bir+inga+ Via Great Weston
Te #ord JBadJ in te first +ne+onic and JBrigtJ in te second +ne+onic are often
replaced #it te #ord JBlac$J since blac$ co+es before bro#n in te color code% Wile
te second +ne+onic is certainly te +ost offensi!e of tese, all except te tird lac$ a
sobriety tat +igt be desirable, especially in a teacing context% & +ore staid +e+ory
aide uses te fact tat te central part of te code follo#s te color spectru+, #itout te
i for indigo% Tat is,
Blac$ Bro#n Roy L% Bi! Gray Wite
Te +ost co++on !ariation of te +ne+onic for te )I& color code generally doesnKt
stay posted on tis page for long due to its coice of #ords #ic is +ore offensi!e to
+any today tan #en it #as originated 2+id .340Ks5% Refer to te discussion for details%
Besides te ten colors of te +ain !alue code, te tolerance code is often re+e+bered as
Jfor Lold or Sil!erJ appended to te +ore offensi!e +ne+onic, or JGet So+e No#J
#ere No# refers to none for 40F%
If it is difficult to recall tat blac$ co+es before bro#n in te color code, it +ay be
elpful to use te position of #ite at te end of te color code as a $ey to re+e+ber tat
blac$ 2and not bro#n5 is at te beginning%
Oter languages a!e oter +ne+onics for tis color code% & roug translation of te
-renc is J*onKt eat anyting or IKll beat you !iolently, big ani+al%J
Examples
-ro+ top to botto+>
Lreen@Blue@Blac$@Blac$@Bro#n
o 1H0 _ a .F
Red@Red@Orange@Lold
o 44,000 _ a 1F
Yello#@Ciolet@Bro#n@Lold
o AG0 _ a 1F
Blue@Lray@Blac$@Lold
o H/ _ a 1F
Note> Te si9es of te resistors depend only on te po#er tey can dissipate, and do not
affect teir !alue%
What do resistors do?
Resistors li+it current% In a typical application, a resistor is connected in series #it an
7)*>
)noug current flo#s to +a$e te 7)* ligt up, but not so +uc tat te 7)* is
da+aged% 7ater in tis Capter, you #ill find out o# to calculate a suitable !alue for tis
resistor% 27)*s are described in detail in Capter 1%5
Te KboxK sy+bol for a fixed resistor is popular in te =6 and )urope% & K9ig@9agK sy+bol
is used in &+erica and bapan>
Resistors are used #it (r'n"+!c%r" to +a$e "%n"or "!,"."(%*"% Transducers are
electronic co+ponents #ic con!ert energy fro+ one for+ into anoter, #ere one of
te for+s of energy is electrical% & #)1( +%$%n+%n( r%"#"(or, or LDR, is an exa+ple of
an #n$!( (r'n"+!c%r% Canges in te brigtness of te ligt sining onto te surface of
te 7*R result in canges in its resistance% &s #ill be explained later, an input transducer
is +ost often connected along #it a resistor to to +a$e a circuit called a $o(%n(#'
+#-#+%r% In tis case, te output of te potential di!ider #ill be a !oltage signal #ic
reflects canges in illu+ination%
(icropones and s#itces are input transducers% O!($!( (r'n"+!c%r" include
loudspea$ers, fila+ent la+ps and 7)*s% Can you tin$ of oter exa+ples of transducers
of eac typeI
In oter circuits, resistors are used to direct current flo# to particular parts of te circuit,
or +ay be used to deter+ine te !oltage gain of an a+plifier% Resistors are used #it
capacitors 2Capter A5 to introduce ti+e delays%
(ost electronic circuits re,uire resistors to +a$e te+ #or$ properly and it is ob!iously
i+portant to find out so+eting about te different types of resistor a!ailable, and to be
able to coose te correct resistor !alue, in , , or ( , for a particular application%
Fixed value resistors
Te diagra+ so#s te construction of a c'r,on &#* resistor>
*uring +anufacture, a tin fil+ of carbon is deposited onto a s+all cera+ic rod% Te
resisti!e coating is spiralled a#ay in an auto+atic +acine until te resistance bet#een
te t#o ends of te rod is as close as possible to te correct !alue% (etal leads and end
caps are added, te resistor is co!ered #it an insulating coating and finally painted #it
coloured bands to indicate te resistor !alue%
Carbon fil+ resistors are ceap and easily a!ailable, #it !alues #itin a.0F or a1F of
teir +ar$ed, or Kno+inalK !alue% M%(' &#* and *%(' o/#+% resistors are +ade in a
si+ilar #ay, but can be +ade +ore accurately to #itin a4F or a.F of teir no+inal
!alue% Tere are so+e differences in perfor+ance bet#een tese resistor types, but none
#ic affect teir use in si+ple circuits%
W#r%0o!n+ resistors are +ade by #inding tin #ire onto a cera+ic rod% Tey can be
+ade extre+ely accurately for use in +ulti+eters, oscilloscopes and oter +easuring
e,uip+ent% So+e types of #ire#ound resistors can pass large currents #itout
o!ereating and are used in po#er supplies and oter ig current circuits%
Colour code
Ho# can te !alue of a resistor be #or$ed out fro+ te colours of te bandsI )ac colour
represents a nu+ber according to te follo#ing sce+e>
N!*,%r Coo!r
0 blac$
. bro#n
4 red
B orange
A yello#
1 green
H blue
G !iolet
/ grey
3 #ite
Te first band on a resistor is interpreted as te -IRST *ILIT of te resistor !alue% -or
te resistor so#n belo#, te first band is yello#, so te first digit is A>
Te second band gi!es te S)CON* *ILIT% Tis is a !iolet band, +a$ing te second
digit G% Te tird band is called te (=7TI'7I)R and is not interpreted in ,uite te sa+e
#ay% Te +ultiplier tells you o# +any nougts you sould #rite after te digits you
already a!e% & red band tells you to add 4 nougts% Te !alue of tis resistor is terefore
A G 0 0 o+s, tat is, A G00 , or A%G % Wor$ troug tis exa+ple again to confir+
tat you understand o# to apply te colour code gi!en by te first tree bands%
Te re+aining band is called te TO7)R&NC) band% Tis indicates te percentage
accuracy of te resistor !alue% (ost carbon fil+ resistors a!e a gold@coloured tolerance
band, indicating tat te actual resistance !alue is #it E or @ 1F of te no+inal !alue%
Oter tolerance colours are>
To%r'nc% Coo!r
a.F bro#n
a4F red
a1F gold
a.0F sil!er
Wen you #ant to read off a resistor !alue, loo$ for te tolerance band, usually gold, and
old te resistor #it te tolerance band at its rigt and end% Reading resistor !alues
,uic$ly and accurately isnKt difficult, but it does ta$e practiceV
More about colour codes
Te colour code as explained abo!e allo#s you to interpret te !alues of any resistor
fro+ .00 up#ards% Ho# does te code #or$ for !alues less tan .00 I Here is te
code for .4 >
bro#n, red, blac$
Te +ultiplier colour blac$ represents te nu+ber 0 and tells you tat no nougts sould
be added to te first t#o digits, representing . and 4%
Wat #ould be te colour code for AG I Te ans#er is>
yello#, !iolet, blac$
=sing tis +etod for indicating !alues bet#een .0 and .00 +eans tat all resistor
!alues re,uire te sa+e nu+ber of bands%
-or !alues be#teen . and .0 , te +ultiplier colour is canged to gold% -or exa+ple,
te colours>
bro#n, blac$, gold
indicate a . resistor, #ile te colours>
red, red, gold
refer to a 4%4 resistor%
(etal fil+ resistors, +anufactured to . or 4F tolerance, often use a code consisting of
&o!r coloured bands instead of tree% Te code #or$s in te sa+e #ay, #it te first tree
bands interpreted as digits and te fourt band as te +ultiplier% -or exa+ple, a .
+etal fil+ resistor as te bands>
bro#n, blac$, blac$, bro#n 2Ebro#n or red for tolerance5
#ile a 1H +etal fil+ resistor as te bands>
green, blue, blac$, red
It is #ort pointing out tat te +ultiplier for +etal fil+ resistors #it !alues fro+ .
up#ards is bro#n 2rater tan red, as in te tree colour syste+5, #ile te +ultiplier for
.0 up#ards is red 2instead of orange5%
You are li$ely to use lo# !alue resistors and +etal fil+ resistors on so+e occasions and it
is useful to $no# o# to read teir codes% Ho#e!er, +ost of te resistors you use in
building electronic circuits #ill be carbon fil+ types #it !alues indicated using te tree
band colour code% It is tis syste+ #ic you sould +aster first%
Current liitin!
You are no# ready to calculate a !alue for te resistor used in series #it an 7)*% 7oo$
at te circuit diagra+>
& typical 7)* re,uires a current of .0 +& and as a !oltage of 4 C across it #en it is
#or$ing% Te po#er supply for te circuit is 3 C% Wat is te !oltage across resistor R.I
Te ans#er is 3@4NG C% 2Te !oltages across co+ponents in series +ust add up to te
po#er supply !oltage%5
You no# a!e t#o bits of infor+ation about R.> te current flo#ing is .0 +&, and te
!oltage across R. is G C% To calculate te resistance !alue, use te for+ula>
Substitute !alues for V and I>
7oo$ outV Te for+ula #or$s #it te funda+ental units of resistance, !oltage and
current, tat is, o+s, !olts and a+ps% In tis case, .0 +& ad to be con!erted into a+ps,
0%0. &, before substitution%
If a !alue for current in +& is substituted, te resistance !alue is gi!en in >
Te calculated !alue for R. is G00 % Wat are te nearest ).4?)4A !aluesI Resistors of
H/0 , G10 and /40 are a!ailable% H/0 is te ob!ious coice% Tis #ould allo# a
current sligtly greater tan .0 +& to flo#% (ost 7)*s are unda+aged by currents of up
to 40 +&, so tis is fine% Wat is te colour code for a H/0 resistorI
"esistors in series and #arallel
In a "%r#%" circuit, te current flo#ing is te sa+e at all points% Te circuit diagra+ so#s
t#o resistors connected in series #it a H C battery>
R%"#"(or" #n "%r#%"
It doesnKt +atter #ere in te circuit te current is +easured, te result #ill be te sa+e%
Te total resistance is gi!en by>
In tis circuit, RtotalN.E.N4 % Wat #ill be te current flo#ingI Te for+ula is>
Substituting>
Notice tat te current !alue is in +& #en te resistor !alue is substituted in %
Te sa+e current, B +&, flo#s troug eac of te t#o resistors% Wat is te !oltage
across R.I Te for+ula is>
Substituting>
Wat #ill be te !oltage across R4I Tis #ill also be B C% It is i+portant to point out tat
te su+ of te !oltages across te t#o resistors is e,ual to te po#er supply !oltage%
Te next circuit so#s t#o resistors connected in $'r'% to a H C battery>
R%"#"(or" #n $'r'%
'arallel circuits al#ays pro!ide alternati!e pat#ays for current flo#% Te total resistance
is calculated fro+>
Tis is called te $ro+!c( o-%r "!* &or*!' and #or$s for any (0o resistors in parallel%
&n alternati!e for+ula is>
Tis for+ula can be extended to #or$ for +ore tan t#o resistors in parallel, but lends
itself less easily to +ental arit+etic% Bot for+ulae are correct%
Wat is te total resistance in tis circuitI
Te current can be calculated fro+>
Ho# does tis current co+pare #it te current for te series circuitI ItKs +ore% Tis is
sensible% Connecting resistors in parallel pro!ides alternati!e pat#ays and +a$es it
easier for current to flo#% Ho# +uc current flo#s troug eac resistorI Because tey
a!e e,ual !alues, te current di!ides, #it H +& flo#ing troug R., and H +& troug
R4%
To co+plete te picture, te !oltage across R. can be calculated as>
Tis is te sa+e as te po#er supply !oltage% Te top end of R. is connected to te
positi!e ter+inal of te battery, #ile te botto+ end of R. is connected to te negati!e
ter+inal of te battery% Wit no oter co+ponents in te #ay, it follo#s tat te !oltage
across R. *!"( be H C% Wat is te !oltage across R4I By te sa+e reasoning, tis is also
H C%
KEY POINT>
Wen co+ponents are connected in parallel, te !oltage across te+ is te
sa+e%
Here is a sligtly +ore co+plex circuit, #it bot series and parallel parts>
C#rc!#( 0#(1 "%r#%" 'n+ $'r'%
r%"#"(or"
To find te o!erall resistance, te first step is to calculate te resistance of te parallel
ele+ents% You already $no# tat te co+bined resistance of t#o . resistors in
parallel is 0%1 , so te total resistance in te circuit is .E0%1N.%1 % Te po#er
supply current is>
Tis is te current #ic flo#s troug R.% Ho# +uc current #ill flo# troug R4I
Since tere are t#o e,ually easy pat#ays, 4 +& #ill flo# troug R4, and 4 +&
troug RB%
Te !oltage across R. is gi!en by>
Tis lea!es 4 C across R4 and RB, as confir+ed by te calculation for R4>
&gain, te su+ of te !oltages around te circuit is e,ual to te po#er supply !oltage%
Cec$ troug tis section carefully% & clear understanding of te concepts in!ol!ed #ill
elp tre+endously%
$o%er ratin!
Wen current flo#s troug a resistance, electrical energy is con!erted into eat% Tis is
ob!ious in an electric torc #ere te la+p fila+ent eats up and glo#s #ite ot, see
Capter .% &ltoug te result +ay be less e!ident or i+perceptible, exactly te sa+e
process of energy con!ersion goes on #en current flo#s troug 'n. electronic
co+ponent%
Te $o0%r output of a la+p, resistor, or oter co+ponent, is defined as te rate of cange
of electrical energy to eat, ligt, or so+e oter for+ of energy% 'o#er is +easured in
0'((", W, or *##0'((", *W, and can be calculated fro+>
#ere P is po#er%
Wat is te po#er output of a resistor #en te !oltage across it is H C, and te current
flo#ing troug it is .00 +&I
0%H W of eat are generated in tis resistor% To pre!ent o!ereating, it +ust be possible
for eat to be lost, or +#""#$'(%+, to te surroundings at te sa+e rate%
& resistorKs ability to lose eat depends to a large extent upon its surface area% & s+all
resistor #it a li+ited surface area cannot dissipate 2Nlose5 eat ,uic$ly and is li$ely to
o!ereat if large currents are passed% 7arger resistors dissipate eat +ore effecti!ely%
7oo$ at te diagra+ belo# #ic so#s resistors of different si9es>
Te standard si9e of carbon fil+ resistor used in +ost circuits as a po#er rating of
0%1 W% Tis +eans tat a resistor of tis si9e can lose eat at a *'/#*!* rate of 0%1 W%
In te exa+ple abo!e, te calculated rate of eat loss #as 0%H W, so tat a resistor #it a
iger po#er rating, . W or 4 W, #ould be needed% So+e resistors are designed to pass
!ery large currents and are cased in alu+iniu+ #it fins to increase surface area and
pro+ote eat loss%
Input and signal processing subsyste+s in electronic circuits rarely in!ol!e large currents,
but po#er rating sould be considered #en circuits dri!e output transducers, suc as
la+ps, 7)*s, and loudspea$ers%
KEIL MICROVISION
-An IDE for Microcontrollers
Keil development tools for the 8051 Microcontroller Architecture support every
level of software developer from the professional applications enineer to the student
!ust learnin a"out em"edded software development#
$he industry%standard Keil & &ompilers' Macro Assem"lers' (e"uers' )eal%time
Kernels' Sinle%"oard &omputers' and Emulators support all 8051 derivatives and
help you et your pro!ects completed on schedule
$he Keil 8051 (evelopment $ools are desined to solve the comple* pro"lems facin
em"edded software developers#
+hen startin a new pro!ect' simply select the microcontroller you use from
the (evice (ata"ase and the ,-ision .(E sets all compiler' assem"ler' lin/er'
and memory options for you#
Numerous e*ample prorams are included to help you et started with the
most popular em"edded 8051 devices#
$he Keil ,-ision (e"uer accurately simulates on%chip peripherals 0.1&' &AN'
2A)$' SP.' .nterrupts' .34 Ports' A3( &onverter' (3A &onverter' and P+M
Modules5 of your 8051 device# Simulation helps you understand hardware
confiurations and avoids time wasted on setup pro"lems# Additionally' with
simulation' you can write and test applications "efore taret hardware is
availa"le#
+hen you are ready to "ein testin your software application with taret
hardware' use the M4N51' M4N670' M4NA(.' or 8lashM4N51 $aret
Monitors' the .S(51 .n%System (e"uer' or the 29.NK 2S:%;$A< Adapter to
download and test proram code on your taret system#
$he ,-ision6 .(E is a +indows%"ased software development platform that com"ines
a ro"ust editor' pro!ect manaer' and ma/e facility# ,-ision6 interates all tools
includin the & compiler' macro assem"ler' lin/er3locator' and =E> file enerator#
,-ision6 helps e*pedite the development process of your em"edded applications "y
providin the followin?
8ull%featured source code editor'
(evice data"ase for confiurin the development tool settin'
Pro!ect manaer for creatin and maintainin your pro!ects'
.nterated ma/e facility for assem"lin' compilin' and lin/in your
em"edded applications'
(ialos for all development tool settins'
$rue interated source%level (e"uer with hih%speed &P2 and peripheral
simulator'
Advanced <(. interface for software de"uin in the taret hardware and for
connection to Keil 29.NK'
8lash prorammin utility for downloadin the application proram into 8lash
)4M'
9in/s to development tools manuals' device datasheets @ userAs uides#
$he ,-ision6 .(E offers numerous features and advantaes that help you Buic/ly and
successfully develop em"edded applications# $hey are easy to use and are
uaranteed to help you achieve your desin oals#
$he Vision IDE !n" De#u$$er is the central part of the Keil development
toolchain# ,-ision6 offers a %uil" Mo"e and a De#u$ Mo"e#
.n the ,-ision6 %uil" Mo"e you maintain the pro!ect files and enerate the
application#
.n the ,-ision6 De#u$ Mo"e you verify your proram either with a powerful &P2
and peripheral simulator or with the Keil &LINK &S%-'(A) A"!pter 0or other A<(.
drivers5 that connect the de"uer to the taret system# $he 29.NK allows you also
to download your application into 8lash )4M of your taret system#
About the Environment
$he ,-ision6 screen provides you with a menu "ar for command entry' a tool "ar
where you can rapidly select command "uttons' and windows for source files' dialo
"o*es' and information displays# ,-ision6 lets you simultaneously open and view
multiple source files#
,-ision6 has two operatin modes?
%uil" Mo"e* Allows you to translate all the application files and to enerate
e*ecuta"le prorams# $he features of the :uild Mode are descri"ed under
&reatin Applications#
De#u$ Mo"e* Provides you with a powerful de"uer for testin your
application# $he (e"u Mode is descri"ed in $estin Prorams#
.n "oth operatin modes you may use the source editor of ,-ision6 to modify your
source code# $he (e"u mode adds additional windows and stores an own screen
layout# $he followin picture shows a typical confiuration of ,-ision6 in the (e"u
Mode#
Te tabs of te ProB%c( Wor3"$'c% gi!e you access to>
o +iles and )roups of the pro!ect#
o &P2 Re$isters durin de"uin#
o $ool and pro!ect specific on%line %oo,s#
o $e*t (empl!tes for often used te*t "loc/s#
o +unction in the pro!ect for Buic/ editor naviation#
$he ta"s of the Output -in"o. provides? %uil" messaes and fast error
accessC (e"u Comm!n" input3output consoleC +in" in +iles results with
Buic/ file access#
$he Memory -in"o. ives access to the memory areas in display various
formats#
$he -!tc/ 0 C!ll St!c, -in"o. allows you to review and modify proram
varia"les and displays the current function call tree#
$he -or,sp!ce is used for the file editin' disassem"ly output' and other
de"u information#
$he Perip/er!l Di!lo$s help you to review the status of the on%chip
peripherals in the microcontroller#
Soft.!re De1elopment Cycle
=ome D ,-ision6 4verview D Software (evelopment &ycle
+hen you use the Keil ,-ision6' the pro!ect development cycle is rouhly the same
as it is for any other software development pro!ect#
1# &reate a pro!ect' select the taret chip from the device data"ase' and
confiure the tool settins#
E# &reate source files in & or assem"ly#
6# :uild your application with the pro!ect manaer#
F# &orrect errors in source files#
5# $est the lin/ed application#
$he followin "loc/ diaram illustrates the complete ,-ision6 software development
cycle# Each component is descri"ed "elow#
Vision3 IDE
$he ,-ision6 .(E com"ines pro!ect manaement' a rich%featured editor with
interactive error correction' option setup' ma/e facility' and on%line help# 2se
,-ision6 to create your source files and oraniGe them into a pro!ect that defines
your taret application# ,-ision6 automatically compiles' assem"les' and lin/s your
em"edded application and provides a sinle focal point for your development efforts#
C Compiler & Macro Assembler
Source files are created "y the ,-ision6 .(E and are passed to the & or E&HH
&ompiler or Macro Assem"ler# $he compiler and assem"ler process source files and
create relocata"le o"!ect files#
Library Manager
$he li"rary manaer allows you to create o"!ect li"rary from the o"!ect files created
"y the compiler and assem"ler# 9i"raries are specially formatted' ordered proram
collections of o"!ect modules that may "e used "y the lin/er at a later time# +hen
the lin/er processes a li"rary' only those o"!ect modules in the li"rary that are
necessary to create the proram are used#
LinkerLocator
$he 9in/er39ocator creates an e*ecuta"le proram file usin the o"!ect modules
e*tracted from li"raries and those created "y the compiler and assem"ler# An
e*ecuta"le proram file 0also called a"solute o"!ect module5 contains no relocata"le
code or data# All code and data reside at fi*ed memory locations#
$his e*ecuta"le proram file may "e used?
$o proram an 8lash )4M or other memory devices'
+ith the ,-ision6 (e"uer for simulation and taret de"uin'
+ith an in%circuit emulator for the proram testin#
Vision3 Debugger
$he ,-ision6 sym"olic' source%level de"uer is ideally suited for fast' relia"le
proram de"uin# $he de"uer includes a hih%speed simulator that let you
simulate an microcontroller system includin on%chip peripherals and e*ternal
hardware# $he attri"utes of the chip you use are automatically confiured when you
select the device from the (evice (ata"ase#
$he ,-ision6 (e"uer provides several ways for you to test your prorams on real
taret hardware#
2se the Keil 29.NK 2S:%;$A< adapter for 8lash downloadin and software test
of your proram via on%chip de"uin system li/e the Em"edded .&E macro
cell that is interated in many A)M devices#
2se the A<(. interface to attach use the ,-ision6 (e"uer front end with
your taret system usin other de"uers li/e Monitor' .n%System (e"uer'
or Emulator#
At Keil Software' we are dedicated to provide you with the "est em"edded
development tools and documentation availa"le# .f you have suestions or
comments reardin any of the on%line manuals accompanyin this product' please
contact us# .f you thin/ you have discovered a pro"lem with the software' do the
followin "efore callin technical support#
1# )ead the sections in this manual that pertains to the !o" or tas/ you are
tryin to accomplish#
E# Ma/e sure you are usin the most current version of the software and
utilities# &hec/ ...2,eil2com3up"!te to ma/e sure that you have the
latest software version#
6# .solate the pro"lem to determine if it is a pro"lem with the assem"ler'
compiler' lin/er' de"uer' or another development tool#
F# 8urther isolate software pro"lems "y reducin your code to a few lines#
.f you are still e*periencin pro"lems after followin these steps' report them to our
technical support roup# Please include your product serial num"er and version
num"er# +e prefer that you send the pro"lem via email# .f you contact us "y fa*' "e
sure to include your name and telephone num"ers 0voice and fa*5 where we can
reach you#
$ry to "e as detailed as possi"le when descri"in the pro"lem you are havin# $he
more descriptive your e*ample' the faster we can find a solution# .f you have a
sinle%pae code e*ample demonstratin the pro"lem' please email it to us# .f
possi"le' ma/e sure that your pro"lem can "e duplicated with the ,-ision6 Simulator#
Please try to avoid sendin complete applications or lon listins as this slows down
our response to you#
$he ,-ision6 2ser .nterface consists of menus' tool"ar "uttons' /ey"oard shortcuts'
dialo "o*es' and windows that you use as you interact with and manae the various
aspects of your em"edded pro!ect#
$he menu #!r provides menus for editor operations' pro!ect maintenance'
development tool option settins' proram de"uin' e*ternal tool control'
window selection and manipulation' and on%line help#
$he tool#!r #uttons allow you to rapidly e*ecute ,-ision6 commands# A
St!tus %!r provides editor and de"uer information# $he various tool"ars
and the status "ar can "e ena"led or disa"led from the -iew Menu
commands#
Key#o!r" s/ortcuts offer Buic/ access to ,-ision6 commands and may "e
confiured via the menu command Edit I &onfiuration % Shortcut Key#
$he followin sections list the ,-ision6 commands that can "e reached "y menu
comm!n"s' tool#!r #uttons' and ,ey#o!r" s/ortcuts# $he ,-ision6 commands
are rouped mainly "ased on the appearance in the menu "ar?
8ile Menu and 8ile &ommands
Edit Menu and Editor &ommands
o 4utlinin Menu
o Advanced Menu
o Selectin $e*t &ommands
-iew Menu
Pro!ect Menu and Pro!ect &ommands
(e"u Menu and (e"u &ommands
8lash Menu
Peripherals Menu
$ools Menu
S-&S Menu
+indow Menu
=elp Menu
Cre!tin$ Applic!tions
=ome D &reatin Applications
$his chapter descri"es the %uil" Mo"e of ,-ision6 and is rouped into the followin
sections?
Cre!te ! Pro4ect? e*plains the steps reBuired to setup a simple application
and to enerate =E> output#
Pro4ect (!r$et !n" +ile )roups? shows how to create application variants
and oraniGed the files that "elon to a pro!ect#
(ips !n" (ric,s? provides information a"out the advanced features of the
,-ision6 Pro!ect Manaer#
Cre!te Pro4ect
=ome D &reatin Applications D &reate Pro!ect
,-ision6 is a standard +indows application and started "y clic/in on the proram
icon# A"out the Environment descri"es the different window areas of ,-ision6#
,-ision6 includes a pro!ect manaer which ma/es it easy to desin applications for
an A)M "ased microcontroller# Jou need to perform the followin steps to create a
new pro!ect?
Select the $oolset 0only reBuired for A)M Pro!ects5#
&reate Pro!ect 8ile and Select &P2#
Pro!ect +or/space % :oo/s#
&reate New Source 8iles#
Add Source 8iles to the Pro!ect#
&reate 8ile <roups#
Set $ool 4ptions for $aret =ardware#
&onfiure the &P2 Startup &ode#
:uild Pro!ect and <enerate Application Proram &ode#
&reate a =E> 8ile for P)4M Prorammin#
$he section provides a step%"y%step tutorial that shows you how to create a simple
,-ision6 pro!ect#
Pro4ect (!r$ets !n" +ile )roups
=ome D &reatin Applications D Pro!ect $arets and 8ile <roups
:y usin different Pro4ect (!r$ets ,-ision6 lets you create several prorams from a
sinle pro!ect# Jou may need one taret for testin and another taret for a release
version of your application# Each taret allows individual tool settins within the
same pro!ect file#
+iles )roups let you roup associated files toether in a pro!ect# $his is useful for
roupin files into functional "loc/s or for identifyin enineers in your software
team# +e have already used file roups in our e*ample to separate the &P2 related
files from other source files# +ith these techniBue it is easily possi"le to maintain
comple* pro!ects with several 100 files in ,-ision6#
$he dialo Pro4ect 5 Components6 En1ironment6 %oo,s222 5 Pro4ect
Components allows you to create pro!ect tarets and file roups# +e have already
used this dialo to add system confiuration files in a file roup# An e*ample pro!ect
structure is shown "elow#
$he Pro4ect -or,sp!ce shows all roups and the related files# 8iles are "uilt and
lin/ed in the same order as shown in this window# Jou can move file positions with
Dr!$ 0 Drop# Jou may select a taret or roup name and Clic, to rename it# $he
local menu opens with a riht mouse Clic, and allows you for each item?
to set tool options
to remove the item
to add files to a roup
to open the file#
.n the "uild tool"ar you can Buic/ly chane the current pro!ect taret to "uild#
Pro4ect Components
=ome D (ialos D Pro!ect
Jou may !""' "elete' or re-!rr!n$e the items with the list "o* "uttons in Pro4ect
(!r$ets' )roups' and +iles#
Pro!ect $arets
Shows all Pro4ect (!r$ets in your pro!ect# Pro4ect (!r$ets let you create
several prorams form a sinle pro!ect# Jou may need one taret for testin
and another taret for a release version of your application#
<roups
Shows all +ile )roups in your current pro!ect# +ile )roups let you roup
associated files toether in a pro!ect# $his is useful for roupin files into
functional "loc/s or for identifyin enineers in your software team#
8iles
Shows all files of the selected +ile )roup#
Set as &urrent $aret
Set the selected Pro!ect $aret as the current taret#
Add 8iles
Add files to the selected +ile )roup#
(ips !n" (ric,s
=ome D &reatin Applications D $ips and $ric/s
$he followin section discusses advanced techniBues you may use with the ,-ision6
Pro!ect Manaer# Jou will not need the followin features very often' "ut readers of
this section et a "etter feelin for the ,-ision6 capa"ilities#
St!rt E7tern!l (ools !fter %uil" Process shows how to e*ecute prorams
after a successful "uild command which is useful for post%processin as
reBuired for sym"ol information "y some emulators or prorammers#
Specify ! Sep!r!te +ol"er for Listin$ !n" O#4ect +iles lets you direct the
o"!ect and listin files of your pro!ect to specific folders#
&se ! CP& t/!t is not in t/e Vision De1ice D!t!#!se e*plains how to
define new (evices that can "e selected from the (evice (ata"aseK#
Cre!te ! Li#r!ry +ile ives you the tool setup that is reBuired for creatin
li"rary files#
+ile E7tensions allows you to set the file e*tension for the various file types
of a pro!ect#
Import Pro4ect +iles from Vision Version 8 e*plains you how to import
e*istin ,-ision -ersion 1 92PR' files#
Version !n" Seri!l Num#er Inform!tion allows you to view pro!ect
specific tool version information#
+ile !n" )roup Specific Options are set via Options for 222 in conte*t menu that
opens via a riht mouse clic/ on an item in the Pro4ect -or,sp!ce#
Options for 222 provides the followin confiuration options?
Properties Di!lo$ allows you to set file and roup specific options#
Inclu"e Al.!ys specific Li#r!ry Mo"ules specify li"rary modules that
should "e always included in a pro!ect#
&se ! Custom (r!nsl!tor shows how to pre%process files with a custom
specific translator#
Different Compiler !n" Assem#ler Settin$s allows you to chane tool
options for a file roup or even a sinle file#
+ile E7tensions
=ome D &reatin Applications D $ips and $ric/s D 8ile E*tensions
$he dialo Pro4ect 5 Components6 En1ironment !n" %oo,s allows you to set the
file e*tension for the various file types of a pro!ect# Jou can enter several e*tensions
when you separate them "y semi%colon# $he file e*tensions are pro!ect specific#
!electing a "eneric Device
2nder the <eneric section in the device data"ase' you will find the followin eneric
devices?
8061 0all -ariants5
806E 0all -ariants5
8051 0all -ariants5
805E 0all -ariants5
&1LL 0all -ariants5 % Supports &P2s with no e*tended instruction set
&1LM 0all -ariants5 % Supports &P2s with an e*tended instruction set
A)MM 0all -ariants5 % Supports A)MM "ased microcontrollers
Jou may select one of these devices and then specify any necessary chip options in
the in the Options for (!r$et 5 (!r$et dialo# 8or e*ample on%chip memory may
"e specified as E7tern!l Memory#
A##ing a $e% Device
8rom the 8ile menu' select the (evice (ata"ase item# ,-ision opens a dialo which
shows the device data"ase where you may add and modify the e*istin devices#
$o add a new device###
1# Select a &P2 that is similar to the device you want to use# :e sure to dou"le%
clic/ to "rin the settins for this device into focus#
E# &hane the name of the chip vendor#
6# Select the appropriate &P2 family#
F# Enter the part num"er in the device te*t "o*#
5# Modify the description to match your device#
L# &hane the options for the tool confiuration strins# )efer to (evice
(ata"ase Parameters for information a"out tool confiuration strins#
M# Sinle%clic/ in the data"ase window 0to chane focus5# $his ena"les the Add
"utton#
8# &lic/ Add to add the new device#
Importin$ Vision 8 Pro4ects
=ome D &reatin Applications D $ips and $ric/s D .mportin ,-ision 1 Pro!ects
Jou can import pro!ect files from ,-ision1 "y usin the menu item Pro4ect - Import
Vision8 Pro4ect# $his starts the followin procedure?
1# &reate a new ,-ision pro!ect file# .t is important that the new ,-isionE36
pro!ect file is created in the e*istin ,-ision1 pro!ect folder#
E# Select a &P2 from the device data"ase#
6# Select the old ,-ision1 pro!ect file that e*ists in the pro!ect folder#
F# $his import the old ,-ision1 lin/er settins into the 91LL dialos# =owever' we
recommend that you use the dialo Vision Options for (!r$et 5 (!r$et to
define the memory structure of the taret hardware# 4nce you have done
that' you should open the dialo Options for (!r$et 5 L8:: 3 L7;8
Loc!te# Ena"le the option &se Memory L!yout from (!r$et and remove
the settins for &ser Cl!sses' &ser Se$ments' or &ser Sections in this
dialo#
5# &hec/ carefully if all settins are copied correctly to the new ,-ision pro!ect
file#
L# Jou may now create file roups in the new ,-ision pro!ect# $hen you can (ra
@ (rop files into the new file roups#
De#u$$in$
=ome D (e"uin
$his chapter descri"es the De#u$ Mo"e of ,-ision6 and shows you how to use the
user interface to test a sample proram# Also discussed are simulation mode and the
different options availa"le for proram de"uin#
Jou can use ,-ision6 (e"uer to test the applications you develop# $he ,-ision6
(e"uer offers two operatin modes that are selected in the Options for (!r$et 5
De#u$ dialo#
&se Simul!tor confiures the ,-ision6 (e"uer as software-only product
that simulates most features of a microcontroller without actually havin
taret hardware# Jou can test and de"u your em"edded application "efore
the hardware is ready# ,-ision6 simulates a wide variety of peripherals
includin the serial port' e*ternal .34' and timers# $he peripheral set is
selected when you select a &P2 from the device data"ase for your taret#
&se Advanced <(. drivers' li/e the &LINK De#u$$er to interface to your
taret hardware# 8or ,-ision6 various drivers are availa"le that interface to?
o '(A)3OCDS A"p!ter? which connects to on%chip de"uin systems
li/e the A)M Em"edded .&E#
o Monitor? that may "e interated with user hardware or is availa"le on
many evaluation "oards#
o Emul!tor? which connects to the &P2 pins of the taret hardware#
o In-System De#u$$er? which is part of the user application proram
and provides "asic test functions#
o (est <!r".!re? such as the .nfineon Smart&ard )4M Monitor )MLLP
or the Philips SmartM> (:o*#
+l!s/ Pro$r!mmin$
=ome D 8lash Prorammin
,-ision6 interates 8lash Prorammin 2tilities in the pro!ect environment# All
confiurations are saved in conte*t with your current pro!ect#
Jou may use e*ternal command%line driven utilities 0usually provided "y the chip
vendor5 or the Keil 29.NK 2S:%;$A< Adapter# $he 8lash Prorammin 2tilities are
confiured under Pro4ect - Options - &tilities#
8lash Prorammin may "e started from the +l!s/ Menu or "efore startin the
,-ision6 (e"uer when you ena"le Pro4ect - Options - &tilities - &p"!te (!r$et
#efore De#u$$in$#
Me!sure - Pro4ect +ile
=ome D E*ample Prorams D Measure? A )emote Measurement System D
Measure % Pro!ect 8ile
$he pro!ect file for the MEAS2)E sample proram is called Me!sure2&V=# $o load
this pro!ect file' use Open Pro4ect from the Pro4ect menu and select Me!sure2&V=
in the folder 222>ARM>222>E7!mples>Me!sure#
$he 8iles pae in the Pro!ect +or/space shows the source files that compose the
MEAS2)E pro!ect# $he three application related source files that are located in the
Source +iles roup# $he function of the source files is descri"ed "elow# $o open a
source file' dou"le%clic/ on the filename#
Me!sure2C? contains the main & function for the measurement system and
the interrupt routine for timer 0# $he main function initialiGes all peripherals of
the A)M and performs command processin for the system# $he timer
interrupt routine' timer0' manaes the real%time cloc/ and the measurement
samplin of the system#
MComm!n"2C? processes the display' time' and interval commands# $hese
functions are called from main# $he display command lists the analo values
in floatin%point format to ive a voltae "etween 0#00- and 5#00-#
)etLine2C? contains the command%line editor for characters received from
the serial port#
IR?2S? is an interface module for the interrupt service routine#
Compilin$ !n" Lin,in$ Me!sure
=ome D E*ample Prorams D Measure? A )emote Measurement System D
&ompilin and 9in/in Measure
+hen you are ready to compile and lin/ the MEAS2)E pro!ect' use the %uil" (!r$et
command from the Pro!ect menu or the tool"ar# ,-ision6 "eins to compile and lin/
the source files in MEAS2)E and displays a messae when the "uild is finished#
4nce the pro!ect is "uilt' you are ready to "rowse the sym"ol information or "ein
testin#
(estin$ Me!sure
=ome D E*ample Prorams D Measure? A )emote Measurement System D $estin
Measure
$he MEAS2)E sample proram is desined to accept commands from the on%chip
serial port# .f you have actual taret hardware' you can use a terminal simulation to
communicate with the A)M &P2# .f you do not have taret hardware' you can use
,-ision6 to simulate the hardware# Jou can also use the serial window in ,-ision6 to
provide serial input#
4nce the MEAS2)E proram is "uild' you can test it# 2se the St!rt3Stop De#u$
Session command from the De#u$ menu to start the ,-ision6 de"uer#
&emote Measurement !ystem Comman#s
$he serial commands that MEAS2)E supports are listed in the followin ta"le# $hese
commands are composed of AS&.. te*t characters# All commands must "e
terminated with a carriae return# Jou can enter these commands in the Seri!l
-in"o. @8 durin de"uin#
Comm!n"Seri!l (e7t Description
&lear & &lears the measurement record "uffer#
(isplay ( (isplays the current time and input values#
$ime
$
hh:mm:ss
Sets the current time in EF%hour format#
.nterval . mm:ss.ttt
Sets the interval time for the measurement samples# $he
interval time must "e "etween 0?00#001 0for 1ms5 and
L0?00#000 0for L0 minutes5#
Start S
Starts the measurement recordin# After receivin the start
command' MEAS2)E samples all data inputs at the specified
interval#
)ead ) NcountO
(isplays the recorded measurements# Jou may specify the
num"er of most recent samples to display with the read
command# .f no count is specified' the read command
transmits all recorded measurements# Jou can read
measurements on the fly if the interval time is more than 1
second# 4therwise' the recordin must "e stopped#
Puit P Puits the measurement recordin#
Vie. Pro$r!m Co"e
=ome D E*ample Prorams D Measure? A )emote Measurement System D -iew
Proram &ode
,-ision6 lets you view the proram code in the (isassem"ly +indow that opens with
the -iew menu or the tool"ar "utton# $he (isassem"ly +indow shows intermi*ed
source and assem"ly lines# Jou may chane the view mode or use other commands
from the local menu that opens with the riht mouse "utton#
Vie. Memory Contents
=ome D E*ample Prorams D Measure? A )emote Measurement System D -iew
Memory &ontents
,-ision6 displays memory in various formats# $he Memory +indow opens via the
-iew menu or the tool"ar "utton# Jou can enter the address of four different memory
areas in the paes# $he local menu allows you to modify the memory contents or
select different output formats#
Pro$r!m E7ecution
=ome D E*ample Prorams D Measure? A )emote Measurement System D
Proram E*ecution
:efore you "ein simulatin MEAS2)E' open the Seri!l -in"o. @8 that displays
the serial output with the Vie. menu or the De#u$ tool"ar# Jou may disa"le other
windows if your screen is not lare enouh#
Jou can use the Step tool"ar "uttons on assem"ler instructions or source code lines#
.f the (isassem"ly +indow is active' you sinle step at assem"ly instruction "asis# .f
an editor window with source code is active' you sinle step at source code level#
C!ll St!c,
=ome D E*ample Prorams D Measure? A )emote Measurement System D &all
Stac/
,-ision6 internally trac/s function nestin as the proram e*ecutes# $he C!ll St!c,
pae of the -!tc/ -in"o. shows the current function nestin# A dou"le clic/ on a
line displays the source code that called the selected function#
%re!,points Di!lo$
=ome D E*ample Prorams D Measure? A )emote Measurement System D
:rea/points (ialo
,-ision6 also supports comple* "rea/points as discussed on pae 107# Jou may want
to halt proram e*ecution when a varia"le contains a certain value# $he e*ample
shows how to stop when the value 6 is written to current2time2sec#
4pen the %re!,points dialo from the De#u$ menu# Enter as e*pression
current2time2secAA# Select the +rite chec/ "o* 0this option specifies that the
"rea/ condition is tested only when the e*pression is written to5# &lic/ on the (efine
"utton to set the "rea/point#
$o test the "rea/point condition perform the followin steps?
Sym#ol Description
)eset &P2#
.f proram e*ecution is halted "ein e*ecutin the MEAS2)E proram#
After a few seconds' ,-ision6 halts e*ecution# $he proram counter line in the de"u
window mar/s the line in which the "rea/point occurred#
-!tc/ V!ri!#les
=ome D E*ample Prorams D Measure? A )emote Measurement System D +atch
-aria"les
Jou may constantly view the contents of varia"les' structures' and arrays# 4pen the
-!tc/ -in"o. from the Vie. menu or with the tool"ar# $he Loc!ls pae shows all
local sym"ols of the current function# $he +atch Q1 and +atch QE paes allow you
to enter any proram varia"les as descri"ed in the followin?
Select the te*t Benter /ereC with a mouse clic/ and wait a second# Another
mouse clic/ enters edit mode that allows you to add varia"les# .n the same
way you can modify varia"le values#
Select a varia"le name in an E"itor -in"o. and open the local menu with a
riht mouse clic/ and use the command A"" to -!tc/ -in"o.#
Jou can enter -!tc/Set in the Output -in"o. 5 Comm!n" pae#
$o remove a varia"le' clic/ on the line and press the Delete /ey#
Structures and arrays open on demand when you clic/ on the NHO sym"ol# (isplay
lines are indented to reflect the nestin level#
$he +atch +indow updates at the end of each e*ecution command# Jou ena"le may
ena"le Perio"ic -in"o. &p"!te in the Vie. menu to update the watch window
durin proram e*ecution#
Vie. !n" Mo"ify On-C/ip Perip/er!ls
,-ision6 provides several ways to view and modify the on%chip peripherals used in
your taret proram# Jou may directly view the results of the e*ample "elow when
you perform the followin steps?
Sym#ol Description
)eset &P2 and /ill all defined "rea/points#
.f proram e*ecution is halted "ein e*ecutin the MEAS2)E proram#
4pen the Seri!l -in"o. @8 and enter the RdR command for the MEAS2)E
application# MEAS2)E shows the values from .34 PortE and A3( input 0 I 6#
$he Serial +indow shows the followin output?
Jou may now use the followin procedures to supply input to the .34 pins?
&sin$ Perip/er!l Di!lo$ %o7es
,-ision6 provides dialos for? .34 Ports' .nterrupts' $imers' A3( &onverter' Serial
Ports' and chip%specific peripherals# $hese dialos can "e opened from the (e"u
menu# 8or the MEAS2)E application you may open .34 Ports?PortE and A3(
&onverter# $he dialos show the current status of the peripherals and you may
directly chane the input values#
Each of these dialos lists the related S8) sym"ols and shows the current status of
the peripherals# $o chane the inputs' chane the values of the Pins or Analo .nput
&hannels#
&sin$ V(RE) Sym#ols
.n the Comm!n" pae of the Output -in"o.' you may ma/e assinments to the
-$)E< sym"ols !ust li/e varia"les and reisters# 8or e*ample?
PORT2=0xDA00 set digital input PORT2 to 0xDA00.
AIN1=3.3 set analog input AIN1 to 3.3 volts.
&sin$ &ser !n" Si$n!l +unctions
Jou may com"ine the use of -$)E< sym"ols defined "y the &P2 driver and ,-ision6
user and sinal functions to create a sophisticated method of providin e*ternal input
to your taret prorams# $he Analo E*ample shows a sinal function that provides
input to A.N0# $he sinal function is included in the MEAS2)E e*ample and may "e
Buic/ly invo/ed with the $ool"o* "utton Analo0##6- and chanes constantly the
voltae on the input A.N0#

POWER SUPPLY:
To run te electronic gadget at o+e it is pro!ided by so+e po#er supply%
Te +icrocontroller used 2at/3c1.5 re,uires .4! *%C supply% Te *T(- recei!er used
2+t//G05 re,uires 1! *%C% so design of tese regulated po#er supply is also an i+portant
part in ard#are design% Te &%C po#er supply fro+ +ains is ta$en and regulated using
te rectifiers%
-or design of a regulated po#er supply co+ponents used are>
IN4007
0
1
2
70!
LE
1
2
1000u"
T!A"#$%!ME!
&
'
4
IN4007
(
1)
2
1
100u"
4B0 C &C
S=''7Y
10 Hc
A
Transfor+er%
*iodes%
Rectifiers%
Regulated IC cips%
Capaciti!e filters%
Trans former
& transfor+er is re,uired to couple te +ains to te actual po#er supply
circuit% Tis is re,uired to isolate te +ains fro+ te actual regulated po#er
supply circuit and te oter part of te $it% Tis isolation eli+inates te da+e of
te $it to any po#er supply !ariations or fro+ a faulty soc$%
-or a transfor+er so#n belo#>
>
Diodes:
In bride rectifier four diodes are used% Te specifications of diodes are cosen
as>
'IC d input !oltage%
Si diode is better%
'o#er dissipation is $ept fixed #it respect to current troug te diode%
bunction capacitance need not be considered for fre,uencies Y. $H9%
V5 V6
#5 #6
V5 : #6 : n5
V6 #5 n6
RECTIFIERS:
Rectification is a process of con!ersion of &C to *C% Here, te &C of transfor+er
output is gi!en to te rectifier input, #ic con!erts it to *C output% Basically, bridge
rectifiers or diodes arranged in bridge called *iode arrange+ent are used for po#er
supply design%
& bridge rectifier +a$es use of four diodes in a bridge arrange+ent to acie!e
full@#a!e rectification% Tis is a #idely used configuration, bot #it indi!idual diodes
#ired as so#n and #it single co+ponent bridges #ere te diode bridge is #ired
internally

Current Flow in the Bridge Rectifier
-or bot
positi!e and
negati!e s#ings
of te

transfor+er, tere is a for#ard pat troug te diode bridge% Bot conduction pats
cause current to flo# in te sa+e direction troug te load resistor, acco+plising full@
#a!e rectification%




Wile one set of diodes is for#ard biased, te oter set is re!erse biased and
effecti!ely eli+inated fro+ te circuit%
Diode Bridge:
& diode bridge is an arrange+ent of four diodes connected in a bridge circuit as
so#n belo#, tat pro!ides te sa+e polarity of output !oltage for any polarity of te
input !oltage% Wen used in its +ost co++on application, for con!ersion of alternating
current 2&C5 input into direct current 2*C5 output, it is $no#n as a bridge rectifier% Te
diagra+ describes a diode@bridge design $no#n as a full@#a!e rectifier or Lraet9 circuit%
Tis design can be used to rectify single pase &C #en no transfor+er center tap is
a!ailable
Bridge Rectifier Circuit:
Te essential feature of tis arrange+ent is tat for bot polarities of te
!oltage at te bridge input, te polarity of te output is constant%
Capacitors:
Capaciti!e filters are used stabili9ed or perfect regulation of te !oltage% Te
capaciti!e filters are opted because, tey are +ore efficient% But tey are also +ore costly%
*ifferent types of capacitors are>
.% Cera+ic capacitors%
4% )lectrolyte capacitors%
B% 'aper?(ica capacitors%
A% Sil!er capacitors%
1% Tantalu+ capacitors%
Cera+ic, 'aper?(ica, Sil!er are nonpolari9ed capacitors% )lectrolyte and Tantalu+ are
polari9ed capacitors% -or ig fre,uency, Cera+ic capacitors are used% -or lo#
fre,uencies, )lectrolyte capacitors are used%
inear regulated !C"s:
7inear regulated IC<s are used for best regulated output% Te output fro+ tese
regulated IC<s is gi!en to +icrocontroller and *T(- recei!er% Tese linear regulated IC<s
are self protecti!e 2any accidental sot circuit in te IC is grounded auto+atically5%
G/xx series ICs are used for ;E!e< supply%
G3xx series ICs are used for ;@!e< supply%
G/xx and G3xx series ICs are fixed !oltage regulators% 7( B.G is a !ariable
!oltage regulator%
-or +icrocontroller and *T(- recei!er #e are using ;E!e< !oltage regulation%
-or ;E!e< !oltage regulation te connections are as so#n belo#>
Co+bining all te circuits #e can design a circuit #ose output is a perfect
regulated !oltage% Te regulated po#er supply $it used to po#er te +icrocontroller and
*T(- recei!er is as so#n belo#>
G/xx .
.
4
.
B
.
INPUT O!($!(
GND
Br#+)%
r%c(#&#%r
A.C
*'#n"
=?56 =?4; C;-
C56-
-IL> R)L=7&T)* 'OW)R S=''7Y
CIRC=IT
ULN6?47,!&&%r
-eatures>
100@+& Rated Collector Current 2Single Output5
Hig@Coltage Outputs % % % 10 C
Output Cla+p *iodes
Inputs Co+patible Wit Carious Types of
logic
Relay *ri!er &pplications
Co+patible #it =7N4/00& Series
+%"cr#$(#on8or+%r#n) #n&or*'(#on
Te =7N4/0B& is a ig@!oltage, ig@
current *arlington transistor array% Te de!ice
consists of eigt npn *arlington pairs tat feature
ig@!oltage outputs #it co++on@catode cla+p diodes for s#itcing inducti!e loads%
Te collector@current rating of eac *arlington pair is 100 +&% Te *arlington pairs +ay
be connected in parallel for iger current capability%
&pplications include relay dri!ers, a++er dri!ers, la+p dri!ers, display dri!ers 27)*
and gas discarge5, line dri!ers, and logic buffers% Te =7N4/0B& as a 4%G@$Oseries base
resistor for eac *arlington pair for operation directly #it TT7 or 1@C C(OS de!ices%
7ogic diagra+>
',"o!(% *'/#*!* r'(#n)" '( 6;C &r%%2'#r (%*$%r'(!r% @!n%"" o(1%r0#"% no(%+A
Collector@e+itter
!oltageeeeeeeeeeeeeeeeeeeeeeeeeeee% 10 C
Input !oltage 2see Note .5
eeeeeeeeeeeeeeeeeeeeeeeeee%B0 C
Continuous collector currenteeeeeeeeeeeeeeeeeeeeeeee%
100 +& %
Output cla+p diode
currenteeeeeeeeeeeeeeeeeeeeeeeee 100 +&
Total substrate@ter+inal
currenteeeeeeeeeeeeeeeeeeeeeeee @4%1 &
'ac$age ter+al i+pedance, b& 2see Notes 4 and B5> *W pac$age TB* C?W N
pac$age TB* C?W
Operating !irtual "unction te+perature,eeeeeeeeeeeeeeeeeeee
Tb .10 C
Storage te+perature range, eeeeeeeeeeeeeeeeeeee%%Tstg
@H1 C to .10 C %
=>LNS 6>>P ,!&&%r
B@State Outputs *ri!e Bus 7ines or Buffer (e+ory &ddress Registers
'N' Inputs Reduce *C 7oading
Hysteresis at Inputs I+pro!es Noise
(argins
D%"cr#$(#on
Tese octal buffers and line dri!ers are
designed specifically to i+pro!e bot te
perfor+ance and density of tree@state
+e+ory address dri!ers, cloc$ dri!ers, and
bus@oriented recei!ers and trans+itters% Te
designer as a coice of
selected co+binations of in!erting andnonin!erting outputs, sy++etrical, acti!e@
lo#output@control 2L5 inputs, and co+ple+entary output@control 2L and L5 inputs% Tese
de!ices feature ig fan@out, i+pro!ed fan@in, and A00@+C noise +argin% Te SNGA7S<
and SNGAS< de!ices can be used to dri!e ter+inated lines do#n to .BBo+s%
',"o!(% *'/#*!* r'(#n)" o-%r o$%r'(#n) &r%%2'#r (%*$%r'(!r% r'n)% @!n%""
o(1%r0#"% no(%+A
Sn'$ "1o(" o& K%# *#cro-#"#on 'n+ M#cro&'"1 $ro)r'**%r
Pro)r'* 0r#((%n #n C 'n)!')%
fincludeYstdio%d
fincludeYreg1.%d
!oid deley2int5:
!oid +sdeley2!oid5:
sbit sen.N'.g0:
sbit sen4N'.g.:
sbit bu99N'.gB:
sbit sig.N'.gA:
sbit sig4N'.g1:
sbit laserN'. gH:
!oid close25:
!oid open25:
!oid bu99er25:
int +N.0000:
!oid +ain25
h
'0N'4N'BN0x00:
'.N0xff:
bu99er25:
sig.N0x00: ??train stop?road go
sig4N0x0.:
open25:
for2::5
h
if2sen.NN0x005
h
sig.N0x0.: sig4N0x00: ??train go?road stop
bu99er25:
close25:
+sdeley25:
#ile2sen4NN0x0.5hi
#ile2sen4NN0x005hi
sig.N0x00: sig4N0x0.: ??train stop?road go
bu99er25:
open25:
i
if2sen4NN0x005
h
sig.N0x0.: sig4N0x00: ??train go?road stop
bu99er25:
close25:
+sdeley25:
#ile2sen.NN0x0.5hi
#ile2sen.NN0x005hi
sig.N0x00: sig4N0x0.: ??train stop?road go
bu99er25:
open25:
i
i
i
!oid +sdeley2!oid5
h
int lN0:
for2lN0:lYN400:lEE5
h
T(O*N0x.0:
T7.N0xfe:
TH.N0xa1:
TR.N.:
#ile2T-.NN05
h
if2laserNN0x005
h
sig.N0x00: sig4N0x0.: ??train stop?road go
bu99er25:
open25:
#ile2laserNN0x005hi
sig.N0x0.: sig4N0x00: ??train go?road stop
bu99er25:
close25:
i
i
TR.N0:
T-.N0:
i
i
!oid bu99er25
h
int y:
for2yN0:yYN/:yEE5
h
bu99N0x0.:deley2.10005:
bu99N0x00:deley2.10005:
i
i
!oid open25
h
'4N0x..:deley2+5:
'4N0xBB:deley2+5:
'4N0x44:deley2+5:
'4N0xHH:deley2+5:
'4N0xAA:deley2+5:
'4N0xcc:deley2+5:
'4N0x//:deley2+5:
'4N0x33:deley2+5:
'4N0x..:deley2+5:
'4N0xBB:deley2+5:
'4N0x44:deley2+5:
'4N0xHH:deley2+5:
'4N0xAA:deley2+5:
'4N0xcc:deley2+5:
'4N0x//:deley2+5:
'4N0x33:deley2+5:
i
!oid close25
h
'4N0x33:deley2+5:
'4N0x//:deley2+5:
'4N0xcc:deley2+5:
'4N0xAA:deley2+5:
'4N0xHH:deley2+5:
'4N0x44:deley2+5:
'4N0xBB:deley2+5:
'4N0x..:deley2+5:
'4N0x33:deley2+5:
'4N0x//:deley2+5:
'4N0xcc:deley2+5:
'4N0xAA:deley2+5:
'4N0xHH:deley2+5:
'4N0x44:deley2+5:
'4N0xBB:deley2+5:
'4N0x..:deley2+5:
i
!oid deley2$5
h
int iN0:
for2iN0:iYN$:iEE5hi
i
Pro)r'* H%/ co+%:
>0A044)00040C4G.0/G
>.00.AB00)A-1B0-1&0-1/0G130--.40.)AC43A*4))
>.00.1B0031.400/-4030.3.40.)0.400)*.40.33-G
>.00.HB00403.-*B03.-*C43A*431.40.)A.400/-CB
>.00.GB00403.)..40.)0.400)*.40.334030-*B0HG
>0)0./B0030-*C43A*431.40.)A.400/-/0CHB)
>.00.3300)A-10/-103-10/-103G1/3.0G1/B-)G1-B
>.00.&300/*&1*4/)40/-./403H-&C43A*431.40.H*
>.00.B300)A.400/-B03H-*.40.)0.400)*/0)1C4*1
>.00.C300/)C4/-0103)103G004010/*B3AC/)10/B0
>0H0.*300HA/03A/0A0CB41
>0.0.*-0044-*
>0A0.)000*43AC4311)
>.00.)A00)A-10&-10B*43BG-3/G)B&.404.HC43BG1
>.00.-A00G-3/G)B&.404.H010B)10BG004010&*B&)
>0&040A003A0/)10&HA/03A/0A0*B14
>0.040)0044C*
>.000/-00G1&0...404.4.4040-G1&044.404.4G140
>.0003-00&0HH.404.4G1&0AA.404.4G1&0CC.404B.
>.000&-00.4G1&0//.404.4G1&033.404.4G1&0..G4
>.000B-00.404.4.4040-G1&044.404.4G1&0HH.4-)
>.000C-0004.4G1&0AA.404.4G1&0CC.404.4G1&0G4
>0)00*-00//.404.4G1&033&-0*&)0C0404.H4G
>.000)*00G1&033.404.4G1&0//.404.4G1&0CC.4G3
>.000-*0004.4G1&0AA.404.4G1&0HH.404.4G1&0&&
>.00.0*0044.404.4.4040-G1&0...404.4G1&033G*
>.00..*00.404.4G1&0//.404.4G1&0CC.404.4G1H*
>.00.4*00&0AA.404.4G1&0HH.404.4G1&044.404CC
>0)0.B*00.4.4040-G1&0..&-0*&)0C0404.HC3
>0G040-00G1&0BB&-0*&)0C4&
>.004.H00)A-*-C*B)*3-))HA/0-/)CHA/03/100G.B
>0G044H000*B*000.0C/0)C/)
>0.044*0044&)
>0B00000004000B-/
>0C000B00G/G-)A-H*/-*G1/.0*0400A&-C
>.0000-00040.AB)A3B&B-/)A3B&BA00B-H/00.-4BB
>.000.-000/*--A/043)A3B&B-/1A0G4A0CC/CBBB-4
>.0004-00CA1A0-AA40C//BA00A-A1H/00.AH-H*-C.
>.000B-00)A/00B0.040A0/.040A0/030044))AG)4.
>.000A-000.3BH0BC&B--1AB-B0)1031A.--))A3BBH
>.0001-00&BH00.0)C-1AC041)0H0&/A0B/)A3B&BG*
>.000H-00-&)A3B&B-/)A3B&BC/C1/4C/C&C1/BC&&/
>.000G-00-0&BC/C1/4C/C&C1/BC&*-)3*))G/0B)H0
>0.04B40000CB
>0000000.--
R%&%r%nc%":
###%/014%co+?tutorial%pt+l
/01. +icrocontroller by 6ennet b% &yala
www.electronicsforu.com*electronicsforu*articles*hits.asp+id,1-.1
Programming Embedded Syste+s> Wit C and LN= *e!elop+ent Tools
by Michael Barr
Basic electronics By> LROB
'ractical transistor circuit design and analysis By> L)R&7* )% WI77I&(S
Sensor @ )lectronic circuit guide boo$ U Colu+e U . By> bOS)'H b%C&RR
'rogra++ing and Custo+i9ing te /01. (icro@controller By> (y$e 'red$o
Te concepts and -eatures of (icro@controllers @ By> Ra" 6a+al
The '0(1 Micro/controller Architecture0 programming 1 Applications
2y3 4enneth 5. Ayala
C(OS?TT7 IC *ata (anuals

Vous aimerez peut-être aussi