You are on page 1of 71

i

AUTOMATIC BOTTLE FILLING WATER SYSTEM USING PLC WITH CONVEYOR MODEL
A thesis submitted i !u"!i""met #! the
$e%ui$emet !#$ the &'&$d #! the de($ee #!
B&)he"#$ #! E(iee$i( *E"e)t$#i)s + Ist$umet&ti#,
Faculty of Electronics & Instrumentation Engineering
Aarupadai Veedu Institute of Technology (Vi&-&.& Missi#
Ui/e$sit-,

ii
DECLARATION
0I he$eb- de)"&$ed th&t this thesis tit"ed 1Aut#m&ti) B#tt"e Fi""i( W&te$ S-stem Usi( PLC2
is the $esu"t #! m- #' e!!#$t e3)e4t &s )"e&$"- st&ted i $e!e$e)es the s#u$)e #! $e!e$e)e5
Signature :-
ame of Author :- !!!!!!
D&te 67 !!!!!

iii

To my beloved father, mother, brother and sister

i"
ACKNOWLEDGEMENT
Fi$st #! &""8 I '#u"d "i.e t# th&. L#$d 9RISHNA !#$ HIS !i$m h&ds i (uidi( me i the )#u$se #! )#m4"eti(
this thesis '$iti(: It is b- HIS ($&)e &d me$)- th&t I &m &b"e t# #bt&i the $ese&$)h # 4"&i( 4$#;e)t 'ithi su)h &s
"imited time:
Se)#d8 I '#u"d "i.e t# e34$ess m- ($&titude &d th&.s t# m- F&)u"t- Assist&ts8 M$s: M:CHITRA + L:Chit$&8 !#$ his
4$#!essi#&" (uid&)e8 'isd#m8 edu$&)e8 &d/i)es m#ti/&ti# &d e)#u$&(emet du$i( his su4e$/isi# 4e$i#d:
Th&. -#u s# mu)h !#$ the isi(hts &d e)#u$&(emet she h&s (i/e t# me: With#ut his 4&tie)e &d /&"u&b"e
&ssist&)e8 the 4$#;e)t &d thesis '#u"d #t h&/e bee the s&me &s 4$eseted he$e:
Besides th&t8 I '#u"d "i.e t# )#/e- m- th&.s t# m- be"#/ed 4&$ets8 M$: Umesh P$&s&d Si(h &d M$s:
P##&m Si(h !#$ the &d/i)e &d (i/e &"" su44#$t t# me i de/e"#4i( this 4$#;e)t:
M- !e""#' !$ieds sh#u"d &"s# be $e)#(i<ed !#$ thei$ su44#$t &t /&$i#us )#diti#s: Thei$ /ie's &d ti4s &$e use!u"
ideed: U!#$tu&te"-8 it is #t 4#ssib"e t# "ist &"" #! them i this "imited s4&)e: Ad "&st but #t "e&st8 I &m ($&te!u" t# &""
m- !&mi"- membe$s:



"
ABSTRACT
N#'&d&-s8 the &44"i)&ti# #! PLC is 'ide"- .#' &d use i this di(it&" '#$"d PLC2s &44"i)&ti# is #b/i#us"-
&44"ied &t the idust$i&" se)t#$: N#$m&""-8 the PLC2s th&t h&/e bee used &t the idust$i&" !ie"d is usu&""- t# )#t$#" &
me)h&i)&" m#/emet eithe$ #! the m&)hie #$ he&/- m&)hie i #$de$ t# )$e&te & e!!i)iet 4$#du)ti# &d &))u$&te
si(&" 4$#)essi(: I this 4$#;e)t8 & dis)ussi# &b#ut PLC &44"i)&ti# 'i"" be e34"&ied i m#$e det&i"s &d s4e)i!ied:
Whe$eb-8 & m&)hie th&t used t# 4$e4&$e &ut#m&ti) !i""i( '&te$ it# the b#tt"e is !u""- )#t$#""ed b- the PLC CPM=A8
'hi)h &)ts &s the he&$t #! the s-stem: The s-stem se%ue)e #! #4e$&ti# is desi(ed b- "&dde$ di&($&m &d the
4$#($&mmi( #! this 4$#;e)t b- usi( C>7P$#($&mme$ s#!t'&$e: Ses#$ usu&""- 4"&-s its /it&" 4&$t &s & i4ut si(&"
t$&smitte$ !#$ the PLC i this s-stem: Du$i( this 4$#;e)t ses#$ h&s bee used t# dete)t the b#tt"e 4#siti# th&t m#/e
&"#( the )#/e-#$ be"t &t the "#' s4eed 'hi"e the m&)hie #4e$&tes: The i4ut si(&" th&t h&s bee set !$#m the
ses#$ t# the PLC h&s bei( m&de &s & $e!e$e)e: Si(&" i #$de$ t# dete$mie the #ut4ut si(&" th&t e3&)t"- & s&me
'ith the PLC 4$#($&mmi( "&(u&(e b&sed # the use$ $e%ui$emet: Beside th&t8 the e"e)t$#i)s &d e"e)t$i) de/i)es
th&t usu&""- bee )#t$#""ed b- the PLC &$e "i.e & m#t#$8 4um48 ses#$8 )#/e-#$ be"t8 bu<<e$ &d the #the$s de/i)es:

"i
TABLE OF CONTENTS
#$A%TE& TIT'E
%A(E
TIT'E %A(E
i
)E#'A&ATI*
ii
)E)I#ATI*
iii
A#+*,'E)(E-ET
i"
A.ST&A#T
"
TA.'E *F #*TETS
"i
'IST *F TA.'ES
i/
'IST *F FI(0&ES
/
'IST *F A%%E)I1S
/ii
2 .A#+(&*0) *F %&*3E#T
2
2!2 Introduction
2
2!2!2 *pen-'oop Systems
4
2!2!4 #lose-'oop Systems
5
2!4 %ro6lem Statement
7
2!5 %ro8ect *68ecti"e
9
2!: Scope of %ro8ect
9
2!7 Implementation of %ro8ect
;
2!9 Thesis *utline
<
4 'ITE&AT0&E &EVIE,
2=
4!2 $istory of %'#
2=
4!4 ,hat is %'#>
24
4!5 'adder 'ogic
25
4!5!2 'adder 'ogic Input
2:
4!5!4 'adder 'ogic *utput
27
4!: %rogramming
2;
4!7 *peration of %'#
2<
4!9 Time &esponse
2?
5 -ET$*)*'*(@
44
5!2 -ethodology *"er"ieA
44
5!4 $oA )oes the System ,orB
4:
5!5 $ardAare )esign
47
5!2!2 #on"eyor System
47
5!2!4 -otor
49
5!2!5 Infrared Sensor
4;


Vii
CHAPTER TITLE PAGE
: E'E#T&I# )ESI(
4?
:!2 )# Input
4?
:!4 A# Input
54
:!5 &elay *utput
55
:!5 Transistor *utput
57
7 %&*(&A--I( )EVE'*%-ET
5;
7!2 A Systematic Approach of #ontrol System )esign
5;
7!4 State )iagram
:=
7!5 Assignment of Inputs and *utputs
:2
7!: 'adder )iagram
:4
6 FINAL RESULT
44
9!2 The %rototype
::
9!4 The ,iring System
:9
9!5 The $ardAare )esign
:;
7 CONCLUSION AND RECOMMENDATION
49
;!2 #onclusion
:?
;!4 Future &ecommendation
7=
REFERENCES
51
APPENDIX
53

"iii
LIST OF TABLES
TA.'E *! TIT'E
%A(E
7!2 Assignment of Inputs!
:2
7!4 Assignment of *utputs!
:2

i/
LIST OF FIGURES
FI(! o! TIT'E
%A(ES
2!2 .locB diagrams of open-loop system
4
2!4 .locB diagrams of closed-loop system
5
2!5 %ro8ect FloA #hart
;
4!2 Typical of %'#
24
4!4 A Simple &elay #ontroller
2:
4!5 'adder 'ogic Inputs
27
4!: 'adder 'ogic *utputs
29
4!7 A Simple 'adder 'ogic )iagram
2;
5!2 )esign of %ro8ect
45
5!4 #on"eyor )esign
4:
5!5 )# -otor
47
5!: .asic I& recei"eCtransmit
4;
:!2 *utput for % and %% sensor
4?
:!4 Internal )# input circuit diagram
5=
:!5 ,iring of A# input
52
:!: Internal input circuit diagram
54
:!7 ,iring of &elay *utput
55
:!9 Internal &elay *utput )iagram
55
:!; ,iring of Transistor for % Type
5:
:!< Internal *utput #ircuit )iagram for % Type *utput
57
7!2 A Systematic Approach to %rogramma6le #ontrol )esign FloA #hart
5<
7!4 State )iagram of the *peration!
5?
7!5 .locB )iagram of %lant
:=
7!: 'adder )iagram
:4
9!2 The system from side "ieA
::
9!4 The system from top "ieA
::
9!5 The system from front "ieA
::
9!: The %'# electrical Airing system
:7
9!7 The e/ternal poAer supply
:7
9!9 The con"eyor system
:9
9!; The 6uDDer circuit
:9
9!< The I& sensor circuit
:9
9!? The process of the filling Aater
:;

1

LIST OF APPENDICES
A%%E)I1 TIT'E
%A(E
A )ata Sheet of #%-4A
75

. #ircuit of I& Emitter and )etector
9<
# )ata Sheet of '-54:
;=

#$A%TE& 2

BACKGROUND OF PROJECT
2!2 Introduction
C#t$#" e(iee$i( h&s e/#"/ed #/e$time: I the 4&st8 hum&s 'e$e the m&i meth#d !#$
)#t$#""i( & s-stem: M#$e $e)et"-8 e"e)t$i)it- h&s bee used !#$ )#t$#" &d e&$"- e"e)t$i)&"
)#t$#" '&s b&sed # $e"&-s: These $e"&-s &""#' 4#'e$ t# be s'it)hed # &d #!! 'ith#ut &
me)h&i)&" s'it)h: It is )#mm# t# use $e"&- t# m&.e sim4"e "#(i)&" )#t$#" de)isi#s: The
de/e"#4met #! "#' )#st )#m4ute$ h&s b$#u(ht the m#st $e)et $e/#"uti#8 the P$#($&mm&b"e
L#(i) C#t$#""e$ *PLC,: The &d/et #! the PLC be(& i the ?@ABs8 &d h&s be)#me the m#st
)#mm# )h#i)e !#$ m&u!&)tu$i( )#t$#"s: C?D:
PLC h&s bee (&ii( 4#4u"&$it- # the !&)t#$- !"##$ &d 'i"" 4$#b&b"- $em&i 4$ed#mi&t !#$
s#me time t# )#me: M#st #! this be)&use #! the &d/&t&(es67
C#st e!!e)ti/e !#$ )#t$#""i( )#m4"e3 s-stems
F"e3ib"e &d )& be $e&44"ied t# )#t$#" #the$ s-stems %ui)."- &d e&si"-
C#m4ut&ti#&" &bi"ities &""#' m#$e s#4histi)&ted )#t$#"
Trouble shooting aids make programminng easier and reduce downtime.
Reliaable componnents make these likely to operate for years before failure.
C#t$#" s-stems &$e & ite($&" 4&$t #! m#de$ s#)iet-:It )#sists #! subs-stems &d 4$#)esses
&ssemb"ed !#$ the 4u$4#se #! )#t$#""i( the #ut4uts #! the 4$#)esses:The$e &$e m&-
ume$#us &44"i)&ti#s th&t usi( )#t$#" s-stem &$#ud us: A )#t$#" s-stem 4$#/ides & #ut4ut
#$ $es4#se !#$ & (i/e i4ut #$ stimu"us:The $e&s# th&t )#t$#" s-stem '&s bui"t is!#$ 4#'e$
&m4"i!i)&ti#8 $em#te )#t$#"8 )#/eie)e #! i4ut !#$mE &d )#m4es&ti# !#$ distu$b&)es:
T#d&- )#t$#" s-stems !id 'ides4$e&d &44"i)&ti# i the (uid&)e8 &/i(&ti#8 &d
)#t$#" #! missi"es &d s4&)e)$&!ts8 &s 'e"" &s 4"&es &d shi4 &t se&: The &44"i)&ti#s &"s#
th$#u(h#ut the 4$#)ess )#t$#" idust$-8 $e(u"&ti( "i%uid "e/e" t&.s8 )hemi)&" )#)et$&ti#s i
/&ts8 &s 'e"" &s thi).ess #! !&b$i)&ted m&te$i&":

4





1





2.2 What i a PLC!
A %rogramma6le 'ogic #ontrollerE %'# is a digital computer used for automation
of industrial processesE such as control of machinery on factory assem6ly lines!
0nliBe general-purpose computersE the %'# is designed for multiple inputs and
output arrangementsE e/tended temperature rangesE immunity to electrical
noiseE and resistance to "i6ration and impact! %rograms to control machine
operation are typically stored in 6attery-6acBed or non-"olatile memory! A %'# is
an e/ample of a real time system since output results must 6e produced in
response to input conditions Aithin a 6ounded timeE otherAise unintended
operation Aill result!F<G
A %'# (i!e! %rogramma6le 'ogic #ontrollerH is a de"ice that Aas in"ented to
replace the necessary seIuential relay circuits for machine control! The %'#
AorBs 6y looBing at its inputs and depending upon their stateE turning onCoff its
outputs! The user enters a programE usually "ia softAareE that gi"es the desired
results! %'# are used in many Jreal AorldK applications! If there is industry
presentE chances are good that there is a plc present! Almost any application
that needs some type of electrical control has a need for a %'#! F<G
2.3 Ladder Logic
Ladder logic is the main programming method used for PLC. As mention before,
ladder logic has been deeloped to mimic relay logic. The decision to use the relay logic
diagrams was strategic one. !y selecting ladder logic as the main programming method,
the amount of retraining needed for engineers and trades people was greatly reduce. "#$
-odern control systems still include relayE 6ut these are rarely used for logic! A
relay is a simple de"ice that uses a magnetic field to control a sAitch! &elay are
used to let one poAer source close a sAitch for another poAer sourceE Ahile
Beeping isolated! An e/ample of a relay in a simple control application is shoAn
in Figure4!4! In this system the first relay on the left is used as normally closedE
and Aill alloA current to floA until a "oltage is applied to the input A! The second
relay is normally open and Aill not alloA current to floA until the "oltage is
applied to the input .! If current is floAing through the first tAo relay then
current Aill floA though the coil in the third relayE and closed the sAitch for
output #! This circuit Aould normally 6e draAn in the ladder logic form! This can
6e read logically as # Aill 6e on if A is off and . is on! F9G


2.3.1 Ladder Logic Inputs
%'# inputs are easily represented in ladder logic! In Figure 4!5 there are three
types of inputs shoAn! The first tAo are normally open and normally closed
inputsE discussed pre"iously! The IIT (Immediate InputH function alloAs inputs to
6e read after the input scanE Ahile the ladder logic is 6eing scanned! This alloAs
ladder logic to e/amine input "alues more often than once e"ery cycle! (ote:
This instruction is not a"aila6le on the #ontrol 'ogic processorsE 6ut is still
a"aila6le on older models!H F9G
2.3.2 Ladder Logic Outputs
In ladder logic there are multiple types of outputsE 6ut these are not consistently
a"aila6le on all %'#! Some of the outputs Aill 6e e/ternally connected to de"ices
outside the %'#E 6ut it is also possi6le to use internal memory locations in the
%'#! Si/ types of outputs are shoAn in Figure 4!:! The first is a normal outputE
Ahen energiDed the output Aill turn onE and energiDe an output! The circle Aith a
diagonal line through is a normally on output! ,hen energiDed the output Aill
turn offE this type of output is not a"aila6le on all %'# types! ,hen initially
energiDed the OSR (*ne Shot &elayH instruction Aill turn on for one scanE 6ut
then 6e off for all scans afterE until it is turned off! The L (latchH and U (unlatchH
instructions can 6e used to locB outputs on! ,hen an L output is energiDed the
output Aill turn on indefinitelyE e"en Ahen the output coil is reenergiDed! The
output can only 6e turned off using a U output! The last instruction is the IOT
(Immediate *utputH that Aill alloA outputs to 6e updated Aithout ha"ing to Aait
for the ladder logic scan to 6e completed! F9G
Figure 4!: 'adder 'ogic )iagram
2.4 Programming
%rogramming softAare #1-%rogrammer has 6een utiliDed in this pro8ect! #1-
%rogrammer is a %'# programming tool for the creationE testing and
maintenance of programs associated Aith *-&*Ls #%-4A series! It pro"ides
facilities for the support of %'# de"ices and address information and for
communications Aith *-&* %'#s and their supported netAorB types! An
e/ample of ladder logic can 6e seen in Figure 4!7! To interpret this diagram
imagines that the poAer is on the "ertical line on the left hand sideE Ae call this
the hot rail! *n the right hand side is the neutral rail! In the figure there are tAo
rungsE and on each rung there are com6inations of inputs (tAo "ertical linesH
and outputs (circlesH! If the inputs are opened or closed in the right com6ination
the poAer can floA from the hot railE through the inputsE to poAer the outputsE
and finally to the neutral rail! An input can come from a sensorE sAitchE or any
other type of sensor! An output Aill 6e some de"ice outside the %'# that is
sAitched on or offE such as lights or motors! In the top rung the contacts are
normally open and normally closed! This means if input A is on and input . is offE
then poAer Aill floA through the output and acti"ate it! Any other com6ination
of input "alues Aill result in the output X 6eing off! F;G
Figure 4!7: A Simple 'adder 'ogic )iagram
2.5 Operation of PLC
A %'# AorBs 6y continually scanning a program! ,e can thinB of this scan cycle
as consisting of 5 important steps! There are typically more than 5 6ut Ae can
focus on the important parts and not Aorry a6out the others! Typically the
others are checBing the system and updating the current internal counter and
timer "alues! F7G
%tep 1&CHECK INP! "!#!"&'irst the PLC takes a look at each input to determine if it is on or
off. (n other words, is the sensor connected to the first input on) *ow about the second input) *ow
about the third... (t records this data into its memory to be used during the ne+t step.
%tep ,&E$EC!E P%O&%#'&-e+t the PLC e+ecutes your program one instruction at a time.
.aybe your program said that if the first input was on then it should turn on the first output. %ince it
already knows which inputs are on/off from the preious step it will be able to decide whether the
first output should be turned on based on the state of the first input. (t will store the e+ecution results
for use later during the ne+t step.
%tep 0&P(#!E O!P! "!#!"&'inally the PLC updates the status of the outputs. (t updates
the outputs based on which inputs were on during the first step and the results of e+ecuting your
program during the second step. !ased on the e+ample in step , it would now turn on the first output
because the first input was on and your program said to turn on the first output when this condition is
true.
After the third step the PLC goes back to step one and repeats the steps continuously. 1ne scan time
is defined as the time it takes to e+ecute the 0 steps listed aboe.
2.) !ime %esponse
The %'# can only see an input turn onCoff Ahen itLs looBing! In other AordsE it
only looBs at its inputs during the checB input status part of the scan!
(n the diagram, input 1 is not seen until scan ,. This is because when input 1 turned on, scan
1 had already finished looking at the inputs. (nput , is not seen until scan 0. This is also because
when the input turned on scan , had already finished looking at the inputs.
(nput 0 is neer seen. This is because when scan 0 was looking at the inputs, signal 0 was not
on yet. (t turns off before scan 2 looks at the inputs. Therefore signal 0 is neer seen by the plc. -ow
let3s consider the longest time for an output to actually turn on. Let3s assume that when a switch turns
on we need to turn on a load connected to the plc output.
The diagram 6eloA shoAs the longest delay (Aorst case 6ecause the input is not
seen until scan 4H for the output to turn on after the input has turned on!F<G The
ma/imum delay is thus 2 "a# "$"%& ' 1 i#()t *&%a$ ti+&.
Pu*se stretc+ function. This function e+tends the length ofthe input signal until the plc looks at the
inputs during the ne+tscan.4 i.e. it stretches the duration of the pulse.5
Interrupt function. This function interrupts the scan toprocess a special routine that you hae
written. i.e. As soon as the input turns on, regardless of where the scan currently is,the plc
immediately stops what its doing and e+ecutes aninterrupt routine. 4A routine can be thought of as a
miniprogram outside of the main program.5 After its done e+ecuting the interrupt routine, it goes
back to the point it leftoff at and continues on with the normal scan process.
CH#P!E% 3

'E!HO(OLO&,
This chapter will mainly discuss about the methodology of the pro6ect and also the aspect or
factors that must be taken into consideration during the deelopment process. All this factors were
ery important to make sure the pro6ect will achiee it ob6ectie. .oreoer, this chapter will also
discuss about the designation stage on this pro6ect including electronic design, hardware design and
material selection.
3.1 Pro-ect O.er.ie/
In this sectionE it Aill discuss an o"erall o"er"ieA of Automatically Filling ,ater
System 0sing %'# pro8ect! The introduction to system tasB Aill also 6riefly
e/plain in this chapter! FinallyE the entire decision maBing Aill 6e addressed in
this section!
.asicallyE softAare and
hardAare design Aill 6e used in order to implement this pro8ect! In additionE
there some methods must 6e e/ecuted to Beep this pro8ect implemented
successfully!

3.2 ,-. D-& th& S$t&+ W-/0!

Figure 5!2: )esign of %ro8ect
Through this pro8ectE the 6ottle Aill mo"e on the con"eyor 6elt! The con"eyor
Aill 6e stopped automatically after the infrared sensor detected the presence of
the 6ottle! The controller Aill sAitch on the pumps Ahen the con"eyor stops to
mo"e! The Aater pump Aill start to fill into the 6ottle! The filling process Aill 6e
stopped automatically 6y using the timer and Aill 6e turn on and 6uDDer Aill
sound for fi"e seconds su6seIuently! This system Aill repeat the process
continuously!
3.3 Hard/are (esign
(n the hardware design part, oerall component such as coneyor system, motor,
infrared sensor, pump and bu77er circuit will be integrated to form the complete prototype.
The hardware components are the backbone of the system. .ore detailed information of each
section will be discussed in the following sections.
3.3.1 Con.e0or "0stem
'igure 0.,8 Coneyor 9esign

The dimension of the prototype is appro+imately 1: inch of length and three inch of width. This
prototype consist of motor, trek, gear and other electronic circuit. (t presents a continually moing
surface that is designed to moe ob6ects from one location to another. Coneyor belt is a long loop of
rubber or plastic 4usually combined with steel for strength, 6ust like tire treads5, that is wrapped
around a set of motori7ed rollers. A simple coneyor belt will be stretched between two rollers, one
drien roll which powers it and one idle roll which is free to spin as the belt moes.
3.3.2 'otor
.otor is a small electronic deice that can moe if the power supply connect. (t is a main part to
make the coneyor belt moes perfectly. There are many type of 9C .otor at market such as gear
9C motor, motor sero and stepper motor but in this pro6ect 9C motor will be used because it can
spin 0;<= continuously. .oreoer, it is strong enough to moe the trek.
Figure 5!5: )# -otor
'igure 0.0 aboe shows the sample of the 9C motor. 9C motor or direct current motor is
the most common motor. There are many types of 9C motor likes >&pole motor, seromotor,
brushless motor, coreless motor, fi+ magnet motor and many more. 9C motor takes direct current
oltages as input and conerts it into a rotational moement.
)# motor 6asically ha"e tAo AiresE and can directly poAered from a 6attery or
other )# poAer supply! )# motor also can 6e poAer from the dri"er circuit that
can regulate the speed and direction of the motor! The usual "oltages of the )#
motor use are 9V and 24V! The current rating depends on the maBe of the
con"eyor 6uild for and it is usually 6etAeen IA and 5A! Varying the "oltage input
to the motor Aill "aries the speed of motor accordingly!
)# motor has a6ility to turn at high
re"olution per minutes (&%-H 6ut has loA torIue! The most significant limitation
of the )# motor is the loA output torIue! The speed can 6e reduced and the
torIue increase 6y adding gear rain to the output shaft! For the purpose of
con"eyor 6elt 6uildingE )# motor is the cheapest compare to stepper motor or
ser"o motor!
3.3.3 Infrared "ensor
This sensor proides the system with ability to detect the presence of ob6ect position. The
theory is the (R emitter emits infrared light. (f an ob6ect presence the signal will be reflected back to
the receier. Then, the (R detector implemented will detect the reflected light. Then, the
correspondence signal sends to the PLC for being analy7e. "#$
.ased on the measurement of the intensity of the reflected light from the target
area such a 6ottleE it has a light source sending light to the mo"ing target and a
light sensor recei"ing the light! The output signal from the sensor decreases
e/ponentially Aith the increase of the distance to the measured o68ect! Infrared
light-emitting diodes ('E)MsH and photosensiti"e diodes are used in this
transducer! The sensor output is in"ersely proportional to the amount of
occupation! A multilinB array of light sensiti"e elements and a light-6eam
scanning techniIue determines and Iualifies the shape of the measured o68ect
6y processing data from the elements!

Figure 5!: shoAs the electro optical displacement transducersE a N transducer
Aith mo"ing targetE 6 N dimension sensorO f = displacementE 2 = mo"ing target
Aith light reflectorE 4 = light sourceE 5 N light sensorE : N o68ect to 6e gage!
CH#P!E% 4
ELEC!%IC#L (E"I&N
?lectrical design of the Automatic 'illing @ater %ystem inoles the electrical components used, and
the installation of the electrical components on the system. !efore all connection was established all
the input and output deices to PLC, the concept on how the input and outputs circuits of PLC must
be understood. The wiring of the 9C input, AC input, relay output, and the transistor output is
discussed.
4.1 (C Input
Typically, dc input modules are aailable that will work with >, 1,, ,2, and 2#A. the connections of
the 9C input modules is either P-P4 sourcing5 or -P-4 sinking5 transistor types deices. 'or a
regular switch 4i.e. toggle or pushbutton, etc5, typically no need to worry about whether wire it as
-P- or P-P. .ost PLCs not allow mi+ -P- and P-P deices on the same modules.
The difference 6etAeen the tAo types is Ahether the load sAitched to ground or
positi"e "oltages! An % typeLs sensor has the load sAitches to ground
Ahereas a %% de"ice has the load sAitches to positi"e "oltage! Figure :!2 is
shoAn the output for % and %% sensor!


Figure :!2: *utput for % and %% sensor
1n the -P- sensor, one output is connected to the PLC input and the other output to the power
supply ground. (f the sensor is not powered from the same supply as the PLC, both grounds should
be connected together.
1n the P-P sensor, connect one output to positie oltages and the other output to the PLC input. (f
the sensor is not powered from the same supply as the PLC, both AB3s should be connected together.
The common terminal either gets connected to AB or ground where it3s connected depends upon the
type of sensor used. @hen using -P- sensor this terminal is connected to AB, when using a P-P
sensor this terminal is connected to <A4ground5.
A common switch 4i.e. limit switch, pushbutton, toggle etc5 would be connected to the input
in similar way. 1ne side of the switch would be connected directly to AB. The other end goes to the
PLC input terminal. This assumes the common terminal is connected to <A 4ground5. (f the common
is connected to AB the simply connect one end of the switch to <A 4ground5 and the other end to the
PLC input terminal.
The photo couplers are used to isolate the %'#s internal circuit from the inputs
as shoAn in Figure :!4! This eliminates the chance of any electrical noise
entering the internal circuitry! They AorB 6y con"erting the electrical input
signal to light and then 6y con"erting the light 6acB to an electrical signal to 6e
processed 6y the internal circuit!

Figure :!4: Internal )# input circuit diagram
4.2 #C Input

An ac "oltage is non-polariDedE means that there is no positi"e and negati"e
polarity! TypicallyE ac input modules are a"aila6le that Aill AorB Aith 4:E :<E
22=E and 44=V an ac de"ice is connected to input %'# as shoAn in Figure :!5
Figure :!5: ,iring of A# input
Commonly the ac ChotD wire is connected to the switch while the CneutralD goes to the PLC
common. The ac ground 40rd wire5 should be connected to the frame ground terminal of the PLC. AC
connection is typically color code. (n E% is commonly white 4neutral5, black 4hot5, and green 40rd
wire ground when applicable5. 1utside the E% its commonly coded as brown 4hot5, blue 4neutral5,
and green with yellow stripe 40rd wire ground when applicable5.
A common sAitch (i!e! limit sAitchE push6uttonE toggleE etcH Aould 6e connected
to the input terminals directly as shoAn in Figure :!:! *ne side of the sAitch
Aould 6e connected directly to %'# input! The other end goes to the ac hot Aire!
This assumes the common terminal is connected to neutral!

Figure :!:: Internal input circuit diagram
4.3 %e*a0 Output
1ne of the most common types of outputs aailable is the relay outputs. A relay can be used with
both AC and 9C loads. %ome forms of a load are a solenoid, bu77er, motor, etc. Always check the
specifications of the load before connecting it to the PLC output and make sure that the ma+imum
current it will consume is within the specifications of the PLC outputs.
Some types of loads are "ery decei"ing! These decei"ing loads are called
inducti"e loads! These ha"e a tendency to deli"er a J6acB currentK Ahen they
turn on! This 6acB current is liBe a "oltage spiBe coming through the system!
Typically a diodeE resistorE or other snu66ed circuit should 6e used to pre"ent
any damage to the relay!
Figure :!7: ,iring of &elay *utput
Figure :!7 is a typical method of connecting the outputs to the %'# relays! A#
supply or )# supply can 6e used as Aell connected to the output! A relay is non-
polariDed and typically it can sAitch either A# or )#! $ere the common is
connected to one end of the A# poAer supply or )# poAer supply and the other
end of the supply is connected to the load! The other half of the load gets
connected to the actual %'# outputs!
The relay is internal to the %'#! Its circuit diagram is shoAn in Figure :!9! ,hen
ladder diagram tells the outputs to turn onE the %'# Aill internally apply a
"oltage to the relay coil! This "oltage Aill alloA the proper contact to close!
,hen the contact closeE and e/ternal current is alloAed to floA through our
e/ternal circuit! ,hen the ladder diagram tell the %'# to turn off the outputE it
Aill simply remo"e the "oltage from the internal circuit there6y ena6ling the
output contact to release the load Aill than ha"e an open circuit and Aill
therefore 6e off!
4.4 !ransistor Output
The ne+t type of outputs is transistor type outputs. Typically a PLC will hae either -P- or P-P
type outputs. (t is important to note that a transistor can only switch a dc current. 'or this reason it
cannot be used with an ac oltage.
A transistor is a solid-state sAitch or an electrical sAitch! A small current applied
to the transistor 6ase (i!e! inputH and sAitch a much larger current through its
outputs! The %'# applies a small current to the transistor 6ase and the transistor
output JcloseK! ,hen itLs closedE the de"ices connected to the %'# output Aill 6e
turn on!
Figure :!;: ,iring of Transistor for % Type
Figure :!; shoAs hoA to connect the output de"ices to the transistor output for
% type transistor! If it Aere a %% typeE the common terminal is connected to
VP and V- Aould connect to one end of the load!
'igure 2.#8 (nternal 1utput Circuit 9iagram for -P- Type 1utput
There is a photo coupler isolating the Jreal AorldK from the internal circuit as
shoAn in Figure :!<! ,hen the ladder diagram call for itE the internal circuit turn
on the photo coupler 6y applying a small "oltage to the 'E) side of the photo
coupler! This maBe the 'E) emit light and the recei"ing part of the photo
coupler Aill see it and alloA current to floA! This small current Aill turn on the
6ase of the outputs transistor connection to output =7==! ThereforeE Ahate"er is
connected 6etAeen #*- and =7== Aill turn on! ,hen the ladder tell =7== to
turn offE the 'E) Aill stop emitting light and hence the output transistor
connected 6etAeen =7== and #*- Aill turn off!
CH#P!E% 5
P%O&%#''IN& (E1ELOP'EN!
A systematic approach of control system design using programming logic controller is presented in
this chapter. As a rule, the layout of the entire of Automatic 'illing @ater %ystem using PLC is
designed before implementing programming deelopment process. The machine seFuences of
operation will be discussed. -e+t, the assignment of input and outputs are shown in tables. 'inally,
the ladder diagram design using CG&Programmer are shown.

5.1 # "0stematic #pproac+ of Contro* "0stem (esign.
In generalE a control system is a collection of electronic de"ices and eIuipment
Ahich are in place to ensure the sta6ilityE accuracy and smooth transition of a
process or a manufacturing acti"ity! E"ery single component in a control system
plays an important role regardless of siDe!
.efore programmingE the concept of controlling a control
system is introduceE Ahich is the systematic approach of control system design
using a %'#! The operation procedure of the system approach is shoAn in Figure
7!2
Figure 7!2: A Systematic Approach to %rogramma6le #ontrol )esign FloA #hart
5.2 Stat& Dia1/a+
The general state diagram of the seIuences of operation is shoAn in Figure 7!4
6eloA!
Figure 7!4: State )iagram of the *peration
5.3 #ssignment of Inputs and Outputs
After the system seIuence of operation is determineE all e/ternal input and
output de"ices connected to the %'# must 6e determined and assigned the
num6er corresponding to the input and output num6er! Ta6le 7!2 and 7!4 shoAs
the assignment of inputs and outputs!
Ta6le 7!2: Assignment of Inputs!
Ta6le 7!4: Assignment of *utputs!
Figure 7!5: .locB )iagram of %lant
5.4 Ladder (iagram
A ladder diagram is produced according to the state diagram of the system and based on the system
operation and condition. 'igure >.0 shows the ladder diagram of the system.
The system in the ladder diagram form Aill 6e programmed into %'#! *nce the
programs ha"e 6een doAnloaded into %'#E it can 6e monitored in the )iagram
,orBspace during e/ecution! FurthermoreE the #1-programmer pro"ides on-line
editing functions during e/ecution! ote that the on-line editing is not possi6le
in &un mode! All acti"ities occurs can 6e o6ser"ed using the #1-programmer!
Figure 7!:: 'adder )iagram
CH#P!E% )
2IN#L %E"L!
As mentioned in Chapter 2 and Chapter >, all the system of the desired pro6ect was implemented and
the results of the systems illustrated in this Chapter ;. 9uring the operation, all actiities that occur
can be obsered by computer using CG&Programmer. The system needs to debug along the way and
fine tune if necessary. Test run the system thoroughly until if is safe to be operated.
).1 !+e Protot0pe
The prototype Aas mainly 6uilt 6y com6ining the mechanical design and the
electrical designs! The system reIuire three e/ternal )# poAer supply for input
output de"icesE tAo A# poAer supply for supplying pump and %'#E and one ?V
6attery for 6uDDer!
The pictures 6eloA shoA that the prototype of system from different "ieA:-
).2 !+e 3iring "0stem
.efore running the systemE thoroughly ensure that the input and Airing are
correctly connected according to the IC* assignment to a"oid any unAanted
accidents! *nce confirmedE the operation of the Automatic Filling ,ater System
using %'# can 6e started!
CH#P!E% 4
CONCL"ION #N( %ECO''EN(#!ION
An Automatic Filling ,ater System using %'# has 6een successfully constructed
and designed 6y applying all the concept of control system at this pro8ect! The
system that is produced can 6e modified to 6e 6etter if some of the electrical
de"ices and system are upgraded and impro"ed!
4.1 Conc*usion
The theory and concept of the automatic filling Aater system is 6ased on the
control system! In electrical designE the features and functions of the electrical
components are reIuired to determine the system reIuirement! FurthermoreE
the theoretical of the Airing system is reIuired for connecting the inputs and
outputs de"ices to %'#! In programming designE understandings of the desired
control system and hoA to use the 'adder )iagram to translate the machine
seIuence of operation are the most important partsE 6ecause it ha"e direct
effect on the system performance! The main aim in this process is to apply %'#
to design automatic filling Aater system and all o68ecti"es in this pro8ect Aere
successfully done as planned! FinallyE the 6asis control system and logic design
apply in this pro8ect can 6e used as a references to design other applications of
automation systemE and also can 6e used as a teaching material for the
Industrial #ontrol su68ect!
4.2 2!%E %ECO''EN(#!ION
Actually, a lot of weakness from the pro6ect can be taken as future works so that the improed system
will be better in terms of performance. %o that, there are seeral recommendations or suggestions that
we can take to increase performance in this pro6ect. The performance of Automatic 'illing @ater
%ystem can be increased based on two recommendations which areH
The system that is proposed now is using only one sensor that is (R sensor to detect position
of bottle. (t will be better if we add more sensors in this system like a flow sensor to detect water
flow or use leel sensor to detect water leel. Thus, the system will be more sensitie as there will be
more sensing points
!esides using PLC as controller, the other controller can be used in this future work is like
.icrocontroller. *oweer, many factors must be considered like cost, practically and others.
%E2E%ENCE"
"1$ %iemens. IBasic Of PLCs %T?P ,<<< series, %iemens Technical ?ducation Program.
",$ -orman %. -ice IControl System Engineering3. Third ?dition. California %tate Polytechnic
Eniersity Pomona. John @iley K %on, (nc, ,<<
"0$ Colin 9. %impson
IProgrammable Logic Controllers Regents3 Prentice *all.
"2$ -oel .. .orris
IControl Engineering3 .c LRA@&*(LL !ook Company 4EM5 Limited.
">$ Lug, J. N. %., @alker, .. @., and Paul, R. P. 41:#<b5. Resoled&Acceleration
Control of .echanical .anipulators. IEEE Trans. Automatic Control.
";$ !ateson, -.R. (ntroduction to Control %ystem Technology, %i+th ?dition, Enited %tate of
America8 Prentice *all.1:::.
"O$ .anual book, IA Beginners Guie to PLC! ersion ,.1. %ingapore8 1mron.,<<1.
"#$ http8PP www.plcs.netPdefault.html
F?G http:QQ AAA!sea!siemens!comQstepQdefault!html
"1<$ http8PP www.seacheng.co.ukParticlesPplaPinde+.html
F22G http: QQ AAA!omron-ap!com
#PPEN(I$
A
#PPEN(I$
2
A%%E)I1
#

You might also like