plc based automation
TRANSCRIPT
-
8/18/2019 plc based automation
1/87
PLEASE NOTE: THE MATTER
PRODUCED BELOW IS
REFERENCE MATERIAL ONLY
FOR PREPARING THE PROJECT
REPORT. IT IS NOT THE
COMPLETE PROJECT REPORT.
1
-
8/18/2019 plc based automation
2/87
A PROJECT REPORT ON
LOW COST PROGRAMMABLE LOGIC CONTROL (PLC) FOR
INDUSTRIAL AUTOMATION IN REPETATIVE NATURE OF
WORK
Submitted in partial fulfillment of the requirements
For the award of the degree
AC!E"OR OF EN#$NEER$N#
$N
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EN#$NEER$N#
S&'$TTE( )
-------------------- (--------------)
--------------------- (---------------)
--------------------- (---------------)
(EPART'ENT OF %%%%%%%%%%%%%%%%%%%%%%% EN#$NEER$N#
%%%%%%%%%%CO""E#E OF EN#$NEER$N#
AFF$"$ATE( TO %%%%%%%%%%% &N$*ERS$T)
2
-
8/18/2019 plc based automation
3/87
CERTIFICATE
This is to +ertif, that the dissertation wor- entitled LOW COST
PROGRAMMABLE LOGIC CONTROL ( PLC) FOR INDUSTRIAL
AUTOMATION IN REPETATIVE NATURE OF WORK is the wor- done b,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%submitted in partial
fulfillment for the award of .AC!E"OR OF EN#$NEER$N# /0E12in
%%%%%%%%%%%%%%%%%%%%%%%%%%Engineering from%%%%%%%%%%%%%% College of
Engineering affiliated to %%%%%%%%% &ni3ersit,4 !,derabad 0
________________ ____________
(Head of te de!a"t#e$t% ECE) (A&&'&ta$t P"ofe&&o")
ETERNAL EAMINER
3
-
8/18/2019 plc based automation
4/87
ACKNOWLEDGEMENT
The satisfa+tion and euphoria that a++ompan, the su++essful +ompletion of an,
tas- would be in+omplete without the mentioning of the people whose +onstant
guidan+e and en+ouragement made it possible0 5e ta-e pleasure in presenting
before ,ou4 our pro6e+t4 whi+h is result of studied blend of both resear+h and
-nowledge0
5e e7press our earnest gratitude to our internal guide4 Assistant Professor
%%%%%%%%%%%%%%4 (epartment of ECE4 our pro6e+t guide4 for his +onstant
support4 en+ouragement and guidan+e0 5e are grateful for his +ooperation and
his 3aluable suggestions0
Finall,4 we e7press our gratitude to all other members who are in3ol3ed either
dire+tl, or indire+tl, for the +ompletion of this pro6e+t0
DECLARATION4
-
8/18/2019 plc based automation
5/87
5e4 the undersigned4 de+lare that the pro6e+t entitled LOW COST
PROGRAMMABLE LOGIC CONTROL ( PLC) FOR INDUSTRIAL
AUTOMATION IN REPETATIVE NATURE OF WORK*4 being submitted
in partial fulfillment for the award of a+helor of Engineering (egree in
Ele+troni+s and Communi+ation Engineering4 affiliated to %%%%%%%%%
&ni3ersit,4 is the wor- +arried out b, us0
%%%%%%%%%% %%%%%%%%% %%%%%%%%%
%%%%%%%%%% %%%%%%%%% %%%%%%%%%
CONTENTS PAGE NO+
5
-
8/18/2019 plc based automation
6/87
80 ASTRACT 9
:0 $NTRO(&CT$ON TO E'E((E( S)STE'S 8;
RE"A) ?
?0 P&S! &TTONS ?9
?0B "C( <
?09 &"N:;;< >
?08; 8N?;;
?088 "E(
?08: "OA(
?08: RES$STORS
?08< CAPAC$TORS
0 SOFT5ARE RE@&$RE'ENTS >
08 $(E
0: CONCEPT OF CO'P$"ER
0< CONCEPT OF CROSS CO'P$"ER B
0? =E$" C CROSS CO'P$"ER 9
0 &$"($N# AN APP"$CAT$ON $N &*$S$ON: 9
6
-
8/18/2019 plc based automation
7/87
0> CREAT$N# )O&R O5N APP"$CAT$ON $N &*$S$ON: 9
0 (E#$N# AN APP"$CAT$ON $N &*$S$ON: >;
0B START$N# &*$S$ON: D CREAT$N# A PROJECT >8
09 5$N(O5S% F$"ES >8
08; &$"($N# PROJECTS D CREAT$N# !E F$"ES >8
088 CP& S$'&"AT$ON >:
08: (ATAASE SE"ECT$ON >:
08< START (E#$N# ><
08? ($SASSE'") 5$N(O5 ><
08 E'E((E( C >?
>0 SC!E'AT$C ($A#RA' >>
08 (ESCR$PT$ON >
0 "A)O&T ($A#RA' 8
B0 $"" OF 'ATER$A"S :
90 CO($N#
908 CO'P$"ER >
90: SO&RCE CO(E B?
8;0 !AR(5ARE TEST$N# BB
8;08 CONT$N&$T) TEST BB
8;0: PO5ER ON TEST B9
880 RES&"TS >9
8:0CONC"&S$ON 9<
8
-
8/18/2019 plc based automation
8/87
:/a1 E'E((E( (ES$#N CA""S 8:
:/b1 .*2 ($A#RA' 8:
< "OC= ($A#RA' OF T!E PROJECT 8>
?08 A T)P$CA" TRANSFOR'ER 89
?0:/a1 "OC= ($A#RA' OF *O"TA#E RE#&"ATOR :8
?0:/b1 RAT$N# OF *O"TA#E RE#&"ATOR ::
?0:/+1 PERFOR'ANCE C!ARACTER$ST$CS
OF *O"TA#E RE#&"ATOR ::
?0/a1 "OC= ($A#RA' OF ATB9S: :
?0/b1 P$N ($A#RA' OF ATB9S: :B
?0/+1 OSC$""ATOR CONNECT$ONS
-
8/18/2019 plc based automation
9/87
The main ob6e+ti3e of the pro6e+t is designing a programmable sequential swit+hing
of an, load using embedded s,stem based mi+ro+ontroller +on+ept0
The de3elopment of this appli+ation requires the +onfiguration of mi+ro+ontroller
ar+hite+ture that is the sele+tion of the ma+hines4 and writing debugging of the appli+ation
program0 $n this pro6e+t4 the +lo+- pla,s an important role4 where it is used in the following
mode i0e04 the set mode4 auto mode and manual mode for +ontrolling different ma+hines0 $n
set mode4 through the digital +lo+- the ma+hiner, will run based onoff and on time where as
in auto mode the, will run b, default settings and finall, in the manual mode the realGtime
s,stems used e7tensi3el, in industrial +ontrol appli+ations +an run depending on the user2s
need and fle7ibilit,0
9
-
8/18/2019 plc based automation
10/87
-+INTRODUCTION TO EMBEDDED S.STEMS
Wat '& e#/edded &0&te#1
An Embedded S,stem is a +ombination of +omputer hardware and software4 and
perhaps additional me+hani+al or other parts4 designed to perform a spe+ifi+ fun+tion0 An
10
-
8/18/2019 plc based automation
11/87
E#/eddedS0&te#&
Computer Ar+hite+ture
SoftwareEngineering(ata
Communi+ationControl
Engineering
Ele+tri+ motorsand a+tuators
Sensors andmeasurements
AnalogEle+troni+ design
(igitalEle+troni+ design
$ntegrated +ir+uitdesign
E#/edded &0&te# de&'2$ 3a44& o$ #a$0 d'&3'!4'$e&
Operating Systems
BuildDownloadDebugTools
embedded s,stem is a mi+ro+ontrollerGbased4 software dri3en4 reliable4 realGtime +ontrol
s,stem4 autonomous4 or human or networ- intera+ti3e4 operating on di3erse ph,si+al
3ariables and in di3erse en3ironments and sold into a +ompetiti3e and +ost +ons+ious mar-et0
An embedded s,stem is not a +omputer s,stem that is used primaril, for pro+essing4
not a software s,stem on PC or &N$4 not a traditional business or s+ientifi+ appli+ation0
!ighGend embedded D lower end embedded s,stems0 !ighGend embedded s,stem G #enerall,
? it Controllers used with OS0 E7amples Personal (igital Assistant and 'obile phones
et+ 0"ower end embedded s,stems G #enerall, B48> it Controllers used with an minimal
operating s,stems and hardware la,out designed for the spe+ifi+ purpose0
S.STEM DESIGN CALLS5
Figure :/a1H Embedded s,stem design +alls
EMBEDDED S.STEM DESIGN C.CLE
11
-
8/18/2019 plc based automation
12/87
SystemTestin
g
SystemDefinit
ionTargeting
RapidProt
otyping
Hardware-in-the-
LoopTesting
Figure :/b1HI* (iagram
Ca"a3te"'&t'3& of E#/edded S0&te#
K An embedded s,stem is an, +omputer s,stem hidden inside a produ+t other than a
+omputer0
K The, will en+ounter a number of diffi+ulties when writing embedded s,stem software
in addition to those we en+ounter when we write appli+ations0
L Throughput L Our s,stem ma, need to handle a lot of data in a short period of
time0
L ResponseLOur s,stem ma, need to rea+t to e3ents qui+-l,0
L Testabilit,LSetting up equipment to test embedded software +an be diffi+ult0
L (ebugabilit,L5ithout a s+reen or a -e,board4 finding out what the software is
doing wrong /other than not wor-ing1 is a troublesome problem0
L Reliabilit, L embedded s,stems must be able to handle an, situation without
human inter3ention0
L 'emor, spa+e L 'emor, is limited on embedded s,stems4 and ,ou must
ma-e the software and the data fit into whate3er memor, e7ists0
L Program installation L ,ou will need spe+ial tools to get ,our software into
embedded s,stems0
L Power +onsumption L Portable s,stems must run on batter, power4 and the
software in these s,stems must +onser3e power0
L Pro+essor hogs L +omputing that requires large amounts of CP& time +an
+ompli+ate the response problem0
12
-
8/18/2019 plc based automation
13/87
L Cost L Redu+ing the +ost of the hardware is a +on+ern in man, embedded
s,stem pro6e+tsM software often operates on hardware that is barel, adequate
for the 6ob0
K Embedded s,stems ha3e a mi+ropro+essor mi+ro+ontroller and a memor,0 Some
ha3e a serial port or a networ- +onne+tion0 The, usuall, do not ha3e -e,boards4
s+reens or dis- dri3es0
APPLICATIONS
81 'ilitar, and aerospa+e embedded software appli+ations: 1 Communi+at ion App li+at ions
-
8/18/2019 plc based automation
14/87
3.BLOCK DIAGRAM
14
-
8/18/2019 plc based automation
15/87
Fig
-
8/18/2019 plc based automation
16/87
4.HARDWARE REQUIREMENTS
HARDWARE COMPONENTS5
80 TRANSFOR'ER /:
-
8/18/2019 plc based automation
17/87
:0 *O"TA#E RE#&"ATOR /"' B;1
-
8/18/2019 plc based automation
18/87
power supplies use a stepGdown transformer to redu+e the dangerousl, high 3oltage to a safer
low 3oltage0
F$# ?08H A T)P$CA" TRANSFOR'ER
The input +oil is +alled the primar, and the output +oil is +alled the se+ondar,0 There
is no ele+tri+al +onne+tion between the two +oilsM instead the, are lin-ed b, an alternating
magneti+ field +reated in the softGiron +ore of the transformer0 The two lines in the middle of
the +ir+uit s,mbol represent the +ore0 Transformers waste 3er, little power so the power out
is /almost1 equal to the power in0 Note that as 3oltage is stepped down and +urrent is stepped
up0
The ratio of the number of turns on ea+h +oil4 +alled the turn2s ratio4 determines the
ratio of the 3oltages0 A stepGdown transformer has a large number of turns on its primar,/input1 +oil whi+h is +onne+ted to the high 3oltage mains suppl,4 and a small number of turns
on its se+ondar, /output1 +oil to gi3e a low output 3oltage0
T&RNS RAT$O /*p *s1 / Np Ns 1
5here4
*p primar, /input1 3oltage0
*s se+ondar, /output1 3oltage
Np number of turns on primar, +oil
Ns number of turns on se+ondar, +oil
$p primar, /input1 +urrent
$s se+ondar, /output1 +urrent0
Idea4 !o7e" e89at'o$
18
-
8/18/2019 plc based automation
19/87
The ideal transformer as a +ir+uit element
$f the se+ondar, +oil is atta+hed to a load that allows +urrent to flow4 ele+tri+al power istransmitted from the primar, +ir+uit to the se+ondar, +ir+uit0 $deall,4 the transformer is
perfe+tl, effi+ientM all the in+oming energ, is transformed from the primar, +ir+uit to the
magneti+ field and into the se+ondar, +ir+uit0 $f this +ondition is met4 the in+oming ele+tri+
power must equal the outgoing powerH
#i3ing the ideal transformer equation
Transformers normall, ha3e high effi+ien+,4 so this formula is a reasonable appro7imation0
$f the 3oltage is in+reased4 then the +urrent is de+reased b, the same fa+tor0 The impedan+e in
one +ir+uit is transformed b, the square of the turns ratio0 For e7ample4 if an impedan+e Z s is
atta+hed a+ross the terminals of the se+ondar, +oil4 it appears to the primar, +ir+uit to ha3e an
impedan+e of / N p N s1: Z s0 This relationship is re+ipro+al4 so that the impedan+e Z p of the
primar, +ir+uit appears to the se+ondar, to be / N s N p1: Z p0
6+- VOLTAGE REGULATOR :;
-
8/18/2019 plc based automation
20/87
Feat9"e&
K Output Current up to 8A0
K Output *oltages of 4 >4 B4 94 8;4 8:4 84 8B4 :?*0
K Thermal O3erload Prote+tion0
K Short Cir+uit Prote+tion0
K Output Transistor Safe Operating Area Prote+tion0
De&3"'!t'o$
The "'B"'BA series of threeGterminal positi3e regulators are a3ailable in
the TOG::;(GPA= pa+-age and with se3eral fi7ed output 3oltages4 ma-ing them useful in a
5ide range of appli+ations0 Ea+h t,pe emplo,s internal +urrent limiting4 thermal shutdown
and safe operating area prote+tion4 ma-ing it essentiall, indestru+tible0 $f adequate heat
sin-ing is pro3ided4 the, +an deli3er o3er 8A output Current0 Although designed primaril, as
fi7ed 3oltage regulators4 these de3i+es +an be used with e7ternal +omponents to obtain
ad6ustable 3oltages and +urrents0
I$te"$a4 B4o3> D'a2"a#
20
-
8/18/2019 plc based automation
21/87
F$# ?0:/a1H "OC= ($A#RA' OF *O"TA#E RE#&"ATOR
A/&o49te Ma?'#9# Rat'$2&
TA"E ?0:/b1H RAT$N#S OF T!E *O"TA#E RE#&"ATOR
21
-
8/18/2019 plc based automation
22/87
6+@ RECTIFIER
A re+tifier is an ele+tri+al de3i+e that +on3erts alternating +urrent /AC14 whi+h
periodi+all, re3erses dire+tion4 to dire+t +urrent /(C14 +urrent that flows in onl, one
dire+tion4 a pro+ess -nown as re+tifi+ation0 Re+tifiers ha3e man, uses in+luding as
+omponents of power supplies and as dete+tors of radio signals0 Re+tifiers ma, be made of
solid state diodes4 3a+uum tube diodes4 mer+ur, ar+ 3al3es4 and other +omponents0 The
output from the transformer is fed to the re+tifier0 $t +on3erts A0C0 into pulsating (0C0 The
re+tifier ma, be a half wa3e or a full wa3e re+tifier0 $n this pro6e+t4 a bridge re+tifier is used
be+ause of its merits li-e good stabilit, and full wa3e re+tifi+ation0 $n positi3e half +,+le onl,
two diodes/ 8 set of parallel diodes1 will +ondu+t4 in negati3e half +,+le remaining two diodes
will +ondu+t and the, will +ondu+t onl, in forward bias onl,0
6+6 FILTER
Capa+iti3e filter is used in this pro6e+t0 $t remo3es the ripples from the output of
re+tifier and smoothens the (0C0 Output re+ei3ed from this filter is +onstant until the mains
22
http://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Detector_(radio)http://en.wikipedia.org/wiki/Radiohttp://en.wikipedia.org/wiki/Solid_state_(electronics)http://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Vacuum_tubehttp://en.wikipedia.org/wiki/Mercury_arc_valvehttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Detector_(radio)http://en.wikipedia.org/wiki/Radiohttp://en.wikipedia.org/wiki/Solid_state_(electronics)http://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Vacuum_tubehttp://en.wikipedia.org/wiki/Mercury_arc_valve
-
8/18/2019 plc based automation
23/87
3oltage and load is maintained +onstant0 !owe3er4 if either of the two is 3aried4 (0C0 3oltage
re+ei3ed at this point +hanges0 Therefore a regulator is applied at the output stage0
The simple +apa+itor filter is the most basi+ t,pe of power suppl, filter0 The use of
this filter is 3er, limited0 $t is sometimes used on e7tremel, highG3oltage4 lowG+urrent power
supplies for +athodeGra, and similar ele+tron tubes that require 3er, little load +urrent from
the suppl,0 This filter is also used in +ir+uits where the powerGsuppl, ripple frequen+, is not
+riti+al and +an be relati3el, high0 elow figure +an show how the +apa+itor +hanges and
dis+harges0
6+= MICROCONTROLLER AT;S=-
The ATB9S: is a lowGpower4 highGperforman+e C'OS BGbit mi+ro+ontroller with B=
b,tes of inGs,stem programmable Flash memor,0 The de3i+e is manufa+tured using Atmel2s
highGdensit, non 3olatile memor, te+hnolog, and is +ompatible with the industr, standard
B;C8 instru+tion set and pin out0 The onG+hip Flash allows the program memor, to be
reprogrammed inGs,stem or b, a +on3entional non 3olatile memor, programmer0 ,
+ombining a 3ersatile BGbit CP& with inGs,stem programmable Flash on a monolithi+ +hip4
the Atmel ATB9S: is a powerful mi+ro+ontroller whi+h pro3ides a highl,Gfle7ible and +ostG
effe+ti3e solution to man, embedded +ontrol appli+ations0 The ATB9S: pro3ides the
following standard featuresH B= b,tes of Flash4 :> b,tes of RA'4 Gbit timer+ounters4 a si7G3e+tor twoGle3el interrupt
ar+hite+ture4 a full duple7 serial port4 onG+hip os+illator4 and +lo+- +ir+uitr,0 $n addition4 the
23
-
8/18/2019 plc based automation
24/87
ATB9S: is designed with stati+ logi+ for operation down to ero frequen+, and supports two
software sele+table power sa3ing modes0 The $dle 'ode stops the CP& while allowing the
RA'4 timer+ounters4 serial port4 and interrupt s,stem to +ontinue fun+tioning0 The PowerG
down mode sa3es the RA' +ontents but freees the os+illator4 disabling all other +hip
fun+tions until the ne7t interrupt or hardware reset0
Feat9"e&5
K Compatible with 'CSQG8 Produ+ts
K B= ,tes of $nGS,stem Programmable /$SP1 Flash 'emor,
L Enduran+eH 8;4;;; 5riteErase C,+les
K ?0;* to 0* Operating Range
K Full, Stati+ OperationH ; ! to Gbit TimerCounters
K Eight $nterrupt Sour+es
K Full (uple7 &ART Serial Channel
K "owGpower $dle and PowerGdown 'odes
K $nterrupt Re+o3er, from PowerGdown 'ode
K 5at+hdog Timer
K (ual (ata Pointer
K PowerGoff Flag
K Fast Programming Time
K Fle7ible $SP Programming /,te and Page 'ode1
K #reen /Pb!alideGfree1 Pa+-aging Option
B4o3> D'a2"a# of AT;S=-5
24
-
8/18/2019 plc based automation
25/87
F$# ?0/A1H "OC= ($A#RA' OF ATB9S:
P'$ Co$f'29"at'o$& of AT;S=-
25
-
8/18/2019 plc based automation
26/87
F$# ?0/b1H P$N ($A#RA' OF ATB9S:
P'$ De&3"'!t'o$5
VCC5
Suppl, 3oltage0
GND5
#round
Po"t
-
8/18/2019 plc based automation
27/87
e7ternall, being pulled low will sour+e +urrent /$$"1 be+ause of the internal pullGups0 $n
addition4 P80; and P808 +an be +onfigured to be the timer+ounter : e7ternal +ount input
/P80;T:1 and the timer+ounter : trigger input /P808T:E10
Po"t -5
Port : is an BGbit bidire+tional $O port with internal pullGups0 The Port : output
buffers +an sin-sour+e four TT" inputs0 5hen 8s are written to Port : pins4 the, are pulled
high b, the internal pullGups and +an be used as inputs0 As inputs4 Port : pins that are
e7ternall, being pulled low will sour+e +urrent /$$"1 be+ause of the internal pullGups0 Port :
emits the highGorder address b,te during fet+hes from e7ternal program memor, and during
a++esses to e7ternal data memor, that uses 8>Gbit addresses /'O* (PTR10 $n this
appli+ation4 Port : uses strong internal pullGups when emitting 8s0 (uring a++esses to e7ternal
data memor, that uses BGbit addresses /'O* R$14 Port : emits the +ontents of the P:
Spe+ial Fun+tion Register0
Po"t @5
Port < is an BGbit bidire+tional $O port with internal pullGups0 The Port < output
buffers +an sin-sour+e four TT" inputs0 5hen 8s are written to Port < pins4 the, are pulled
high b, the internal pullGups and +an be used as inputs0 As inputs4 Port < pins that are
e7ternall, being pulled low will sour+e +urrent /$$"1 be+ause of the pullGups0
RST5
Reset input0 A high on this pin for two ma+hine +,+les while the os+illator is running
resets the de3i+e0 This pin dri3es high for 9B os+illator periods after the 5at+hdog times out0
The ($SRTO bit in SFR A&R /address BE!1 +an be used to disable this feature0 $n the
default state of bit ($SRTO4 the RESET !$#! out feature is enabled0
ALEPROG5
Address "at+h Enable /A"E1 is an output pulse for lat+hing the low b,te of the
address during a++esses to e7ternal memor,0 This pin is also the program pulse input /PRO#1
during Flash programming0
$n normal operation4 A"E is emitted at a +onstant rate of 8> the os+illator frequen+,
and ma, be used for e7ternal timing or +lo+-ing purposes0 Note4 howe3er4 that one A"E pulse
is s-ipped during ea+h a++ess to e7ternal data memor,0
PSEN5
Program Store Enable /PSEN1 is the read strobe to e7ternal program memor,0 5hen
the ATB9S: is e7e+uting +ode from e7ternal program memor,4 PSEN is a+ti3ated twi+e ea+h
27
-
8/18/2019 plc based automation
28/87
ma+hine +,+le4 e7+ept that two PSEN a+ti3ations are s-ipped during ea+h a++ess to e7ternal
data memor,0
EAVPP5
E7ternal A++ess Enable0 EA must be strapped to #N( in order to enable the de3i+e
to fet+h +ode from e7ternal program memor, lo+ations starting at ;;;;! up to FFFF!0 Note4
howe3er4 that if lo+- bit 8 is programmed4 EA will be internall, lat+hed on reset0 EA should
be strapped to *CC for internal program e7e+utions0 This pin also re+ei3es the 8:G3olt
programming enable 3oltage /*PP1 during Flash programming0
TAL,5
$nput to the in3erting os+illator amplifier and input to the internal +lo+- operating
+ir+uit0
TAL-5
Output from the in3erting os+illator amplifier0
O&3'44ato" Ca"a3te"'&t'3&5
TA"8 and TA": are the input and output4 respe+ti3el,4 of an in3erting amplifier
whi+h +an be +onfigured for use as an onG+hip os+illator4 as shown in Figure 80 Either a quart
+r,stal or +erami+ resonator ma, be used0 To dri3e the de3i+e from an e7ternal +lo+- sour+e4
TA": should be left un+onne+ted while TA"8 is dri3en as shown in Figure >0:0 There are
no requirements on the dut, +,+le of the e7ternal +lo+- signal4 sin+e the input to the internal
+lo+-ing +ir+uitr, is through a di3ideGb,Gtwo flipGflop4 but minimum and ma7imum 3oltage
high and low time spe+ifi+ations must be obser3ed0
F$# ?0/+1H Os+illator Conne+tions
28
-
8/18/2019 plc based automation
29/87
-
8/18/2019 plc based automation
30/87
+apabilit,0 Appli+ations in+lude rela, dri3ers4 hammer dri3ers4 lamp dri3ers4 displa, dri3ers
/"E( gas dis+harge14 line dri3ers4 and logi+ buffers0
The &"N:;;< has a :0-5 series base resistor for ea+h (arlington pair for operation
dire+tl, with TT" or * C'OS de3i+es0
FigH &"N :;;<
30
-
8/18/2019 plc based automation
31/87
FEATURES5
• Pin no0H8>
• Temperature4 Operating RangeHG:;C to BC
• Transistor Polarit,H NPN• Transistors4 No0 ofH
• Case St,leH($PG8>
• Temp4 Op0 'inHG:;C
• Temp4 Op0 'a7HBC
• ase NumberH:;;<
• Channels4 No0 ofH
• Current4 Output 'a7H;;mA
• (e3i+e 'ar-ingH&"N:;;
-
8/18/2019 plc based automation
32/87
PIN D'a2"a#5
32
-
8/18/2019 plc based automation
33/87
F'25 S3e#at'3& of Da"4'$2to$*& !a'"
33
-
8/18/2019 plc based automation
34/87
F'25 Da"4'$2to$ !a'"
(arlington pairs are ba+- to ba+- +onne+tion of two transistors with some sour+e resistors
and when the, are arranged as shown in the +ir+uit the, are used to amplif, wea- signals0
The amount b, whi+h the wea- signal is amplified is +alled the .#A$N20 0
FEATURES OF DRIVER5
• Se3en (arlington2s per pa+-age
• Output +urrents;;mA per dri3er/>;;mA pea-1
• $ntegrated suppression diodes for indu+ti3e loads
• Outputs +an be paralleled for high +urrents
• TT"C'OSP'OS(T" +ompatible inputs0
• $nputs pinned opposite to outputs
• Simplified la,out
Figure shows the (arlington pair +onne+tion of transistor0 The +ir+uit abo3e is a
.(arlington Pair2 dri3er0 The first transistor2s emitter feeds into the se+ond transistor2s base
and as a result the input signal is amplified b, the time it rea+hes the output0 The important
point to remember is that the (arlington Pair is made up of two transistors
FEATURES
U ;;mA rated +olle+tor +urrent /Single output10
34
-
8/18/2019 plc based automation
35/87
U !ighG3oltage outputsH ;*0
U $nputs +ompatible with 3arious t,pes of logi+0
U Rela, dri3er appli+ation0
6+: RELA.
A rela, is an ele+tri+all, operated swit+h0 'an, rela,s use an ele+tromagnet to
operate a swit+hing me+hanism me+hani+all,4 but other operating prin+iples are also used0
Rela,s are used where it is ne+essar, to +ontrol a +ir+uit b, a lowGpower signal /with
+omplete ele+tri+al isolation between +ontrol and +ontrolled +ir+uits14 or where se3eral
+ir+uits must be +ontrolled b, one signal0
A rela, is an ele+tri+all, operated swit+h0 Current flowing through the +oil of the rela,
+reates a magneti+ field whi+h attra+ts a le3er and +hanges the swit+h +onta+ts0 The +oil
+urrent +an be on or off so rela,s ha3e two swit+h positions and most ha3e double throw
/+hangeo3er1 swit+h +onta+ts as shown in the diagram0
35
-
8/18/2019 plc based automation
36/87
Fig ?0B Rela, showing +oil and swit+h +onta+ts
Rela,s allow one +ir+uit to swit+h a se+ond +ir+uit whi+h +an be +ompletel, separate
from the first0 For e7ample a low 3oltage batter, +ir+uit +an use a rela, to swit+h a :
-
8/18/2019 plc based automation
37/87
'ost rela,s are designed for PC mounting but ,ou +an solder wires dire+tl, to the
pins pro3iding ,ou ta-e +are to a3oid melting the plasti+ +ase of the rela,0
The supplierVs +atalogue should show ,ou the rela,Vs +onne+tions0 The +oil will be
ob3ious and it ma, be +onne+ted either wa, round0 Rela, +oils produ+e brief high 3oltage
Vspi-esV when the, are swit+hed off and this +an destro, transistors and $Cs in the +ir+uit0 To
pre3ent damage ,ou must +onne+t a prote+tion diode a+ross the rela, +oil0
The figure shows a rela, with its +oil and swit+h +onta+ts0 )ou +an see a le3er on the
left being attra+ted b, magnetism when the +oil is swit+hed on0 This le3er mo3es the swit+h
+onta+ts0
37
-
8/18/2019 plc based automation
38/87
-
8/18/2019 plc based automation
39/87
-
8/18/2019 plc based automation
40/87
to return to their unGpushed state0 (ifferent people use different terms for the pushing of the
button4 su+h as press4 depress4 mash4 and pun+h0
U&e&5
$n industrial and +ommer+ial appli+ations push buttons +an be lin-ed together b, a
me+hani+al lin-age so that the a+t of pushing one button +auses the other button to be
released0 $n this wa,4 a stop button +an for+e a start button to be released0 This method of
lin-age is used in simple manual operations in whi+h the ma+hine or pro+ess ha3e no
ele+tri+al +ir+uits for +ontrol0
Pushbuttons are often +olorG+oded to asso+iate them with their fun+tion so that the
operator will not push the wrong button in error0 Commonl, used +olors are red for stopping
the ma+hine or pro+ess and green for starting the ma+hine or pro+ess0
Red pushbuttons +an also ha3e large heads /mushroom shaped1 for eas, operation and
to fa+ilitate the stopping of a ma+hine0 These pushbuttons are +alled emergen+, stop buttons
and are mandated b, the ele+tri+al +ode in man, 6urisdi+tions for in+reased safet,0 This large
mushroom shape +an also be found in buttons for use with operators who need to wear glo3es
for their wor- and +ould not a+tuate a regular flushGmounted push button0 As an aid for
operators and users in industrial or +ommer+ial appli+ations4 a pilot light is +ommonl, added
to draw the attention of the user and to pro3ide feedba+- if the button is pushed0 T,pi+all,
this light is in+luded into the +enter of the pushbutton and a lens repla+es the pushbutton hard
+enter dis-0
The sour+e of the energ, to illuminate the light is not dire+tl, tied to the +onta+ts on
the ba+- of the pushbutton but to the a+tion the pushbutton +ontrols0 $n this wa, a start button
when pushed will +ause the pro+ess or ma+hine operation to be started and a se+ondar,
+onta+t designed into the operation or pro+ess will +lose to turn on the pilot light and signif,
the a+tion of pushing the button +aused the resultant pro+ess or a+tion to start0
$n popular +ulture4 the phrase the button refers to a /usuall, fi+tional1 button that a
militar, or go3ernment leader +ould press to laun+h nu+lear weapons0
40
-
8/18/2019 plc based automation
41/87
P9& to ON /9tto$5
Fig0?0/b1H push on button
$nitiall, the two +onta+ts of the button are open0 5hen the button is pressed the, be+ome
+onne+ted0 This ma-es the swit+hing operation using the push button0
6+ LIUID CR.STAL DISPLA. (LCD)
De&3"'!t'o$5
This is the e7ample for the Parallel Port0 This e7ample doesnVt use the iG
dire+tional feature found on newer ports4 thus it should wor- with most4 if not all Parallel
Ports0 $t howe3er doesnVt show the use of the Status Port as an input for a 8> Chara+ter 7 :
"ine "C( 'odule to the Parallel Port0 These "C( 'odules are 3er, +ommon these da,s4
and are quite simple to wor- with4 as all the logi+ required running them is on board0
P"o&5
• *er, +ompa+t and light
• "ow power +onsumption
• No geometri+ distortion
• "ittle or no fli+-er depending on ba+-light te+hnolog,
• Not affe+ted b, s+reen burnGin
• No high 3oltage or other haards present during repairser3i+e
• Can be made in almost an, sie or shape
41
-
8/18/2019 plc based automation
42/87
• No theoreti+al resolution limit
LCD Ba3>2"o9$d5
Frequentl,4 an B;8 program must intera+t with the outside world using input and
output de3i+es that +ommuni+ate dire+tl, with a human being0 One of the most +ommon
de3i+es atta+hed to an B;8 is an "C( displa,0 Some of the most +ommon "C(s +onne+ted
to the B;8 are 8>7: and :;7: displa,s0 This means 8> +hara+ters per line b, : lines and :;
+hara+ters per line b, : lines4 respe+ti3el,0
Fortunatel,4 a 3er, popular standard e7ists whi+h allows us to +ommuni+ate with the
3ast ma6orit, of "C(s regardless of their manufa+turer0 The standard is referred to as
!(??B;&4 whi+h refers to the +ontroller +hip whi+h re+ei3es data from an e7ternal sour+e
/in this +ase4 the B;81 and +ommuni+ates dire+tl, with the "C(0
F$# ?08;H "C(
66:;< LCD BACKGROUND
The ??B; standard requires < +ontrol lines as well as either ? or B $O lines for the
data bus0 The user ma, sele+t whether the "C( is to operate with a ?Gbit data bus or an BGbit
data bus0 $f a ?Gbit data bus is used the "C( will require a total of data lines /< +ontrol lines
plus the ? lines for the data bus10 $f an BGbit data bus is used the "C( will require a total of 88
data lines /< +ontrol lines plus the B lines for the data bus10
42
-
8/18/2019 plc based automation
43/87
The three +ontrol lines are referred to as EN4 RS4 and R50
The EN line is +alled Enable0 This +ontrol line is used to tell the "C( that ,ou are
sending it data0 To send data to the "C(4 ,our program should ma-e sure this line is low /;1
and then set the other two +ontrol lines andor put data on the data bus0 5hen the other lines
are +ompletel, read,4 bring EN high /81 and wait for the minimum amount of time required
b, the "C( datasheet /this 3aries from "C( to "C(14 and end b, bringing it low /;1 again0
The RS line is the Register Sele+t line0 5hen RS is low /;14 the data is to be treated
as a +ommand or spe+ial instru+tion /su+h as +lear s+reen4 position +ursor4 et+010 5hen RS is
high /814 the data being sent is te7t data whi+h should be displa,ed on the s+reen0 For
e7ample4 to displa, the letter T on the s+reen ,ou would set RS high0
The R5 line is the Read5rite +ontrol line0 5hen R5 is low /;14 the information
on the data bus is being written to the "C(0 5hen R5 is high /814 the program is effe+ti3el,
quer,ing /or reading1 the "C(0 Onl, one instru+tion /#et "C( status1 is a read +ommand0
All others are write +ommandsGGso R5 will almost alwa,s be low 0Finall,4 the data bus
+onsists of ? or B lines /depending on the mode of operation sele+ted b, the user10 $n the +ase
of an BGbit data bus4 the lines are referred to as (;4 (84 (:4 (4 and
(0
43
-
8/18/2019 plc based automation
44/87
6+,< ,N6
-
8/18/2019 plc based automation
45/87
FigHPN Jun+tion diode
PN UNCTION OPERATION
Now that ,ou are familiar with PG and NGt,pe materials4 how these materials are 6oined
together to form a diode4 and the fun+tion of the diode4 let us +ontinue our dis+ussion with the
operation of the PN 6un+tion0 ut before we +an understand how the PN 6un+tion wor-s4 we
must first +onsider +urrent flow in the materials that ma-e up the 6un+tion and what happens
initiall, within the 6un+tion when these two materials are 6oined together0
C9""e$t F4o7 '$ te NT0!e Mate"'a4
Condu+tion in the NGt,pe semi+ondu+tor4 or +r,stal4 is similar to +ondu+tion in a +opper
wire0 That is4 with 3oltage applied a+ross the material4 ele+trons will mo3e through the +r,stal 6ust as +urrent would flow in a +opper wire0 This is shown in figure 8G80 The positi3e
potential of the batter, will attra+t the free ele+trons in the +r,stal0 These ele+trons will lea3e
the +r,stal and flow into the positi3e terminal of the batter,0 As an ele+tron lea3es the +r,stal4
an ele+tron from the negati3e terminal of the batter, will enter the +r,stal4 thus +ompleting the
+urrent path0 Therefore4 the ma6orit, +urrent +arriers in the NGt,pe material /ele+trons1 are repelled
b, the negati3e side of the batter, and mo3e through the +r,stal toward the positi3e side of
the batter,0
45
-
8/18/2019 plc based automation
46/87
C9""e$t F4o7 '$ te PT0!e Mate"'a4
Current flow through the PGt,pe material is illustrated0 Condu+tion in the P material is
b, positi3e holes4 instead of negati3e ele+trons0 A hole mo3es from the positi3e terminal of
the P material to the negati3e terminal0 Ele+trons from the e7ternal +ir+uit enter the negati3e
terminal of the material and fill holes in the 3i+init, of this terminal0 At the positi3e terminal4
ele+trons are remo3ed from the +o3alent bonds4 thus +reating new holes0 This pro+ess
+ontinues as the stead, stream of holes /hole +urrent1 mo3es toward the negati3e terminal
6+,, LED
"E(s are semi+ondu+tor de3i+es0 "i-e transistors4 and other diodes4 "E(s are made
out of sili+on0 5hat ma-es an "E( gi3e off light are the small amounts of +hemi+al
impurities that are added to the sili+on4 su+h as gallium4 arsenide4 indium4 and nitride0
5hen +urrent passes through the "E(4 it emits photons as a b,produ+t0 Normal light
bulbs produ+e light b, heating a metal filament until it is white hot0 "E(s produ+e photons
dire+tl, and not 3ia heat4 the, are far more effi+ient than in+andes+ent bulbs0
Fig ?088/a1H T,pi+al "E( Fig ?088/b1H +ir+uit s,mbol
Not long ago "E(s were onl, bright enough to be used as indi+ators on dashboards or
ele+troni+ equipment0 ut re+ent ad3an+es ha3e made "E(s bright enough to ri3al traditionallighting te+hnologies0 'odern "E(s +an repla+e in+andes+ent bulbs in almost an,
appli+ation0
T0!e& of LED*S
"E(s are produ+ed in an arra, of shapes and sies0 The mm +,lindri+al pa+-age is the
most +ommon4 estimated at B;W of world produ+tion0 The +olor of the plasti+ lens is often the
same as the a+tual +olor of light emitted4 but not alwa,s0 For instan+e4 purple plasti+ is often used
for infrared "E(s4 and most blue de3i+es ha3e +lear housings0 There are also "E(s in e7tremel,
46
-
8/18/2019 plc based automation
47/87
tin, pa+-ages4 su+h as those found on blin-ers and on +ell phone -e,pads0 The main t,pes of "E(s
are miniature4 high power de3i+es and +ustom designs su+h as alphanumeri+ or multiG+olor0
Fig ?088/+1 (ifferent t,pes of "E(2S
6+,- RESISTORS
A resistor is a twoGterminal ele+troni+ +omponent designed to oppose an ele+tri+ +urrent b,
produ+ing a 3oltage drop between its terminals in proportion to the +urrent4 that is4 in
a++ordan+e with OhmVs lawH
* $R
Resistors are used as part of ele+tri+al networ-s and ele+troni+ +ir+uits0 The, are e7tremel,
+ommonpla+e in most ele+troni+ equipment0 Pra+ti+al resistors +an be made of 3arious
+ompounds and films4 as well as resistan+e wire /wire made of a highGresisti3it, allo,4 su+h
as ni+-el+hrome10
The primar, +hara+teristi+s of resistors are their resistan+e and the power the, +an
dissipate0 Other +hara+teristi+s in+lude temperature +oeffi+ient4 noise4 and indu+tan+e0 "ess
wellG-nown is +riti+al resistan+e4 the 3alue below whi+h power dissipation limits the
ma7imum permitted +urrent flow4 and abo3e whi+h the limit is applied 3oltage0 Criti+al
resistan+e depends upon the materials +onstituting the resistor as well as its ph,si+al
dimensionsM itVs determined b, design0
47
-
8/18/2019 plc based automation
48/87
Resistors +an be integrated into h,brid and printed +ir+uits4 as well as integrated
+ir+uits0 Sie4 and position of leads /or terminals1 are rele3ant to equipment designersM
resistors must be ph,si+all, large enough not to o3erheat when dissipating their power0
A resistor is a twoGterminal passi3e ele+troni+ +omponent whi+h implements ele+tri+al
resistan+e as a +ir+uit element0 5hen a 3oltage * is applied a+ross the terminals of a resistor4
a +urrent $ will flow through the resistor in dire+t proportion to that 3oltage0 The re+ipro+al of
the +onstant of proportionalit, is -nown as the resistan+e R4 sin+e4 with a gi3en 3oltage *4 a
larger 3alue of R further resists the flow of +urrent $ as gi3en b, OhmVs lawH
Resistors are +ommon elements of ele+tri+al networ-s and ele+troni+ +ir+uits and are
ubiquitous in most ele+troni+ equipment0 Pra+ti+al resistors +an be made of 3arious
+ompounds and films4 as well as resistan+e wire /wire made of a highGresisti3it, allo,4 su+has ni+-elG+hrome10 Resistors are also implemented within integrated +ir+uits4 parti+ularl,
analog de3i+es4 and +an also be integrated into h,brid and printed +ir+uits0
The ele+tri+al fun+tionalit, of a resistor is spe+ified b, its resistan+eH +ommon
+ommer+ial resistors are manufa+tured o3er a range of more than 9 orders of magnitude0
5hen spe+if,ing that resistan+e in an ele+troni+ design4 the required pre+ision of the
resistan+e ma, require attention to the manufa+turing toleran+e of the +hosen resistor4
a++ording to its spe+ifi+ appli+ation0 The temperature +oeffi+ient of the resistan+e ma, also be
48
http://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Direct_proportionhttp://en.wikipedia.org/wiki/Direct_proportionhttp://en.wikipedia.org/wiki/Resistancehttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Electrical_networkshttp://en.wikipedia.org/wiki/Electrical_networkshttp://en.wikipedia.org/wiki/Resistance_wirehttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Hybrid_circuithttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Orders_of_magnitudehttp://en.wikipedia.org/wiki/Orders_of_magnitudehttp://en.wikipedia.org/wiki/Engineering_tolerance#Electrical_component_tolerancehttp://en.wikipedia.org/wiki/Temperature_coefficienthttp://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Direct_proportionhttp://en.wikipedia.org/wiki/Resistancehttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Electrical_networkshttp://en.wikipedia.org/wiki/Resistance_wirehttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Hybrid_circuithttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Orders_of_magnitudehttp://en.wikipedia.org/wiki/Engineering_tolerance#Electrical_component_tolerancehttp://en.wikipedia.org/wiki/Temperature_coefficient
-
8/18/2019 plc based automation
49/87
of +on+ern in some pre+ision appli+ations0 Pra+ti+al resistors are also spe+ified as ha3ing a
ma7imum power rating whi+h must e7+eed the anti+ipated power dissipation of that resistor
in a parti+ular +ir+uitH this is mainl, of +on+ern in power ele+troni+s appli+ations0 Resistors
with higher power ratings are ph,si+all, larger and ma, require heat sin-ing0 $n a high
3oltage +ir+uit4 attention must sometimes be paid to the rated ma7imum wor-ing 3oltage of
the resistor0
The series indu+tan+e of a pra+ti+al resistor +auses its beha3ior to depart from ohms
lawM this spe+ifi+ation +an be important in some highGfrequen+, appli+ations for smaller
3alues of resistan+e0 $n a lowGnoise amplifier or preGamp the noise +hara+teristi+s of a resistor
ma, be an issue0 The unwanted indu+tan+e4 e7+ess noise4 and temperature +oeffi+ient are
mainl, dependent on the te+hnolog, used in manufa+turing the resistor0 The, are not
normall, spe+ified indi3iduall, for a parti+ular famil, of resistors manufa+tured using a
parti+ular te+hnolog,0X8Y A famil, of dis+rete resistors is also +hara+teried a++ording to its
form fa+tor4 that is4 the sie of the de3i+e and position of its leads /or terminals1 whi+h is
rele3ant in the pra+ti+al manufa+turing of +ir+uits using them0
Units
The ohm /s,mbolH Z1 is the S$ unit of ele+tri+al resistan+e4 named after #eorg Simon
Ohm0 An ohm is equi3alent to a 3olt per ampere0 Sin+e resistors are spe+ified and
manufa+tured o3er a 3er, large range of 3alues4 the deri3ed units of milliohm /8 mZ 8; [<
Z14 -ilohm /8 -Z 8;
-
8/18/2019 plc based automation
50/87
A +apa+itor or +ondenser is a passi3e ele+troni+ +omponent +onsisting of a pair of +ondu+tors
separated b, a diele+tri+0 5hen a 3oltage potential differen+e e7ists between the +ondu+tors4
an ele+tri+ field is present in the diele+tri+0 This field stores energ, and produ+es a
me+hani+al for+e between the plates0 The effe+t is greatest between wide4 flat4 parallel4
narrowl, separated +ondu+tors0
An ideal +apa+itor is +hara+teried b, a single +onstant 3alue4 +apa+itan+e4 whi+h is
measured in farads0 This is the ratio of the ele+tri+ +harge on ea+h +ondu+tor to the potential
differen+e between them0 $n pra+ti+e4 the diele+tri+ between the plates passes a small amount
of lea-age +urrent0 The +ondu+tors and leads introdu+e an equi3alent series resistan+e and the
diele+tri+ has an ele+tri+ field strength limit resulting in a brea-down 3oltage0
The properties of +apa+itors in a +ir+uit ma, determine the resonant frequen+, and
qualit, fa+tor of a resonant +ir+uit4 power dissipation and operating frequen+, in a digital
logi+ +ir+uit4 energ, +apa+it, in a highGpower s,stem4 and man, other important aspe+ts0
A +apa+itor /formerl, -nown as +ondenser1 is a de3i+e for storing ele+tri+ +harge0 The
forms of pra+ti+al +apa+itors 3ar, widel,4 but all +ontain at least two +ondu+tors separated b,
a nonG+ondu+tor0 Capa+itors used as parts of ele+tri+al s,stems4 for e7ample4 +onsist of metal
foils separated b, a la,er of insulating film0
Capa+itors are widel, used in ele+troni+ +ir+uits for blo+-ing dire+t +urrent while
allowing alternating +urrent to pass4 in filter networ-s4 for smoothing the output of power
supplies4 in the resonant +ir+uits that tune radios to parti+ular frequen+ies and for man, other
purposes0
50
http://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/LC_circuithttp://en.wikipedia.org/wiki/LC_circuithttp://en.wikipedia.org/wiki/Frequencyhttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/LC_circuithttp://en.wikipedia.org/wiki/Frequency
-
8/18/2019 plc based automation
51/87
A +apa+itor is a passi3e ele+troni+ +omponent +onsisting of a pair of +ondu+tors
separated b, a diele+tri+ /insulator10 5hen there is a potential differen+e /3oltage1 a+ross the
+ondu+tors4 a stati+ ele+tri+ field de3elops in the diele+tri+ that stores energ, and produ+es a
me+hani+al for+e between the +ondu+tors0 An ideal +apa+itor is +hara+teried b, a single
+onstant 3alue4 +apa+itan+e4 measured in farads0 This is the ratio of the ele+tri+ +harge on
ea+h +ondu+tor to the potential differen+e between them0
The +apa+itan+e is greatest when there is a narrow separation between large areas of
+ondu+tor4 hen+e +apa+itor +ondu+tors are often +alled plates4 referring to an earl, means of
+onstru+tion0 $n pra+ti+e the diele+tri+ between the plates passes a small amount of lea-age
+urrent and also has an ele+tri+ field strength limit4 resulting in a brea-down 3oltage4 while
the +ondu+tors and leads introdu+e an undesired indu+tan+e and resistan+e0
Theor o! o"er#tion
'ain arti+leH Capa+itan+e
Charge separation in a parallelGplate +apa+itor +auses an internal ele+tri+ field0 A diele+tri+
/orange1 redu+es the field and in+reases the +apa+itan+e0
51
http://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Dielectrichttp://en.wikipedia.org/wiki/Dielectrichttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Breakdown_voltagehttp://en.wikipedia.org/wiki/Lead_(electronics)http://en.wikipedia.org/wiki/Lead_(electronics)http://en.wikipedia.org/wiki/Equivalent_series_inductancehttp://en.wikipedia.org/wiki/Equivalent_series_inductancehttp://en.wikipedia.org/wiki/Equivalent_series_resistancehttp://en.wikipedia.org/wiki/Equivalent_series_resistancehttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Passivity_(engineering)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Dielectrichttp://en.wikipedia.org/wiki/Potential_differencehttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Leakage_(electronics)http://en.wikipedia.org/wiki/Breakdown_voltagehttp://en.wikipedia.org/wiki/Lead_(electronics)http://en.wikipedia.org/wiki/Equivalent_series_inductancehttp://en.wikipedia.org/wiki/Equivalent_series_resistancehttp://en.wikipedia.org/wiki/Capacitance
-
8/18/2019 plc based automation
52/87
A simple demonstration of a parallelGplate +apa+itor
A +apa+itor +onsists of two +ondu+tors separated b, a nonG+ondu+ti3e regionXBY0 The nonG
+ondu+ti3e region is +alled the diele+tri+ or sometimes the diele+tri+ medium0 $n simpler
terms4 the diele+tri+ is 6ust an ele+tri+al insulator 0 E7amples of diele+tri+ mediums are glass4
air4 paper4 3a+uum4 and e3en a semi+ondu+tor depletion region +hemi+all, identi+al to the
+ondu+tors0 A +apa+itor is assumed to be selfG+ontained and isolated4 with no net ele+tri+
+harge and no influen+e from an, e7ternal ele+tri+ field0 The +ondu+tors thus hold equal and
opposite +harges on their fa+ing surfa+es4X9Y and the diele+tri+ de3elops an ele+tri+ field0 $n S$
units4 a +apa+itan+e of one farad means that one +oulomb of +harge on ea+h +ondu+tor +auses
a 3oltage of one 3olt a+ross the de3i+e0X8;Y
The +apa+itor is a reasonabl, general model for ele+tri+ fields within ele+tri+ +ir+uits0 An
ideal +apa+itor is wholl, +hara+teried b, a +onstant +apa+itan+e C4 defined as the ratio of
+harge \@ on ea+h +ondu+tor to the 3oltage * between themHXBY
Sometimes +harge buildGup affe+ts the +apa+itor me+hani+all,4 +ausing its +apa+itan+e to3ar,0 $n this +ase4 +apa+itan+e is defined in terms of in+remental +hangesH
Ener$ stor#$e
5or- must be done b, an e7ternal influen+e to mo3e +harge between the +ondu+tors in a
+apa+itor0 5hen the e7ternal influen+e is remo3ed the +harge separation persists in theele+tri+ field and energ, is stored to be released when the +harge is allowed to return to its
equilibrium position0 The wor- done in establishing the ele+tri+ field4 and hen+e the amount
of energ, stored4 is gi3en b,HX88Y
52
http://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Dielectric_mediumhttp://en.wikipedia.org/wiki/Insulator_(electrical)http://en.wikipedia.org/wiki/Vacuumhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p157-8http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Coulombhttp://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p169-9http://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p169-9http://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Work_(thermodynamics)http://en.wikipedia.org/wiki/Equilibriumhttp://en.wikipedia.org/wiki/Capacitor#cite_note-10http://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Dielectric_mediumhttp://en.wikipedia.org/wiki/Insulator_(electrical)http://en.wikipedia.org/wiki/Vacuumhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p157-8http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Coulombhttp://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p169-9http://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Work_(thermodynamics)http://en.wikipedia.org/wiki/Equilibriumhttp://en.wikipedia.org/wiki/Capacitor#cite_note-10
-
8/18/2019 plc based automation
53/87
-
8/18/2019 plc based automation
54/87
54
-
8/18/2019 plc based automation
55/87
=+SOFTWARE REUIREMENTS
55
-
8/18/2019 plc based automation
56/87
=+, INTRODUCTION TO KEIL MICRO VISION (IDE)
=eil an AR' Compan, ma-es C +ompilers4 ma+ro assemblers4 realGtime -ernels4
debuggers4 simulators4 integrated en3ironments4 e3aluation boards4 and emulators for
AR'AR'9Corte7G'7C8>7ST8;4 :84 and B;8 'C& families0
=eil de3elopment tools for the B;8 'i+ro+ontroller Ar+hite+ture support e3er, le3el
of software de3eloper from the professional appli+ations engineer to the student 6ust learning
about embedded software de3elopment0 5hen starting a new pro6e+t4 simpl, sele+t the
mi+ro+ontroller ,ou use from the (e3i+e (atabase and the ]*ision $(E sets all +ompiler4
assembler4 lin-er4 and memor, options for ,ou0
=eil is a +ross +ompiler0 So first we ha3e to understand the +on+ept of +ompilers and
+ross +ompilers0 After then we shall learn how to wor- with -eil0
=+- CONCEPT OF COMPILER
Compilers are programs used to +on3ert a !igh "e3el "anguage to ob6e+t +ode0
(es-top +ompilers produ+e an output ob6e+t +ode for the underl,ing mi+ropro+essor4 but not
for other mi+ropro+essors0 $0E the programs written in one of the !"" li-e .C2 will +ompile
the +ode to run on the s,stem for a parti+ular pro+essor li-e 7B> /underl,ing mi+ropro+essor
56
-
8/18/2019 plc based automation
57/87
in the +omputer10 For e7ample +ompilers for (os platform is different from the Compilers for
&ni7 platform So if one wants to define a +ompiler then +ompiler is a program that translates
sour+e +ode into ob6e+t +ode0
The +ompiler deri3es its name from the wa, it wor-s4 loo-ing at the entire pie+e of
sour+e +ode and +olle+ting and reorganiing the instru+tion0 See there is a bit little differen+e
between +ompiler and an interpreter0 $nterpreter 6ust interprets whole program at a time while
+ompiler anal,ses and e7e+ute ea+h line of sour+e +ode in su++ession4 without loo-ing at the
entire program0
The ad3antage of interpreters is that the, +an e7e+ute a program immediatel,0
Se+ondl, programs produ+ed b, +ompilers run mu+h faster than the same programs e7e+uted
b, an interpreter0 !owe3er +ompilers require some time before an e7e+utable program
emerges0 Now as +ompilers translate sour+e +ode into ob6e+t +ode4 whi+h is unique for ea+h
t,pe of +omputer4 man, +ompilers are a3ailable for the same language0
=+@ CONCEPT OF CROSS COMPILER
A +ross +ompiler is similar to the +ompilers but we write a program for the target
pro+essor /li-e B;8 and its deri3ati3es1 on the host pro+essors /li-e +omputer of 7B>10 $t
means being in one en3ironment ,ou are writing a +ode for another en3ironment is +alled
+ross de3elopment0 And the +ompiler used for +ross de3elopment is +alled +ross +ompiler0 So
the definition of +ross +ompiler is a +ompiler that runs on one +omputer but produ+es ob6e+t
+ode for a different t,pe of +omputer0
=+6 KEIL C CROSS COMPILER
57
-
8/18/2019 plc based automation
58/87
=eil is a #erman based Software de3elopment +ompan,0 $t pro3ides se3eral
de3elopment tools li-e
K $(E /$ntegrated (e3elopment en3ironment1
K Pro6e+t 'anager
K Simulator
K (ebugger
K C Cross Compiler4 Cross Assembler4 "o+ator"in-er
The =eil AR' tool -it in+ludes three main tools4 assembler4 +ompiler and lin-er0 An
assembler is used to assemble the AR' assembl, program0 A +ompiler is used to +ompile the
C sour+e +ode into an ob6e+t file0 A lin-er is used to +reate an absolute ob6e+t module suitable
for our inG+ir+uit emulator0
=+= B9'4d'$2 a$ A!!4'3at'o$ '$ V'&'o$-
To build /+ompile4 assemble4 and lin-1 an appli+ation in ]*ision:4 ,ou mustH
8 Sele+t Pro6e+t G/fore7ample48>>^EA'P"ES^!E""O^!E""O0&*:10
: Sele+t Pro6e+t G Rebuild all target files or uild target0]*ision: +ompiles4 assembles4
and lin-s the files in ,our pro6e+t0
=+ C"eat'$2 .o9" O7$ A!!4'3at'o$ '$ V'&'o$-
To +reate a new pro6e+t in ]*ision:4 ,ou mustH
8 Sele+t Pro6e+t G New Pro6e+t0
: Sele+t a dire+tor, and enter the name of the pro6e+t file0
< Sele+t Pro6e+t G Sele+t (e3i+e and sele+t an B;84 :84 or C8>7ST8; de3i+e from the
(e3i+e (atabase_0
? Create sour+e files to add to the pro6e+t0
58
-
8/18/2019 plc based automation
59/87
Sele+t Pro6e+t G Targets4 #roups4 Files0 AddFiles4 sele+t Sour+e #roup84 and add the
sour+e files to the pro6e+t0
> Sele+t Pro6e+t G Options and set the tool options0 Note when ,ou sele+t the target
de3i+e from the (e3i+e (atabase_ all spe+ial options are set automati+all,0 )ou
t,pi+all, onl, need to +onfigure the memor, map of ,our target hardware0 (efault
memor, model settings are optimal for most appli+ations0
Sele+t Pro6e+t G Rebuild all target files or uild target0
=+: De/922'$2 a$ A!!4'3at'o$ '$ V'&'o$-
To debug an appli+ation +reated using ]*ision:4 ,ou mustH
8 Sele+t (ebug G StartStop (ebug Session0
: &se the Step toolbar buttons to singleGstep through ,our program0 )ou ma, enter #4
main in the Output 5indow to e7e+ute to the main C fun+tion0
< Open the Serial 5indow using the Serial ̀ 8 button on the toolbar0
(ebug ,our program using standard options li-e Step4 #o4 rea-4 and so on0
=+; Sta"t'$2 V'&'o$- a$d C"eat'$2 a P"oe3t
]*ision: is a standard 5indows appli+ation and started b, +li+-ing on the program
i+on0 To +reate a new pro6e+t file sele+t from the ]*ision: menu Pro6e+t L New Pro6e+t0
This opens a standard 5indows dialog that as-s ,ou for the new pro6e+t file name0 5e
suggest that ,ou use a separate folder for ea+h pro6e+t0 )ou +an simpl, use the i+on Create
New Folder in this dialog to get a new empt, folder0 Then sele+t this folder and enter the file
name for the new pro6e+t4 i0e0 Pro6e+t80 ]*ision: +reates a new pro6e+t file with the name
PROJECT80&*: whi+h +ontains a default target and file group name0 )ou +an see these
names in the Pro6e+t0
=+ W'$do7 F'4e&+
Now use from the menu Pro6e+t L Sele+t (e3i+e for Target and sele+t a CP& for ,our
pro6e+t0 The Sele+t (e3i+e dialog bo7 shows the ]*ision: de3i+e data base0 Just sele+t the
mi+ro+ontroller ,ou use0 5e are using for our e7amples the Philips B;C8R( CP&0 This
sele+tion sets ne+essar, tool Options for the B;C8R( de3i+e and simplifies in this wa, the
tool Configuration0
59
-
8/18/2019 plc based automation
60/87
=+,< B9'4d'$2 P"oe3t& a$d C"eat'$2 a HE F'4e&
T,pi+al4 the tool settings under Options L Target are all ,ou need to start a new
appli+ation0 )ou ma, translate all sour+e files and line the appli+ation with a +li+- on theuild Target toolbar i+on0 5hen ,ou build an appli+ation with s,nta7 errors4 ]*ision: will
displa, errors and warning messages in the Output 5indow L uild page0 A double +li+- on a
message line opens the sour+e file on the +orre+t lo+ation in a ]*ision: editor window0 On+e
,ou ha3e su++essfull, generated ,our appli+ation ,ou +an start debugging0
After ,ou ha3e tested ,our appli+ation4 it is required to +reate an $ntel !E file to
download the software into an EPRO' programmer or simulator0 ]*ision: +reates !E files
with ea+h build pro+ess when Create !E files under Options for Target L Output is enabled0
)ou ma, start ,our PRO' programming utilit, after the ma-e pro+ess when ,ou spe+if, the
program under the option Run &ser Program `80
=+,, CPU S'#94at'o$
]*ision: simulates up to 8> 'b,tes of memor, from whi+h areas +an be mapped for
read4 write4 or +ode e7e+ution a++ess0 The ]*ision: simulator traps
and reports illegal memor, a++esses0 $n addition to memor, mapping4 the simulator also
pro3ides support for the integrated peripherals of the 3arious B;8 deri3ati3es0 The onG+hip
peripherals of the CP& ,ou ha3e sele+ted are +onfigured from the (e3i+e0
=+,- Data/a&e &e4e3t'o$
)ou ha3e made when ,ou +reate ,our pro6e+t target0 Refer to page B for more
$nformation about sele+ting a de3i+e0 )ou ma, sele+t and displa, the onG+hip peripheral
+omponents using the (ebug menu0 )ou +an also +hange the aspe+ts of ea+h peripheral using
the +ontrols in the dialog bo7es0
=+,@ Sta"t De/922'$2
)ou start the debug mode of ]*ision: with the (ebug L StartStop (ebug
Session Command0 (epending on the Options for Target L (ebug Configuration4 ]*ision:
will load the appli+ation program and run the startup +ode ]*ision: sa3es the editor s+reen
60
-
8/18/2019 plc based automation
61/87
la,out and restores the s+reen la,out of the last debug session0 $f the program e7e+ution stops4
]*ision: opens an editor window with the sour+e te7t or shows CP& instru+tions in the
disassembl, window0 The ne7t e7e+utable statement is mar-ed with a ,ellow arrow0 (uring
debugging4 most editor features are still a3ailable0
For e7ample4 ,ou +an use the find +ommand or +orre+t program errors0 Program
sour+e te7t of ,our appli+ation is shown in the same windows0 The ]*ision: debug mode
differs from the edit mode in the following aspe+tsH
% The I(ebug 'enu and (ebug Commands des+ribed on page :B are a3ailable0 The
additional debug windows are dis+ussed in the following0
% The pro6e+t stru+ture or tool parameters +annot be modified0 All build +ommands are
disabled0
=+,6 D'&a&&e#/40 W'$do7
The (isassembl, window shows ,our target program as mi7ed sour+e and assembl,
program or 6ust assembl, +ode0 A tra+e histor, of pre3iousl, e7e+uted instru+tions ma, be
displa,ed with (ebug L *iew Tra+e Re+ords0 To enable the tra+e histor,4 set (ebug L
Enable(isable Tra+e Re+ording0
$f ,ou sele+t the (isassembl, 5indow as the a+ti3e window all program step
+ommands wor- on CP& instru+tion le3el rather than program sour+e lines0 )ou +an sele+t a
te7t line and set or modif, +ode brea-points using toolbar buttons or the +onte7t menu
+ommands0
)ou ma, use the dialog (ebug L $nline Assembl, to modif, the CP& instru+tions0
That allows ,ou to +orre+t mista-es or to ma-e temporar, +hanges to the target program ,ou
are debugging0 Numerous e7ample programs are in+luded to help ,ou get started with the
most popular embedded B;8 de3i+es0
The =eil ]*ision (ebugger a++uratel, simulates onG+hip peripherals /$C4 CAN4
&ART4 SP$4 $nterrupts4 $O Ports4 A( Con3erter4 (A Con3erter4 and P5' 'odules1 of
,our B;8 de3i+e0 Simulation helps ,ou understand hardware +onfigurations and a3oids time
61
-
8/18/2019 plc based automation
62/87
wasted on setup problems0 Additionall,4 with simulation4 ,ou +an write and test appli+ations
before target hardware is a3ailable0
=+,= EMBEDDED C &se of embedded pro+essors in passenger +ars4 mobile phones4 medi+al equipment4
aerospa+e s,stems and defense s,stems is widespread4 and e3en e3er,da, domesti+
applian+es su+h as dish washers4 tele3isions4 washing ma+hines and 3ideo re+orders now
in+lude at least one su+h de3i+e0
e+ause most embedded pro6e+ts ha3e se3ere +ost +onstraints4 the, tend to use lowG
+ost pro+essors li-e the B;8 famil, of de3i+es +onsidered in this boo-0 These popular +hips
ha3e 3er, limited resour+es a3ailable most su+h de3i+es ha3e around :> b,tes /not
megab,tesc1 of RA'4 and the a3ailable pro+essor power is around 8;;; times less than that
of a des-top pro+essor0 As a result4 de3eloping embedded software presents signifi+ant new
+hallenges4 e3en for e7perien+ed des-top programmers0 $f ,ou ha3e some programming
e7perien+e G in C4 C or Ja3a G then this boo- and its a++ompan,ing C( will help ma-e
,our mo3e to the embedded world as qui+- and painless as possible0
).SCHEMATIC DIAGRAM
JFOR SCHEMATIC DIAGRAM REFER CD
62
-
8/18/2019 plc based automation
63/87
+, SCHEMATIC DIAGRAM DESCRIPTION
POWER SUPPL.
The +ir+uit uses standard power suppl, +omprising of a stepGdown transformer from
:
-
8/18/2019 plc based automation
64/87
AT'E" series of B;8 famil, of mi+ro +ontrollers need +ertain standard +onne+tions0
The a+tual number of the 'i+ro+ontroller +ould be IB9C8 4 IB9C:4 IB9S84 IB9S:4
and as regards to :; pin +onfiguration a number of IB9C:;80 The ? set of $O ports are used
based on the pro6e+t requirement0 E3er, mi+ro+ontroller requires a timing referen+e for its
internal program e7e+ution therefore an os+illator needs to be fun+tional with a desired
frequen+, to obtain the timing referen+e as t 8f0
A +r,stal ranging from : to :; '! is required to be used at its pin number 8B and 89
for the internal os+illator0 $t ma, be noted here the +r,stal is not to be understood as +r,stal
os+illator $t is 6ust a +r,stal4 while +onne+ted to the appropriate pin of the mi+ro+ontroller it
results in os+illator fun+tion inside the mi+ro+ontroller0 T,pi+all, 880;9: '! +r,stal is
used in general for most of the +ir+uits using B;8 series mi+ro+ontroller0 Two small 3alue
+erami+ +apa+itors of
-
8/18/2019 plc based automation
65/87
the +ontroller a++esses the program from e7ternal memor,0 !owe3er as we are using the
internal memor, it is alwa,s +onne+ted to *0
BRIEF DESCRIPTION OF WORKING OF RELA.
A rela, is an ele+tri+all, operated swit+h0 Current flowing through the +oil of the rela,
+reates a magneti+ field whi+h attra+ts a le3er and +hanges the swit+h +onta+ts0 The +oil
+urrent +an be on or off so rela,s ha3e two swit+h positions and most ha3e double throw
/+hangeo3er1 swit+h +onta+ts0 Rela,s allow one +ir+uit to swit+h a se+ond +ir+uit whi+h +an
be +ompletel, separate from the first0 For e7ample a low 3oltage batter, +ir+uit +an use a
rela, to swit+h a :
-
8/18/2019 plc based automation
66/87
upto se3en rela,s +an be used for se3en different loads to be swit+hed on b, the normall,
open/NO1 +onta+t or swit+hed off b, the normall, +losed +onta+t/NC1
"oad off "oad on
OPERATION EPLANATION
CONNECTIONS5
The output of power suppl, whi+h is +onne+ted to the ?;th pin of
mi+ro+ontroller and ground is +onne+ted to its :; th pin0 Se3en push buttons are +onne+ted as
an input to the port
-
8/18/2019 plc based automation
67/87
WORKING5
This pro6e+t is designed to wor- li-e a P"C for a spe+ifi+ operation su+h as
programmable timing based sequential swit+hing operation of industrial loads0 Four loads are
used independentl, from the +onta+ts of four rela,s dri3en b, a rela, dri3er $C &"N:;;< as
e7plained abo3e0 Three setup swit+hes are used for auto mode4 setting mode4 manual mode0
Four more push buttons are separatel, pro3ided for manual operation of the rela,s while
manual mode is +hosen0 Sele+ting auto mode4 the output the mi+ro+ontroller pin
-
8/18/2019 plc based automation
68/87
:+ PROECT LA.OUT
68
-
8/18/2019 plc based automation
69/87
69
-
8/18/2019 plc based automation
70/87
;+ BILL OF MATERIALS
T. PARTREFS VALUE
Re&'&to"&
8 R8
-
8/18/2019 plc based automation
71/87
8 ?;GP$N
8 8>GP$N
D'ode&
? (8G(? 8N?;;
M'&3e44a$eo9&
8 CR)STA" 880;9:'!
? "8G"? "A'P
? "A'P !O"(ER
8 "C( "';8>"/8>:1
"E(8G"E( "E(GRE(
8 POT 8;=
? RE"A)8GRE"A)? 8:*
B S8GSB P&S! &TTON
8 TRANSFOR'ER ;G8:*
PC CONNECTORS :GP$N
8 FE'A"E &R#E 8>GP$N
8 'A"E &R# 8>GP$N
8 'A"E &R# :GP$N
71
-
8/18/2019 plc based automation
72/87
8 FE'A"E &R# :GP$N
8 !EAT S$N=
72
-
8/18/2019 plc based automation
73/87
*.CODING
73
-
8/18/2019 plc based automation
74/87
*.+ COM,ILER
,+ Cli+- on the =eil *ision $+on on (es-top
-+ The following fig will appear
@+ Cli+- on the Pro6e+t menu from the title bar
6+ Then Cli+- on New Pro6e+t
74
-
8/18/2019 plc based automation
75/87
=+ Sa3e the Pro6e+t b, t,ping suitable pro6e+t name with no e7tension in u r ownfolder sited in either CH^ or (H^
+ Then Cli+- on Sa3e button abo3e0
:+ Sele+t the +omponent for u r pro6e+t0 i0e0 Atmel
;+ Cli+- on the S,mbol beside of Atmel
75
-
8/18/2019 plc based automation
76/87
+ Sele+t ATB9C8 as shown below
,
-
8/18/2019 plc based automation
77/87
,-+ Then Cli+- either )ES or NOmostl, INO0
,@+ Now ,our pro6e+t is read, to &SE0
,6+ Now double +li+- on the Target84 ,ou would get another option ISour+e group 8
as shown in ne7t page0
,=+ Cli+- on the file option from menu bar and sele+t Inew0
77
-
8/18/2019 plc based automation
78/87
,+ The ne7t s+reen will be as shown in ne7t page4 and 6ust ma7imie it b, double
+li+-ing on its blue boarder0
,:+ Now start writing program in either in IE'E((E( C or IAS'0
,;+ For a program written in Assembl,4 then sa3e it with e7tension I0 asm and for
IE'E((E( C based program sa3e it with e7tension I 0C
78
-
8/18/2019 plc based automation
79/87
,+ Now right +li+- on Sour+e group 8 and +li+- on IAdd files to #roup Sour+e0
-
-
8/18/2019 plc based automation
80/87
-,+ Now sele+t as per ,our file e7tension gi3en while sa3ing the file
--+ Cli+- onl, one time on option IADD0
-@+ Now Press fun+tion -e, F to +ompile0 An, error will appear if so happen0
-6+ $f the file +ontains no error4 then press ControlF simultaneousl,0
-=+ The new window is as follows
80
-
8/18/2019 plc based automation
81/87
-+ Then Cli+- IO=0
-:+ Now +li+- on the Peripherals from menu bar4 and +he+- ,our required port as
shown in fig below0
-;+ (rag the port a side and +li+- in the program file0
81
-
8/18/2019 plc based automation
82/87
-+ Now -eep Pressing fun+tion -e, IF88 slowl, and obser3e0
@
-
8/18/2019 plc based automation
83/87
,
-
8/18/2019 plc based automation
84/87
Then we appl, this 3oltage to the power suppl, +ir+uit0 Note that we do this test
without mi+ro+ontroller be+ause if there is an, e7+essi3e 3oltage4 this ma, lead to damaging
the +ontroller0 5e +he+- for the input to the 3oltage regulator i0e04 are we getting an input of
8:3 and an output of 30 This 3 output is gi3en to the mi+ro+ontrollers2 ?; th pin0 !en+e we
+he+- for the 3oltage le3el at ?; th pin0 Similarl,4 we +he+- for the other terminals for the
required 3oltage0 $n this wa, we +an assure that the 3oltage at all the terminals is as per the
requirement0
84
-
8/18/2019 plc based automation
85/87
,,+RESULT
85
-
8/18/2019 plc based automation
86/87
-
8/18/2019 plc based automation
87/87
,@+BIBLIOGRAPH.
TET BOOKS REFERED
80 IThe B;8 'i+ro+ontroller and Embedded s,stems b, 'uhammad Ali 'aidi and Jani+e
#illispie 'aidi 4 Pearson Edu+ation0
:0 AT'E" B9S: (ata Sheets0
WEBSITES
• www0atmel0+om
• www0be,ondlogi+0org
• www0wi-ipedia0org
• www0howstuffwor-s0+om
• www0alldatasheets0+om