Professional Documents
Culture Documents
Automatic Bottle Filling
Automatic Bottle Filling
CHAPTER ONE
BACKGROUND OF PROJECT
1.1 Introduction
Control engineering has evolved overtime. In the past, humans were the main method for controlling a system.
More recently, electricity has been used for control and early electrical control was based on
relays. These relays allow power to be switched on and off without a mechanical switch. It is
common to use relay to make simple logical control decisions. The development of low
cost computer has brought the most recent revolution, the Programmable Logic Controller (PLC).
The advent of the 89S52began in the 1970s, and has become the most common choice for
manufacturing controls.
89S52has been gaining popularity on the factory floor and will probably remain predominant
for some time to come. Most of this because of the advantages:
Control systems are an integral part of modern society. It consists of subsystems and processes assembled for the
purpose of controlling the outputs of the processes. There are many numerous applications that using control system
around us. A control system provides an output or response for a given input or stimulus. The reason that control
system was built is for power amplification, remote control, convenience of input form; and compensation for
disturbances. Today control systems find widespread application in the guidance, navigation, and control of missiles
and spacecrafts, as well as planes and ship at sea. The applications also throughout the process control industry,
regulating liquid level tanks, chemical concentrations in vats, as well as thickness of fabricated material.
ii
variable. Other signals, such as disturbances are shown added the controller & process outputs via
summing junctions, which yields the algebraic sum of their input signals using associated sign.
The distinction characteristics of an open loop system is that it cannot compensate for any
disturbances that added to the controllers driving signals. The output of an open loop system
computed not only by the signals that add to the controllers commands but also the disturbances
at the output. The system cannot correct for these disturbances & are simply commanded by the
input.
ii
The first summing junction algebraically adds the signal from the input to the signal from the
output which arrives via the feedback path, the returned path from the output to the summing
junction. In the figure above, output signal is subtracted from the input signal. The result is
generally called the actuating signal.
The closed loop system compensated for disturbances by measuring the output response, feeding
the measurement back through a feedback path, & comparing that response to the input at the
summing junction. If there is any difference between the two responses, the system drives the
plant, via the actuating signal to make correction. If there is no difference the system does not
ii
drive the plant since the plants response is already the desired response. To compared between
open loop system & closed loop system; closed loop system has the obvious advantage of greater
accuracy than open loop system.
The system are less sensitive to noise, disterbance,in the change in enviroment. Transient response
in steady state eror can be controlled more convinently & with greater flexibility in closed loop
system,often by simply adjutments of gain in the loop & sometimes by redesigning the controller.
in summery, systems that perform the priviously described measurement & correction are called
cosed loop or feedback control system.
ii
ii
In this section, seven chapters will briefly discused.in chapter one the introdussing of
automatically filling bottle system using 89S52will mainly discuss about the project objective and
scope in order to achieve the desired goal.
After that, chapter two ; litrature review will coverd all explanation about the main type of
89S52available and type of 89S52has been choosen for this project with the reason of selection.
Besides, this chapter wll review other related and background project that have been develop in
other countries for the same purpose.
Chapter three,methadology will decribe about the over all project that has been testified and
successfully operate. Come along with this chapter an explanation about material selection which
is including controller, moto and sensor. In order to design a good project, the descission making
for each electronic programming are briefly discuss in this chapter.
Chaptr four, electrical design, will discuss about electrical compenents used, and the instalations
of electrical compenents on the system.this chapter also discuss the concepts of how the input and
outputs of 89S52shuold be understood.
After that, programming devlopment will be discussed in chapter five. A systematic aproach of
control system design using 89S52presented. The machine sequence of operation will be discussed
next. The assignments of input and output are shown in tables.
ii
CHAPTER TWO
LITRATURE REVIEW
2.1 History of PLC
89S52were first introduced in 1960s. the primary reason for such adevice was eliminating the
large cost involved in replacing the complicated relation based machine control system.Bedford
associates proposed something called amodular digital controller(MODICON) to major US car
manufacture. Other companies at the time proposed computer based schemes.one of which of
based up on PDP-S. the MODICON OS4 brought the words first 89S52in to commertial
production.
When aproduction requirements changed so did the control sytem. This becomes very expenssive
when the change is frequent, scincerelays are mechanical device that also have alimited life time
which required strict adhesion to maintenance schedule. Troubleshooting was also quite tedious
when so many relays are involved.
These new controllers also had to be easly programmed by maintenance are plant engineers.the
life time had to be long and programming changes easly performance. They also had to servive the
harsh industrial enviroment.
ii
machine control. They are capable of storing instructions, such as sequencing, timing, counting,
arithmetic, data manipulation and communication, to control machines and processes.
89S52have many definitions for example: According to NEMA(National Electrical Manufactures
Association ,USA),the definition of 89S52has been given as Digital electronic devices that uses a
programmable memory to store instructions and to implement specific functions such as logic ,
sequencing, timing, counting, and arithmetic to control machines and processes.
Figure below illustrates conceptual diagram of 89S52application
Basic parts of PLC:All programmable controllers contain a CPU, memory, power supply, I/O modules, and
programmable devices. Basic parts of the 89S52are as follows: Processor
Memory
Input/output devices
ii
Scanning
Execution of program
Peripheral and external device communication
ii
Self- diagnostic
Power of PLCs depends on the type of microprocessors being used. Small size PLCs use 8-bit
microprocessors where as higher order controllers use bit-slice microprocessor in order to
achieve faster instruction execute. Modern day PLCs vary widely in their capabilities to control
real world devices, like some processors are able to handle the I/O devices as few as six and
some are able to handle 40000 or more. The no. of input/output control of PLCs depends on
the,hardware, software, overall capacity and memory capability of the PLCs.
The CPU upon receiving instruction from the memory together with feedback on the status of the
I/O devices generates commands for the output devices. These commands control the devices on a
machine or a process. Devices such as solenoid valves, indicator lamps, relay coils and motor
starters and typical loads to be controlled.
The machine or process input elements transmit signal to input modules which in turn, generates
logic signal to the CPU.CPU monitors the input like selector switches, push buttons etc.
Operating system is the main workhouse of the system and hence performs the following tasks:
Note:- operating system stored in ROM(non volatile) memory, whereas application program are
stored in RWM(read-write memory).
There are many types of input modules to choose from. The type of input module selection
depends upon the process, some example of input modules are limit :-switches, proximity switches
and push buttons etc. nature of input classification can be done in three ways, namely:
low/high frequency
analog/digital (two-bit, multi-bit)
maintained or momentary
5V/24V/110V/220V switched
ii
Some most industrial power systems are inherently noisy:- electrical isolation is provided between
the input and the processor. Electromagnetic interference (EMI) and radio frequency interference
(RFI) can cause severe problems in most solid state control systems. The component used often to
provide electrical isolation within I/O cards is called an optical isolator or opto-coupler. Typically,
there are 8 to 32 input points on any one input modules. Each input point is assigned a unique
address by the processor.
Output modules:Output modules can be used for devices such as solenoids, relays, contractors, pilot lamps and
led readouts. Output cards usually have 6 to 32 output points on a single module. Output cards,
like input cards, have electrically isolation between the load being connected and the PLC.
Analog output cards are a special type of output modules that use digital to analog conversion.
The analog output module can take a value stored in a 12 bit file and convert it to an analog
signal. Normally, this signal is 0-10 volts dc or 4-20ma. This analog signal is often used in
equipment, such as motor-operated valves and pneumatic position control device. Each output
point is identified with a unique address.
Addressing scheme:Each I/O device has to be identified with a unique address for exchange of data. Different
manufacturer apply different method to identify i/o devices. One of the addressing schemes may
be X1 X2 X3 X4 X5 where
For example, 1 2 3 13 implies that input is at rack 2 , module slot no.3 and terminal address
no.13.
Programming unit:It is an external, electronic handheld device which can be connected to the processors of the
89S52when programming changes are required. Once a program has been coded and is considered
finished, It can be burned in to ROM. The contents of ROM cannot be altered, as it is not affected
by power failure. Now a days EPROM/EEPROM are provided in which program can be
debugged at any stage. Once the program is debugged, programming unit is disconnected; and the
89S52can operate process according to the ladder diagram or the statement list.
ii
Communications in PLC:There are several methods how a 89S52can communicate with the programmer, or even with
another PLC. PLCs usually built in communication ports for at least RS232, and optionally for
RS 485, and Ethernet. Mod bus is the lowest common denominator communication protocol.
Others are various field buses such as profibus, interbus-s, foundation field bus, etc.
PLCs are becoming more and more intelligent .in recent years, PLCs have been integrated in to
industrial networks, and all the PLCs in an industrial environment have been plugged in to a
network. The PLCs are then supervised by a control center. There exist many types of networks,
SCADA (supervisory control and data acquisition)
Operation of PLC:During program execution, the processor reads all the inputs, and according to control application
program, energizes and de-energizes the outputs. Once all the logic has been solved,
The processors will update all the outputs. The process of reading the inputs, executing the control
application program, and updating the output is known as scan. During the scan operation, the
processor also performs housekeeping tasks. The inputs to the PLCs are sampled by processor and
the contents are stored in memory. Control program is executed, the input value stored in memory
are used in control logic calculations to determine the value of output. The outputs are then
updated. The cycle consisting of reading of inputs, executing the control program, and actuating
the output is known as scan and the time to finish this task is known as scan time. The speed
at which 89S52scan depends upon the clock speed of CPU. The time to scan depends upon
following parameter: Scan rate
Length of the program
Types of functions used in the program
Faster scan time implies the inputs and outputs are updated frequently. Due to advance
techniques of ASIC (application specific integrated circuit) within the microcomputer for
specific functions, scan time of different PLCs have reduced greatly.
As PLCs have developed and expanded, programming languages have developed with them.
Programming languages allow the user to enter a control program into a 89S52using an
established syntax. Todays advanced languages have new, more versatile instructions, which
initiate control program actions. These new instructions provide more computing power for
ii
Ladder
Boolean
Grafcet
ii
Ladder logic is the main programming method used for PLC. As mention before, ladder logic has been
developed to mimic relay logic. The decision to use the relay logic diagrams was strategic one. By
selecting ladder logic as the main programming method, the amount of retraining needed for
engineers and trades people was greatly reduce. Modern control systems still include relay, but these are
rarely used for logic. A relay is a simple device that uses a magnetic field to control a switch. Relay are used to let
one power source close a switch for another power source, while keeping isolate.
Normally open
Normally closed
ii
IIT
2.4 Programming
Programming software CX-Programmer has been utilized in this project. An example of ladder
logic can be seen in Figure 2.5. To interpret this diagram imagines that the power is on the vertical
line on the left hand side, we call this the hot rail. On the right hand side is the neutral rail. In the
figure there are two rungs, and on each rung there are combinations of inputs (two vertical lines)
and outputs (circles). If the inputs are opened or closed in the right combination the power can
flow from the hot rail, through the inputs, to power the outputs, and finally to the neutral rail. An
input can come from a sensor, switch, or any other type of sensor. An output will be some device
outside the 89S52that is switched on or off, 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 B is off, then power
will flow through the output and activate it. Any other combination of input values will result in
the output X being off.
ii
ii
In the diagram, input 1 is not seen until scan 2. This is because when input 1 turned on, scan1 had
already finished looking at the inputs. Input 2 is not seen until scan 3. This is also
because when the input turned on scan 2 had already finished looking at the inputs. Input 3 is
never seen. This is because when scan 3 was looking at the inputs, signal 3 was not on yet. It turns
off before scan 4 looks at the inputs. Therefore signal 3 is never seen by the plc. Now lets
consider the longest time for an output to actually turn on. Lets assume that when a switch turns
on we need to turn on a load connected to the 89S52output.
The diagram below shows the longest delay (worst case because the input is not seen until scan 2)
for the output to turn on after the input has turned on. The maximum delay is thus 2 scan cycles
1 input delay time.
ii
CHAPTER THREE
METHODOLOGY
This chapter will mainly discuss about the methodology of the project and also the aspect
or factors that must be taken into consideration during the development process. All this factors
were very important to make sure the project will achieve its objective.
3.1Project Overview
In this section, we will discuss an overall overview of Automatically Filling liquid System Using
89S52project. The introduction to system task will also briefly explain in this chapter. Finally, the
entire decision making will be addressed in this section.
Basically, software design will be used in order to implement this project. In addition, there some
methods must be executed to keep this project implemented successfully. Below block diagram
shows implementation of our project
CHAPTER FOUR
AUTOMATIC BOTTLE FILLING AND CAPPING SYSTEM USING PLC
ii
Filling hose actuator: here the actuator moves the hose down until reach the bottle to fill
it. After that, the actuator will move the hose up.
Capping actuator: this actuator moves the capper with suitable speed and force, pressing
ii
But we are focused on belt conveyor which has two conveyor systems.
The first conveyer belt that carries the bottles to the track to be filled will be made of PVC
(polyvinyl Chloride) to allow for the bottle to slip if it hits the ratchet while another bottle is still
waiting to be grabbed. Also, this will enable us to use a DC motor with relatively small output
power and low speed. The second conveyer belt will be made out of rubber because we need
relatively high coefficient of friction with the bottle to prevent slippage. The motor used here will
be also a DC motor with relatively low speedtorque capabilities. This is because the load on the
conveyer belt will be low.
ii
ii
The filling process starts when a bottle is detected by the limit switches shown in Figure 4.2.1.
These limit switches alert the system when a bottle is detected by sending a detection signal to the
PLC. Consequently, the 89S52will send a stop_motor1 and stop_motor2 commands to both
motor1 and motor 2; controlling conveyer belts 1 and 2 respectively. This will ensure that the
bottle remains stationary while being filled with liquid. Now, a pneumatic actuator will move the
filling arm and head down to an elevation suitable for liquid filling to commence. Then a valve
opens, allowing for the liquid to flow into the bottle. As liquid flows into the bottle, an accurate
balance will continuously measure the weight of the bottle and the liquid filling it. The output
from the balance will serve as an indication of the liquid level present in the bottle. The liquid will
continue to flow until the desired liquid level (1L) is obtained. Figure 4.2.2 provides a schematic
of the arrangement.
ii
system.
The capping process starts when the limit switches detect the entry of a bottle. The detection is
again done though two limit switches fixed on the sides of the track which defines the motion of
the bottles. These limit switches will prompt the 89S52to issue a stop motor 1 and stop motor 2
commands to stop both conveyer belts. When the bottle has completely stopped, a pneumatically
actuated gripped is extracted to hold the bottle firm in it position so as to allow for the capping
process to be completed properly. As soon as the gripper extends fully, another pneumatic
actuator extends to push the capping head towards the filled bottle. Push force will result in the
cap being firmly attached to the bottle.
The moment this is done, both pneumatic actuators are retracted, and the 89S52issues as start
motor 1 and start motor 2 commands; causing both conveyer belts to start moving again. At the
end of the conveyer belt 2, the bottle is transferred to a labeling It is worth noting that both; the
filling and the capping processes, take place concurrently, however on different bottle. In other
words,when a bottle is detected by the filling system, the controller checks if another bottle has
been detected by the capping system. If the capping system has detected a bottle then the capping
process continues. However, if the capping system failed to detect a bottle, then the capping
process does not take place. In either case, the filling process is unaffected by the bottle detection
at the capping systems side. Furthermore, for this sequence to take place, the separation between
the two systems shall be a multiple of a bottles height. Therefore, a suitable separation between
the filling and the capping systems would be twice to three times the height of a bottle. This
separation constitutes a compromise between allowing for enough space between the equipment
with the lowest possible reduction in the production rate. Furthermore, as a safety precaution, as
soon as the start button is pressed, the system will check if the tank has enough milk in it and if the
capping system has enough caps placed in the caps compartment in the capping system.
ii
The purpose of this arrangement is to ensure that only one bottle leaves conveyer belt 1 at a time.
Furthermore, as soon as the bottle has been detected and has entered through the ratchet, an alert
ii
LED will light up, indicating that no more bottles shall be placed on the conveyer belt at this
moment. The LED will turn off as soon as the bottle starts moving. As the bottle enters the round
track it remains stationary until a gripper grabs it. There are eight gripper arranged in a starlike
pattern as shown in Figure4.2.1. Each gripper will grab one bottle at point A, and will release it
at point B after being filled and caped. Moreover, each gripper has a liquid filling mechanism, a
cap fitting mechanism and a balance attached to it. This arrangement is illustrated in Figure 4.3.
ii
As soon as the gripper grabs the bottle, a limit switch alerts the system that a bottle has been
grabbed. A pneumatic actuator is used to interchange the position of the filling and the cap fitting
mechanisms. In default position, the actuator is normally retracted. At this actuator position, the
filling mechanism is located straight above the empty bottle. At this moment, the 89S52issues a
start filling command. This will open the valve controlling the flow of liquid from the tank to the
bottle, thus allowing liquid to flow into the bottle. Liquid will flow continuously into the bottle
until the desired liquid level is achieved. In our design, we will depend on a balance to
continuously provide an indication of the level of liquid in the bottle. As soon as the balance
signals that the level of liquid in the bottle has reached the desired level1, the 89S52issues a stop
filling command. This will close the valve that controls the flow of liquid.
Now, after the filling process has been completed, the 89S52issues a start capping command. This
will force the pneumatic actuator to move the filling mechanism away from the bottle and bring
forth the capping mechanism. The capping mechanism consists of a caps holder, a stationary arm
and a capping arm/head. The capping arm/head can move up and down in a controlled manner.
Whenever the capping process starts, the capping arm/head will be forced to move down, pressing
the cap against the bottle. If enough force is applied, the cap will be fitted on the bottle. Once the
above mentioned processes (i.e. the filling and the capping processes) have been completed, the
bottle would have traveled from point A to point B on the circular track. At point B, a second
conveyer belt will move the filled bottle to a different place in the factory, where labeling and
packaging shall take place. It is important to note that we are assuming the level of liquid in the
tank is sufficient to provide for the minimum flow of liquid required for the bottle to be filled and
capped before reaching point B on the circular track.
ii
Figure 4.3.2: gripper, liquid filling and cap fitting mechanisms, and balance arrangement
4.4 Programming
We start programming with the first conveyor system using flowcharts and ladder diagram as
shown below
4.4.1 Conveyor System Flow Chart:
ii
ii
ii
A
CHAPTER FIVE
RESULTS AND DISSCUSSIONS
Once the start button is pressed the green light (L1) turns ON and remains ON until stop button is
pressed .As light turns ON out feed motor (M2) starts running. After M2 runs and if either limit
switch (LS) has not signaled or filled bottle condition is fulfilled motor (M1) starts. After limit
switch has signaled timer, T1 gets activated. After T1 gives done (DN) signal and photo eye
detector (PE) is disabled, solenoid valve gets in operation. As PE signals solenoid stops and buzzer
(Q) sounds after which timer, T2 gets enabled which stops the process for the set seconds. Once
the filled bottle condition is activated the cycle starts again.
The ladder diagram was successfully checked in the 89S52simulator and all the prescribed
conditions were observed completely.
ii
CONCLUSION
The theory and concept of the automatic filling water system is based on the control system. In
electrical design, the features and functions of the electrical components are required to determine
the system requirement. , the theoretical of the wiring system is required for connecting the inputs
and outputs devices to PLC. In programming design, understandings of the desired control system
and how to use the Ladder Diagram to translate the machine sequence of operation are the most
important parts, because it has direct effect on the system performance. The main aim in this
process is to apply 89S52to design automatic filling water system and all objectives in this project
were successfully done as planned. Finally, the basis control system and logic design apply in this
project can be used as a references to design other applications of automation system, and also can
be used as a teaching material for the Industrial Control subject.
RECOMMENDATION
Actually, a lot of weakness from the project can be taken as future works so that the improved system will
be better in terms of performance, So that, there are several recommendations or suggestions that we can
take to increase performance in this project. The performance of Automatic Filling Water System can be
increased based on two recommendations which are;
The system that is proposed now is using only one sensor that is griper sensor to detect
position of bottle. It will be better if we add more sensors in this system like a flow sensor
to detect water flow or use level sensor to detect water level. Thus, the system will be more
sensitive as there will be more sensing points
Besides using 89S52as controller, the other controller can be used in this future work is
like Microcontroller. However, many factors must be considered like cost, practically and
others.
ii
REFERENCES
1. Richard A. Cox, Technicians Guide to Programmable Controllers, 4th edition, Vikash
Publishing House, New Delhi
2.J. R. Hackworth, F.D. Hackworth, Programmable Logic Controllers
Programming
ii
APENDIX
ii
ii
Contents
Acknowledgementi
Table of Contents.ii
List of figures.iv
Abstract...v
CHAPTER ONE.............................................................................................................. 1
BACKGROUND OF PROJECT....................................................................................... 1
1.1 Introduction............................................................................................................ 1
1.1.1 Open loop system............................................................................................... 1
1.1.2 Closed loop system............................................................................................. 2
1.2 Problem statement.................................................................................................... 4
1.3 project objective...................................................................................................... 4
1.4 Implementation of project.......................................................................................... 5
CHAPTER TWO............................................................................................................. 8
LITRATURE REVIEW.................................................................................................. 8
2.1 History of PLC........................................................................................................ 8
2.2 What is a PLC?....................................................................................................... 8
2.3 Ladder Logic........................................................................................................ 14
2.3.1 Ladder Logic Inputs.......................................................................................... 15
2.3.2 Ladder Logic Outputs........................................................................................ 16
2.4 Programming........................................................................................................ 16
2.5 Operation of PLC................................................................................................... 17
CHAPTER THREE........................................................................................................ 20
METHODOLOGY..................................................................................................... 20
3.1Project Overview.................................................................................................... 20
CHAPTER FOUR.......................................................................................................... 21
AUTOMATIC BOTTLE FILLING AND CAPPING SYSTEM USING PLC..............................21
4.1 Components / Instruments used................................................................................21
4.1.1 Dc motor........................................................................................................ 21
4.1.2 Limit switch.................................................................................................. 21
ii
ii