You are on page 1of 75

AUTOMATIC RAILWAY SIGNALLING SYSTEM

INDEX CONTENTS 1.Abbreviations 2.Intro !"tion #.$%o"& Dia'ra( ).$%o"& Dia'ra( Des"ri*tion +.S",e(ati" -.S",e(ati" Des"ri*tion ../ar 0are Co(*onents Mi"ro"ontro%%er 1o0er s!**%2 LCD $U33ER Re4%e"tion sensor

Gate o*enin' s2ste(5ste**er (otor6 Si'na%%in' s2ste(

7.Cir"!it Des"ri*tion 8.so4t0are 19.Con"%!sion 5or6 S2no*sis 11.:!t!re As*e"ts 12.$ib%io'ra*,2 A$$RE;IATIONS

SYM$OL ACC B PSW SP DPTR DP" DP# P% P& P2 P' (P (E TM)D TC)N T2C)N T2M)D T#% T"% T#& T"& T#2 T"2 SC)N SB+, PC)N

NAME Accumulator B register Program status word Stack pointer Data pointer 2 !tes "ow !te #ig$ !te Port% Port& Port2 Port' (nterrupt priorit! control (nterrupt ena le control Timer*counter mode control Timer*counter control Timer*counter 2 control Timer*counter mode2 control Timer*counter %$ig$ !te Timer*counter % low !te Timer*counter & $ig$ !te Timer*counter & low !te Timer*counter 2 $ig$ !te Timer*counter 2 low !te Serial control Serial data u--er Power control

INTRODUCTION
EM$EDDED SYSTEM<

An e(be

s2ste( is a special.purpose s!stem in w$ic$ t$e computer is completel!

encapsulated ! or dedicated to t$e de/ice or s!stem it controls0 +nlike a general.purpose computer1 suc$ as a personal computer1 an em edded s!stem per-orms one or a -ew prede-ined tasks1 usuall! wit$ /er! speci-ic re2uirements0 Since t$e s!stem is dedicated to speci-ic tasks1 design engineers can optimi3e it1 reducing t$e si3e and cost o- t$e product0 Em edded s!stems are o-ten mass.produced1 ene-iting -rom economies o- scale0 Personal digital assistants 4PDAs5 or $and$eld computers are generall! considered em edded de/ices ecause o- t$e nature o- t$eir $ardware design1 e/en t$oug$ t$e! are more e6panda le in so-tware terms0 T$is line o- de-inition continues to lur as de/ices e6pand0 Wit$ t$e introduction o- t$e )7) Model 2 wit$ t$e Windows 8P operating s!stem and ports suc$ as a +SB port 9 ot$ -eatures usuall! elong to :general purpose computers:1 9 t$e line o- nomenclature lurs e/en more0 P$!sicall!1 em edded s!stems ranges -rom porta le de/ices suc$ as digital watc$es and MP' pla!ers1 to large stationar! installations like tra--ic lig$ts1 -actor! controllers1 or t$e s!stems controlling nuclear power plants0 (n terms o- comple6it! em edded s!stems can range -rom /er! simple wit$ a single microcontroller c$ip1 to /er! comple6 wit$ multiple units1 perip$erals and networks mounted inside a large c$assis or enclosure0

E=a(*%es o4 E(be

e S2ste(s<

A/ionics1 suc$ as inertial guidance s!stems1 -lig$t control $ardware*so-tware and ot$er integrated s!stems in aircra-t and missiles Cellular telep$ones and telep$one switc$es Engine controllers and antilock rake controllers -or automo iles #ome automation products1 suc$ as t$ermostats1 air conditioners1 sprinklers1 and securit! monitoring s!stems #and$eld calculators #and$eld computers #ouse$old appliances1 including microwa/e o/ens1 was$ing mac$ines1 tele/ision sets1 D;D pla!ers and recorders Medical e2uipment Personal digital assistant ;ideogame consoles Computer perip$erals suc$ as routers and printers0 (ndustrial controllers -or remote mac$ine operation0

A$STRACT
T$e railroad industr!<s own desire to maintain t$eir a ilit! to pro/ide sa-e and secure transport o- t$eir customers $a3ardous materials1 $as introduced new c$allenges in rail securit!0 Addressing t$ese c$allenges is important1 as railroads1 and t$e e--icient deli/er! o- t$eir cargo1 pla! a /ital role in t$e econom! o- t$e countr!0 T$e present pro=ect is designed to satis-! t$e securit! needs o- t$e railwa!s0 T$is s!stem pro/ides t$e securit! in -our wa!s> automatic gate opening*closing s!stem at track crossing1 signaling -or t$e train dri/er1 tracking t$e signals1 and t$e track protection0 T$e automatic gate opening*closing s!stem is pro/ided wit$ t$e Re-lection sensors placed at a distance o- -ew kilometers on t$e ot$ sides -rom t$e crossing road0 T$ese sensors gi/e t$e train reac$ing and lea/ing status to t$e em edded controller at t$e gate to w$ic$ t$e! are connected0 T$e controller operates 4open*close5 t$e gate as per t$e recei/ed signal -rom t$e Re-lection sensors0 T$e train dri/er alwa!s o ser/es t$e signals placed eside t$e track0 T$ese signals are controlled -rom t$e control room0 T$e green lig$t denotes t$at t$e track is -ree and red lig$t denotes t$e track is us! or damaged0 T$ese signals are controlled ased on t$e train position w$ic$ is sensed ! using t$e Re-lection sensors placed along t$e track0 T$e position o- t$e train can e estimated ! using t$e Re-lection sensor placed along t$e track and is displa!ed on t$e control room to indicate t$e train position along t$e track0 0 T$e track protection is ac$ie/ed ! pro/iding t$e closed loop along t$e track0 (- an! crack or cut is occurred to t$e track simultaneousl! t$e same $appens to t$e closed loop0 T$is gi/es a signal

to t$e controller at t$e control room0 ,rom control room we can gi/e t$e red signal ! knowing t$e position o- t$e train t$roug$ t$e Re-lection sensors0

/ar 0are Co(*onents< Micro Controller (R Sensor "CD ?ate opening s!stem Signalling s!stem Track Protection circuit Bu33er

So4t0are Too%s<
@eil u.;ision Em edded AC< E6press PCB

A**%i"ations< Railwa! Sector


$LOC> DIAGRAM<

Power suppl! Micro controller

"CD

RE,"ECT()N

SENS)R

?ATE )PEN(N? SBSTEM 4DC5

Bu33er

S(?NA""(N? SBSTEM

$%o"& ia'ra( e=*%anation< T$e o =ecti/e o- t$is pro=ect is to pro/ide signaling s!stem -or t$e railwa!s to enter and lea/e t$e track0 T$e automatic gate opening*closing s!stem is
pro/ided wit$ t$e Re-lection sensors placed at a distance o- -ew kilometers on t$e ot$ sides -rom t$e crossing road0 T$ese sensors gi/e t$e train reac$ing and lea/ing status to t$e em edded controller at t$e gate to w$ic$ t$e! are connected0 T$e controller operates 4open*close5 t$e gate as per t$e recei/ed signal -rom t$e Re-lection sensors0 "CD will pro/ide t$e status o- t$e gate and also t$e -aults o- t$e track i- an! present w$en arri/al o- t$e rail0 T$e u33er will e )N w$ene/er t$e track is corrupted1and ),, w$en t$ere is no pro lem wit$ t$e track0 T$e "EDs i0e green lig$t denotes t$at t$e track is -ree and red lig$t denotes t$e track is us! or damaged0

S",e(ati" ia'ra(<

S",e(ati" e=*%anation< ,irstl!1 t$e re2uired operating /oltage -or Microcontroller CDCE& is E;0 #ence t$e E; D0C0 power suppl! is needed ! t$e same0 T$is regulated E; is generated ! -irst stepping down t$e 2'%; to D; ! t$e step down trans-ormer0

T$e step downed a0c0 /oltage is eing recti-ied ! t$e Bridge Recti-ier0 T$e diodes used are &NF%%G0 T$e recti-ied a0c /oltage is now -iltered using a AC< -ilter0 Now t$e recti-ied1 -iltered D0C0 /oltage is -ed to t$e ;oltage Regulator0 T$is /oltage regulator allows us to $a/e a Regulated ;oltage w$ic$ is HE;0 T$e recti-iedI -iltered and regulated /oltage is again -iltered -or ripples using an electrol!tic capacitor &%%J,0 Now t$e output -rom t$is section is -ed to F% t$ pin o- CDcE& microcontroller to suppl! operating /oltage0 T$e microcontroller CDcE& wit$ Pull up resistors at Port% and cr!stal oscillator o&&0%ED2 M#3 cr!stal in con=unction wit$ couple o- capacitors o- is placed at &C t$ K &Dt$ pins oCDcE& to make it work 4e6ecute5 properl!0 T$e re-lection sensors are connected to using t$e transistor logics0 T$e "EDs w$ic$ will s$ow t$e status o- t$e track 1eit$er it is -ree or not0 T$e "CD data pins are connected to t$e port & o- t$e microcontroller0 T$e control pins are connected to t$e p20G down to p20E0 T$e re-lection sensors are connected to t$e p'02 top'0F as s$own in t$e sc$ematic0

T$e DC motor is connected to port % o- microcontroller t$roug$ t$e dri/er circuit w$ic$ is known as t$e +"N dri/er0

/ar 0are "o(*onents<


MICRO CONTROLLER 5AT78S+16

Intro !"tion
A Micro controller consists o- a power-ul CP+ tig$tl! coupled wit$ memor!1 /arious (*) inter-aces suc$ as serial port1 parallel port timer or counter1 interrupt controller1 data ac2uisition inter-aces.Analog to Digital con/erter1 Digital to Analog con/erter1 integrated on to a single silicon c$ip0 (- a s!stem is de/eloped wit$ a microprocessor1 t$e designer $as to go -or e6ternal memor! suc$ as RAM1 R)M1 EPR)M and perip$erals0 But controller is pro/ided all t$ese -acilities on a single c$ip0 De/elopment o- a Micro controller reduces PCB si3e and cost odesign0 )ne o- t$e ma=or di--erences etween a Microprocessor and a Micro controller is t$at a controller o-ten deals wit$ its not !tes as in t$e real world application0 (ntel $as introduced a -amil! o- Micro controllers called t$e MCS.E&0

:i'!re< (i"ro "ontro%%er

:eat!res<

L Compati le wit$ MCS.E&M Products

L F@ B!tes o- (n.S!stem Programma le 4(SP5 ,las$ Memor! N Endurance> &%%% Write*Erase C!cles L F0%; to E0E; )perating Range L ,ull! Static )peration> % #3 to '' M#3 L T$ree.le/el Program Memor! "ock L &2C 6 C. it (nternal RAM L '2 Programma le (*) "ines L Two &O. it Timer*Counters L Si6 (nterrupt Sources L ,ull Duple6 +ART Serial C$annel L "ow.power (dle and Power.down Modes

Des"ri*tion
T$e ATCDSE& is a low.power1 $ig$.per-ormance CM)S C. it microcontroller wit$ F@ !tes o- in.s!stem programma le ,las$ memor!0 T$e de/ice is manu-actured using Atmel<s $ig$.densit! non/olatile memor! tec$nolog! and is compati le wit$ t$e industr!. standard C%CE& instruction set and pinout0 T$e on.c$ip ,las$ allows t$e program memor! to e reprogrammed in.s!stem or ! a con/entional non/olatile memor! programmer0 B! com ining a /ersatile C. it CP+ wit$ in.s!stem programma le ,las$ on a monolit$ic c$ip1 t$e Atmel ATCDSE& is a power-ul microcontroller w$ic$ pro/ides a $ig$l!.-le6i le and cost.e--ecti/e solution to man! em edded control applications0

$%o"& ia'ra(<

:i'!re< $%o"& ia'ra(

1in ia'ra(<

:i'!re< *in ia'ra( o4 (i"ro "ontro%%er

1in Des"ri*tion

;CC ? Suppl! /oltage0 GND ? ?round0 1ort 9< Port % is an C. it open drain idirectional (*) port0 As an output port1 eac$ pin can sink eig$t TT" inputs0 W$en &s are written to port % pins1 t$e pins can e used as $ig$.impedance inputs0 Port % can also e con-igured to e t$e multiple6ed low.order address*data us during accesses to e6ternal program and data memor!0 (n t$is mode1 P% $as internal pull.ups0 Port % also recei/es t$e code !tes during ,las$ programming and outputs t$e code !tes during program /eri-ication0 E=terna% *!%%?!*s are re@!ire veri4i"ation0 1ort 1< Port & is an C. it idirectional (*) port wit$ internal pull.ups0 T$e Port & output u--ers can sink*source -our TT" inputs0 W$en &s are written to Port & pins1 t$e! are pulled $ig$ ! t$e internal pull.ups and can e used as inputs0 As inputs1 Port & pins t$at are e6ternall! eing pulled low will source current 4(("5 ecause ot$e internal pull.ups0 Port & also recei/es t$e low.order address /eri-ication0 !tes during ,las$ programming and !rin' *ro'ra(

1ort 2< Port 2 is an C. it idirectional (*) port wit$ internal pull.ups0 T$e Port 2 output u--ers can sink*source -our TT" inputs0 W$en &s are written to Port 2 pins1 t$e! are pulled $ig$ ! t$e internal pull.ups and can e used as inputs0 As inputs1 Port 2 pins t$at are e6ternall! eing pulled low will source current 4(("5 ecause ot$e internal pull.ups0 Port 2 also recei/es t$e $ig$.order address its and some control signals during ,las$ programming and /eri-ication0 1ort #< Port ' is an C. it idirectional (*) port wit$ internal pull.ups0 T$e Port ' output u--ers can sink*source -our TT" inputs0 W$en &s are written to Port ' pins1 t$e! are pulled $ig$ ! t$e internal pull.ups and can e used as inputs0 As inputs1 Port ' pins t$at are e6ternall! eing pulled low will source current 4(("5 ecause o-

t$e pull.ups0 Port ' recei/es some control signals -or ,las$ programming and /eri-ication0 Port ' also ser/es t$e -unctions o- /arious special -eatures o- t$e ATCDSE&1 as s$own in t$e -ollowing ta le0

RST< Reset input0 A $ig$ on t$is pin -or two mac$ine c!cles w$ile t$e oscillator is running resets t$e de/ice0 T$is pin dri/es #ig$ -or DC oscillator periods a-ter t$e Watc$dog times out0 T$e D(SRT) it in S,R A+8R 4address CE#5 can e used to disa le t$is -eature0 (n t$e de-ault state o- it D(SRT)1 t$e RESET #(?# out -eature is ena led0 ALEA1ROG< Address "atc$ Ena le 4A"E5 is an output pulse -or latc$ing t$e low !te o- t$e address during accesses to e6ternal memor!0 T$is pin is also t$e program pulse input 4PR)?5 during ,las$ programming0 (n normal operation1 A"E is emitted at a constant rate o- &*O t$e oscillator -re2uenc! and ma! e used -or e6ternal timing or clocking purposes0 Note1 $owe/er1 t$at one A"E pulse is skipped during eac$ access to e6ternal data memor!0 (- desired1 A"E operation can e disa led ! setting it % o- S,R location CE#0 Wit$ t$e it set1 A"E is acti/e onl! during a M);8 or M);C instruction0 )t$erwise1 t$e pin is weakl! pulled $ig$0 Setting t$e A"E.disa le it $as no e--ect i- t$e microcontroller is in e6ternal e6ecution mode0 1SEN< Program Store Ena le 4PSEN5 is t$e read stro e to e6ternal program memor!0 W$en t$e ATCDSE& is e6ecuting code -rom e6ternal program memor!1 PSEN is acti/ated twice eac$ mac$ine c!cle1 e6cept t$at two PSEN acti/ations are skipped during eac$ access to e6ternal data memor!0

EAA;11< E6ternal Access Ena le0 EA must e strapped to ?ND in order to ena le t$e de/ice to -etc$ code -rom e6ternal program memor! locations starting at %%%%# up to ,,,,#0 Note1 $owe/er1 t$at i- lock it & is programmed1 EA will e internall! latc$ed on reset0 EA s$ould e strapped to ;CC -or internal program e6ecutions0 T$is pin also recei/es t$e &2./olt programming ena le /oltage 4;PP5 during ,las$ programming0 XTAL1< (nput to t$e in/erting oscillator ampli-ier and input to t$e internal clock operating circuit0 XTAL2< )utput -rom t$e in/erting oscillator ampli-ier0 Os"i%%ator C,ara"teristi"s<

8TA"& and 8TA"2 are t$e input and output1 respecti/el!1 o- an in/erting ampli-ier w$ic$ can e con-igured -or use as an on.c$ip oscillator1 as s$own in ,igs O020'0 Eit$er a 2uart3 cr!stal or ceramic resonator ma! e used0 To dri/e t$e de/ice -rom an e6ternal clock source1 8TA"2 s$ould e le-t unconnected w$ile 8TA"& is dri/en as s$own in ,igure O020F0T$ere are no re2uirements on t$e dut! c!cle o- t$e e6ternal clock signal1 since t$e input to t$e internal clocking circuitr! is t$roug$ a di/ide. !.two -lip.-lop1 ut minimum and ma6imum /oltage $ig$ and low time speci-ications must e o ser/ed0

:i' -.2.# Os"i%%ator Conne"tions :i' -.2.) E=terna% C%o"& Drive Con4i'!ration

$U33ER
T$e :Pie3oelectric sound components: introduced $erein operate on an inno/ati/e principle utili3ing natural oscillation o- pie3oelectric ceramics0 T$ese u33ers are o--ered in lig$tweig$t compact si3es -rom t$e smallest diameter o- &2mm to large Pie3o electric sounders0 Toda!1 pie3oelectric sound components are used in man! wa!s suc$ as $ome appliances1 )A e2uipment1 audio e2uipment telep$ones1 etc0 And t$e! are applied widel!1 -or e6ample1 in alarms1 speakers1 telep$one ringers1 recei/ers1 transmitters1 eep sounds1 etc0

:IG< T2*es o4 $!BBers

Os"i%%atin' S2ste(<
Basicall!1 t$e sound source o- a pie3oelectric sound component is a pie3oelectric diap$ragm0 A pie3oelectric diap$ragm consists o- a pie3oelectric ceramic plate w$ic$ $as electrodes on ot$ sides and a metal plate 4 rass or stainless steel1 etc050 A pie3oelectric ceramic plate is attac$ed to a metal plate wit$ ad$esi/es0 ,ig0 2 s$ows t$e oscillating s!stem o- a pie3oelectric diap$ragm0 Appl!ing D0C0 /oltage etween electrodes o- a pie3oelectric diap$ragm causes mec$anical distortion due to t$e pie3oelectric e--ect0 ,or a miss$aped pie3oelectric element1 t$e distortion o- t$e pie3oelectric element e6pands in a radial direction0 And t$e pie3oelectric diap$ragm direction s$own in ,ig02 4a50 ends toward t$e

T$e metal plate onded to t$e pie3oelectric element does not e6pand0 Con/ersel!1 w$en t$e pie3oelectric element s$rinks1 t$e pie3oelectric diap$ragm ends in t$e direction s$own in ,ig02 4 50 T$us1 w$en AC /oltage is applied across electrodes1 t$e ending s$own in ,ig02 4a5 and ,ig02 4 5 is repeated as s$own in ,ig02 4c51 producing sound wa/es in t$e air0 DESIGN 1ROCEDURES< (n general1 manPs audi le -re2uenc! range is a out 2% #3 to 2%k#30 ,re2uenc! ranges o2k#3 to Fk#3 are most easil! $eard0 ,or t$is reason1 most pie3oelectric sound components are used in t$is -re2uenc! range1 and t$e resonant -re2uenc! 4-%5 is generall! selected in t$e same range too0 As s$own in ,ig0 '1 t$e resonant -re2uenc! depends on met$ods used to support t$e pie3oelectric diap$ragm0 (- pie3oelectric diap$ragms are o- t$e same s$ape1 t$eir /alues will ecome smaller in t$e order o- 4a51 4 5 and 4c50

(n general1 t$e pie3oelectric diap$ragm is installed in a ca/it! to produce $ig$ sound pressure0 T$e resonant -re2uenc! 4-ca/5 o- t$e ca/it! in is o tained -rom ,ormula 4&5 4#elm$olt3Ps ,ormula50 Since t$e pie3oelectric diap$ragm and ca/it! $a/e proper resonant -re2uencies1 4-%5 and 4-ca/5 respecti/el!1 sound pressure in speci-ic -re2uencies can e increased and a speci-ic andwidt$ can e pro/ided ! controlling ot$ positions0

1o0er s!**%2<
T$e power supplies are designed to con/ert $ig$ /oltage AC mains electricit! to a suita le low /oltage suppl! -or electronics circuits and ot$er de/ices0 A power suppl! can ! roken down into a series o- locks1 eac$ o- w$ic$ per-orms a particular -unction0 A d0c power suppl! w$ic$ maintains t$e output /oltage constant irrespecti/e o- a0c mains -luctuations or load /ariations is known as QRegulated D0C Power Suppl!R

,or e6ample a E; regulated power suppl! s!stem as s$own elow>

Trans4or(er<
A trans-ormer is an electrical de/ice w$ic$ is used to con/ert electrical power -rom one Electrical circuit to anot$er wit$out c$ange in -re2uenc!0

Trans-ormers con/ert AC electricit! -rom one /oltage to anot$er wit$ little loss o- power0 Trans-ormers work onl! wit$ AC and t$is is one o- t$e reasons w$! mains electricit! is AC0 Step.up trans-ormers increase in output /oltage1 step.down trans-ormers decrease in output /oltage0 Most power supplies use a step.down trans-ormer to reduce t$e dangerousl! $ig$ mains /oltage to a sa-er low /oltage0 T$e input coil is called t$e primar! and t$e output coil is called t$e secondar!0 T$ere is no electrical connection etween t$e two coilsI instead t$e! are linked ! an alternating magnetic -ield created in t$e so-t.iron core o- t$e trans-ormer0 T$e two lines in t$e middle o- t$e circuit s!m ol represent t$e core0 Trans-ormers waste /er! little power so t$e power out is 4almost5 e2ual to t$e power in0 Note t$at as /oltage is stepped down current is stepped up0 T$e ratio o- t$e num er o- turns on eac$ coil1 called t$e turn<s ratio1 determines t$e ratio o- t$e /oltages0 A step.down trans-ormer $as a large num er o- turns on its primar! 4input5 coil w$ic$ is connected to t$e $ig$ /oltage mains suppl!1 and a small num er o- turns on its secondar! 4output5 coil to gi/e a low output /oltage0

An Electrical Trans-ormer

Turns ratio S ;p* ;S S Np*NS Power )utS Power (n ;S 8 (SS;P 8 (P ;p Np S S num er primar! oturns 4input5 on primar! /oltage coil

(p S primar! 4input5 current

RECTI:IER<
A circuit w$ic$ is used to con/ert a0c to dc is known as RECT(,(ER0 T$e process o- con/ersion a0c to d0c is called Qrecti-icationR TY1ES O: RECTI:IERS< #al- wa/e Recti-ier ,ull wa/e recti-ier &0 Centre tap -ull wa/e recti-ier0 20 Bridge t!pe -ull ridge recti-ier0

Co(*arison o4 re"ti4ier "ir"!its< T2*e o4 Re"ti4ier 1ara(eter Num er o- diodes & P(; o- diodes ;m D0C output /oltage ;dc1at no.load Ripple -actor Ripple -re2uenc! Recti-ication e--icienc! Trans-ormer +tili3ation ,actor4T+,5 RMS /oltage ;rms ;m* %0'&C;m &02& %0F%O %02CG ;m*2 2;m 2;m* %0O'O;m %0FC2 2%0C&2 %0OD' ;m*T2 ;m 2;m* %0O'O;m %0FC2 2%0C&2 %0C&2 ;m*T2 2 F /a%4 0ave :!%% 0ave $ri 'e

:!%%?0ave Re"ti4ier<
,rom t$e a o/e comparison we came to know t$at -ull wa/e ridge recti-ier as more ad/antages t$an t$e ot$er two recti-iers0 So1 in our pro=ect we are using -ull wa/e ridge recti-ier circuit0

$ri 'e Re"ti4ier< A ridge recti-ier makes use o- -our diodes in a ridge arrangement to ac$ie/e -ull.wa/e recti-ication0 T$is is a widel! used con-iguration1 ot$ wit$ indi/idual diodes wired as s$own and wit$ single component internall!0
A ridge recti-ier makes use o- -our diodes in a ridge arrangement as s$own in -ig4a5 to ac$ie/e -ull.wa/e recti-ication0 T$is is a widel! used con-iguration1 ot$ wit$ indi/idual diodes wired as s$own and wit$ single component ridges w$ere t$e diode ridge is wired internall!0

ridges w$ere t$e diode

ridge is wired

,ig4A5

O*eration<
During positi/e $al- c!cle o- secondar!1 t$e diodes D2 and D' are in -orward iased w$ile D& and DF are in re/erse iased as s$own in t$e -ig4 50 T$e current -low direction is s$own in t$e -ig 4 5 wit$ dotted arrows0

,ig4B5
During negati/e $al- c!cle o- secondar! /oltage1 t$e diodes D& and DF are in -orward iased w$ile D2 and D' are in re/erse iased as s$own in t$e -ig4c50 T$e current -low direction is s$own in t$e -ig 4c5 wit$ dotted arrows0

,ig4C5 :i%ter<
A ,ilter is a de/ice w$ic$ remo/es t$e a0c component o- recti-ier output ut allows t$e d0c component to reac$ t$e load

Ca*a"itor :i%ter<
We $a/e seen t$at t$e ripple content in t$e recti-ied output o- $al- wa/e recti-ier is 121C or t$at o-ull.wa/e or ridge recti-ier or ridge recti-ier is )7C suc$ $ig$ percentages o- ripples is not accepta le -or most o- t$e applications0 Ripples can e remo/ed ! one o- t$e -ollowing met$ods o- -iltering0 5a6 A capacitor1 in parallel to t$e load1 pro/ides an easier ! Npass -or t$e ripples /oltage t$oug$ it due to low impedance0 At ripple -re2uenc! and lea/e t$e d0c0to appears t$e load0 5b6 An inductor1 in series wit$ t$e load1 pre/ents t$e passage o- t$e ripple current 4due to $ig$ impedance at ripple -re2uenc!5 w$ile allowing t$e d0c 4due to low resistance to d0c5 5"6 ;arious com inations o- capacitor and inductor1 suc$ as ".section -ilter section -ilter1 multiple

section -ilter etc0 w$ic$ make use o- ot$ t$e properties mentioned in 4a5 and 4 5 a o/e0 Two cases ocapacitor -ilter1 one applied on $al- wa/e recti-ier and anot$er wit$ -ull wa/e recti-ier0

,iltering is per-ormed ! a large /alue electrol!tic capacitor connected across t$e DC suppl! to act as a reser/oir1 suppl!ing current to t$e output w$en t$e /ar!ing DC /oltage -rom t$e recti-ier is -alling0 T$e capacitor c$arges 2uickl! near t$e peak o- t$e /ar!ing DC1 and t$en

disc$arges as it supplies current to t$e output0 ,iltering signi-icantl! increases t$e a/erage DC /oltage to almost t$e peak /alue 4&0F U RMS /alue50 To calculate t$e /alue o- capacitor4C51 C S VWT'W-WrWRl W$ere1 - S suppl! -re2uenc!1 r S ripple -actor1 Rl S load resistance Note> (n our circuit we are using &%%%X,0 #ence large /alue o- capacitor is placed to reduce ripples and to impro/e t$e DC component0

Re'!%ator<
;oltage regulator (Cs is a/aila le wit$ -i6ed 4t!picall! E1 &2 and &E;5 or /aria le output /oltages0 T$e ma6imum current t$e! can pass also rates t$em0 Negati/e /oltage regulators are a/aila le1 mainl! -or use in dual supplies0 Most regulators include some automatic protection -rom e6cessi/e current 4Po/erload protectionP5 and o/er$eating 4Pt$ermal protectionP50 Man! o- t$e -i6ed /oltage regulator (Cs $a/e ' leads and look like power transistors1 suc$ as t$e GC%E HE; &A regulator s$own on t$e rig$t0 T$e "MGC%E is simple to use0 Bou simpl! connect t$e positi/e lead o- !our unregulated DC power suppl! 4an!t$ing -rom D;DC to 2F;DC5 to t$e (nput pin1 connect t$e negati/e lead to t$e Common pin and t$en w$en !ou turn on t$e power1 !ou get a E /olt suppl! -rom t$e output pin0

,ig O0&0O A T$ree Terminal ;oltage Regulator .7XX<

T$e Ba! "inear "MGC88 is integrated linear positi/e regulator wit$ t$ree terminals0 T$e "MGC88 o--er se/eral -i6ed output /oltages making t$em use-ul in wide range o- applications0 W$en used as a 3ener diode*resistor com ination replacement1 t$e "MGC88 usuall! results in an e--ecti/e output impedance impro/ement o- two orders o- magnitude1 lower 2uiescent current0 T$e "MGC88 is a/aila le in t$e T).2E21 T).22% K T).2O'packages1

:eat!res<
L )utput Current o- &0EA L )utput ;oltage Tolerance o- EY L (nternal t$ermal o/erload protection L (nternal S$ort.Circuit "imited L No E6ternal Component L )utput ;oltage E0%;1 O;1 C;1 D;1 &%;1&2;1 &E;1 &C;1 2F; L )--er in plastic T).2E21 T).22% K T).2O'

L Direct Replacement -or "MGC88

LIG/T EMITING DIODES

(t is a semiconductor diode $a/ing radioacti/e recom ination0 (t re2uires a de-inite amount oenerg! to generate an electron.$ole pair0 T$e same energ! is released w$en an electron recom ines wit$ a $ole0 T$is released energ! ma! result in t$e emission o- p$oton and suc$ a recom ination0 #ear t$e amount o- energ! released w$en t$e electro re/erts -rom t$e conduction and to t$e /alence and appears in t$e -orm o- radiation0 Alternati/el! t$e released energ! ma! result in a series o- p$onons causing lattice /i ration0 ,inall! t$e released energ! ma! e trans-erred to anot$er electron0 T$e recom ination radiation ma! e lie in t$e in-ra.red and /isi le lig$t spectrum0 (n -orward is peaked around t$e and gap energ! and t$e p$enomenon is called in=ection luminescence0 ( n a =unction iased in t$e a/alanc$e reak down region 1 t$ere results a spectrum o- p$otons carr!ing muc$ $ig$er energies 0 Almost W$ite lig$t t$en gets emitted -rom micro.plasma reakdown region in silicon =unction0 Diodes $a/ing radioacti/e recom ination are termed as "ig$t Emitting Diode1 a re/iated as "EDs0

(n gallium arsenide diode1 recom ination is predominantl! a radiation recom ination and t$e pro a ilit! o- t$is radio acti/e recom ination -ar e6ceeds t$at in eit$er germanium or silicon 0 #ence ?a As "ED $as muc$ $ig$er e--icienc! in terms oP$otons emitted per carrier0 T$e internal e--icienc! o- ?a As "ED ma! e /er! close to &%%Y ut ecause o- $ig$ inde6 o- re-raction1 onl! a small -raction o- t$e internal radiation can usuall! come out ot$e de/ice sur-ace0 (n spite o- t$is low e--icienc! o- actuall! radiated lig$t 1 t$ese "EDs are e--icienc! used as lig$t emitters in /isual displa! units and in opticall! coupled circuits1 T$e e--icienc! o- lig$t generation increases wit$ t$e increase o- in=ected current and wit$ decreases in temperature0 T$e lig$t so generated is concentrated near t$e =unction since most o- t$e c$arge carriers are o tained wit$in one di--usion lengt$ o- t$e diode =unction0

T$e -ollowing are t$e merits o- "EDs o/er con/entional incandescent and ot$er t!pes o- lamps &0 "ow working /oltages and currents 20 "ess power consumption '0 ;er! -ast action F0 Emission o- monoc$romatic lig$t E0 small si3e and weig$t O0 No e--ect o- mec$anical /i rations G0 E6tremel! long li-e T!pical "ED uses a -orward /oltage o- a out 2; and current o- E to &%mA0 ?aAs "ED produces in-ra.red lig$t w$ile red1 green and orange lig$ts are produced ! gallium arsenide p$osp$ide 4?aAs5 and gallium p$osp$ide4?ap5 0 Li',t E(ittin' Dio es 5LEDs6

E6ample>
:!n"tion

Circuit s!m ol>

"EDs emit lig$t w$en an electric current passes t$roug$ t$em0

Conne"tin' an so% erin'

"EDs must e connected t$e correct wa! round1 t$e diagram ma! e la elled a or D -or anode and & or ? -or cat$ode 4!es1 it reall! is k1 not c1 -or cat$odeZ50 T$e cat$ode is t$e s$ort lead and t$ere ma! e a slig$t -lat on t$e od! o- round "EDs0 (- !ou can see inside t$e "ED is t$e larger electrode 4 ut t$is is not an o--icial identi-ication met$od50 t$e cat$ode

"EDs can e damaged ! $eat w$en soldering1 ut t$e risk is small unless !ou are /er! slow0 No special precautions are needed -or soldering most "EDs0

Testin' an LED
Ne/er connect an "ED directl! to a atter! or power suppl!Z resistor (t will e destro!ed almost instantl! ecause too muc$ current will pass t$roug$ and urn it out0 "EDs must $a/e a resistor in series to limit t$e current to a sa-e /alue1 -or 2uick testing purposes a &k "orre"t 0a2 ro!n E is suita le -or most "EDs i- !our suppl! /oltage is &2; or less0 Re(e(ber to "onne"t t,e LED t,e

Co%ors o4 LEDs
"EDs are a/aila le in red1 orange1 am er1 !ellow1 green1 lue and w$ite0 Blue and w$ite "EDs are muc$ more e6pensi/e t$an t$e ot$er colours0 T$e colour o- an "ED is determined ! t$e semiconductor material1 not ! t$e colouring PpackageP 4t$e plastic od!50 "EDs o- all are a/aila le in uncoloured packages w$ic$ di--used 4milk!5 or clear 4o-ten descri ed as clearP50 T$e coloured packages are also a/aila le as di--used 4t$e standard4t!pe5ortransparent0 o- t$e colours ma! e Pwater

Tri?"o%o!r LEDs

T$e most popular t!pe o- tri.colour "ED $as a red and a green "ED com ined in one package wit$ t$ree leads0 T$e! are called tri.colour ecause mi6ed red and green lig$t appears to e !ellow and t$is is produced w$en ot$ t$e red and green "EDs are on0 T$e diagram s$ows t$e construction o- a tri.colour "ED0 Note t$e di--erent lengt$s o- t$e t$ree leads0 T$e centre lead 4k5 is t$e common cat$ode -or ot$ "EDs1 t$e outer leads 4a& and a25 are t$e anodes to t$e "EDs allowing eac$ one to e lit separatel!1 or ot$ toget$er to gi/e t$e t$ird colour0

$i?"o%or LEDs
A i. colour "ED $as two "EDs wired in Pin/erse parallelP 4one -orwards1 one ackwards5 com ined in one package wit$ two leads0 )nl! one o- t$e "EDs can e lit at one time and t$e! are less use-ul t$an t$e tri.colour "EDs descri ed a o/e0

SiBesF S,a*es an ;ie0in' an'%es o4 LEDs


"EDs are a/aila le in a wide /ariet! o- si3es and s$apes0 T$e PstandardP "ED $as a round cross. section o- Emm diameter and t$is is pro a l! t$e est t!pe -or general use1 ut 'mm round "EDs are also popular0 Round cross.section "EDs are -re2uentl! used and t$e! are /er! eas! to install on o6es ! drilling a $ole o- t$e "ED diameter1 adding a spot o- glue will $elp to $old t$e "ED i- necessar!0 "ED clips are also a/aila le to secure "EDs in $oles0 )t$er cross.section s$apes include s2uare1 rectangular and triangular0 As well as a /ariet! o- colors1 si3es and s$apes1 "EDs also /ar! in t$eir /iewing angle0 T$is tells !ou $ow muc$ t$e eam o- lig$t spreads out0 Standard "EDs $a/e a /iewing angle o- O%[ ut ot$ers $a/e a narrow eam o- '%[ or less0 Rapid Electronics stock a wide selection o- "EDs and t$eir catalogue is a good guide to t$e range a/aila le0

Ca%"!%atin'

an LED resistor va%!e

An "ED must $a/e a resistor connected in series to limit t$e current t$roug$ t$e "ED1 ot$erwise it will urn out almost instantl!0

T$e resistor /alue1 R is gi/en !

R G 5;S ? ;L6 A I
;S ;" S "ED S /oltage 4usuall! 2;1 suppl! ut F; -or lue /oltage and w$ite "EDs5

( S "ED current 4e0g0 2%mA51 t$is must e less t$an t$e ma6imum permitted (- t$e calculated /alue is not a/aila le c$oose t$e nearest standard resistor /alue w$ic$ is 'reater1 so t$at t$e current will e a little less t$an !ou c$ose0 (n -act !ou ma! wis$ to c$oose a greater resistor /alue to reduce t$e current 4to increase atter! li-e -or e6ample5 ut t$is will make t$e "ED less rig$t0 Wor&in' o!t t,e LED resistor 4or(!%a !sin' O,(Hs %a0 )$mPs law sa!s t$at t$e resistance o- t$e resistor1 R S ;*(1 w$ere> ; S /oltage across t$e resistor 4S ;S . ;" in t$is case5 ( S t$e current t$roug$ t$e resistor So R S 4;S . ;"5 * (

Conne"tin' LEDs in series


(- !ou wis$ to $a/e se/eral "EDs on at t$e same time it ma! e possi le to connect t$em in series0 T$is prolongs atter! li-e ! lig$ting se/eral "EDs wit$ t$e same current as =ust one "ED0

All t$e "EDs connected in series pass t$e sa(e "!rrent so it is est i- t$e! are all t$e same t!pe0 T$e power suppl! must $a/e su--icient /oltage to pro/ide a out 2; -or eac$ "ED 4F; -or lue and w$ite5 plus at least anot$er 2; -or t$e resistor0 To work out a /alue -or t$e resistor !ou must add up all t$e "ED /oltages and use t$is -or ;"0

Avoi "onne"tin' LEDs in *ara%%e%


Connecting se/eral "EDs in parallel wit$ =ust one resistor s$ared etween t$em is generall! not a good idea0 (- t$e "EDs re2uire slig$tl! di--erent /oltages onl! t$e lowest /oltage "ED will lig$t and it ma! e destro!ed ! t$e larger current -lowing t$roug$ it0 Alt$oug$ identical "EDs can e success-ull! connected in parallel wit$ one resistor t$is rarel! o--ers an! use-ul ene-it ecause resistors are /er! c$eap and t$e current used is t$e same as connecting t$e "EDs indi/iduall!0

1/OTO SENSOR T$is sensor consists o- (R transmitter and recei/ers on a single plain0 W$ere (n-rared 4(R5 radiation is part o- t$e electromagnetic spectrum1 w$ic$ includes radio wa/es1 microwa/es1 /isi le lig$t1 and ultra/iolet lig$t1 as well as gamma ra!s and 8.ra!s0

T$e (R range -alls etween t$e /isi le portion o- t$e spectrum and radio wa/es0 (R wa/elengt$s are usuall! e6pressed in microns1 wit$ t$e lR spectrum e6tending -rom %0G to &%%%microns0 +sing ad/anced optic s!stems and detectors1 non.contact (R t$ermometers can -ocus on nearl! an! portion or portions o- t$e%0G.&F micron and0 Because e/er! o =ect 4wit$ t$e e6ception o- a lack od!5 emits an optimum amount o- (R energ! at a speci-ic point along t$e (R and1 eac$ process ma! re2uire uni2ue sensor models wit$ speci-ic optics and detector t!pes0 ,or e6ample1 a sensor wit$ a narrow spectral range center data '0F' microns is optimi3ed -or measuring t$e sur-ace temperature o- pol!et$!lene and related materials0 A sensor set up -or E microns is used to measure glass sur-aces0 A micron sensor is used -or metals and -oils0 T$e roader spectral ranges are used to measure lower temperature sur-aces1 suc$ as paper1 oard1 pol!1 and -oil composites0 T$e intensit! o- an o =ectPs emitted (R energ! increases or decreases in proportion to its temperature0 (t is t$e emitted energ!1 measured as t$e targetPs emissi/it! t$at indicates an o =ectPs temperature0 Emissi/it! is a term used to 2uanti-! t$e energ!.emitting c$aracteristics o- di--erent materials and sur-aces0 (R sensors $a/e ad=usta le emissi/it! settings1 usuall! -rom %0& to &0%1 w$ic$ allow accurate temperature measurements o- se/eral sur-ace t!pes0 T$e emitted energ! comes -rom an o =ect and reac$es t$e (R sensor t$roug$ its optical s!stem1 w$ic$ -ocuses t$e energ! onto one or more p$otosensiti/e detectors0 T$e detector t$en con/erts t$e (R energ! into an electrical signal1 w$ic$ is in turn con/erted into a temperature /alue Based on t$e sensorPs cali ration e2uation and t$e targetPs emissi/it!0 T$is temperature /alue can e displa!ed on t$e sensor or1 in t$e case o- t$e smart sensor1 con/erted to a digital output and displa!ed on a computer terminal0
(R remote controls use wa/elengt$s etween CE% . DE%nm0 At t$is s$ort wa/elengt$1 t$e lig$t is in/isi le to t$e $uman e!e1 ut a domestic camcorder can actuall! /iew t$is portion o- t$e electromagnetic spectrum0 ;iewed wit$ a camcorder1 an (R "ED appears to c$ange rig$tness0 All remote controls use an encoded series o- pulses1 o- w$ic$ t$ere are t$ousands o- com inations0 T$e lig$t output intensit! /aries wit$ eac$ remote controlI remotes working at F0E; dc generall! will pro/ide a stronger lig$t output t$an a '; dc control0 Also1 as t$e p$otodiode in t$is pro=ect $as a peak lig$t response at CE%nm1 it will recei/e a stronger signal -rom controls operating closer to t$is wa/elengt$0 T$e

p$otodiode will actuall! respond to (R wa/elengt$s -rom F%%nm to &&%%nm1 so all remote controls s$ould e compati le0

A sensor is a t!pe o- transducer1 or mec$anism1 w$ic$ responds to a t!pe o- energ! ! producing anot$er t!pe o- energ! signal1 usuall! electrical0 T$e! are eit$er direct indicating 4an electrical meter5 or are paired wit$ an indicator 4per$aps indirectl! t$roug$ an analog to digital con/erter1 a computer and a displa!5 so t$at t$e /alue sensed is translated -or $uman understanding0 T!pes o- sensors include electromagnetic1 c$emical1 iological and acoustic0 Aside -rom ot$er applications1 sensors are $ea/il! used in medicine1 industr!K ro otics0

(n order to act as an e--ectual sensor1 t$e -ollowing guidelines must e met> t$e sensor s$ould e sensiti/e to t$e measured propert! t$e sensor s$ould e insensiti/e to an! ot$er propert! t$e sensor s$ould not in-luence t$e measured propert! (n t$eor!1 w$en t$e sensor is working per-ectl!1 t$e output signal o- a sensor is e6actl! proportional to t$e /alue o- t$e propert! it is meant to measure0 T$e gain is t$en de-ined as t$e ratio etween output signal and measured propert!0 ,or e6ample1 i- a sensor measures temperature and $as an actual /oltage output1 t$e gain is a constant wit$ t$e unit0 W$en t$e sensor is not per-ect1 /arious de/iations can occur1 including gain error1 long term dri-t1 and noise0 T$ese and ot$er de/iations can e classi-ied as s!stematic1 or random1 errors0 S!stematic de/iations ma! e compensated -or ! means o- some kind o- cali ration strateg!0 Noise is an e6ample o- a random error t$at can e reduced ! signal processing1 suc$ as -iltering1 usuall! at t$e e6pense o- t$e d!namic e$a/ior o- t$e sensor0 A sensor network is a computer network o- spatiall! distri uted de/ices using sensors to monitor conditions 4suc$ as temperature1 sound1 /i ration1 pressure1 motion or pollutants5 at a /ariet! o- locations0 +suall! t$e de/ices are small and ine6pensi/e1 allowing t$em to e produced and deplo!ed in large num ersI t$is constrains t$eir resources in terms o- energ!1 memor!1 and computational speed and andwidt$0 Eac$ de/ice is e2uipped wit$ a radio transcei/er1 a small micro controller1 and an energ! source1 most commonl! a atter!0 T$e de/ices work o-- eac$ ot$er to deli/er data to t$e computer w$ic$ $as een set up to monitor t$e in-ormation0 Sensor networks in/ol/e t$ree areas> sensing1

communications1 and computation 4$ardware1 so-tware1 algorit$ms50 T$e! are applied in man! areas1 suc$ as /ideo sur/eillance1 tra--ic monitoring1 $ome monitoring and manu-acturing0

1RINCI1E< Transmitter and recei/er are incorporated in a single $ousing0 T$e modulated in-rared lig$t o- t$e transmitter strikes t$e o =ect to e detected and is re-lected in a di--use wa!0 Part o- t$e re-lected lig$t strikes t$e recei/er and starts t$e switc$ing operation0 T$e two states N i0e0 re-lection recei/ed or no re-lection N are used to determine t$e presence or a sence o- an o =ect in t$e sensing range0 T$is s!stem sa-el! detects all o =ects t$at $a/e su--icient re-lection0 ,or o =ects wit$ a /er! ad degree ore-lection 4matt lack roug$ sur-aces5 t$e use o- di--use re-lection sensors -or s$ort ranges or wit$ ackground suppression is recommended0

:IG2-<1/OTO

TRANSMITTER

:IG
Sensitivit2

2.<
settin' ?

RECEI;ER
Di44!se

C/ARACTERISTICS
re4%e"tion sensors

,or di--use re-lection sensors wit$ sensiti/it! setting t$e sensiti/it! s$ould alwa!s e set to ma6imum independent o- t$e re2uired range in order to ac$ie/e t$e $ig$est possi le operational sa-et!0 )nl! in t$e case o- inter-ering
Di44!se

ackgrounds 4walls1 mac$ine parts5 could it


re4%e"tion sensors 4or

e necessar! to reduce t$e range0


s,ort ran'es

S$ort.range di--use t!pe sensors are di--use re-lection sensors w$ic$ $a/e een speci-icall! designed -or s$ort ranges0 "ig$t and dark o =ects are almost e2uall! detecta le wit$in t$e set sensing range0

:IG 27< Di44!se re4%e"tion sensors 4or s,ort ran'es S$ort.range di--use t!pes $a/e $ig$ e6cess gains w$ic$ allow usage e/en under e6treme en/ironmental conditions Di44!se 4e0g0 dust1 mist etc050 sensor ) =ects outside 0it, t$e range are not detected0

re4%e"tion

4ore'ro!n

s!**ression

Di--use re-lection sensors wit$ -oreground suppression are t$e pre-erred c$oice in t$e case o- well re-lecting ackgrounds and less well re-lecting o =ects0 T$e! are ad=usted to t$e ackground 4 ackground ser/es as re-lector50 Re-lections -rom t$e -oreground are e/aluated as an interruption o- t$e lig$t eam0 Di44!se de-ined re4%e"tion areas0 T$is sensor makes it 0it, possi le ba"&'ro!n to opticall! s!**ression suppress

Di--use re-lection sensors wit$

ackground suppression limit t$e range to ad=usta le1 geometricall!

inter-ering elements 4e0g0 s$ining mac$ine parts5 e$ind t$e o =ect to e sensed0 ) =ects wit$in t$e range are detected largel! independent o- t$eir re-lecti/e c$aracteristics 4colour1 si3e1 sur-ace50 T$us t$e e--ecti/e range does not depend on t$e target o =ects1 ut onl! on t$e set range0

Li@!i "r2sta% is*%a2


"i2uid cr!stal displa!s 4"CDs5 $a/e materials1 w$ic$ com ine t$e properties o- ot$ li2uids and cr!stals0 Rat$er t$an $a/ing a melting point1 t$e! $a/e a temperature range wit$in w$ic$ t$e molecules are almost as mo ile as t$e! would e in a li2uid1 ut are grouped toget$er in an ordered -orm similar to a cr!stal0
An "CD consists o- two glass panels1 wit$ t$e li2uid cr!stal material sand witc$ed in etween t$em0 T$e inner sur-ace o- t$e glass plates are coated wit$ transparent electrodes w$ic$ de-ine t$e c$aracter1 s!m ols or patterns to e displa!ed pol!meric la!ers are present in etween t$e electrodes and t$e li2uid cr!stal1 w$ic$ makes t$e li2uid cr!stal molecules to maintain a de-ined orientation angle0 )ne eac$ polarisers are pasted outside t$e two glass panels0 T$ese polarisers would rotate t$e lig$t ra!s passing t$roug$ t$em to a de-inite angle1 in a particular direction0 W$en t$e "CD is in t$e o-- state1 lig$t ra!s are rotated ! t$e two polarisers and t$e li2uid cr!stal1 suc$ t$at t$e lig$t ra!s come out o- t$e "CD wit$out an! orientation1 and $ence t$e "CD appears transparent0 W$en su--icient /oltage is applied to t$e electrodes1 t$e li2uid cr!stal molecules would e aligned in a speci-ic direction0 T$e lig$t ra!s passing t$roug$ t$e "CD would e rotated ! t$e polarisers1 w$ic$ would result in acti/ating* $ig$lig$ting t$e desired c$aracters0 T$e "CD<s are lig$tweig$t wit$ onl! a -ew millimeters t$ickness0 Since t$e "CD<s consume less power1 t$e! are compati le wit$ low power electronic circuits1 and can e powered -or long durations0 T$e "CD<s don<t generate lig$t and so lig$t is needed to read t$e displa!0 B! using acklig$ting1 reading is possi le in t$e dark0 T$e "CD<s $a/e long li-e and a wide operating temperature range0 C$anging t$e displa! si3e or t$e la!out si3e is relati/el! simple w$ic$ makes t$e "CD<s more customers -riendl!0 T$e "CDs used e6clusi/el! in watc$es1 calculators and measuring instruments are t$e simple se/en.segment displa!s1 $a/ing a limited amount o- numeric data0 T$e recent ad/ances in tec$nolog! $a/e resulted in etter legi ilit!1 more in-ormation displa!ing capa ilit! and a wider temperature range0 T$ese $a/e resulted in t$e "CDs eing e6tensi/el! used in telecommunications and entertainment electronics0 T$e "CDs $a/e e/en started replacing t$e cat$ode ra! tu es 4CRTs5 used -or t$e displa! ote6t and grap$ics1 and also in small T; applications0

T$is section descri es t$e operation modes o- "CD<s t$en descri e $ow to program and inter-ace an "CD to C%E& using Assem l! and C0

LCD operation
(n recent !ears t$e "CD is -inding widespread use replacing "EDs4se/en.segment "EDs or ot$er multisegment "EDs50T$is is due to t$e -ollowing reasons> &0 20 '0 T$e declining prices o- "CDs0 T$e a ilit! to displa! num ers1 c$aracters and grap$ics0 T$is is in contract to "EDs1 w$ic$ are limited to num ers and a -ew c$aracters0 (ncorporation o- a re-res$ing controller into t$e "CD1 t$ere ! relie/ing t$e CP+ o- t$e task o- re-res$ing t$e "CD0 (n t$e contrast1 t$e "ED must e re-res$ed ! t$e CP+ to keep displa!ing t$e data0 F0 Ease o- programming -or c$aracters and grap$ics0

LCD pin description


T$e "CD discussed in t$is section $as &F pins0 T$e -unction o- eac$ pins is gi/en in ta le0

TA$LE 1<1in es"ri*tion 4or LCD< 1in


& 2 ' F

s2(bo%
;ss ;cc ;EE RS

(*)
.. .. .. (

Description
?round HE; power suppl! Power suppl! to control contrast RSS% to select command register RSS& to select data register R*WS% -or write R*WS& -or read Ena le T$e C. it data us T$e C. it data us T$e C. it data us T$e C. it data us T$e C. it data us T$e C. it data us T$e C. it data us T$e C. it data us

E O G C D &% && &2 &' &F

R*W E DB% DB& DB2 DB' DBF DBE DBO DBG

( (*) (*) (*) (*) (*) (*) (*) (*) (*)

TABLE 2: LCD Command Codes Code Command to "CD (nstruction 4$e65


& 2 F O E G C A C E , &% &F &C &C C% C% 'C

Register
Clear displa! screen Return $ome Decrement cursor (ncrement cursor S$i-t displa! rig$t S$i-t displa! le-t Displa! o--1 cursor o-Displa! o--1 cursor on Displa! on1 cursor o-Displa! on1 cursor on Displa! on1 cursor linking S$i-t cursor position to le-t S$i-t cursor position to rig$t S$i-t t$e entire displa! to t$e le-t S$i-t t$e entire displa! to t$e rig$t ,orce cursor to eginning o- &st line ,orce cursor to eginning o- 2nd line 2 lines and E6G matri6

+ses>
T$e "CDs used e6clusi/el! in watc$es1 calculators and measuring instruments are t$e simple se/en.segment displa!s1 $a/ing a limited amount o- numeric data0 T$e recent ad/ances in tec$nolog! $a/e resulted in etter legi ilit!1 more in-ormation displa!ing capa ilit! and a wider temperature range0 T$ese $a/e resulted in t$e "CDs eing e6tensi/el! used in telecommunications and entertainment electronics0 T$e "CDs $a/e e/en started replacing t$e cat$ode ra! tu es 4CRTs5 used -or t$e displa! o- te6t and grap$ics1 and also in small T; applications0

LCD INTERFACING

Sen in' "o((an s an

ata to LCDs 0it, a ti(e e%a2<

:i' 21< Inter4a"in' o4 LCD to a (i"ro "ontro%%er


To send an! command -rom ta le 2 to t$e "CD1 make pin RSS%0 -or data1 make RSS&0T$en send a $ig$ Nto.low pulse to t$e E pin to ena le t$e internal latc$ o- t$e "CD0

STE11ER MOTOR Intro !"tion


Stepping motors can e used in simple open.loop control s!stemsI t$ese are generall!

ade2uate -or s!stems t$at operate at low accelerations wit$ static loads1 ut closed loop control ma! e essential -or $ig$ accelerations1 particularl! i- t$e! in/ol/e /aria le loads0 (a stepper in an open.loop control s!stem is o/er tor2ued1 all knowledge o- rotor position is lost and t$e s!stem must e reinitiali3edI ser/omotors are not su =ect to t$is pro lem0
Stepping motors are known in ?erman as Schrittmotoren1 in ,renc$ as moteurs pas pas1 and in Spanis$ as motor paso paso. Stepper motor control ma! e ased on open loop or closed loop models0 We are

primaril! interested in open loop models1 ecause t$is is w$ere stepping motors e6cel1 ut we will treat closed loop models rie-l! ecause t$e! are somew$at simpler0 ,igure G0& illustrates an e6treme E=a(*%e<

,ig0O0F0& Stepper motor open loop model


Rotar! s$a-t encoders are t!picall! rated in output pulses per c$annel per re/olutionI -or t$is e6ample to e use-ul1 -or a motor wit$ n steps per re/olution1 t$e s$a-t encoder output must gi/es n*2 pulses per c$annel per re/olution0 (- t$is is t$e case1 t$e e$a/ior o- t$is s!stem will depend on $ow t$e s$a-t encoder is rotated around t$e motor s$a-t relati/e to t$e motor0 (- t$e s$a-t encoder is rotated into a position w$ere t$e output o- t$e s$a-t encoder translates to a control /ector t$at $olds t$e motor s$a-t in its initial position1 t$e motor s$a-t will not rotate o- itsel-1 and i- t$e motor s$a-t is rotated ! -orce1 it will sta! w$ere/er it is le-t0 We will re-er to t$is position o- t$e s$a-t encoder relati/e to t$e motor as t$e neutral position0

(- t$e s$a-t encoder is rotated one step clockwise or counterclockwise -rom t$e neutral position1 t$e control /ector output ! t$e s$a-t encoder will pull t$e rotor clockwise 4or counterclockwise50 As t$e rotor turns1 t$e s$a-t encoder will c$ange t$e control /ector so t$at t$e rotor is alwa!s tr!ing to maintain a position one step clockwise 4or counterclockwise5 -rom w$ere it is at t$e moment0 T$e tor2ue produced ! t$is met$od will -all o-- wit$ rotor speed1 ut t$is control s!stem will alwa!s produce t$e ma6imum tor2ue t$e motor is a le to deli/er at an! speed0 (n e--ect1 wit$ t$is one.step displacement1 we $a/e constructed a rus$less DC motor -rom a stepping motor and a collection o- o--.t$e.s$el- parts0 (n practice1 t$is is rarel! done1 ut t$ere are numerous applications o- stepping motors in closed.loop control s!stems t$at are

ased on t$is model1 usuall! wit$ a microprocessor included in t$e -eed ack loop etween t$e s$a-t encoder and t$e motor controller0 (n an open.loop control s!stem1 t$is -eed ack loop is roken1 ut at a $ig$ le/el1 t$e asic principle remains 2uite similar1 as illustrated in ,igure O0F02

:i'!re -.).2 Ste**er (otor o*en %oo* (o e%


(n ,igure O0F021 we replace t$e s$a-t encoder -rom ,igure O0F0& wit$ a simulation model o- t$e response o- t$e motor and load to t$e control /ector0 At an! instant1 t$e actual position o- t$e rotor is unknownZ Nonet$eless1 we can use t$e simulation model to predict1 ased on an assumed rotor position and /elocit!1 $ow t$e motor will respond to t$e control /ector1 and we can construct t$is model so t$at its output is t$e control /ector generated ! a simulated s$a-t encoder0 So long as t$e model is su--icientl! accurate1 t$e e$a/ior o- t$e motor controlled ! t$is model will e t$e same as t$e e$a/ior o- t$e motor controlled ! a closed loop s!stemZ

STE11ER MOTOR TY1ES


Stepping motors come in two /arieties1 permanent magnet and variable. "acking a la el on t$e motor1 We can generall! tell t$e two apart ! -eel w$en no power is applied0 Permanent magnet motors tend to :cog: as !ou twist t$e rotor wit$ !our -ingers1 w$ile /aria le reluctance motors almost spin -reel! 4alt$oug$ t$e! ma! cog slig$tl! ecause o- residual magneti3ation in t$e rotor50 We can also distinguis$ etween t$e two /arieties wit$ an o$mmeter0 ;aria le reluctance motors usuall! $a/e t$ree 4sometimes -our5 windings1 wit$ a common return1 w$ile permanent magnet motors usuall! $a/e two independent windings1 wit$ or wit$out center taps0 Center.tapped windings are used in uni.polar permanent magnet motors0 Stepping motors come in a wide range o- angular resolution0 T$e coarsest motors

t!picall! turn D% degrees per step1 w$ile $ig$ resolution permanent magnet motors are commonl! a le to $andle &0C or e/en %0G2 degrees per step0 Wit$ an appropriate controller1 most permanent magnet and $! rid motors can e run in $al-.steps1 and some controllers can $andle smaller -ractional steps or micro.steps0 ,or ot$ permanent magnet and /aria le reluctance stepping motors1 i- =ust one winding o- t$e motor is energi3ed1 t$e rotor 4under no load5 will snap to a -i6ed angle and t$en $old t$at angle until t$e tor2ue e6ceeds t$e $olding tor2ue o- t$e motor1 at w$ic$ point1 t$e rotor will turn1 tr!ing to $old at eac$ successi/e e2uili rium point0

Variable Reluctance Motors

:i'!re -.).# ;ariab%e Re%!"tan"e (otors


(- motor $as t$ree windings1 t!picall! connected as s$own in t$e sc$ematic diagram in ,igure &0&1 wit$ one terminal common to all windings1 it is most likel! a /aria le reluctance stepping motor0 (n use1 t$e common wire t!picall! goes to t$e positi/e suppl! and t$e windings are energi3ed in se2uence0

T$e cross section s$own in ,igure &0& is o- '% degree per step /aria le reluctance motor0 T$e rotor in t$is motor $as F teet$ and t$e stator $as O poles1 wit$ eac$ winding wrapped around two opposite poles0 Wit$ winding num er & energi3ed1 t$e rotor teet$ marked 8 are attracted to t$is windingPs poles0 (- t$e current t$roug$ winding & is turned o-- and winding 2 is turned on1 t$e rotor will rotate '% degrees clockwise so t$at t$e poles marked B line up wit$ t$e poles marked 20 To rotate t$is motor continuousl!1 we =ust appl! power to t$e ' windings in se2uence0 Assuming positi/e logic1 w$ere a & means turning on t$e current t$roug$ a motor winding1 t$e -ollowing control se2uence will spin t$e motor illustrated in ,igure &0& clockwise 2F steps or 2 re/olutions> Winding 1 1001001001001001001001001 Winding 2 0100100100100100100100100

Winding 3 0010010010010010010010010 time ---> T$ere are also /aria le reluctance stepping motors wit$ F and E windings1 re2uiring E or O wires0 T$e principle -or dri/ing t$ese motors is t$e same as t$at -or t$e t$ree winding /ariet!1 ut it ecomes important to work out t$e correct order to energi3e t$e windings to make t$e motor step nicel!0 T$e motor geometr! illustrated in ,igure &0&1 gi/ing '% degrees per step1 uses t$e -ewest num er o- rotor teet$ and stator poles t$at per-orms satis-actoril!0 +sing more motor poles and more rotor teet$ allows construction o- motors wit$ smaller step angle0 Toot$ed -aces on eac$ pole and a correspondingl! -inel! toot$ed rotor allows -or step angles as small as a -ew degrees0

Unipolar Motors

:i'!re -.).) Uni*o%ar (otor

T$e motor cross section s$own in ,igure &02 is o- a '% degree per step permanent magnet or $! rid motor .. t$e di--erence etween t$ese two motor t!pes is not rele/ant at t$is le/el o- a straction0 Motor winding num er & is distri uted etween t$e top and ottom stator pole1 w$ile motor winding num er 2 is distri uted etween t$e le-t and rig$t motor poles0 T$e rotor is a permanent magnet wit$ O poles1 ' sout$ and ' nort$1 arranged around its circum-erence0 ,or $ig$er angular resolutions1 t$e rotor must $a/e proportionall! more poles0 T$e '% degree per step motor in t$e -igure is one o- t$e most common permanent magnet motor designs1 alt$oug$ &E and G0E degree per step motors are widel! a/aila le0 Permanent

magnet motors wit$ resolutions as good as &0C degrees per step are made1 and $! rid motors are routinel! uilt wit$ '0O and &0C degrees per step1 wit$ resolutions as -ine as %0G2 degrees per step a/aila le0 As s$own in t$e -igure1 t$e current -lowing -rom t$e center tap o- winding & to terminal a causes t$e top stator pole to e a nort$ pole w$ile t$e ottom stator pole is a sout$ pole0 T$is attracts t$e rotor into t$e position s$own0 (- t$e power to winding & is remo/ed and winding 2 is energi3ed1 t$e rotor will turn '% degrees1 or one step0 To rotate t$e motor continuousl!1 we =ust appl! power to t$e two windings in se2uence0 Assuming positi/e logic1 w$ere a & means turning on t$e current t$roug$ a motor winding1 t$e -ollowing two control se2uences will spin t$e motor illustrated in ,igure &02 clockwise 2F steps or F re/olutions> Winding &a &%%%&%%%&%%%&%%%&%%%&%%%& Winding & %%&%%%&%%%&%%%&%%%&%%%&%% Winding 2a %&%%%&%%%&%%%&%%%&%%%&%%% Winding 2 %%%&%%%&%%%&%%%&%%%&%%%&% time ...\ Winding &a &&%%&&%%&&%%&&%%&&%%&&%%& Winding & %%&&%%&&%%&&%%&&%%&&%%&&% Winding 2a %&&%%&&%%&&%%&&%%&&%%&&%% Winding 2 &%%&&%%&&%%&&%%&&%%&&%%&& time ...\
Note t$at t$e two $al/es o- eac$ winding are ne/er energi3ed at t$e same time0 Bot$ se2uences s$own a o/e will rotate a permanent magnet one step at a time0 T$e top se2uence onl! powers one winding at a time1 as illustrated in t$e -igure a o/eI t$us1 it uses less power0 T$e ottom se2uence in/ol/es powering two windings at a time and generall! produces a tor2ue a out &0F times greater t$an t$e top se2uence w$ile using twice as muc$ power0

T$e step positions produced ! t$e two se2uences a o/e are not t$e sameI as a result1 com ining t$e two se2uences allows $al- stepping1 wit$ t$e motor stopping alternatel! at t$e positions indicated ! one or t$e ot$er se2uence0 T$e com ined se2uence is as -ollows>

Winding &a &&%%%%%&&&%%%%%&&&%%%%%&&& Winding & %%%&&&%%%%%&&&%%%%%&&&%%%% Winding 2a %&&&%%%%%&&&%%%%%&&&%%%%%& Winding 2 %%%%%&&&%%%%%&&&%%%%%&&&%% time ...\

Bipolar Motors

:i'!re -.).+ $i*o%ar (otor


Bipolar permanent magnet and $! rid motors are constructed wit$ e6actl! t$e same mec$anism as is used on unipolar motors1 ut t$e two windings are wired more simpl!1 wit$ no center taps0 T$us1 t$e motor itsel- is simpler ut t$e dri/e circuitr! needed to re/erse t$e polarit! o- eac$ pair o- motor poles is more comple60 T$e sc$ematic in ,igure &0' s$ows $ow suc$ a motor is wired1 w$ile t$e motor cross section s$own $ere is e6actl! t$e same as t$e cross section s$own in ,igure &020

Brie-l!1 an #. ridge allows t$e polarit! o- t$e power applied to eac$ end o- eac$ winding to e controlled independentl!0 T$e control se2uences -or single stepping suc$ a motor are s$own elow1 using H and . s!m ols to indicate t$e polarit! o- t$e power applied to eac$ motor terminal> Terminal &a H...H...H...H... HH..HH..HH..HH.. Terminal & ..H...H...H...H. ..HH..HH..HH..HH Terminal 2a .H...H...H...H.. .HH..HH..HH..HH. Terminal 2 ...H...H...H...H H..HH..HH..HH..H time ...\

Note t$at t$ese se2uences are identical to t$ose -or a unipolar permanent magnet motor1 at an a stract le/el1 and t$at a o/e t$e le/el o- t$e #. ridge power switc$ing electronics1 t$e control s!stems -or t$e two t!pes o- motor can e identical0 Note t$at man! -ull #. ridge dri/er c$ips $a/e one control input to ena le t$e output and anot$er to control t$e direction0 ?i/en two suc$ ridge c$ips1 one per winding1 t$e -ollowing control se2uences will spin t$e motor identicall! to t$e control se2uences gi/en a o/e> Ena le Ena le & &%&%&%&%&%&%&%&% &&&&&&&&&&&&&&&& 2 %&%&%&%&%&%&%&%& &&&&&&&&&&&&&&&& time ...\ To distinguis$ a ipolar permanent magnet motor -rom ot$er F wire motors1 measure t$e resistances etween t$e di--erent terminals0 (t is wort$ noting t$at some permanent magnet stepping motors $a/e F independent windings1 organi3ed as two sets o- two0 Wit$in eac$ set1 it$e two windings are wired in series1 t$e result can e used as a $ig$ /oltage ipolar motor0 (t$e! are wired in parallel1 t$e result can e used as a low /oltage ipolar motor0 (- t$e! are wired in series wit$ a center tap1 t$e result can e used as a low /oltage uni polar motor0

Direction & &6%6&6%6&6%6&6%6 &&%%&&%%&&%%&&%% Direction 2 6&6%6&6%6&6%6&6% %&&%%&&%%&&%%&&%

STE11ER MOTOR CONTROL CIRCUITS


T$is section o- t$e stepper motor deals wit$ t$e asic -inal stage dri/e circuitr! -or stepping motors0 T$is circuitr! is centered on a single issue1 switc$ing t$e current in eac$ motor winding on and o--1 and controlling its direction0 T$e circuitr! discussed in t$is section is connected directl! to t$e motor windings and t$e motor power suppl!1 and t$is circuitr! is controlled ! a digital s!stem t$at determines w$en t$e switc$es are turned on or o--0 T$is section co/ers t$e most elementar! control circuitr! -or eac$ class o- motor0 All o- t$ese circuits assume t$at t$e motor power suppl! pro/ides a dri/e /oltage no greater t$an t$e motorPs rated /oltage1 and t$is signi-icantl! limits motor per-ormance0 T$e ne6t section1 on current limited dri/e circuitr!1 co/ers practical $ig$.per-ormance dri/e circuits0

:i' -.).- $o=es Use 4or re*resentin' s0it",es

(n ,igure '0&1 o6es are used to represent switc$esI a control unit1 not s$own1 is responsi le -or pro/iding t$e control signals to open and close t$e switc$es at t$e appropriate times in order to spin t$e motors0 (n man! cases1 t$e control unit will e a computer or programma le inter-ace controller1 wit$ so-tware directl! generating t$e outputs needed to control t$e switc$es1 ut in ot$er cases1 additional control circuitr! is introduced1 sometimes gratuitousl!Z Motor windings1 solenoids and similar de/ices are all inducti/e loads0 As suc$1 t$e current t$roug$ t$e motor winding cannot e turned on or o-- instantaneousl! wit$out in/ol/ing in-inite /oltagesZ W$en t$e switc$ controlling a motor winding is closed1 allowing current to -low1 t$e result o- t$is is a slow rise in current0 W$en t$e switc$ controlling a motor winding is opened1 t$e result o- t$is is a /oltage spike t$at can seriousl! damage t$e switc$ unless care is taken to deal wit$ it appropriatel!0 T$ere are two asic wa!s odealing wit$ t$is /oltage spike0 )ne is to ridge t$e motor winding wit$ a diode1 and t$e ot$er is to ridge t$e motor winding wit$ a capacitor0 ,igure '02 illustrates ot$ approac$es>

:i'!re -.).. $ri 'e (otor 0in in' 0it, a io e "a*a"itor


T$e diode s$own in ,igure must e a le to conduct t$e -ull current t$roug$ t$e motor winding1 ut it will onl! conduct rie-l! eac$ time t$e switc$ is turned o--1 as t$e current t$roug$ t$e winding deca!s0 (- relati/el! slow diodes suc$ as t$e common &NF%%8 -amil! are used toget$er wit$ a -ast

switc$1 it ma! e necessar! to add a small capacitor in parallel wit$ t$e diode0 T$e capacitor s$own in ,igure '02 poses more comple6 design pro lemsZ W$en t$e switc$ is closed1 t$e capacitor will disc$arge t$roug$ t$e switc$ to ground1 and t$e switc$ must e a le to $andle t$is rie- spike odisc$arge current0 A resistor in series wit$ t$e capacitor or in series wit$ t$e power suppl! will limit t$is current0 W$en t$e switc$ is opened1 t$e stored energ! in t$e motor winding will c$arge t$e capacitor up to a /oltage signi-icantl! a o/e t$e suppl! /oltage1 and t$e switc$ must e a le to tolerate t$is /oltage0 To sol/e -or t$e si3e o- t$e capacitor1 we e2uate t$e two -ormulas -or t$e stored energ! in a resonant circuit> P S C V2 * 2 P S L I2 * 2 W$ere>

:i' -.).7 $o=es !se to re*resent s0it",es


(n ,igure as in pre/ious ,igure o6es are used to represent switc$esI a control unit1 not s$own1 is responsi le -or pro/iding t$e control signals to open and close t$e switc$es at t$e appropriate times in order to spin t$e motors0 T$e control unit is commonl! a computer or programma le inter-ace controller1 wit$ so-tware directl! generating t$e outputs needed to control t$e switc$es0 As wit$ dri/e circuitr! -or /aria le reluctance motors1 we must deal wit$ t$e inducti/e kick produced w$en eac$ ot$ese switc$es is turned o--0 Again1 we ma! s$unt t$e inducti/e kick using diodes1 ut now1 F diodes are re2uired1 as s$own in ,igure '0F>

:i'!re -.).8 Drive "ir"!itr2 o4 ste**er (otor


T$e e6tra diodes are re2uired ecause t$e motor winding is not two independent inductors1 it is a single center.tapped inductor wit$ t$e center tap at a -i6ed /oltage0 T$is acts as an autotrans-ormerZ W$en one end o- t$e motor winding is pulled down1 t$e ot$er end will -l! up1 and /isa /ersa0 W$en a switc$ opens1 t$e inducti/e kick ack will dri/e t$at end o- t$e motor winding to t$e positi/e suppl!1 w$ere it is clamped ! t$e diode0 T$e opposite end will -l! downward1 and i- it was not -loating at t$e suppl! /oltage at t$e time1 it will -all elow ground1 re/ersing t$e /oltage across t$e switc$ at t$at end0 Some switc$es are immune to suc$ re/ersals1 ut ot$ers can e seriousl! damaged0 A capacitor ma! also e used to limit t$e kick ack /oltage1 as s$own in ,igure O0F0&%>

:i'!re -.).19 Ca*a"itor !se to %i(it t,e &i"&ba"& vo%ta'e


T$e rules -or si3ing t$e capacitor s$own in ,igure '0E are t$e same as t$e rules -or si3ing t$e capacitor s$own in ,igure '021 ut t$e e--ect o- resonance is 2uite di--erentZ Wit$ a permanent magnet motor1 i- t$e capacitor is dri/en at or near t$e resonant -re2uenc!1 t$e tor2ue will increase to as muc$

as twice t$e low.speed tor2ueZ T$e resulting tor2ue /ersus speed cur/e ma! e 2uite comple61 as illustrated in

:i'!re -.).11 Tor@!e s*ee C,arateristi"s


,igure '0O s$ows a peak in t$e a/aila le tor2ue at t$e electrical resonant -re2uenc!1 and a /alle! at t$e mec$anical resonant -re2uenc!0 (- t$e electrical resonant -re2uenc! is placed appropriatel! a o/e w$at would $a/e een t$e cuto-- speed -or t$e motor using a diode. ased dri/er1 t$e e--ect can e a considera le increase in t$e e--ecti/e cuto-- speed0 T$e mec$anical resonant -re2uenc! depends on t$e tor2ue1 so i- t$e mec$anical resonant -re2uenc! is an!w$ere near t$e electrical resonance1 it will e s$i-ted ! t$e electrical resonanceZ ,urt$ermore1 t$e widt$ o- t$e mec$anical resonance depends on t$e local slope o- t$e tor2ue /ersus speed cur/eI i- t$e tor2ue drops wit$ speed1 t$e mec$anical resonance will e s$arper1 w$ile i- t$e tor2ue clim s wit$ speed1 it will e roader or e/en split into multiple resonant -re2uencies0 Fast decay mode or coasting mode1 all switc$es open0 An! current -lowing t$roug$ t$e motor winding will e working against t$e -ull suppl! /oltage1 plus two diode drops1 so current will deca! 2uickl!0 T$is mode pro/ides little or no d!namic raking e--ect on t$e motor rotor1 so t$e rotor will coast -reel! i- all motor windings are powered in t$is mode0 ,igure '0&& illustrates t$e current -low immediatel! a-ter switc$ing -rom -orward running mode to -ast deca! mode0

,igure '0&& Dri/e Ckt o- Stepper Motor Slow decay modes or dynamic braking modes. (n t$ese modes1 current ma! re circulate t$roug$ t$e motor winding wit$ minimum resistance0 As a result1 i- current is -lowing in a motor winding w$en one o- t$ese modes is entered1 t$e current will deca! slowl!1 and i- t$e motor rotor is turning1 it will induce a current t$at will act as a rake on t$e rotor0 ,igure '0&2 illustrates one o- t$e man! use-ul slow.deca! modes1 wit$ switc$ D closedI i- t$e motor winding $as recentl! een in -orward running mode1 t$e state o- switc$ B ma! e eit$er open or closed>

,ig O0F0&F Slow Deca! Modes


T$is circuit is e--ecti/e -or dri/ing motors wit$ up to a out E% o$ms per winding at /oltages up to a out F0E /olts using a E /olt suppl!0 Eac$ tri.state u--er in t$e "S2FF can sink a out twice t$e current it can source1 and t$e internal resistance o- t$e u--ers is su--icient1 w$en sourcing current1 to e/enl! di/ide t$e current etween t$e dri/ers t$at are run in parallel0 T$is motor dri/e allows -or all

o- t$e use-ul states ac$ie/ed ! t$e dri/er in ,igure '0&'1 ut t$ese states are not encoded as e--icientl!>

XYE ..& %%%

Mo e ,ast deca! Slower deca!

%&% :or0ar &%% Reverse &&% Slow deca! Ta O0F0& Stepper Motor T!pes and t$eir Modes T$e second d!namic raking mode1 8BES&&%1 pro/ides a slig$tl! weaker raking e--ect t$an t$e -irst ecause o- t$e -act t$at t$e "S2FF dri/ers can sink more current t$an t$e! can source0

ULN299# DESCRI1TION
T$e +"N2%%' is $ig$ /oltage1 $ig$ current Darlington arra!s eac$ containing se/en open collectors Darlington pairs wit$ common emitters0 Eac$ c$annel rated at E%%mAand can wit$stand peak currents o- O%%mA0Suppressiondiodesare included -or inducti/e load dri/ing and t$e inputs are pinned opposite t$e outputs to simpli-! oard la!out0
T$e -our /ersions inter-ace to all common logic -amilies>

Ta O0E0& t!pes o- +"N series and t$eir /oltages T$ese /ersatile de/ices are use-ul -or dri/ing a wide range o- loads including solenoids1 rela!s DC motors1 "ED displa!s -ilament lamps1 t$ermal print $eads and $ig$ power u--ers0

,ig O0E0& D(P &O

1IN CONNECTION

,ig O0E02 Pin connection o- +"N 2%%' SC/EMATIC DIAGRAM

,ig O0E0' Sc$ematic Diagram o- +"N 2%%' A$SOLUTE MAXIMUM RATINGS

Tab -.+.2 Abso%!te (a= ratin's o4 ULN 299#

T/ERMAL DATA

Ta O0E0' T$ermal Data o- +"N 2%%' ELECTRICAL C/ARACTERISTICS 4Tam S 2EoC unless ot$erwise speci-ied5

Ta O0E0F Electrical C$aracteristics o- +"N 2%%'

CIRCUIT DESCRI1TION<
(n t$is pro=ect we re2uired operating /oltage -or Microcontroller CDCE& is E;0 #ence t$e E; D0C0 power suppl! is needed -or t$e (C<s0 T$is regulated E; is generated ! stepping down t$e /oltage -rom 2'%; to &C; now t$e step downed a0c /oltage is eing recti-ied ! t$e Bridge Recti-ier using &NF%%G diodes0 T$e recti-ied a0c /oltage is now -iltered using a AC< -ilter0 Now t$e recti-ied1 -iltered D0C0 /oltage is -ed to t$e ;oltage Regulator0 T$is /oltage regulator pro/ides*allows us to $a/e a Regulated constant ;oltage w$ic$ is o- HE;0 T$e recti-iedI -iltered and regulated /oltage is again -iltered -or ripples using an electrol!tic capacitor &%%J,0 Now t$e

output -rom t$is section is -ed to F%t$ pin o- CDCE& microcontroller to suppl! operating /oltage0 T$e microcontroller CDCE& wit$ Pull up resistors at Port% and cr!stal oscillator o- &&0%ED2 M#3 cr!stal in con=unction wit$ couple o- '%.''p- capacitors is placed at &C t$ K &Dt$ pins o- CDCE& to make it work 4e6ecute5 properl!0 T$e automatic gate opening*closing s!stem is pro/ided wit$ t$e Re-lection sensors placed at a distance o- -ew kilometers on t$e ot$ sides -rom t$e crossing road0 T$ese sensors gi/e t$e train reac$ing and lea/ing status to t$e em edded controller at t$e gate to w$ic$ t$e! are connected0 T$e controller operates 4open*close5 t$e gate as per t$e recei/ed signal -rom t$e Re-lection sensors0 T$e train dri/er alwa!s o ser/es t$e signals placed eside t$e track0 T$ese signals are controlled -rom t$e control room0 T$e green lig$t denotes t$at t$e track is -ree and red lig$t denotes t$e track is us! or damaged0 T$ese signals are controlled ased on t$e train position w$ic$ is sensed ! using t$e Re-lection sensors placed along t$e track0 T$e position o- t$e train can e estimated ! using t$e Re-lection sensor placed along t$e track and is displa!ed on t$e control room to indicate t$e train position along t$e track0 0 T$e track protection is ac$ie/ed ! pro/iding t$e closed loop along t$e track0 (- an! crack or cut is occurred to t$e track simultaneousl! t$e same $appens to t$e closed loop0 T$is gi/es a signal to t$e controller at t$e control room0 ,rom control room we can gi/e t$e red signal ! knowing t$e position o- t$e train t$roug$ t$e Re-lection sensors0

So4t0are
So4t0are "o(*onents Abo!t >ei% Click on t$e @eil u ;ision (con on Desktop T$e -ollowing -ig will appear

Click on t$e Pro=ect menu -rom t$e title ar T$en Click on New Pro=ect

Sa/e t$e Pro=ect ! t!ping suita le pro=ect name wit$ no e6tension in u r own -older sited in eit$er C>] or D>]

T$en Click on Sa/e utton a o/e0 Select t$e component -or u r pro=ect0 i0e0 Atmel^^ Click on t$e H S!m ol eside o- Atmel

Select ATCDCE& as s$own elow

T$en Click on Q)@R T$e ,ollowing -ig will appear

T$en Click eit$er BES or N)^^^mostl! QN)R

Now !our pro=ect is read! to +SE Now dou le click on t$e Target&1 !ou would get anot$er option QSource group &R as s$own in ne6t page0

Click on t$e -ile option -rom menu ar and select QnewR

T$e ne6t screen will e as s$own in ne6t page1 and =ust ma6imi3e it ! dou le clicking on its lue oarder0

Now start writing program in eit$er in QCR or QASMR ,or a program written in Assem l!1 t$en sa/e it wit$ e6tension Q0 asmR and -or QCR ased program sa/e it wit$ e6tension Q 0CR

Now rig$t click on Source group & and click on QA

4i%es to Gro!* So!r"eR

Now !ou will get anot$er window1 on w$ic$ ! de-ault QCR -iles will appear0

Now select as per !our -ile e6tension gi/en w$ile sa/ing t$e -ile Click onl! one time on option QADDR Now Press -unction ke! ,G to compile0 An! error will appear i- so $appen0

(- t$e -ile contains no error1 t$en press ControlH,E simultaneousl!0 T$e new window is as -ollows

T$en Click Q)@R

Now Click on t$e Perip$erals -rom menu ar1 and c$eck !our re2uired port as s$own in -ig elow

Drag t$e port a side and click in t$e program -ile0

Now keep Pressing -unction ke! Q,&&R slowl! and o ser/e0

Bou are running !our program success-ull!

C)NC"+T()N

T$e pro=ect QAUTOMATIC RAILWAY SIGNALLING SYSTEM I $as een success-ull! designed and tested0

(t $as een de/eloped ! integrating -eatures o- all t$e $ardware components used0 Presence o- e/er! module $as een reasoned out and placed care-ull! t$us contri uting to t$e est working o- t$e unit0

Secondl!1 using $ig$l! ad/anced (C<s and wit$ t$e $elp o- growing tec$nolog! t$e pro=ect $as een success-ull! implemented0

,inall! we conclude t$at QAUTOMATIC RAILWAY SIGNALLING SYSTEM R is an emerging -ield and t$ere is a $uge scope -or researc$ and de/elopment0

$ib%io'ra*,2

T$e C%E& Micro controller and Em edded S!stems

.M!,a((a A%i MaBi i Jani"e Gi%%is*ie MaBi i

T$e C%E& Micro controller Arc$itecture1 Programming K Applications

?>ennet, J.A2a%a

,undamentals )- Micro processors and Micro computers

?$.Ra(

Micro processor Arc$itecture1 Programming K Applications

?Ra(es, S. Gaon&ar

Electronic Components

.D.;. 1rasa

Wireless Communications . T$eodore S0 Rappaport

Mo ile Tele Communications . William C0B0 "ee

Re4eren"es on t,e Web< www0national0com www0atmel0com www0microso-tsearc$0com www0geocities0com

You might also like