Sunteți pe pagina 1din 18

A PROJECT REPORT ON AUTOMATIC CAN FILLING MACHINE

BY

400 LEVEL COMPUTER ENGINEERING STUDENTS

FOR

CPE 413
TITLE
Automatic Can Filling Machine

OBJECTIVES
To apply the knowledge of Programmable Logic Controller (PLC) to build an Automatic Can
Filling Machine.

APPARATUS
1. PLC MicroLogix 1400 (Allen Bradley)
2. Circuit breaker
3. 2 Relays
4. Contactor
5. Terminal blocks
6. Connecting wires
7. Normally open switch
8. Normally closed switch
9. Light-emitting diode (green and red)
10. Adapter (220V 24V) Converter
11. Valve (AC 220V)
12. Casing
13. Conveyor belt
14. Motor
15. Sensors (2 PNP normally open)
16. Cans (5)
17. Power cable

DESCRIPTION OF APPARATUS
1. PLC MicroLogix 1400: This is an Allen Bradley PLC. Its a relay PLC which has 20
inputs and 12 outputs. It is a 24V PLC that produces a maximum current of 2A.
2. Circuit breaker: This is a single phase circuit breaker that acts as a switch to power up the
system.
3. 2 Relays: Relays are used to connect AC devices to the output of the PLC and protect the
PLC. It has a DC24V coil and 8 terminals.
4. Contactor: This is generally used with a motor to start a motor. It is magnetically coiled.
5. Terminal blocks: These are used to spread a voltage across several points where they can
be se for different devices.
6. Connecting wires: These are used to connect all our components electrically.
7. Normally open switch: This is used for our start switch.
8. Normally closed switch: This is used for our stop switch.
9. Light-emitting diode (green and red): These are used to indicate when the machine is
operating (green) and when it is not functioning (red).
10. Adapter (220V 24V) Converter: This helps us to convert 220volts to 24volts.
11. Valve (AC 220V): This is used to control the flow of liquid into the cans.
12. Casing: This is where all our components are placed.
13. Conveyor belt: This is used to move the cans.
14. Motor: This is used to move the conveyor belt. It is an AC single phase motor.
15. Sensors (2 PNP normally open): This is used to sense the can when they are under the
liquid dispenser and they are inductive sensors and they are sourcing.
16. Cans (5): The liquid from the tank is filled into these.
17. Power cable: This is used to pass 220V to the circuit breaker.

THEORY
Programmable logic controller (PLC) is a solid state electronic device that is used in controlling
an output device with the aid of an input device and a user defined programme.
A PLC consists;
1. Input module.
2. Output module.
3. Central processing unit (CPU).
4. Memory.
5. Power supply.
Input module: This is where the input devices are connected which gives instructions to the
PLC using the user defined programme. They can either be sensors or switches.
Output module: This is where the device to be controlled are connected.
Types of PLC
1. Fixed PLC or compact PLC -: Every part of the PLC is joined all together.
2. Modular PLC -: The parts of the PLC can be separated and changed.

How to connect a switch to the input module of a PLC


PLC is basically defined by the number of outputs and inputs in it.

INPUT MODULE OF PLC + - 0 1 2 3 4 com


0, 1, 2, 3, 4 are input terminals, com is common for
all input terminals.
In each terminal, there is an opto coupler. An opto coupler is a combination of a
phototransistor and a light emitting diode as shown in the figure below.

24V 5V

Switches have two terminals. We have two types of switches:


1. Normally open switches.
2. Normally closed switches.
To connect a switch to the PLC; we connect one end of the switch terminal to the positive on the
input module to power up the switch and the we connect the other terminal to the input terminal
we wish on the input module of PLC, then we connect the negative to the common as shown in
fig 2 below;

+ - 0 1 2 3 4 com

For example, when switch 0 is on that is closed, the LED come on, which the photo transistor
senses and comes on also. This voltage 24V is then converted to 5V which the CPU reads as 1.
If the switch is turn off, the LED is off and the photo transistor does not sense light which
automatically provides 0V then the CPU reads it as 0.
PLC uses Logic 0 False and 1 True to function.

How to connect a sensor to the input module of a PLC


A sensor has three terminal, which have colours brown, blue and black.
There are two types of sensor;
1. PNP sensors (sourcing sensors).
2. NPN sensors (sinking sensors).
For the sensor to work, its needs to be activated. Black is the signal wire.
When the sensor is sourcing, the PLC input is sinking and when the sensor is sinking the PLC
input is sourcing.
To use a PNP sensor, it has to be connected to a PLC whose input is sinking and to use an NPN
sensor, it has to be connected to a PLC whose input is sourcing as shown in fig 3 and fig 4.
PNP sensors: Brown (Sensor sourcing)
Black
2 com
(PLC sinking)
Blue

NPN sensors: Brown (Sensor sinking)


Black

2 com (PLC sourcing)


Blue
For PNP, internal switch is between the brown and black, but for NPN, internal switch is
between blue and black.
How the PLC works
There is no electrical connection with the input and output, but the CPU is the link between the
input and output of the PLC.
INPUT MODULE
CPU
OUTPUT
The MODULE process of the PLC is called scanning which includes;
1. Reads the status of the input from the input image table.
2. Execute user defined program.
3. Update the output.
Input image table: This is where the status of the input of the PLC is recorded.
Table 1:
Input terminal 0 1 2 3
Status of input 0 1 0 0

Output Terminal
There is switch at every terminal of the output of a PLC. Based on the program in the
CPU, the PLC output will come on.

+ - Vac 0 Vac 1 Vac 2


OUTPUT MODULE OF PLC
Types of switches at the output of a PLC
1. Relay; can power AC and DC load.
2. Triac; can only power AC load.
3. Transistor; can only power DC load.
In PLC we use programming language to program the PLC. We make use of ladder logic in this
experiment.
Ladder Logic Programming Language
In programming, we use two instructions to represent the input (sensors or switches)
1. Normally open instruction (Examine if closed).
2. Normally closed instruction (Examine if open).
The instruction used to represent the output is called output energize (OTE) denoted as

Each line on a ladder logic is called a RUNG. An address as to be given to the instruction to
know what particular terminal is involved.
For a normally open instruction, when the input is 1 it reads 1 (True) and when the
input is 0 it reads 0 (False).
For a normally closed instruction, when the input is 1 it reads 0 (False) and when the
input is 0 it reads 1 (True).
For an output to be switched on, a rung must be true.
Stop Instruction
This is an instruction used to put off an output.
The basic rule about a stop instruction is that a stop instruction should be initially true 1.
With this rule, we can choose what kind of input and instruction to use. The stop instruction
reads the input image table to be initially true. An example is shown below figure 1

switch_2 switch_3 bulb_7


Local:5:I:Data 2 Local:5:I:Data 3 Local:2:O:Data 7

STOP INSTRUCTION

bulb_7
Local:2:O:Data 7

Here, a normally open switch is used, which in the input image table reads 0 OFF, therefore to
put a stop instruction we use a normally closed instruction to
represent the stop switch.
Interlocking
This is the process that prevents two output from coming on or working at the same time.
This is done by creating a separate rung for each output and the output addresses are placed in
the rung of the opposite. An example is shown below in figure 2
switch_2 bulb_7 switch_3 bulb_6
Local:5:I:Data 2 Local:2:O:Data 7 Local:5:I:Data 3 Local:2:O:Data 6

bulb_6
Local:2:O:Data 6

switch_4 bulb_6 switch_3 bulb_7


Local:5:I:Data 4 Local:2:O:Data 6 Local:5:I:Data 3 Local:2:O:Data 7

bulb_7
Local:2:O:Data 7

How the CPU reads the program Ladder Logic


The CPU reads the ladder logic instruction using this syntax:
Left to right top to bottom

switch_1 Bulb_2

switch_2 Bulb_2

Latching
This is an instruction used to keep an output on. There are two ways of latching
1. Use an output energize to represent the output and then OR the input with a normally
open instruction having the same address as the output.
We put off the output using a stop instruction in series with the input.
switch_2 switch_3 bulb_7
Local:5:I:Data 2 Local:5:I:Data 3 Local:2:O:Data 7

Stop instruction

bulb_7
Local:2:O:Data 7

Latch
2. Use the latch instruction L as our output instruction and we put it off using the
unlatch instruction U having the same address/ tag with the latch instruction on a
new rung.
switch_1 Bulb_2
L

switch_2 Bulb_2
U

Timers
Timers are used to fix a time for when our output should come on or off.
There are four types of timers
1. Timer ON, On-delay timer TON
2. Timer OFF, Off-delay timer TOF
3. Retentive Timer ON, On-delay retentive timer RTO
4. Retentive Timer OFF, off-delay retentive timer RTF
An on-delay timer will wait for a set time after a line of ladder logic has been true before turning
on, but will turn off immediately.
An off-delay timer will turn on immediately when a line of ladder logic is true, but will delay
before turning off.
ON-DELAY Timer
This consist of the timer, preset and accumulator.
The Timer is the address of timer,
The Preset is how long the timer should time and stop,
The Accumulator is like a counter, it accumulates the time the timer has gone.
The preset and the accumulator are not bits but double integer and have 32 bits.

TON
Timer On Delay EN
Timer?
Preset?
DN
Accum ?

The On-Delay timer has 3 bits namely;


1. Enable bit. EN
2. Timer timing bit. TT
3. Done bit. DN
The Enable bit (EN) is 0 when the rung containing the timer is false and it is 1 when
the rung containing the timer is true. The enable bit depends on the status of the rung and does
not depend on the status of the timer.
The Timer timing bit (TT) is 0 when the timer is not timing and it is 1 when the timer
is timing. This depends on the status of the timer.
The Done bit (DN) is 0 while the timer is still timing (this means when the accumulator
is less than the preset A < P) and is 1 when the timer has finished timing (this means when the
accumulator is equal to the preset A = P).
The bits of the timer can be used to program/put on an output.
A timer has a time base. A time base is the number of ticks the timer will undergo before
reaching the preset. TIME VALUE = PRESET X TIME BASE. Time based for RS logix 5000
is 0.001ms

Self-resetting timer
Self-resetting timers are timers who have the ability to resets itself. For the timer to reset,
accumulator should go back to zero. How to reset the timer is by making the rung false.
When a timer is activated whose preset (P) is 20 and rung is true, the Accumulator (A)
will start counting still it reaches the preset and when it is equal to the preset (A=P) the timer
stops. At (A=P), the timer cannot time again until the accumulator is reset that means comes back
to zero (A=0) when the rung is false then the timer can time again.
The function of a self-resetting timer is to make the accumulator turn to zero by making the rung
false when a timer has finished timing.
To achieve a self-resetting timer, we place a normally close instruction on the rung of the
timer as its input and give it a tag of the done bit (DN) of the same timer.
How it works
Timer_1_Done_bit TON
<timer_1.DN>
Timer On Delay EN
Timer timer_1
Preset 10000
DN
Accum 0
A done bit of a timer is 0 before the timer starts timing or while timing and is 1 when the
timer has stop timing. With this information and considering the above diagram, initially the 0
is passed through the input normally close instruction when it sees the 0 converts it to 1,
turning the timer (the accumulator start counting) and making the rung true. When the
accumulator is equal to the preset, the timer stops (after 10seconds) and the done bit changes to
1. Now the done bit is 1 and is seen by the normally close instruction which converts it to a
0 making the rung false and accumulator 0. When the accumulator turns to 0, the done bit
turn to 0 and the process is repeated again.
Cascading timer
We use the knowledge of self-resetting timer to build a cascading timer. In cascading
timer, two timers are placed on separate rungs and each timer is used to reset the other timer
using the done bit (DN) of the timer.

Timer_2_Done_bit TON
<timer_2.DN>
Timer On Delay EN
Timer timer_1
Preset 10000
DN
Accum 0

Timer_1_Done_bit TON
<timer_1.DN> Timer On Delay EN
Timer timer_2
Preset 10000
DN
Accum 0

How it works
Initially the done bit (DN) the timer_2 is 0 which is passed into the input of the timer_1
a normally close instruction that converts it to 1 making the rung true and this starts the timer.
After 10 seconds, timer_1 stops timing which makes the done bit(DN) it 1 and it is passed into
the input of timer_2 a normally open instruction which reads it and makes the rung true and
starts timer_2. After 10 seconds, timer_2 stops timing which makes the done bit (DN) 1 and is
passed into the input of timer_1 a normally closed instruction which reads it, converts it to 0
making the rung of timer_1 false, the accumulator 0 which makes the done bit (DN) of timer_1
0, this is then passed into the input of timer_2 a normally open instruction which reads it,
makes the rung false, accumulator 0 and the done bit (DN) 0 and the process is done all over
again.
Counter
A counter basically counts either up or down.
A counter response to a false to true transition to count. For any false to true transition, the
counter has an increment of 1.
The counter does not depend on time or depend on the rung if it remains true for it to increment
but only when a false to true transition is made.
A counter has Preset and Accumulator just like a timer but a counter is not timing rather counting
so it does not have a time base.
There are two types of counters
1. Up counter
2. Down counter
The counter has its bits just like the timer, the bits of a counter are
1. Done bit (DN)
2. Counter up/down (CU)/(CD)
3. Overflow bit
The done bit (DN) of a counter is 1 when the counter accumulator equal to or greater than
preset (AP, here a counter can count more than the require preset as long as there is a false to
true transition) and 0 when the counter accumulator A<P.
The counter up/down (CU) / (CD) is 1 when the rung is true and 0 when the rung is false.
A diagram of both Up and Down counter is shown below

Up Counter

Down Counter
We can combine both up and down counter to form an up down counter.
Let say we have a car park that can take 50 cars altogether and we want to know the number of
cars in the car park at all times, we know that cars would be entering and leaving the car park, so
we would need a counter to increment when a car comes in and decrement when a car goes out
and we can achieve this using a up down counter giving the up and down counter the same tag. A
diagram is shown below to illustrate

An Up down Counter.
Reset Instruction

A reset instruction is used to reset a counter. We give the reset instruction the same tag
as the counter, we can use a switch with the reset instruction or to self-reset the counter we can
use the done bit (DN) of the counter as the input for the reset instruction. A diagram is shown
below
AUTOMATIC CAN FILLING SYSTEM
An automatic can filling system helps to reduce human error while also bringing about efficiency
in the dispensation of liquid. The basic purpose of this system is to dispense the liquid with
precision creating equal amounts of liquids in each can, saving human labour and saving cost of
services. This system basically operates with cans of certain height and material.
The can filling system consists basically of the control system and the dispensing system. The
control system also holds the memory and is the brain work of the system. It basically contains
the PLC, the relays, the contactor, the terminal block and the circuit breaker. The dispensing
system is where the operation is visualised and is made up of the tank (bucket), the valve, the
conveyor, the motor etc.
The can filling system has a hardware unit which has the conveyor, the motor, the valve
etc. The components of the system are connected together with the sensors and switches serving
as input devices and the motor, LEDs (green and red) and the valve serving as the output
devices. This input and output devices are set using the PLC. The PLC is mainly used to program
the operation of the circuit and the input and output terminals are used to connect the devices.
The system is programmed using the PLC to move the conveyor upon which cans have been
placed. It also programs the sensor to detect the cans which must be metallic in nature since the
sensors being used are inductive. This system has a period of filling the cans and also a period of
delay.
CIRCUIT DIAGRAM (LADDER LOGIC)
PROCEDURE
Assignment of input and output.
1. Sensors - IN 5 and IN 7
2. Normally closed switch (red) IN 0
3. Normally open switch (green) IN 2
4. Electric Motor OUT 0
5. Valve OUT 1
6. Red LED OUT 8
7. Green LED OUT 9
Wiring
1. The PLC, terminal blocks, two relays, contactor and circuit breaker were placed on the track
board.
2. From the power cable, the positive terminal (+220V) was connected to the circuit breaker
while the negative terminal (-220V) was connected to a terminal block in which the other side
of the circuit breaker having +220V was connected to another terminal block and the two
terminals (220V) were distributed across three terminal blocks.
3. The power pack was connected to a terminal block having +220V and -220V to power up the
power pack.
4. The other end of the power pack having +24V and -24V was distributed across three terminal
blocks.
5. Then +24V and -24V was connected to the output terminal 24VDC and 24NEUTRAL of the
PLC respectively to power up the PLC.
6. The switches (Red and Green) were connected by connecting +24V from the terminal block to
one end of the switch and the other end to the input terminal (0 and 2 respectively) of the PLC
and common (COM) for both switches were connected to -24V on the terminal block.
7. The sensors (PNP) were connected by connecting the brown terminal to +24V on the terminal
block, black terminal to the input terminal (5 and 7) of the PLC and the blue and common
(COM) for both sensors to -24V on the terminal block.
8. The motor was connected by connecting the PLC to the relay, the relay to the contactor and the
contactor to the motor.
9. For the relay for the motor, terminal 1 was connected to +220V on the terminal block, terminal
2 was connected to the output terminal 0 of the PLC, VDC 0 of output 0 was connected to +24V
on the terminal block, terminal 3 was connected to terminal A1 of the contactor and terminal 7
was connected to -24V on the terminal block.
10. For the contactor, terminal A2 was connected to -220V on the terminal block, terminal L1 was
connected to +220V on the terminal block, terminal T1 was connected to the positive terminal
of the motor and the negative terminal of the motor was connected to -220V on the terminal
block.
11. The valve was connected by connecting the PLC to the relay and relay to the valve.
12. For the relay for the valve, terminal 1 was connected to +220V on the terminal block, terminal
2 was connected to the output terminal 1 of the PLC, VDC 1 of output 1 was connected to
+24V on the terminal block, terminal 3 was connected to one end of the valve and the other
end of the valve was connected to -220V on the terminal block.
13. The LEDs (red and green) were connected by connecting one end of the LED to the output
terminal (8 and 9 respectively) of the PLC, the other end to -24V on the terminal block and the
VDC (3 and 4) for the input terminal respectively were connected to +24V on the terminal
block.

Programming
1. RSLogix 500 was opened.
2. New was clicked from the menu bar, and the Bul. 1766 MicroLogix 1400 Series A was
selected as the processor type.
3. Ten rungs were added.
4. 5 on delay timers (TON) and 1 up counter (CTU) is to be used in this project.
5. The default time base of 1.0 was used for the timers.
6. The 1st timer with address T4:1 was placed on rung 4. The preset was set to 5.
7. The 2nd timer with address T4:2 was placed on rung 6. The preset was set to 15.
8. The 3rd timer with address T4:3 was placed on rung 7. The preset was set to 3.
9. The 4th timer with address T4:4 was placed on rung 8. The preset was set to 20.
10. The 5th timer with address T4:5 was placed in branch to T4:4. The preset was set to 5.
11. The only counter with address C5:0 was placed in a branch to T4:3. The preset was set to 5.
12. On rung 0, a NC instruction with address of I:0/5 was added, another NC instruction with
address I:0/7 was added in a branch to the first instruction. These two instructions represent
Sensor_1 and Sensor_2 respectively. An output with address B3:0/0 was added.
13. On rung 1, a NC instruction with address I:0/0 was added. An output with address B3:0/1 was
added. In a branch to I:0/0 a NC instruction with the address of the output was added.
14. On rung 2, a NO instruction with the address of the DN bit of timer T4:5 was placed. In a
branch to the DN bit, a NO instruction with address B3:0/1 was placed and a NC instruction
with the address of the Green_switch was placed. An output with address O:0/8 representing the
Red_light was placed.
15. On rung 3, a NO instruction with address I:0/2 representing the Green_switch was placed. A NO
instruction with the address of the Red_switch was placed. An output with address O:0/9 was
placed representing the Green_light. In a branch to I:0/2, a NC instruction with address
C5:0/DN was placed AND a NO instruction with the address of the Green_light was placed.
16. On rung 4, a NO instruction with address of the Green_switch was placed. In a branch to I:0/2,
a NO instruction with the address of the EN bit of T4:1 (T4:1/EN) was placed. In a branch to
T4:1, a NC instruction with address T4:1/DN was placed AND an output with address O:0/10
representing the buzzer was placed.
17. On rung 5, a NO instruction with address T4:1/DN was placed in series with a NO instruction
with an address B3:0/0. In a branch to these two instructions, two NO instructions with
addresses T4:2/DN and T4:3/DN respectively were placed in series with each other. In series to
this branch, two NC instruction with addresses T4:5/DN and B3:0/1 were placed. And an output
with address O:0/0 was placed, this represents the motor.
18. On rung 6, two NO instructions with the addresses of the Sensor_1 and Sensor_2 were placed in
series with each other. In a branch to T4:2, a NC instruction with address T4:2/DN was placed
AND an output with address O:0/1 was placed, this represents the valve.
19. On rung 7, a NO instruction with address T4:2/DN was placed. This was in series to the already
attached C5:0 and T4:4.
20. On rung 8, a NO instruction with address C5:0/DN was placed. This was in series to the already
attached T4:4 and T4:5.
21. On rung 9, a NO instruction with address T4:4/DN was placed. In series to that a RESET output
with the address C5:0 was placed.

OPERATION OF THE MACHINE


The inputs used in the project are the two sensors(I:0/5 and I:0/7), the Red switch(I:0/0) and
the Green switch(I:0/2) while the outputs are the motor(conveyor)(O:0/0) , the buzzer(O:0/10) ,
the valve(O:0/1), the red LED(O:0/8) and the green LED(O:0/9). The two sensors and the Green
button operate as Normally Open switches while the Red button operates as a Normally Closed
switch. The machine is to operate in such a way that on pressing the Green button, the Green
LED comes ON and after a 5 second delay caused by a timer(T:4/1), the conveyor belt starts
moving. The conveyor belt is to move until both sensors detect a metallic can of a certain height.
After both sensors detect, a timer (T4:2) is started which makes the valve open for 15 seconds.
After the 15 seconds, the valve is closed and another timer(T4:3) is triggered for 3 seconds
which is to ensure that the water from the valve drips off completely before the conveyor starts
moving again. When the timer controlling the valve is done timing, the accumulator of the
counter (C5:0) increases by 1. When the accumulator of the counter gets to 5, the DN bit of the
counter becomes 1 and this triggers a timer(T4:5) that lasts for 5 seconds for the last can to move
from below the valve. When this timer is done timing, the Red LED comes on. The DN bit of the
counter also triggers another timer (T4:4) that times for 20 seconds. The DN bit of this timer
triggers the RES instruction which sets the accumulator of the counter back to 0.

OBSERVATION
When the machine was switched on and start switch (green button) pressed, it was observed that
there was a delay for five seconds and the conveyor started moving. When the two sensors
sensed the first can, the conveyor stopped moving, the valve opened for 15seconds which
enabled liquid to flow into the can and after this, there was a three second delay which enabled
all the liquid to drip out. After this, the conveyor started moving again and the same process
occurred until five cans were filled. After the fifth can was sensed, the conveyor belt moved for
three seconds in order to move the can away from the sensor. The counter was then reset after
twenty seconds and the whole process started again. When a can which didnt meet the required
height of the sensor was used, the conveyor continued moving.

PRECAUTIONS
1. It was ensured that all the wires were connected accurately to prevent damages, bridging and
removal of the connections.
2. The input voltage to the PLC was checked using a multimeter before the machine was turned
on to ensure that the adequate voltage (24V) is received by the PLC.
3. It was also ensured that the wires were arranged neatly. This was done by passing the wires
through a trunk.

CONCLUSION
The theory and concept of the automatic can filling system was clearly understood.The
connections of all the components were done accurately. In the programming design, an
understanding of the desired automatic can filling machine and how to use the Ladder Diagram
with required instructions to translate the machine sequence of operation was clearly
understood. In conclusion, the objective of this project which was to apply the knowledge of
PLC to design an automatic can liquid filling system was achieved. A working project was
demonstrated successfully.
The concept of this project can be used to design other applications of automation systems.

S-ar putea să vă placă și