Beruflich Dokumente
Kultur Dokumente
The word robot comes from the Czech word ROBOT, meaning, Forced labor. According to the robot Instit te of America a robot is re!rogrammable, m lti f nctional mani! lator designed to mo"e materials, !arts, tools or s!ecialized de"ices thro gh "ario s !rogrammed motion for the !erformance of a "ariet# of tas$s. %e are constr cting a micro controlled based remote controlled robot sing AT &'C() IC.A remote controller being o!erated in radio fre* enc#+RF,.%e are designing a transmitter circ it and recei"er circ it in order to control the mo"ement of robot .The RF +Radio fre* enc#, is sed for wide range of a!!lications. In the RF sections we are sing -../01 in order to transmit and recei"e the signals and therefore to control the mo"ements of the robot. And here we are also se a 2C camera to identif# the ob3ects and we see the ob3ects in the com! ter. Robot is constr cted b# sing fo r 4C motors and the !rogram for the mo"ement of these motors is b rned in to the IC AT&'C(). The main a!!lication of o r !ro3ect is to "iew the ob3ects which are at a distance of )$m where man !ower is not s !!osed to do +mines, high tem!erat re, s!ace,. 0ere the "ehicle consists of a rotating camera which is sed to transmit both A dio and 5ideo signals sing F/. The camera sed here is small in size with lens and in b ild mic which transmits both A dio and 5ideo signals on a !ortable tele"ision with the hel! of wireless Technolog#.
electromechanical s#stem, which, b# its a!!earance or mo"ements, con"e#s a sense that it has intent or agenc# of its own. The word robot can refer to both !h#sical robots and "irt al software agents, b t the latter are s all# referred to as bots to differentiate. Robots are able to !erform re!etiti"e tas$s more * ic$l#, chea!l#, and acc ratel# than h mans. %hile there is still disc ssion abo t which machines * alif# as robots, a t#!ical robot will ha"e se"eral, tho gh not necessaril# all of the following !ro!ertiesA
It is not Cnat ralC i.e. artificiall# created It can sense its en"ironment, and mani! late or interact with things in it. .
It has some degree of intelligence or abilit# to ma$e choices based on the en"ironment, often sing a tomatic control or a !re!rogrammed se* ence. It is !rogrammable. It mo"es with one or more a>es of rotation or translation. It ma$es de>tero s coordinated mo"ements.
embedded s#stems became feasible. 2resentl#, a lot of "arieties of embedded s#stems are a"ailable at "er# low costs. Charact!ristics:
?mbedded s#stems are designed to do some s!ecific tas$. Bome also ha"e real time !erformance constraints that m st be met, for reason s ch as safet# and sabilit#@ others ma# ha"e low or no !erformance re* irements, allowing the s#stem hardware to be sim!lified to red ce cost. An embedded s#stem is not alwa#s a se!arate bloc$="er# often it is !h#sicall# b ilt=in to the de"ice it is controlling. The software written for embedded s#stems is often called #ir $ar!% and is stored in read=onl# memor# or flash memor# chi!s rather than a dis$ dri"e. It often r ns with limited com! ter hardware reso rcesA small or no $e#board, screen, and little memor#.
CP& P'at#or : ?mbedded !rocessors can be bro$en into two distinct categoriesA micro!rocessors +.2, and microcontrollers +.C,. /icrocontrollers ha"e b ilt=in !eri!herals on the chi!, red cing size of the s#stem. There are man# different C28 architect res sed in embedded designs s ch as AR/, /I2B, ColdfireJH&$, 2ower 2C, K&H, 2IC, &;(), Atmel A5R, Renesas 0&, B0, 5&(;, FR=5, /.:R, 1&;, 1&, etc. This contrast to the d!s(to) co )ut!r mar$et, which is c rrentl# limited to 3 st a few com!eting architect res.A common config ration for "er#=high="ol me embedded s#stems is the s"st! on a chi) +soc,, an a))'ication*s)!ci#ic int!+rat!d circuit ,ASIC-% for which the C28 core was ! rchased and added as a !art of the chi! design. A related scheme to se a #i!'d )ro+ra C28. ( ab'! +at! arra" ,.P/A-% and !rogram it with all the logic, incl ding the
0AR4%AR? BOFT%AR?
). 2eri!herals ). AF2 :. 2rocessors .. /emor# :. C .. 5B, etc...
So#t$ar!: 5ario s software can be for "ario s ! r!oses. AF2 i.e. Assembl# Fang age 2rogram can be sed as the bac$end and other software li$e C, 5B, etc. can be sed in front end.
E b!dd!d So#t$ar! Archit!ctur!s: There are se"eral different t#!es of software architect re in common se. a. Si )'! Contro' 0oo): In this design, the software has a loo!. The loo! calls the s bro tines, each of which manages a !art of the hardware or software. b. Int!rru)t Contro''!d S"st! : Bome embedded s#stems are !redominantl# interr !t controlled. This means that tas$s !erformed b# the s#stem are triggered b# different $inds of e"ents. An interr !t co ld be generated for e>am!le b# a timer in a !re=defined fre* enc#, or b# a serial !ort controller recei"ing a b#te.
These $inds of s#stems r n a sim!le tas$ in a main loo! also, b t this tas$ is not sensiti"e to e>!ected dela#s. The tas$s !erformed in the interr !t handlers sho ld be $e!t short the interr !t latenc# to a minim m. Bome times longer tas$s are added to a * e e str ct re in the interr !t handlers to be !rocessed in the main loo! later. This method brings the s#stem close to a m ltitas$ing $ernel with discrete !rocessed in the main loo! later. This brings the s#stem close to a m ltitas$ing $ernel with discrete !rocessors. 1icro*(!rn!' and E2o*(!rn!': A micro$ernel is a logical ste! ! from a real=time OB. The s al arrangement is that the o!erating s#stem $ernel allocates memor# and switches the C28 to different threads of e>ec tion. 8ser mode !rocesses im!lement ma3or f nctions s ch as file s#stems, networ$ interfaces, etc. In general, micro$ernel s cceed when the tas$ switching and inter tas$ comm nication is fast, and fail when the# are slow. ?>o$ernels comm nicate efficientl# b# normal s bro tine calls. The hardware and all the software in the s#stem are a"ailable to, and e>tensible b# a!!lication !rogrammers. P!ri)h!ra's: 2eri!herals are the "ario s de"ices that are connected to the C28, for !erforming "ario s f nctions. ?mbedded s#stems tal$ with the o tside world "ia !eri!herals, s ch asA Berial comm nication interfaces +BCI,A RB=:.:, RB=-::, RB=-(& etc. B#nchrono s Berial comm nication interfaces +BBCI,A I:C, LTAE, B2I, BBC and ?BBI 8ni"ersal Berial B s +8BB, <etwor$sA Controller Area <etwor$, etc. TimersA 2FF+s,, Ca!t reJCom!are and Time 2rocessing nits. 4iscrete IJOA Eeneral 2 r!ose In! tJO t! t +E2IO,.
Proc!ssors: 2rocessors are the $e# elements in an# embedded s#stem. The# interact with the memor#, where the "ario s instr ctions of sef l f nctions into a single IC !ac$age. These f nctions areA The abilit# to e>ec te a stored set of instr ctions to carr# o t ser defined tas$s. The abilit# to be able to access e>ternal memor# chi!s to both read and writes data from and to the memor#.
1icrocontro''!r: Basicall#, a microcontroller is a de"ice which integrates a n mber of the com!onents of a micro!rocessor s#stem on to a single chi!. Bo a microcontroller combines onto the same microchi!A The C28 core /emor#+both RO/ and RA/, /ost microcontrollers will also combine other de"ices s ch asA A Timer mod le to allow the microcontroller to !erform tas$s for certain !eriods. A serial IJO !ort to allow data to flow between the microcontroller and other de"ices s ch as a 2C or another microcontroller. &
An A4C to allow the microcontroller to acce!t analog e in! t data for !rocessing. 3SP: It is the st d# of signals in digital re!resentation and !rocessing methods of these signals. It is sed where large mathematical and scientific calc lations are re* ired. ASIC: It is an IC designed for a s!ecific a!!lication. This IC designed for s!ecific a!!lication can9t be sed for other a!!lication. .!atur!s: The main feat res of an embedded s#stem are its reliabilit# and the sco!e for deb gging. 3!bu++in+: 4eb gging ma# be !erformed at different le"els, de!ending on the facilities a"ailable, ranging from assembl# or so rce=le"el 4eb gging with an in=circ it em lator or in circ it 4eb gger, to o t! ts from serial deb g !orts to an em lated en"ironment r nning on a 2C. As the com!le>it# of embedded s#stems grows, higher le"el tools and O!erating s#stems or migrating into machiner# where it ma$es sense.
R!'iabi'it":
'
?mbedded s#stems often reside in machines that are e>!ected to r n contin o sl# for #ears witho t errors and in some cases reco"er b# themsel"es if an# error occ rs. Therefore the software is s all# de"elo!ed and tested more caref ll# than that for 2C, and nreliable mechanical mo"ing !arts s ch as 4is$ dri"es, switches or b ttons are a"oided. B!ecific reliabilit# iss es ma# incl deA The s#stem cannot safel# be sh tdown for re!air, or it is too inaccessible to re!air. Bol tions ma# in"ol"e s bs#stems with red ndant s!ares that can be switched o"er to, or software lim! modes that !ro"ide !artial f nction. ?>am!les incl de s!ace s#stems, nder sea cables, na"igational beacons, bore=hole s#stems and a tomobiles. The s#stem m st be $e!t r nning for safet# reasons. Fim! modes are less tolerable. Often bac$ !s are selected b# an o!erator. ?>am!les incl de Aircraft, <a"igation, Reactor control s#stems, safet#=critical Chemical factor# controls, Train signals and engines on single=engine Aircraft. The s#stem will loose large amo nts of mone# when sh tdownA Tele!hone switches, Factor# controls, Bridge and ele"ator controls, f nds transfer and mar$et ma$ing, a tomated sales and ser"ice. 2h#sicall#, embedded s#stems ranged from !ortable de"ices s ch as /2. !la#ers, to large stationar# installations li$e traffic lights, Factor# controllers. In terms of com!le>it# embedded s#stems can range from "er# sim!le with a single microcontroller chi! to "er# com!le> with m lti!le nits, !eri!herals and networ$s mo nted inside a large chassis or enclos re.
);
a- TRA5S1ITTER SECTI65
Keypad
Transistor Logic
Encoder
RF Amplifier
Antenna
b, RECEI7ER SECTI65
))
Motors
3!scri)tion:
1. /icrocontroller AT&'C()A /icrocontroller here we sed is AT&'C() a clone to Intel &;()microcontroller as it has the highest set of instr ctions a"ailable +aro nd (: instr ctions,. It has on chi! -7b RO/ in the form flash memor#. This is ideal for fast de"elo!ment since flash memor# can be erased in seconds. In the !ro3ect microcontroller is sed to control the o!eration of ser"o motors. 2. R. 1odu'!s:
RF means radio fre* enc# and the range of radio fre* enc# is ; to .;;/hz.In o r !ro3ect we are sing : RF I49s one is :G/01 and another one with a fre* enc# -'/01 for the mo"ement of robot .In the radio fre* enc# we are sing two logics, the# are logic ; and ).These two logics mainl# de!ends on ! lse width. the logic zero means ! lses are ):
Relays
Motors
Transistor logic
Relays
Relays
Motors
Antenna
less and logic one means ! lses are more in this wa# we can identif# the logics ; and ).the mo"ements of the robot are sent in the form of ! lses from the transmitter .the recei"er recei"es the ! lses which are generated in the transmitting circ it are gi"en to the microcontroller to r n the de"ice. The desired fre* enc# is generated from the ind ction coil !resent in the transmitter circ it
.. S!r9o 1otor:
A ser"omotor +ser"o, is an electromechanical de"ice in which an electrical in! t determines the !osition of the armat re of a motor. The motors themsel"es are blac$ bo>es which contain a motor, gearbo> and decoder electronics. Three wires go into the bo>A (5, gro nd and signal. A short shaft comes o t of the motor which s all# has a circ lar interface !late attached to it ./ost ser"os will rotate thro gh abo t );; degrees in less than a second according to the signal in! t. This nit will control ! to - ser"o motors sim ltaneo sl#. All the wor$ controlling the ser"os is done in the !re!rogrammed micro=controller +Mc,. R!'a" 0o+icA A rela# is an electricall# o!erated switch. C rrent flowing thro gh the coil of the rela# creates a magnetic field which attracts a le"er and changes the switch contacts. The coil c rrent can be on or off so rela#s ha"e two switch !ositions and the# are do ble throw +changeo"er, switches. The ob3ecti"e of the rela# is to !ro"ide com!lete electrical isolation between the controlling circ it and controlled circ it +i.e. it disconnects the circ it from the main s !!l#,.
-.
).
AT:;C41 1ICR6C65TR600ER
CHAPTER :
)-
The AT&'C() is a low=!ower, high=!erformance C/OB &=bit microcom! ter with -7 b#tes of Flash !rogrammable and erasable read onl# memor# +2?RO/,. The de"ice is man fact red sing Atmel9s high=densit# non"olatile memor# technolog# and is com!atible with the ind str#=standard /CB=() instr ction set and !ino t. The on=chi! Flash allows the !rogram memor# to be re!rogrammed in=s#stem or b# a con"entional non"olatile memor# !rogrammer. B# combining a "ersatile &=bit C28 with Flash on a monolithic chi!, the Atmel AT&'C() is a !owerf l microcom! ter which !ro"ides a highl#=fle>ible and cost=effecti"e sol tion to man# embedded control a!!lications. 3!scri)tion: The AT&'C() !ro"ides the following standard feat resA -7 b#tes of Flash, ):& b#tes of RA/, .: IJO lines, two )H=bit timerJco nters, fi"e "ector two=le"el interr !t architect re, a f ll d !le> serial !ort, on=chi! oscillator and cloc$ circ itr#. In addition, the AT&'C() is designed with static logic for o!eration down to zero fre* enc# and s !!orts two software selectable !ower sa"ing modes. The Idle /ode sto!s the C28 while allowing the RA/, timerJco nters, serial !ort and interr !t s#stem to contin e f nctioning. The 2ower=down /ode sa"es the RA/ contents b t freezes the oscillator disabling all other chi! f nctions ntil the ne>t hardware reset.
B'oc( 3ia+ra :
)(
1. Com!atible with /CB=()N 2rod cts. 2. -7 B#tes of In=B#stem Re!rogrammable Flash /emor# I ?nd ranceA ),;;; %riteJ?rase C#cles
3. F ll# Btatic O!erationA ; 0z to :- /0z. 4. Three=le"el 2rogram /emor# Foc$. 4. ):& > &=bit Internal RA/. 8. .: 2rogrammable IJO Fines. <. Two )H=bit TimerJCo nters. :. Bi> Interr !t Bo rces with two !riorit# le"els : general ! r!ose interr !t +I<T;, I<T),. - !re!rogrammed interr !ts +Timer;, Timer), Berial interr !t, Rest interr !t, ;. It has f ll d !le> as#nchrono s serial !ort. 1=. It can s !!ort ! to H-7B e>ternal memor# with the hel! of 2C and 42TR. 11. 2rogrammable Berial Channel. 12. Fow=!ower Idle and 2ower=down /odes. 13. It can s !!ort ma>im m of (;;mA of c rrent. 14. It has on chi! oscillator and cloc$.
To se the AT&'C() microcontroller we need a general idea of what does each !in does. The following is a brief descri!tion of each !in. 1*:: Port 1A ?ach of these !ins can be sed as either in! t or o t! t. Also, !in) and !in: +2).; and 2).), ha"e s!ecial f nctions associated with Timer :.
;: R!s!t Si+na': 0igh logical state on this in! t halts the /C8 and clears all the registers. Bringing this !in bac$ to logical state zero starts the !rogram a new as if the !ower has 3 st been t rned on. In other words, !ositi"e "oltage im! lse on this !in resets the /C8. 4e!ending on the de"ice9s ! r!ose and en"irons, this !in is s all# connected to the ! sh b tton, reset= !on=start circ it or a brown o t reset circ it. The image shows one sim!le circ it for safe reset !on starting the controller. It is tilized in sit ations when !ower fails to reach its o!timal "oltage.
Fig :.-A R?B?T Circ it 1=*1<: Port 3A As with 2ort ), each of these !ins can be sed as ni"ersal in! t
Pin 1=: R>3* Berial in! t for as#nchrono s comm nication or serial o t! t for s#nchrono s comm nication. Pin 11: T>3 = Berial o t! t for as#nchrono s comm nication or cloc$ o t! t for s#nchrono s comm nication Pin 12: I5T= * In! t for interr !t ;. Pin 13: I5T1 * In! t for interr !t ). Pin 14: T= = Cloc$ in! t of co nter ;. Pin 14: T1 * Cloc$ in! t of co nter ). Pin 18: WR * Bignal for writing to e>ternal +add=on, RA/ memor#. Pin 1<: R3 = Bignal for reading from e>ternal RA/ memor# 1:*1;: >2 and >1: In! t and o t! t of internal oscillator. O artz cr#stal
controlling the fre* enc# commonl# connects to these !ins. Ca!acitances within the oscillator mechanism +see the image, are not critical and are normall# abo t .;!F. Instead of a * artz cr#stal, miniat re ceramic resonators can be sed for dictating the !ace. In that case, man fact rers recommend sing somewhat higher ca!acitances +abo t -G !f,. <ew /C89s wor$ at fre* encies from ;0z to (;/0z.
Fig :.(A Cloc$ Circ it 2=: /53: Ero nd. 21* 2:: Port 2: If e>ternal memor# is not !resent, !ins of 2ort : act as
ni"ersal in! tJo t! t. If e>ternal memor# is !resent, this is the location of the higher :;
address b#te, i.e. addresses A& I A)(. It is im!ortant to note that in cases when not all the & bits are sed for addressing the memor# +i.e. memor# is smaller than H-$B,, the rest of the n sed bits are not a"ailable as in! tJo t! t. 2;: PSE5: /C8 acti"ates this bit +brings to low state, !on each reading of sed for storing the
b#te +instr ction, from !rogram memor#. If e>ternal RO/ is !rogram, 2B?< is directl# connected to its control !ins.
3=: A0E: Before each reading of the e>ternal memor#, /C8 sends the lower
b#te of the address register +addresses A; I AG, to !ort 2; and acti"ates the o t! t AF?. ?>ternal register +G-0CT.G. or G-0CT.G( circ its are common,, memorizes the state of !ort 2; !on recei"ing a signal from AF? !in, and ses it as !art of the address for memor# chi!. 4 ring the second !art of the mechanical /C8 c#cle, signal on AF? is off, and !ort 2; is sed as Data Bus. In this wa#, b# adding onl# one chea! integrated circ it, data from !ort can be m lti!le>ed and the !ort sim ltaneo sl# transferring both addresses and data. 31: EA@ Bringing this !in to the logical state zero +mass, designates the !orts 2: sed for
and 2. for transferring addresses regardless of the !resence of the internal memor#. This means that e"en if there is a !rogram loaded in the /C8 it will not be e>ec ted, b t the one from the e>ternal RO/ will be sed instead. Con"ersel#, bringing the !in to the high logical state ca ses the controller to se both memories, first the internal, and then the e>ternal +if !resent,. 32*3;: Port =@ Bimilar to 2ort :, !ins of 2ort ; can be sed as ni"ersal
in! tJo t! t, if e>ternal memor# is not sed. If e>ternal memor# is sed, 2; beha"es as address o t! t +A; I AG, when AF? !in is at high logical le"el, or as data o t! t +4ata B s, when AF? !in is at low logical le"el. 4=: 7CC@ 2ower P(5
:)
In)ut ? 6ut)ut ,I@6- Ports: ?"er# /C8 from &;() famil# has - IJO !orts of & bits each. This !ro"ides the ser with .: IJO lines for connecting /C8 to the en"irons. Port =: 2ort ; is an &=bit o!en=drain bi=directional IJO !ort. As an o t! t !ort, each !in can sin$ eight TTF in! ts. %hen )s are written to !ort ; !ins, the !ins can be sed as high im!edance in! ts. 2ort ; has two fold roleA if e>ternal memor# is sed, it contains the lower address b#te +addresses A;=AG,, otherwise all bits of the !ort are either in! t or o t! t. Another feat re of this !ort comes to !la# when it has been designated as o t! t. 8nli$e other !orts, 2ort ; lac$s the ! ll ! resistor +resistor with P(5 on one end,. This seemingl# insignificant change has the following conse* encesA %hen designated as in! t, !in of 2ort ; acts as high im!edance offering the %hen designated as o t! t, !in acts as o!en drain. Clearing a !ort bit gro nds
the a!!ro!riate !in on the case +;5,. Betting a !ort bit ma$es the !in act as high im!edance. Therefore, to get !ositi"e logic +(5, at o t! t, e>ternal ! ll ! resistor needs to be added for connecting the !in to the !ositi"e !ole. Therefore, to get one +(5, on the o t! t, e>ternal ! ll ! resistor needs to be added for connecting the !in to the !ositi"e !ole. 2ort ; also recei"es the code b#tes d ring Flash !rogramming, and o t! ts the code b#tes d ring !rogram "erification. ?>ternal ! ll !s are re* ired d ring !rogram "erification.
::
Port 1: 2ort ) is an &=bit bi=directional IJO !ort with internal ! ll !s. The 2ort ) o t! t b ffers can sin$Jso rce fo r TTF in! ts. %hen )s are written to
2ort ) !ins the# are ! lled high b# the internal ! ll !s and can be sed as in! ts. As in! ts, 2ort ) !ins that are e>ternall# being ! lled low will so rce c rrent +IIF, beca se of the internal ! ll !s. In addition, 2).; and 2).) can be config red to be the timerJco nter : e>ternal 2ort ) also recei"es the low=order address b#tes d ring Flash !rogramming and co nt in! t +2).;JT:, and the timerJco nter : trigger in! t +2).)JT:?K,, res!ecti"el# "erification. Port 2: 2ort : is an &=bit bi=directional IJO !ort with internal ! ll !s. The 2ort : o t! t
b ffers can sin$Jso rce fo r TTF in! ts. %hen )s are written to 2ort : !ins the# are ! lled high b# the internal ! ll !s and can be sed as in! ts. 2ort : !ins that are e>ternall# being ! lled low will so rce c rrent +IIF, beca se of the internal ! ll= !s. 2ort : emits the high=order address b#te d ring fetches from e>ternal !rogram memor# and d ring accesses to e>ternal data memor# that ses )H=bit addresses +/O5K Q42TR,. In this a!!lication, it ses strong internal ! ll= !s when emitting )s. 4 ring accesses to e>ternal data memor# that ses &=bit addresses +/O5K Q RI,, 2ort : emits the contents of the 2: B!ecial F nction Register. 2ort : also recei"es the high=order address bits and some control signals d ring Flash !rogramming and "erification.
Port 3
:.
2ort . is an &=bit bi=directional IJO !ort with internal ! ll= !s. The 2ort . o t! t b ffers can sin$Jso rce fo r TTF in! ts. %hen )s are written to 2ort . !ins that are e>ternall# being ! lled low will so rce c rrent +IIF, beca se 2ort . also ser"es the f nctions of "ario s s!ecial feat res of the AT&'C() as
2ort . !ins the# are ! lled high b# the internal ! ll= !s and can be sed as in! ts. of the ! ll= !s. listed belowA
:-
Fig :.HA /emor# Bloc$ 4iagram On=chi! /emor# refers to an# memor# +Code, RA/, or other, that !h#sicall# e>ist on the microcontroller itself. 4e!ending on the ! r!ose this is again classified as 2rogram /emor# and 4ata /emor#. ?>ternal Code /emor# is code +or !rogram, memor# that resides off=chi!. This is often in the form of an e>ternal ?2RO/. ?>ternal RA/ is the RA/ memor# that resides off=chi!. This is often of standard static RA/ or flash RA/.
R61 1! or": 2rogram /emor# +RO/, is sed for !ermanent sa"ing !rogram being e>ec ted. <ew models ha"e b ilt=in RO/, altho gh there are s bstantial "ariations. %ith some models internal memor# cannot be !rogrammed directl# b# the ser. Instead, the ser needs to !roceed the !rogram to the man fact rer, so that the /C8 can be !rogrammed +mas$ed, a!!ro!riatel# in the !rocess of fabrication. Ob"io sl#, this o!tion is cost= effecti"e onl# for large series. /an# man fact rers deli"er controllers that can be !rogrammed directl# b# the ser. These come in a ceramic case with an o!ening +?2RO/ "ersion, or in a !lastic case witho t an o!ening +??2RO/ "ersion,.
:(
RA1 1! or":
4ata /emor# +RA/, is sed for tem!oraril# storing and $ee!ing intermediate res lts and "ariables that are generated d ring r ntime. A!art from that, RA/ com!rises a n mber of registersA hardware co nters and timers, IJO !orts, b ffer for serial connection, etc. %ith older "ersions, RA/ s!anned :(H locations, while new models feat re additional ):& registers. First :(H memor# locations form the basis of RA/ +addresses ; I FFh, of e"er# &;() /C8. Focations that are a"ailable to the ser s!an addresses from ; to GFh, i.e. first ):& registers, and this !art of RA/ is s!lit into se"eral bloc$s as can be seen in the image below.
Fig :.GA RA/ /emor# First bloc$ com!rises - ban$s of & registers each, mar$ed as R; = RG. To address Becond memor# bloc$ +range :;h I :Fh, is bit=addressable, meaning that e"er# these, the !arent ban$ has to be selected. belonging bit has its own address +; toGFh,. Bince the bloc$ com!rises )H of these registers, there is a total of ):& addressable bits. +Bit ; of b#te :;h has bit address ;, while bit G of b#te :Fh has bit address GFh,.
:H
Third is the gro ! of a"ailable registers at addresses :Fh IGFh +total of &; locations, witho t s!ecial feat res or a !reset ! r!ose. The main ! r!ose of RA/ is to !ro"ide s#nchronization between RO/ and C28 so as to increase the s!eed of /icrocontroller.
Bit 1! or":
The &;(), being a comm nication oriented microcontroller, gi"es the ser the abilit# to access a n mber of bit "ariables. These "ariables ma# be either )or ;. There are ):& bit "ariables a"ailable to the ser, n mbered ;;h thro gh GFh.
:G
2.< Ti !rs:
The &;() microcontrollers is e* i!!ed with two timers +T; and T),, both of them ma# be controlled, set, read and config red indi"id all#. The main ! r!ose of timer is di"ided into three e"ents To meas re time i.e. calc lating the time between the e"ents. Co nting e>ternal e"ents. 8sed for generating cloc$ ! lses sed in serial comm nication, i.e. Ba d Rate. /eas re time between two e"ents it is nothing b t co nting ! the ! lses that are generated from * artz cr#stal oscillator between the re* ired two e"ents. Ti !r S.Rs: The two timers share two registers T/O4 and TCO<, which control the timer, and each timer also has two BFRs dedicated solel# to itself +T0;JTF; and T0)JTF),. An :&
BFR has a n meric address. It is often sef l to $now n meric address that corres!onds to an BFR name. The BFRs relating to timers areA when #o enter the name of the BFR into assembler, it internall# con"erts it to a n mber. Ti !r T=: This timer consists of two registers I T0; and TF;. The n mbers that these registers incl de re!resent a lower and a higher b#te of one )H=digit binar# n mber. Bince the timers are "irt all# )H=bit registers, the greatest "al e that co ld be written to them is H( (.(. In case of e>ceeding this "al e, the timer will be a tomaticall# reset and after words that co nting starts from ;. It is called o"erflow. T163 R!+ist!r ,Ti !r 1od!-: This register selects mode of the timers T; and T). The lower - bits +bit; = bit., refer to the timer ;, while the higher - bits +bit- = bitG, refer to the timer ). There are in total of - modes. Bits of this register ha"e the following ! r!oseA
/ATE1 starts and sto!s Timer ) b# means of a signal !ro"ided to the !in I<T) +2...,A
o o
1 = Timer ) o!erates onl# if the bit I<T) is set = = Timer ) o!erates regardless of the state of the bit I<T ) 1 = Timer co nts ! lses !ro"ided to the !in T) +2..(, = = Timer co nts ! lses from internal oscillator
T111% T11=: These two bits selects the Timer ) o!erating mode. T111 ; ; T11= ; ) 1od! ; ) 3!scri)tion ).=bit timer )H=bit timer :'
) )
; )
: .
/ATE= starts and sto!s Timer ), sing a signal !ro"ided to the !in I<T; +2..:,A
o o
1 = Timer ; o!erates onl# if the bit I<T; is set = = Timer ; o!erates regardless of the state of the bit I<T; 1 = Timer co nts ! lses !ro"ided to the !in T;+2..-, = = Timer co nts ! lses from internal oscillator
T=11% T=1= These two bits select the Timer ; o!erating mode. T=11 ; ; ) ) T=1= ; ) ; ) 1od! ; ) : . 3!scri)tion ).=bit timer )H=bit timer &=bit a to= reload B!lit mode
TC65 * Ti !r Contro' R!+ist!r: This is also one of the registers whose bits directl# control timer o!erating. Onl# - of all & bits this register has are sed for timer control, while others are sed for interr !t control.
T.1 This bit is a tomaticall# set with the Timer ) o"erflow TR1 This bit t rns the Timer ) on
o o
T.= This bit is a tomaticall# set with the Timer ; o"erflow. TR= This bit t rns the timer ; on .;
o o
Ti !r 1A Referring to its characteristics, this timer is a twin brother to the Timer ;. This means that the# ha"e the same ! r!ose, their o!erating is controlled b# the same registers T/O4 and TCO< and both of them can o!erate in one of - different modes.
.)
0AR4%AR? B?CTIO<
.:
In o r circ it, a "oltage=o!erated electromagnetic t#!e rela#, which means that it has high resistance coil and is connected in !arallel with the s !!l# "oltage in a circ it. The# draw a "er# little c rrent from so rce to s !!l#. An# change in the coil "oltage energizes or de=energizes the rela#. 3.1.1 Construction: In o r circ it an electromagnetic t#!e rela# is em!lo#ed. This is a common t#!e of rela# and has one ni* e feat re +i.e. a hinged armat re, that is attracted to a force when the core is magnetized b# a c rrent in the coil or wo nd aro nd the core. The constr ction of t#!ical cla!!er t#!e of rela# is shown in the fig re. 3.1.2 Wor(in+: It contains a core s rro nded b# a coil of wire. The core is mo nted on a metal frame. The mo"able !art of the rela# is called armat re. %hen the "oltage is a!!lied to the coil !rod ces a magnetic field in the core. In other words core acts as an electromagnet and attracts metal armat re. %hen the armat re is attracted b# the core the magnetic !ath is from the core to the armat re thro gh frame and bac$ to the core while on remo"ing the "oltage and the armat re ret rns to its original !osition d e to s!ring tension which is attracted to armat re to the other end. %hen no c rrent flows thro gh the rela# coil, the contact or !ole that is mo nted on the armat re along with the contact assembl# mo"es downwards, so that the contact to ches the bottom where bottom contact are connected to re* ired circ it. The main ! r!ose of rela# frame is to !ro"ide a wa# to mo nt the !orts and the im!ortant things is to form a !art of the com!lete magnetic !ath between the armat re and the core. The core, frame and armat re are made with magnetic material s ch as soft iron. In the energized !osition of the rela# if the armat re to ches the core of the electromagnet, it ma# stic$ there beca se of the !ermanent magnetism in the core. The s!ring ma# not be able to ! ll bac$ the armat re. To !re"ent this, a minim m air ga! between the core and the armat re is maintained.
.-
3.1.3 6)!ratin+ s)!!d: %hen an energizing "oltage is a!!lied to the coil of the rela#, the rela# does not !ic$ ! instantaneo sl# beca se of coil ind ctance. The c rrent in the coil grow slowl# and hence the magnetic field d e to that c rrent. Also the armat re ta$es time to mo"ie from one !osition to another. These !eriods are "er# small +of the order of few milli seconds,. O!erate and release times are not necessaril# e* al. The o!erating characteristics are shown in the diagram. The grad al b ild ! from A to B is d e to the initial !osition to the c rrent flow b# the self ind ctance decreases which ca ses the o!!osition of the c rrent b ilt !. Bo that9s wh# the characteristic 3 st dro!s at C. After this ha!!ens the c rrent b ild ! more slowl# to a ma>im m at time 4. The heat !rod ced b# the c rrent thro gh the rela# coil will increase the coil reactance which res lts decrease in c rrent between times ? and F. At time E the c rrent thro gh the rela# coil is t rned off and the armat re dro!s o t at the 0 o!ening the rela# contacts. In other words the fall in "oltage of a rela# is higher than its dro! o t "oltage. The difference of these dro!s is called h#sterics. It !re"ents false triggering and chattering. Eenerall# rela#s are made for "oltages H, ):, )&, :-, -&, ));, :-; "olts 4.C. or A.C. According to the !resent circ it, a coil of .;; ohms are sed which o!erates at P( "olts 4.C. and has (J.;; am!s and the !ower dissi!ated in the coil is (R(J.;; watts.
3.1.4 Caus!s #or th! #ai'ur! o# a r!'a": Im!ro!er control "oltage Fosses connections Bending of mo"ing !arts Im!ro!er s!ring tension 4irt, Reese or g m on contact or on mo"ing !arts.
.(
3.1.4 In)ut and 6ut)ut charact!ristics o# a R!'a": In)ut charact!ristics: O!erating !owerA se"eral h ndred milli watts to se"eral watts O!erating "oltageA P or I);S of rated "oltage
6ut)ut charact!ristics: Contact config ration === m lti!le contacts 2ower 5oltage === !ermits wide range === !ermits wide range
A bi!nt charact!ristics: Resistance to "ibration ===errors d ring o!eration Tem!erat re 0 midit# O!erational noise === not m ch affected === ins lation ma# deteriorate === !rod ces a dible noise.
I on, off or c#cle I ;.) sec to H; min tes I ;.(S to :S I H am!s to :-; "olts a.cJ:- "olt d.c.
.H
Ber"os are 4C motors with b ilt in gearing and feedbac$ control loo! circ itr#. Ber"os are e>tremel# !o! lar with robot, RC !lane, and RC boat b ilders. All ser"os ha"e three wiresA the red wire is s all# connected to the !ower s !!l#, the blac$ or brown wire is s all# connected to the gro nd and TellowJOrange or %hite is the signal wire connected to the controlling signal. Ber"os can o!erate nder a range of "oltages. T#!ical o!eration is from -.&5 to H5. There are a few micro sized ser"os that can o!erate at less, and now a few 0itec ser"os that o!erate at m ch more. The reason for this standard range is beca se most microcontrollers and RC recei"ers o!erate near this "oltage. If we ha"e a batter# "oltageJc rrentJ!ower limitation, we sho ld o!erate at H5. This is sim!l# beca se 4C motors ha"e higher tor* e at higher "oltages. 2ower B!i$es is a s!ecial case for 4C motors that change directions. To re"erse the direction of the motor, we m st also re"erse the "oltage. 0owe"er the motor has a b ilt ! ind ctance and moment m which resists this "oltage change. Bo for the short !eriod of time it ta$es for the motor to re"erse direction, there is a large !ower s!i$e. The "oltage will s!i$e do ble the o!erating "oltage. The c rrent will go to aro nd stall c rrent. 3.2.1 3C 1otors: From the start, 4C motors seem * ite sim!le. A!!l# a "oltage to both terminals, and it s!ins. B t what if #o want to control which direction the motor s!insD Correct, #o re"erse the wires. <ow what if #o want the motor to s!in at half that s!eedD To wo ld se less "oltage. B t how wo ld #o get a robot to do those things a tonomo sl#D 0ow wo ld #o $now what "oltage a motor sho ld getD %h# not (;5 instead of ):5D %hat abo t motor o"erheatingD O!erating motors can be m ch more com!licated than #o thin$.
a- 7o'ta+!:
.G
To !robabl# $now that 4C motors are non=!olarized = meaning that #o can re"erse "oltage witho t an# bad things ha!!ening. T#!ical 4C motors are rated from abo t H5=):5. The larger ones are often :-5 or more. B t for the ! r!oses of a robot, #o !robabl# will sta# in the H5=):5 range. Bo wh# do motors o!erate at different "oltagesD As we all $now +or sho ld,, "oltage is directl# related to motor tor* e. /ore "oltage, higher the tor* e. B t donCt go r nning #o r motor at );;5 ca se that9s 3 st not nice. A 4C motor is rated at the "oltage it is most efficient at r nning. If #o a!!l# too few "olts, it 3 st won9t wor$. If #o a!!l# too m ch, it will o"erheat and the coils will melt. Bo the general r le is, tr# to a!!l# as close to the rated "oltage of the motor as #o can. Also, altho gh a :-5 motor might be stronger, do #o reall# want #o r robot to carr# a :-5 batter# +which is hea"ier and bigger, aro ndD /# recommendation is do not s r!ass ):5 motors nless #o reall# reall# need the tor* e. b- Curr!nt: As with all circ itr#, #o m st !a# attention to c rrent. Too little, and it 3 st wonCt wor$. Too m ch, and #o ha"e meltdown. %hen b #ing a motor, there are two c rrent ratings #o sho ld !a# attention to. The first is o!erating c rrent. This is the a"erage amo nt of c rrent the motor is e>!ected to draw nder a t#!ical tor* e. / lti!l# this n mber b# the rated "oltage and #o will get the a"erage !ower draw re* ired to r n the motor. The other c rrent rating which #o need to !a# attention to is the stall c rrent. This is when #o !ower ! the motor, b t #o ! t eno gh tor* e on it to force it to sto! rotating. This is the ma>im m amo nt of c rrent the motor will e"er draw, and hence the ma>im m amo nt of !ower too. Bo #o m st design all control circ itr# ca!able of handling this stall c rrent. Also, if #o !lan to constantl# r n #o r motor, or r n it higher than the rated "oltage, it is wise to heat sin$ #o r motor to $ee! the coils from melting.
0ow high of a "oltage can #o o"er a!!l# to a motorD %ell, all motors are +or at least sho ld be, rated at a certain wattage. %attage is energ#. Inefficienc# of energ# con"ersion directl# relates to heat o t! t. Too m ch heat, the motor coils melt. Bo the man fact rers of Uhigher * alit#V motors $now how m ch wattage will ca se motor fail re, and !ost this on the motor s!ec sheets. 2ower +watts, W 5oltage R C rrent Increase "oltage and meas re c rrent ntil the !ower is abo t X';S below the gi"en !ower rating. d- Po$!r S)i(!s: There is a s!ecial case for 4C motors that change directions. To re"erse the direction of the motor, #o m st also re"erse the "oltage. 0owe"er the motor has a b ilt ! ind ctance and moment m which resists this "oltage change. Bo for the short !eriod of time it ta$es for the motor to re"erse direction, there is a large !ower s!i$e. The "oltage will s!i$e do ble the o!erating "oltage. The c rrent will go to aro nd stall c rrent. The moral of this is design #o r robot !ower reg lation circ itr# !ro!erl# to handle an# "oltage s!i$es. !- TorAu!: %hen b #ing a 4C motor, there are two tor* e "al e ratings which #o m st !a# attention to. The first is o!erating tor* e. This is the tor* e the motor was designed to gi"e. 8s all# it is the listed tor* e "al e. The other rated "al e is stall tor* e. This is the tor* e re* ired to sto! the motor from rotating. To normall# wo ld want to design sing onl# the o!erating tor* e "al e, b t there are occasions when #o want to $now how far #o can ! sh #o r motor. If #o are designing a wheeled robot, good tor* e means good acceleration. /# !ersonal r le is if #o ha"e : motors on #o r robot, ma$e s re the stall tor* e on each is eno gh to lift the weight of #o r entire robot times #o r wheel radi s. Alwa#s fa"or tor* e o"er "elocit#. Remember, as stated abo"e, #o r tor* e ratings can change de!ending on the "oltage a!!lied. Bo if #o need a little more tor* e to cr sh that c te $itten, going :;S abo"e the rated motor "oltage "al e is fairl# safe +for .'
#o , not the $itten,. L st remember that this is less efficient, and that #o sho ld heat sin$ #o r motor. #- 7!'ocit": 5elocit# is "er# com!le> when it comes to 4C motors. The general r le is, motors r n the most efficient when r n at the highest !ossible s!eeds. Ob"io sl# howe"er this is not !ossible. There are times we want o r robot to r n slowl#. Bo first #o want gearing = this wa# the motor can r n fast, #et #o can still get good tor* e o t of it. 8nfort natel# gearing a tomaticall# red ces efficienc# no higher than abo t ';S. Bo incl de a ';S s!eed and tor* e red ction for e"er# gear meshing when #o calc late gearing. For e>am!le, if #o ha"e . s! r gears, therefore meshing together twice, #o will get a ';S > ';S W &)S efficienc#. The "oltage and a!!lied tor* e resistance ob"io sl# also affects s!eed. +- Contro': The most im!ortant of 4C motor control techni* es is the 0=Bridge. After #o ha"e #o r 0=Bridge hoo$ed ! to #o r motor, to determine #o r wheel "elocit#J!osition #o m st se an encoder. And lastl#, #o sho ld read ! on good 4C /otor Bra$ing methods. h- 6th!r In#or ation: 2lace small microfarad ca!acitors across motor leads to e>tend motor life. This wor$s reall# well with nois# and other el=chea!o motors, almost do bling motor life.
-;
Fig ..)A 4C Ber"omotor 0owe"er there is m ch less im!ro"ement sing this techni* e with the more e>!ensi"e higher end motors. The IC sed for interfacing with microcontroller is F:'.4 02;33 H;;mA O8T28T C8RR?<T CA2ABIFITT 2?R C0A<<?F ).:A 2?A7 O8T28T C8RR?<T +non re!etiti"e, 2?R C0A<<?F ?<ABF? FACIFITT O5?R T?/2?RAT8R? 2ROT?CTIO< FOEICAF; I<28T 5OFTAE? 82 TO ).( 5 +0IE0 <OIB? I//8<ITT, I<T?R<AF CFA/2 4IO4? 3!scri)tion: The 4e"ice is a monolithic integrated high "oltage, high c rrent fo r channel dri"er designed to acce!t standard 4TF or TTF logic le"els and dri"e ind cti"e loads +s ch as rela#s solenoid9s, 4C and ste!!ing motors, and switching !ower transistors. To sim!lif# se as two bridges each !air of channels is e* i!!ed with an enable in! t. A se!arate s !!l# in! t is !ro"ided for the logic, allowing o!eration at a lower "oltage and internal clam! diodes are incl ded. This de"ice is s itable for se in switching a!!lication sat fre* encies ! to ( $0z. The F:'.4 is assembled in a )H lead !lastic !ac$age which has - center !ins connected together and sed for heatsin$ing.The F:'.4 is assembled in a :; lead s rface mo nt which has & center !ins connected together and sed for heat sin$ing. 02;33 IC: The F:'. is an integrated circ it motor dri"er that can be sed for sim ltaneo s, bi=directional control of two small motors. The F:'. is limited to H;; mA, b t in realit# can onl# handle m ch small c rrents nless #o ha"e done some serio s heat sin$ing to -)
$ee! the case tem!erat re down. 8ns re abo t whether the F:'. will wor$ with #o r motorD 0oo$ ! the circ it and r n #o r motor while $ee!ing #o r finger on the chi!. If it gets too hot to to ch, #o canCt se it with #o r motor. +<ote to /?:;)) st dentsA The F:'. sho ld be O7 for #o r small motor b t is not O7 for #o r gear motor., The F:'. comes in a standard )H=!in, d al=in line integrated circ it !ac$age. There is an F:'. and an F:'.4 !art n mber. 2ic$ the Y4Y "ersion beca se it has b ilt in fl# bac$ diodes to minimize ind cti"e "oltage s!i$es. The !in o t for the F:'. in the )H=!in !ac$age is shown below in to! "iew. 2in ) is at the to! left when the notch in the !ac$age faces !. <ote that the names for !in f nctions ma# be slightl# different than what is shown in the following diagrams.
Z electrons and electron holes Z flow into the 3 nction from electrodes with different "oltages. %hen an electron meets a hole, it falls into a lower energ# le"el, and releases energ# in the form of a !hoton.
Fig ...A B#mbol of F?4 The wa"elength of the light emitted, and therefore its color, de!ends on the band ga! energ# of the materials forming the !=n 3 nction. In silicon or germani m diodes, the electrons and holes recombine b# a non=radiati"e transition which !rod ces no o!tical emission, beca se these are indirect bandga! materials. The materials sed for an F?4 ha"e a direct band ga! with energies corres!onding to near=infrared, "isible or near= ltra"iolet light. F?49s are s all# constantl# ill minated when a c rrent !asses thro gh them, b t flashing F?49s are also a"ailable. Flashing F?49s resemble standard F?49s b t the# contain a small chi! inside which ca ses the F?4 to flash with a t#!ical !eriod of one second. This t#!e of F?4 comes most commonl# as red, #ellow, or green. /ost flashing F?49s emit light of a single wa"elength, b t m lticolored flashing F?49s are a"ailable too. F?4 de"elo!ment began with infrared and red de"ices made with galli m arsenide. Ad"ances in materials science ha"e made !ossible the !rod ction of de"ices with e"er=shorter wa"elengths, !rod cing light in a "ariet# of colors.
-.
F?4s are s all# b ilt on an n=t#!e s bstrate, with electrode attached to the != t#!e la#er de!osited on its s rface. 2=t#!e s bstrates, while less common, occ r as well. /an# commercial F?4s, es!eciall# Ea<JInEa<, also se sa!!hire s bstrate. B bstrates that are trans!arent to the emitted wa"elength, and bac$ed b# a reflecti"e la#er, increase the F?4 efficienc#. The refracti"e inde> of the !ac$age material sho ld match the inde> of the semicond ctor, otherwise the !rod ced light gets !artiall# reflected bac$ into the semicond ctor, where it gets absorbed and t rns into additional heat. The semi cond cting chi! is encased in a solid !lastic lens, which is m ch to gher than the glass en"elo!e of a traditional light b lb or t be. The !lastic ma# be colored, b t this is onl# for cosmetic reasons or to im!ro"e the contrast ratio@ the color of the !ac$aging does not s bstantiall# affect the color of the light emitted.
Fig ..-A 4ifferent F?4 4esignations Eenerall#, for newer common standard F?4s in the .mm or (mm !ac$ages, the following forward 4C "oltage dro!s are t#!icall# meas red. The forward "oltage dro! "aries de!ending on the F?4Cs chemistr#, tem!erat re, and on the c rrent +"al es here are for a!!ro>. :; milliam!s, a commonl# fo nd ma>im m "al e, Infrared = ).H5 Red = ).& to :.)5 Orange = :.:5 Tellow = :.-5 --
Ereen = :.H5 Bl e = ..; to ..(5 +%hite same as bl e, 8ltra"iolet = ..(5 3.3.1 Ad9anta+!s: F?4s !rod ce more light !er %att than do incandescent b lbs@ this is sef l in batter# !owered de"ices. F?4s can emit light of an intended color witho t the se of color filters that traditional lighting methods re* ire. This is more efficient and can lower initial costs. The solid !ac$age of an F?4 can be designed to foc s its light. Incandescent and fl orescent so rces often re* ire an e>ternal reflector to collect light and direct it in a sable manner. %hen sed in a!!lications where dimming is re* ired, F?4s do not change their colo r tint as the c rrent !assing thro gh them is lowered, incandescent lam!s, which t rns #ellow. F?4s are ideal for se with occ !anc# sensors, since the# are naffected b# fre* ent on=off c#cling, nli$e fl orescent lam!s that b rn o t more * ic$l# when c#cled fre* entl#. F?4s are b ilt inside solid cases that !rotect them, nli$e incandescent and discharge so rces, ma$ing them e>tremel# d rable. F?4s ha"e an e>tremel# long life s!an when conser"ati"el# r nA !wards of );;,;;; ho rs, twice as long as the best fl orescent b lbs and twent# times longer than the best incandescent b lbs. +Incandescent b lbs can also be made to last an e>tremel# long time b# r nning at lower than normal "oltage, b t onl# at a h ge cost in efficienc#@ F?4s ha"e a long life when o!erated at their rated !ower., F?4s r n at higher c rrents ha"e m ch red ced lifes!an. F?4s light ! "er# * ic$l#. A t#!ical red indicator F?4 will achie"e f ll brightness in microseconds@ F?4s sed in comm nications de"ices can ha"e nli$e
-(
e"en faster res!onse times. F?4s can be "er# small and are easil# !o! lated onto !rinted circ it boards. 3.3.2 3isad9anta+!s o# usin+ 0E3Bs: F?4s are c rrentl# more e>!ensi"e, !rice !er l men, than more con"entional lighting technologies. The additional e>!ense !artiall# stems from the relati"el# low l men o t! t and the dri"e circ itr# and !ower s !!lies needed. F?4 !erformance largel# de!ends on the ambient tem!erat re of the o!erating en"ironment. Y4ri"ingY an F?4 YhardY in high ambient tem!erat res ma# res lt in o"erheating of the F?4 !ac$age, e"ent all# leading to de"ice fail re. Ade* ate heat=sin$ing is re* ired to maintain long life. This is es!eciall# im!ortant when considering a tomoti"e, medical, and militar# a!!lications where the de"ice m st o!erate o"er a large range of tem!erat res, and are re* ired to ha"e a low fail re rate. F?4s re* ire com!le> !ower s !!l# set !s to be efficientl# dri"en. In indicator a!!lications a sim!le series resistor can be c rrent limiting, which also co ld waste as m ch !ower. F?4s t#!icall# cast light in one direction at a narrow angle com!ared to an incandescent or fl orescent lam! of the same l men le"el. F?4s s all# emit s!ectrall# im! re light which means that a white F?4 s all# does not ha"e the same s!ectral !ower distrib tion as s nlight or e"en moonlight sed@ howe"er, this sing sacrifices a large amo nt of energ# efficienc#. Another method is
3.3.3 0ist o# so !
Bome of these a!!lications are f rther elaborated !on in the following te>t. Architect ral lighting Btat s indicators on all sorts of e* i!ment Traffic lights and signals -H
?>it signs /otorc#cle and Bic#cle lights To#s and recreational s!orting goods, s ch as the Flash flight Railroad crossing signals Contin it# indicators Flashlights. Bome models that do not e"en se batteries are of this t#!e. Fight bars on emergenc# "ehicles. ?le"ator 2 sh B tton Fighting Thin, lightweight message dis!la#s at air!orts and railwa# stations and as destination dis!la#s for trains, b ses, trams and ferries. Red or #ellow F?4s are sed in indicator and al!han meric dis!la#s in en"ironments where night "ision m st be retainedA aircraft coc$!its, s bmarine and shi! bridges, astronom# obser"atories, and in the field, e.g. night time animal watching and militar# field se. Red, #ellow, green, and bl e F?4s can be a!!lications Remote controls, s ch as for T5s and 5CRs, often se infrared F?4s. In o!tical fiber and Free B!ace O!tics comm nications. In dot matri> arrangements for dis!la#ing messages. Elow lights, as a more e>!ensi"e b t longer lasting and re sable alternati"e to Elow stic$s. Beca se of their long life and fast switching times, F?4s ha"e been sed for a tomoti"e high=mo nted bra$e lights and tr c$ and b s bra$e lights and t rn signals for some time, b t man# high=end "ehicles are now starting to se F?4s for their entire rear light cl sters. Besides the gain in reliabilit#, this has st#ling ad"antages beca se F?4s are ca!able of forming m ch thinner lights than incandescent lam!s with !arabolic reflectors. The significant ! +!erha!s ;.(s faster than an im!ro"ement in the time ta$en to light sed for model railroading
Bac$lighting for FC4 tele"isions and dis!la#s. The a"ailabilit# of F?4s in s!ecific colors +REB, enables a f ll=s!ectr m light so rce which e>!ands the color gam t b# as m ch as -(S. <ew stage lighting e* i!ment is being de"elo!ed with F?4 so rces in !rimar# red=green=bl e arrangements. F mali"e, a !hotonic te>tile F?4=based Christmas lights ha"e been a"ailable since :;;:, b t are onl# now beginning to gain in !o! larit# and acce!tance d e to their higher initial ! rchase cost when com!ared to similar incandescent=based Christmas lights. For e>am!le, as of :;;H, a set of (; incandescent lights might cost [:.;; 8B4, while a similar set of (; F?4 lights might cost [);.;; 8B4. The ! rchase cost can be e"en higher for single=color sets of F?4 lights with rare or recentl#=introd ced colors, s ch as ! r!le, !in$ or white. Regardless of the higher initial ! rchase !rice, the total cost of ownershi! for F?4 Christmas lights wo ld e"ent all# be lower than the TCO for similar incandescent Christmas lights since an F?4 re* ires m ch less !ower to o t! t the same amo nt of light as a similar incandescent b lb. F?4 !hotothera!# for acne sing bl e or red F?4s has been !ro"en to significantl# red ce acne o"er a . month !eriod. As 5oltage Reference in electronic circ its. The constant "oltage dro! +e.g. ).G 5 for a normal red F?4, can be sed instead of a 1ener diode in low= "oltage reg lators. 1ener diodes are not a"ailable below "oltages of abo t . 5
tele"ision broadcasting, !oint=to=!oint radio comm nication, wireless FA<, radar, and s!ace e>!loration. Antennas s all# wor$ in air or o ter s!ace, b t can also be o!erated nder water or e"en thro gh soil and roc$ at certain fre* encies for short distances. 2h#sicall#, an antenna is an arrangement of cond ctors that generate a radiating electromagnetic field in res!onse to an a!!lied alternating "oltage and the associated alternating electric c rrent, or can be !laced in an electromagnetic field so that the field will ind ce an alternating c rrent in the antenna and a "oltage between its terminals. Bome antenna de"ices +!arabolic antenna, 0orn Antenna, 3 st ada!t the free s!ace to another t#!e of antenna
-'
(;
A !ower s !!l# was designed to meet the re* irements of the circ it. The !ower s !!l# is basicall# a f ll wa"e rectifier. A diode is sed as a switch. The o t! t of the diode has onl# one !olarit#. A diode rectifier is to !ro"ide dc s !!l# "oltage from the (;0z ac !ower line. In! t fl ct ations in the dc o t! t can be com!letel# eliminated b# the ca!acitor. The filter in a circ it is alwa#s electrol#tic beca se of high ca!acitance re* ired. The filters are essentiall# sh nted b# !ass fre* enc# of the ac ri!!le. Farger filter ca!acitors are needed with larger "al es of the load c rrent. The f ll wa"e rectifier with two diodes is arranged in a f ll wa"e rectifier circ it. It !ro"ides dc o t! t for both c#cles of the ac o t! t. The highest ri!!le fre* enc# is easier to filter for allowing smaller "al es of C. a rectifier is an electronic circ it, which con"erts ac to dc. This !rocess is called rectification. %hen diode is forward biased the c rrent allows thro gh it when it is re"erse biased it will act as an o!en circ it. In o r circ it f ll wa"e center ta!!ed rectifier is sed. The o t! t of the rectifier is for com!lete .H; degrees. This can be achie"ed b# ta$ing : diodes and ma$e them to wor$ alternati"el# to the P"e and ="e half c#cles of the a!!lied ac signals. %hen ) diode is in O< state the other will be offstage. 4 e to center ta!!ing we get );=!hase difference. Initiall# the ac in! t is gi"en !rimaril# terminal of transformer the res lting o t! t c rrent is nidirectional and flows in the form of half sine wa"es. These signals are gi"en to !ower rectifiers to decrease the !ower le"el of the a!!lied in! t signal. B# sing f ll wa"e center ta!!ed rectifier the ri!!le factor can be red ced. In this the diodes sed has high !ea$ in"erse "oltage.
12 1 1 7805 2 3 100 uf 5
Brigde
Rectifier 2 + 4 1000 uf
T1
A "oltage reg lator is one, which is sed to control the "oltage. A reg lator IC mainl# consists of reference so rce, com!arator am!lifier and control "oltage and o"er load !rotection all in a single IC. The !ower s !!l# can be b ilt sing a transformer connected to the ac s !!l# can be b ilt sing a transformer connected to the ac s !!l# to ste! the ac b ilt sing a transformer connected to the ac s !!l# to ste! the ac "oltage to desired am!lit de then rectif#ing that ac "oltage filtering with a ca!acitor and RC filter. The reg lators can be selected for o!eration with load c rrents from h ndreds of mille am!eres to tens of am!eres corres!onding to !ower ratings from mille watts to tens of watts. The series G& reg lators !ro"ides fi>ed reg lated "oltages from ( to :- "olt. The G&): are connected to !ro"ide "oltage reg lation with o t! t from this nit of P):", which is filtered b# ca!acitor C. The o t! t and minim m "oltages from G&;( and G&): is P(", G.. and P):", )-.H". The ac line "oltage is ste!!ed down to )&" rms across each half of the center=ta!!ed transformer. A f ll wa"e rectifier and ca!acitor filter then !ro"ides an nreg lated dc "oltage with an ac ri!!le of a few "olts as in! t to the "oltage reg lator. The G&): IC then !ro"ides an o t! t that is reg lated P):" dc. .!atur!s:
\ O t! t C rrent ! to )A
\ O t! t 5oltage of (5 \ Thermal O"erload 2rotection \Bhort Circ it 2rotection \ O t! t Transistor Bafe O!erating Area 2rotection
(:
PR6DECT CIRC&ITRC
CHAPTER 4
(.
3!scri)tion:
4.1.1 E!")adA It consists of si> !ress b ttons.The fo r b ttons are sed to control the o!eration of motor which in t rn controls the wheels mo"ements.And another two b ttons are sed to rotate the camera motor in cloc$wise and anticloc$wise direction. The one $e# acts as a reset b tton .The $e#!ad o t! ts & bit !arallel data. 4.1.2. Para''!' to S!ria' Con9!rt!r: The data o t! t coming from the $e#!ad is !arallel data .Bince RF mod le transmission is single line i.e. ,serial data transmission, it is nable to transfer !arallel data coming from the $e#!ad .0ence it is re* ired to con"ert the !arallel data into serial data. This can be achie"ed b# sing a a !arallel to serial con"erter.0T=H-; is a !arallel to serial con"erter IC sed in this case for con"ersion.
(-
O!erating "oltageA :.-5X):5. Fow !ower and high noise imm nit# C/OB technolog#. Fow standb# c rrent. B ilt=in oscillator needs onl# (S resistor.
T? is the transmission enable !in of the 0TH-; 4.1.3. .unctiona' 3!scri)tion: 6)!ration: The encoders begins a three=word transmission c#cle !on recei!t of a transmission enable +T? for the 0TH-; acti"e high,.This c#cle will re!eat itself as long as the transmission enable +T? or 4):X4)G, is held high. Once the transmission enable falls low, the encoder o t! t com!letes its final c#cle and then sto!s as shown below. ((
R. Trans itt!r: Bince RF mod le cannot transfer !arallel data that has to be con"erted into serial data. This tas$ can be done b# sing !arallel to serial con"erter. Th s con"erted data is gi"en to the RF mod le is of serial data which is nothing b t a digital data. This data is ! lse am!lit de mod lated with a high fre* enc# sine wa"e carrier .The fre* enc# of the sine wa"e is -.. /0z. This data is transmitted sing a telesco!ic antenna o!erated at a fre* enc# of -.. /0z. R. Trans itt!r S)!ci#ications: %or$ing "oltage 4imensions %or$ing c rrent %or$ing mode Trans!ort B!eed Transmit fre* enc# Transmit 2ower ?>ternal Antenna A .=): 5 A :: mm ] :. mm A ); I )( mA A A/ A - 7BJB A .)( J -.. /0z A ); m% A -.. /0z +telesco!ic antenna,
o# R!c!i9!r S!ctionA
o# r!c!i9!r (H
4.2.1. R. R!c!i9!r: The recei"er section consists of RF antenna which recei"es signal from the antenna and gi"es it to RF mod le. The RF mod le consists of a local oscillator !rod cing a signal of same fre* enc# as the carrier signal transmitted i.e., with a fre* enc# of -../0z.The signal recei"ed b# the antenna and the local oscillator signal are a!!lied to a mi>er circ it .The o t! t from the mi>er circ it is a signal with zero fre* enc# and the serial data. The data recei"ed from the transmitter is a!!lied to the micro controller .0ence the serial data has to be con"erted into !arallel data. This can be accom!lished b# sing a serial to !arallel con"erter. The IC sed for this ! r!ose is 0T H-&. R. r!c!i9!r S)!ci#ications Recei"er Bensiti"it# %or$ing "oltage 4imensions Transmit fre* enc# ?>ternal Antenna Trans!ort B!eed %arning Tem!erat re %or$ing c rrent A ='(dBm A (5 A .G mm ] )H mm A .)( J -.. /0z A )& I :( cm A - 7BJB A =); to PG; A ;.( I ;.& mA
O!erating "oltageA :.-5X):5. Fow !ower and high noise imm nit# C/OB technolog#. Fow standb# c rrent. B ilt=in oscillator needs onl# a (S resistor.
.unctiona' 3!scri)tion:
6)!ration:
data !ins in different !ac$ages. It is !aired with t series of encoders. The decoders recei"e data transmitted b# the encoders and inter!ret the first < bits of the code !eriod as (&
address and the last )&I< bits as data +where < is the address code n mber,. A signal on the 4I< !in then acti"ates the oscillator which in t rns decodes the incoming address and data. The decoders will chec$ the recei"ed address twice contin o sl#. If all the recei"ed address codes match the contents of the decoder9s local address, the )&I< bits of data are decoded to acti"ate the o t! t !ins, and the 5T !in is set high to indicate a "alid transmission. That will last ntil the address code is incorrect or no signal has been recei"ed. The o t! t of the 5T !in is high onl# when the transmission is "alid. Otherwise it is low alwa#s. 6ut)ut t")! There are : t#!es of o t! t to select fromA /omentar# t#!eA The data o t! ts follow the encoder d ring a "alid transmission and then reset. Fatch t#!eA The data o t! ts follow the encoder d ring a "alid transmission, and are then latched in this state ntil the ne>t transmission occ rs. R. 1odu'!s: There are three %ireless RF /od les, Transmitter, Recei"er and a Transcei"er. The mod les can comm nicate o"er distances ! to :(; feet. T$o 1od!s o# 6)!ration:
Connecting E<4 to the /ode !in !laces the mod le in Bwitch /ode. Connecting P(5 to the /ode !in !laces the mod le in Berial /ode.
a- S$itch 1od!: The transmitter, recei"er and transcei"er ha"e - address !ins +labeled A44R) I A44R-,, !ro"iding )H address combinations. 2lacing ;5 or (5 on the - address !ins sets the nit9s address +in a binar# fashion,. For e>am!le, !lacing ;5 on all !ins sets the address to zero. 2lacing (5 on all !ins sets the address to )(. The transmitter, recei"er ('
and transcei"er also ha"e . switch data !ins +labeled I<) I I<.,. ;5 or (5 logic le"els !laced on the in! t !ins of the transmitting mod le are a tomaticall# sent to the o t! t !ins +labeled O8T) IO8T., on the recei"e mod le. In addition, )H different mod les can be addressed with the b ilt=in -=bit address !ins. The recei"er will recei"e the switch data on its . switch o t! t !ins onl# when its -=bit address matches the transmitter9s -=bit address. The -=bit address does not a!!l# to serial mode. 2- S!ria' 1od!: In serial mode +with P(5 a!!lied to the /ode !in, the mod les can send and recei"e serial data at 'H;;, <, &, )with P(5 and ;5 logic le"els. Bim!l# connect a single wire to the Transmit 4ata !in +labeled TK4, and send 'H;; ba d data into the mod le. The recei"e mod le o t! ts the same data at 'H;; ba d. All RF data !rocessing is done a tomaticall# b# the mod les. A flow control !in is !ro"ided for the transmitting side to assist with achie"ing ma>im m efficient thro gh! t. 1icrocontro''!r: The o t! t from the serial to !arallel con"erter is gi"en to the micro controller. /icro controller com!ares this data with data coming from the com!arator circ it and !erforms the ob3ect selection. This com!arison is done according to the code written in the micro controller. /icro controller also controls the o!eration of motors which controls the motion of the robot.
H;
6)!ration: The((( timer as a monostable m lti"ibrator. 0ere the o t! t at !in=. of the timer de!ends on the am!lit de of the trigger ! lse a!!lied to the !in=:.0ere we t ne the (;$^ !otentiometer either towards to gro nd or towards P5cc. As the intensit# of light increases the resistance decreases and the triggers at !in=: and o t! t goes high b t the F?4 at o t! t does not glow indicating that the s rro nding area is bright. As the intensit# of light decreases the resistance increases and does not trigger at !in=: and o t! t goes low and the F?4 at o t! t will glow indicating that the s rro nding area is dar$.
H)
Fig (.HA Bloc$ 4iagram of wireless A5 Transmission .!atur!s: %ireless transmission and rece!tion Bmall size Fight weight Fow !ower cons m!tion 0igh sensiti"it#
6)!ration Instructions:
Twist the recei"er antenna into the recei"er. Connect the recei"er to the monitor with A5 cable 2l g the 4C '5 (;;mA ada!tor into the !ower 3ac$ of the recei"er. H:
Insert the 4C &5 :;;mA ada!tor into the !ower 3ac$ of the camera. Ad3 st the fre* enc# controller on the recei"er to the re* ired !osition. Ad3 st the lens of the camera to the best !osition, /o nt the camera with the screw. .unctions: B itable for facilities in the school, office and home, etc., S)!ci#ications: O t! t !owerA (;m% to :;;m% 2ower s !!l#A 4C PH5X):5 O t! t Fre* enc#A';;/01 to ):;;/01 /inim m Ill minationA. F8K
H.
EEI0 S6.TWARE
H-
generating e>tremel# fast and com!act code for the &;() micro!rocessor. C>() !ro"ides #o with the fle>ibilit# of !rogramming in C and the code efficienc# and s!eed of assembl# lang age. The C lang age on its own is not ca!able of !erforming o!erations +s ch as in! t and o t! t, that wo ld normall# re* ire inter"ention from the o!erating s#stems. Instated these ca!abilities are !ro"ided as a !art of standard librar#. Beca se these f nctions are se!arate from the lang age itself, C is s!eciall# s ited for !rod cing code and !ortable across a wide n mber of !latforms. Bince C>() is a cross com!lier, some code of the C !rogramming lang age and standard libraries are altered or enhanced as the !ec liarities of an embedded !rocessor.
th! Co
To in"o$e the C() or C>() com!iler, enter C() or C>() at the command !rom!t. On the command line #o m st incl de the name of the C so rce file to be com!iled as well as an other necessar# control directi"es re* ired to com!ile #o r so rce file. The format for the C>() command line isA C() so rcefile_directi"es..._ C>() so rcefile_directi"es...._ OR C() Qcommandfile C>() Qcommandfile %hereA HH
Bo rcefile = is the name of the so rce !rogram #o want to com!ile. 4irecti"es = are the directi"es #o want to se to control the f nction of Command. Commandfile I is the name of a command in! t file that ma# contain so rce file and directi"es. A commandfile is sed, when the in"ocation line gets com!le> an e>ceeds the limits of the windows command !rom!t.
To can access the ?RROR F?5?l "ariable in batch files. Refer to the windows command inde> or to batch commands in the %indows on=line hel! for more information on ?RRORF?5?F or batch files.
HG
H&
S6.TWARE SECTI65
H'
if +2)_)WW;, c G;
if +2)_-WW;, G)
APP0ICATI65S:
Toda# Robots are wor$ing in almost all fields of ser"ice. Ranging from ho se$ee!ing till high technolog# s!ace e>!loration, robot technolog# has made a significant im!act.
Robots in the homeA As their !rice falls, and their !erformance and com! tational abilit# rises, ma$ing them both affordable and s fficientl# a tonomo s, robots are increasingl# being seen in the home the# tend to be relati"el# a tonomo s, s all# onl# re* iring a command to begin their 3ob. The# then !roceed to go abo t their b siness in their own wa#. At s ch, the# dis!la# a good deal of agenc#, and are considered intelligent robots.
%hen a h man cannot be !resent on site to !erform a 3ob beca se it is dangero s, far awa#, or inaccessible, teleo!orted robots, or telerobots are sed. Telerobot is controlled from a distance b# a h man o!erator. This sa"es the financial cost and !h#sical incon"enience.
/ilitar# robotsA Teleo!erated robot aircraft, li$e the 2redator 8nmanned Aerial 5ehicle, are increasingl# being sed b# the militar#. These robots can be controlled from an#where in the world allowing an arm# to search terrain, and e"en fire on targets, witho t endangering those in control.
?lder CareA The !o! lation is aging in man# co ntries, meaning that there are increasing n mbers of elderl# !eo!le to care for b t relati"el# fewer #o ng !eo!le to care for them. 0 mans ma$e the best careers, b t where the# are na"ailable, robots are grad all# being introd ced.
G.
C65C0&SI65:
This wireless accessible robo are considered to be the f t re so!histicated tools which wo ld be "er# sef l to man. If we loo$ at their !resent a!!lications , we ma# not find eno gh of them , b t the# are s re to re"ol tionalize the field of robotics in the near f t re and wo ld ha"e an im!act on the societ#. The robot which was constr cted b# order to ma$e them s has limited sco!e b t if it is e>tended then it has a more efficient and more sef l. The research and wide range of a!!lications and can be integrated in se"eral intelligent s#stems in de"elo!ment wor$ in the area of mobile robotics incl ding the a!!lications in forestr#, agric lt re, mining, and trans!ortation in a factor# #ard which can reach the goal of the f t re sco!e.
G-
BIB0I6/RAPHC
TIT0E:
Th! :=41 1icrocontro''!r Th! :=41 1icrocontro''!r and E b!dd!d S"st! s
WEBSITES: www.datasheets.com. www.robotics.org www.wi$i!edia.org. www.ieee.org. www.atmel=wm.com. www.fairchildsemi.com. www.datasheetcatalog.comJnationalsemicond ctor. www."isha#.com.
G(