PLC Based Industrial Sorting Thesis Report
PLC Based Industrial Sorting Thesis Report
With advancement of technology things are becoming simpler and easier for us.
Automation is the use of control systems and information technologies to reduce the need
for human work in the production of goods and services. In the scope of industrialization,
automation is a step beyond mechanization. Whereas mechanization provided human
operators with machinery to assist them with the muscular.
Requirements of work, automation greatly decreases the need for human sensory and
mental requirements as well. Automation plays an increasingly important role in the
world economy and in daily experience.
Automatic systems are being preferred over manual system. Through this project we have
tried to show automatic control for the Items sorting.
Performing tasks that are beyond human capabilities of size, weight, speed, endurance,
etc. Economy improvement. Automation may improve in economy of enterprises,
society or most of humankind. For example, when an enterprise that has invested in
automation technology recovers its investment, or when a state or country increases its
income due to automation like Germany or Japan in the 20th Century.
This is why this project looks into construction and implementation of a system
involving hardware to control the sorting of different items.
1
1.2Project Objective
Our objective is to Design such a PLC and SCADA based conveyor Belt system that does the
sorting by itself, gives fast production, reduces the number of personnel and durable.
Due to its small size and less number of input output functions we have used FATEK
PLC 14-FBS, which has 8 inputs and 6 outputs.
DC Gear motor 12v and 4A is used to drive the Conveyor Belts. A dc battery of 12v and
40Amps is used to give power to the Conveyor Belt.
3 infrared sensors are used , two sensors on one CD ROM where the objects with more
width will be detected and the other sensor is used on another CD ROM where the small
object will be detected. The detected objects will be then pushed with the help of the CD
ROMs on their respective Secondary conveyor belts.
1.4Assessment Methodology
The conveyor Belts were designed with the help of the mechanical experts using lathe
machines.
SCADA system is used to display the over all activity of the plc, like production,
detection of the metal and colored item.
2
1.5 Block Diagram
3
1.6Components list
5.1 PLC
5.2 INFRARED SENSORS
5.3 GEAR MOTOR
5.4 SCADA PORT
5.5 Capacitors
5.6 Resistors
5.7 Dc socket
5.8 LM7812
5.9 PCB
5.10 Relays
5.11 Diode
5.12 Supply
5.13 Wires
5.14 Led
5.15 Computer supply
5.16 Metal sensor
5.17 Color Sensor
1.7Project Outlines
Chapter 2 provides theoretical background about all the components used in this Project
in a very detailed way.
References
4
CHAPTER 2 Theoretical Backgrounds
2.1 CAPACITORS
2.1.1 Function
Capacitors store electric charge. They are used with resistors in timing circuits because it
takes time for a capacitor to fill with charge. They are used to smooth varying DC
supplies by acting as a reservoir of charge. They are also used in filter circuits because
capacitors easily pass AC (changing) signals but they block DC (constant) signals.
Small value capacitors are unpolarised and may be connected either way round. They are
not damaged by heat when soldering, except for one unusual type (polystyrene). They
have high voltage ratings of at least 50V, usually 250V or so. It can be difficult to find
the values of these small capacitors because there are many types of them and several
different labeling systems!
5
Fig:2.3
Fig:2.4
Fig:2.5
6
2.1.2 For capacitors in parallel
Capacitors in a parallel configuration each have the same applied voltage. Their
capacitances add up. Charge is apportioned among them by size. Using the
schematic diagram to visualize parallel plates, it is apparent that each capacitor
contributes to the total surface area.
7
2.2 RESISTORS
The Resistor
2.2.1 Function Color Code
Resistors restrict the flow of electric current, for example a resistor is Color Number
placed in series with a light-emitting diode (LED) to limit the current
passing through the LED. Black 0
2.2.2 Connecting and soldering Brown 1
Resistors may be connected either way round. They are not damaged
Red 2
by heat when soldering.
Orange 3
Yellow 4
Green 5
Blue 6
Violet 7
Grey 8
White 9
8
Fig: 2.7
This resistor has red (2), violet (7), yellow (4 zeros) and gold bands.
So its value is 270000 = 270 k .
On circuit diagrams the is usually omitted and the value is written 270K.
Fig: 2.8
The standard colour code cannot show values of less than 10 . To show these small values two
special colors are used for the third band: gold which means × 0.1 and silver which means
× 0.01. The first and second bands represent the digits as normal.
For example:
red, violet, gold bands represent 27 × 0.1 = 2.7
green, blue, silver bands represent 56 × 0.01 = 0.56
Tolerance may be ignored for almost all circuits because precise resistor values are rarely
required.
Electrical energy is converted to heat when current flows through a resistor. Usually the
effect is negligible, but if the resistance is low (or the voltage across the resistor high) a
large current may pass making the resistor become noticeably warm. The resistor must be
able to withstand the heating effect and resistors have power ratings to show this.
Power ratings of resistors are rarely quoted in parts lists because for most circuits the
standard power ratings of 0.25W or 0.5W are suitable. For the rare cases where a higher
power is required it should be clearly specified in the parts list, these will be circuits
using low value resistors (less than about 300 ) or high voltages (more than 15V).
9
The power, P, developed in a resistor is given by:
2.3 RELAY:
The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it
can be as much as 100mA for relays designed to operate from lower voltages. Most ICs
(chips) cannot provide this current and a transistor is usually used to amplify the small IC
current to the larger value required for the relay coil. The maximum output current for the
popular 555 timer IC is 200mA so these devices can supply relay coils directly without
amplification.
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
10
2.3.2 Disadvantages of relays:
For Relays are bulkier than transistors for switching small currents.
Relays cannot switch rapidly (except reed relays), transistors can switch many
times per second.
Relays use more power due to the current flowing through their coil.
Relays require more current than many ICs can provide, so a low power
transistor may be needed to switch the current the relay's coil.
Fig:2.10
11
Fig:2.11
2.4 Diode:
The most basic property of a junction diode is that it conducts an electric current
in one direction and blocks it in the other. This behavior arises from the electrical
characteristics of a junction, called a p-n junction. Fabricated within a
semiconductor crystal. The most commonly used semiconductor material is
silicon. The junction diode is useful in a wide variety of applications including the
rectification of ac signals (producing dc from ac), the detection of radio signals,
the conversion of solar power to electricity, and in the generation and detection of
light. It also finds use in a variety of electronic circuits as a switch, as a voltage
reference or even as a tunable capacitor. The p-n junction is also the basic
building block of a host of other electronic devices, of which the most well-
known is the junction transistor.
In our project we have used a diode as a rectifier basically it is a full wave
rectifier used to convert ac in to dc in the power supply portion of the project.
12
Fig:2.12
Important: The DB-9 pin numbers for transmit and receive (3 and 2) are opposite of those
of the DB-25 connector (2 and 3).
The images show the male and female versions of the DB-9 connector with pin numbers.
Some of the early Macs also used the DB-9 connector as a serial port.
In this project we used db-9 connectors to provide interface between terminal and control
board. More over the interface between control board and server computer is also through
db-9 connectors and 8-wire cables
13
Fig: 2.13
14
Fig:2.14
Basically, LEDs are just tiny light bulbs that fit easily into an electrical circuit. But unlike
ordinary incandescent bulbs ,they don't have a filament that will burn out, and they don't
get especially hot. They are illuminated solely by the movement of electrons in a
semiconductor material, and they last just as long as a standard transistor.
Fig: 2.15
15
A bridge rectifier makes use of four diodes
in a bridge arrangement to achieve full-
wave rectification. It is called a full-wave
rectifier because it uses the entire AC wave
(both positive and negative sections). 1.4V
is used up in the bridge rectifier because
each diode uses 0.7V when conducting and
there are always two diodes conducting, as
shown in the diagram below. Bridge
rectifiers are rated by the maximum current
they can pass and the maximum reverse
voltage they can withstand (this must be at
least three times the supply RMS voltage
so the rectifier can withstand the peak
voltages). This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired internally.
The input to the circuit is applied to the diagonally opposite corners of the network, and
the output is taken from the remaining two corners. Let us assume the transformer is
working properly and there is a positive potential at point A and a negative potential at
point B.
One-half cycle later the polarity across the secondary of the transformer reverses, forward
biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be from point
A through D4, up through RL, through D2, through the secondary of T1, and back to
point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can be
observed across D2 and D4. You should have noted that the current flow through R L is
always in the same direction. In flowing through R L this current develops a voltage
corresponding to that shown in waveform (5). Since current flows through the load (R L)
during both half cycles of the applied voltage, this bridge rectifier is a full-wave rectifier.
One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a
given transformer the bridge rectifier produces a voltage output that is nearly twice that
of the conventional full-wave circuit.
16
For both positive and negative swings of the transformer, there is a forward path through
the diode bridge. Both conduction paths cause current to flow in the same direction
through the load resistor, accomplishing full-wave rectification. While one set of diodes
is forward biased, the other set is reverse biased and effectively eliminated from the
circuit.
2.7.2 Applications
The primary application of rectifiers is to derive DC power from an AC supply. Virtually
all electronics require a DC supply but mains power is AC so rectifiers find uses inside
the power supplies of virtually all electronic equipment.
2.8 Transformer
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled electrical conductors. A changing current in the first circuit
(the primary) creates a changing magnetic field. This changing magnetic field induces a
changing voltage in the second circuit (the secondary). This effect is called mutual
induction.
A transformer is based on a very simple fact about electricity: when a fluctuating electric
current flows through a wire, it generates a magnetic field (an invisible pattern of
magnetism) or "magnetic flux" all around it. The strength of the magnetism (which has
the rather technical name of magnetic flux density) is directly related to the size of the
electric current. So the bigger the current, the stronger the magnetic field. Now there's
another interesting fact about electricity too. When a magnetic field fluctuates around a
piece of wire, it generates an electric current in the wire. So if we put a second coil of
wire next to the first one, and send a fluctuating electric current into the first coil, we will
create an electric current in the second wire. This is called electromagnetic induction
because the current in the first coil causes (or "induces") a current in the second coil. The
current in the first coil is usually called the primary current and the current in the second
wire is (surprise, surprise) the secondary current. What we've done here is pass an electric
current through empty space from one coil of wire to another. This phenomenon is called
electromagnetic induction. We can make electrical energy pass more efficiently from one
coil to the other by wrapping them around a soft iron bar (sometimes called a core):
17
Fig: 2.17
To make a coil of wire, we simply curl the wire round into loops or ("turns" as physicists
like to call them). If the second coil has the same number of turns as the first coil, the
electric current in the second coil will be virtually the same size as the one in the first
coil. But (and here's the clever part) if we have more or fewer turns in the second coil, we
can make the secondary current and voltage bigger or smaller than the primary current
and voltage.
One important thing to note is that this trick works only if the electric current is
fluctuating in some way. In other words, you have to use a type of constantly reversing
electricity called alternating current (AC) with a transformer. Transformers do not work
with direct current (DC), where the current constantly flows in the same direction.
If the first coil has more turns that the second coil, the secondary voltage is smaller than
the primary voltage:
18
This is called a step-down transformer. If the second coil has half as many turns as the
first coil, the secondary voltage will be half the size of the primary voltage; if the second
coil has one tenth as many turns; it has one tenth the voltage. In general:
So a step-down transformer with 100 coils in the primary and 10 coils in the secondary will
reduce the voltage by a factor of 10 but multiply the current by a factor of 10 at the same
time. The power in an electric current is equal to the current times the voltage (watts =
volts x amps is one way to remember this), so you can see the power in the secondary coil is
theoretically the same as the power in the primary coil. (In reality, there is some loss of
power between the primary and the secondary because some of the "magnetic flux" leaks
out of the core; some energy is lost because the core heats up, and so on.)
19
2.9.1 PLC configuration
i. Many PLC configurations are available, even from a single vendor. But each
of these has common components and concepts. The most essential
component is are:
This can be built into the PLC or be an external unit. Common voltage levels required
by the PLC are 24Vdc 100Vac 240Vac.
A number of input/output terminals must be provided so that the PLC can monitor
the process and initiate actions. Inputs to, and outputs from, a PLC is necessary to
monitor and control a process. Both inputs and outputs can be categorized into two
basic types: logical or continuous. Consider the example of a light bulb. If it can only
be turned on or off, it is logical control. If the light can be dimmed to different levels,
it is continuous.
Indicator lights –
Mini:
20
These are similar in function to PLC racks, but about the half size.
Dedicated Backplanes can be used to support the cards OR DIN rail
mountable with incorporated I/O bus in module.
viii. Shoebox:
ix. Micro:
21
The basic PLC schema include CPU, power supply, memory, Input block, output block,
communication and expansion connections. Figure 2.1 shows the PLC system overview.
CPU modules –
22
Memory –
Compact Flash – Can store complete program information, read & write text files
viii. I/O Modules - Input and output (I/O) modules connect the PLC to sensors
and actuators. Provide isolation for the low-voltage, low-current signals that the
PLC uses internally from the higher-power electrical circuits required by most
sensors and actuators. Wide range of I/O modules available including: digital
(logical) I/O modules and analogue (continuous) I/O modules.
23
A programmable logic controller (PLC) is an industrial computer used to control and
automate complex systems. Programmable logic controllers are a relatively recent
development in process control technology. It is designed for use in an industrial
environment, which uses a programmable memory for the integral storage of user-
oriented instructions for implementing specific functions such as logic, sequencing,
timing, counting, and arithmetic to control through digital or analog inputs and outputs,
various types of machines or processes. Programmable logic controllers are used
throughout industry to control and monitor a wide range of machines and other movable
components and systems. PLC is used to monitor input signals from a variety of input
points (input sensors) which report events and conditions occurring in a controlled
process. Programmable logic controllers are typically found in factory type settings.
PLCs are used to control robots, assembly lines and various other applications that
require a large amount of data monitoring and control.
A typical programmable logic controller employs a backplane to serve as the
communications bus for interconnecting the PLC processor with the array of individual
input/output devices with which the processor interacts in terms of receiving input data
for use in executing the control program and transmitting control data for use in
controlling the targeted objects. A PLC includes a rack into which a plurality of
input/output cards may be placed. A rack includes several slots into which these
input/output cards are installed. Each input/output card has a plurality of I/O points. The
I/O modules are typically pluggable into respective slots located on a backplane board in
the PLC. An I/O bus couples the cards in the slots back to the processor of the
programmable logic controller. The slots are coupled together by a main bus which
couples any I/O modules plugged into the slots to a central processing unit (CPU). The
CPU itself can be located on a card which is pluggable into a dedicated slot on the
backplane of the PLC. The particular processor employed in a PLC together with the
particular choice of input and output cards installed in the PLC rack are often referred to
as the hardware configuration of the programmable logic controller. The hardware
configuration also includes the particular addresses which the I/O cards. Each option
module typically has a plurality of input/output points. The option modules are coupled
through an interface bus, for example via a backplane, to a main controller having a
microprocessor executing a user program.
Option modules may also include a microprocessor and a memory containing separate
user programs and data directed to a particular operation of the PLC system. During the
execution of a stored control program, the PLC's read inputs from the controlled process
and, per the logic of the control program, provide outputs to the controlled process. The
outputs typically provide analog or binary voltages or "contacts" implemented by solid
state switching devices. PLC's are normally constructed in modular fashion to allow them
to be easily reconfigured to meet the demands of the particular process being controlled.
The processor and I/O circuitry are normally constructed as separate modules that may be
inserted in a chassis and connected together through a common backplane using
permanent or releasable electrical connectors.
24
The FATEK FBS Series PLC is a new generation of micro PLC equipped with
excellent functions comparable to medium or large PLC, with up to five
communication ports. The maximum I/O numbers are 256 points for Digital Input
(DI) and Digital Output (DO), 64 words for Numeric Input (NI) and Numeric
Output (NO). The Main Units of FBS are available in three types: MA (Economy
Type), MC (High-Performance Type), and MN (High-Speed NC Type). With the
combination of I/O point ranges from 10 to 60, a total of 17 models are available.
Fourteen DI/DO and 12 NI/NO models are available for Expansion
Units/Modules. With interface options in RS232, RS485, USB and Ethernet, the
communication peripherals are available with 14 boards and modules. The
various models are described in the following:
25
All the Main Units of FBS-PLC have the same physical structure. The only
difference is the case width. There are four different
case sizes, which are 60mm, 90mm, 130mm, and 175mm. The figure below will
use the Main Unit case of the FBS-24MC as
an example for illustration:
Fig: 2.19
26
Fig: 2.20
27
3 Hole for screw fixation (ψ4.5×2
)
4 Terminals of 24VDC power input and digital input
(Pitch 7.62mm)
8 Indicators for transmit (TX) and receive (RX) status of built-in communication
port (Port0).
12 I/O output expansion header cover [units of 20 points or beyond only], with
esthetic purpose and capable of securing
expansion cable.
14 FBS-CB22 CB cover plate (each CB has its own specific cover plate)
16 Connector for communication board (for CB2, CB22, CB5, CB55, and CB25)
19 Connector for built-in communication port (Port 0) (With USB and RS232
optional, shown in the figure is for RS232)
20 I/O output expansion header (only available in units with 20 points or beyond),
for connecting with cables from
28
expansion units/modules
Internal relays
Non-retentive
M0~M799 (800)*
can be configured as retentive type
M1400~M1911 (512)
Retentive
M800~M1399 (600)*
Special Relays
M1912~M2001 (90)
29
Retentive C0~C139 (140)*
Non-retentive C140~C199 (60)*
Retentive C200~C239 (40)*
Non-retentive C240~C255 (16)*
DATA REGISTERS
30
EXECUTE PROGRAM-Next the PLC executes a program by one
instruction at a time. If the first input is on then it should turn on the first output.
Since it already knows then it will be able to decide whether the first output
should
be turned on based on the state of the first input. It will store the execution results
for use later during the next step.
2.9.5 SCADA
2.9.5.1 Introduction
31
Widely used in industry for Supervisory Control and Data Acquisition of industrial
processes, SCADA systems are now also penetrating the experimental physics
laboratories for the controls of ancillary systems such as cooling, ventilation,
power distribution, etc.
SCADA systems have made substantial progress over the recent years in terms
of
functionality, scalability, performance and openness such that they are an
alternative to in house development even for very demanding and complex
control systems as those of physics experiments.
SCADA stands for Supervisory Control And Data Acquisition. As the name indicates, it
is not a full control system, but rather focuses on the supervisory level. As such, it is a
purely software package that is positioned on top of hardware to which it is interfaced, in
general via Programmable Logic Controllers (PLCs), or other commercial hardware
modules.
SCADA systems are used not only in industrial processes: e.g. steel making, power
generation (conventional and nuclear) and distribution, chemistry, but also in some
experimental facilities such as nuclear fusion. The size of such plants range from a few
1000 to several 10 thousands input/output (I/O) channels. However, SCADA systems
evolve rapidly and are now penetrating the market of plants with a number of I/O
channels of several 100 K: we know of two cases of near to 1 M I/O channels currently
under development.
SCADA systems used to run on DOS, VMS and UNIX; in recent years all SCADA
vendors have moved to NT and some also to Linux.
32
Fig: 2.21
Configuraton:
33
Fig: 2.22
Gates:
34
Fig: 2.23
Project Template:
35
Fig: 2.24
36
7812 is a famous IC which is being widely used in 12V voltage regulator circuits. Truly
speaking it is a complete standalone voltage regulator. We only need to use two
capacitors, one on the input and second one on the output of 7812 in order to achieve
clean voltage output and even these capacitors are optional to use. To achieve 12V 1A
current, 7812 should be mounted on a good heatsink plate. Thanks to the transistor like
shape of 7812 which makes it easy to mount on a heatsink plate. 7812 has built in over
heat and short circuit protection which makes it a good choice for making power
supplies.
37
7812 pin diagram Fig: 2.26
If you hold upside down (pins up) and the IC number is facing you then the left pin will
be the voltage regulator output, the center pin will be ground and the right pin will be
the voltage input pin. Under my experience, the maximum safe current you can get
from one 7812 IC is 1A. If you need more power then there are a few ways to do so.
More than one 7812 can be used in parallel in order to achieve more than 1A current but
output voltage of each 7812 can slightly vary resulting in unbalanced load on all of
them. This can result in load balancing issues and can damage the IC carrying most
current. However there is a way to overcome this problem. I have given bellow a
schematic diagram in which two 7812 ICs are attached together and both of them are
carrying almost equal load. At least the current difference is not too much to damage
any IC.
38
Please note that in this circuit diagram, I have used resistors for load balancing purpose
so the output of this voltage regulator circuit may slightly inaccurate. Both resistors
should be minimum 15 Watt or above. If you don’t find such resistors in your area then
you can make them using 32 gauge or thinner copper wire. This parallel 7812 circuit
will provide 12V and approximately 2A current. You can increase number of 7812 but
each additional 7812 will require a resistor on its output.
Following is the link to a simple but complete power supply circuit diagram developed
using 7812.
39
2.11 Metal detector
Industrial metal detectors are used in the pharmaceutical, food, beverage, textile,
garment, plastics, chemicals, lumber, and packaging industries.
Contamination of food by metal shards from broken processing machinery during the
manufacturing process is a major safety issue in the food industry. Metal detectors for
this purpose are widely used and integrated into the production line.
Current practice at garment or apparel industry plants is to apply metal detecting after the
garments are completely sewn and before garments are packed to check whether there is
any metal contamination (needle, broken needle, etc.) in the garments. This needs to be
done for safety reasons.
40
The industrial metal detector was developed by Bruce Kerr and David Hiscock in 1947.
The founding company Goring Kerr[12] pioneered the use and development of the first
industrial metal detector. Mars Incorporated was one of the first customers of Goring
Kerr using their Metlokate metal detector to inspect Mars bar.
The basic principle of operation for the common industrial metal detector is based on a 3
coil design. This design utilizes an AM (amplitude modulated) transmitting coil and two
receiving coils one on either side of the transmitter. The design and physical
configuration of the receiving coils are instrumental in the ability to detect very small
metal contaminates of 1mm or smaller. Today modern metal detectors continue to utilize
this configuration for the detection of tramp metal.
The coil configuration is such that it creates an opening whereby the product (food,
plastics, pharmaceuticals, etc.) passes through the coils. This opening or aperture allows
the product to enter and exit through the three coil system producing an equal but
mirrored signal on the two receiving coils. The resulting signals are summed together
effectively nullifying each other.
When a metal contaminant is introduced into the product an unequal disturbance is
created. This then creates a very small electronic signal that is amplified through special
electronics. The amplification produced then signals a mechanical device mounted to
the conveyor system to remove the contaminated product from the production line. This
process is completely automated and allows manufacturing to operate uninterrupted.
Fig: 2.28
41
2.12 Color Sensor
Although the human eye is very strong ability to distinguish colors, but different people
describe the same color will be different, which means that demand accurate color
detection and management of applications, the verbal description is not enough. Despite
the better the ability of the human eye distinguish colors is very strong, but different
people will describe the same color are different, which means that demand accurate
color detection and management of applications, the verbal description is not enough. A
better solution is to use fully calibrated color sensing equipment to digitally describe the
color. These devices include expensive laboratory grade spectrophotometer to the
economy, RGB color sensors (such as the production of Avago color sensor). Avago has
a variety of color sensors, many of the actual color of the current sensing and
measurement applications provide a practical solution. The objective of this paper is to
examine color perception, measurement and specification, and how to apply color sensor-
generated data. Finally, the article discusses the Avago's RGB color sensor products and
how for a variety of color sensing applications. The perception of color into the electronic
devices in the theory of how the color sensor, it is necessary to understand how humans
perceive color. Color is light, the interaction between object and observer results. In
reflected light, the light falling on an object will be reflected or absorbed, depending on
the surface characteristics, such as the reflection coefficient and transmission conditions.
For example, the red paper will absorb most of the spectrum with the green part and the
part with the blue, while reflecting part of the spectrum with the red, so the viewer will
show in red. Luminous objects in their own, its the same principle: light will reach the
human eye, and then processed by the receiver eye, from the nervous system and brain
for interpretation. Human visual system can detect from about 400nm (violet) to about
700nm (red) of the electromagnetic spectrum, can adapt to a wide range of illumination
changes and a lot of color saturation (pure white color in proportion.) Although the rod-
shaped cells are able to work on a wide range of illumination, and provide rapid response
to changes in light sensor element, but these rods can not detect color. Called cone cells,
light sensors to provide high-resolution color image components. There are three cone
cells, at different wavelengths to achieve peak sensitivity, the respective red (580nm),
green (540nm) and blue (450nm). Visible spectrum of light at any wavelength will be in
varying degrees, all three types of cone cells in the stimulation of one or more units, we
feel that the color is our nerve and brain processes visual information. Obviously, people
with normal color vision see the wavelengths in the same light, basically feel the same
color. Scientific tests showed that humans can distinguish very subtle color differences, it
is estimated the maximum could reach 1,000 million, the problem is that we do not have
enough words to describe all of these have a slightly different color. Color measurement
principle Figure 1.1 shows the use of color measurement instruments or sensors than the
human eye detect the basic principles of color. The sensor device is high-end equipment,
such as spectrophotometer or the British International Commission on Illumination (CIE)
calibration of the camera, it can be low-end devices, such as RGB color sensors. Figure
1a measuring instruments are usually divided into two categories: color analysis and
metering method. Analysis of the use of color, the device uses sensor with three filters
42
light from the object (Figure 1.1b). Under normal circumstances, the sensor profile is
optimized, and is therefore very similar to the human eye response. Triple output
stimulus by CIE, said: X, Y, Z. Figure 1b metering method (Fig. 1c) using a variety of
sensors, in large measure the color of a narrow wavelength range. Then, microcomputer
equipment requirements through the integration of data obtained to calculate the value of
the triple stimulation. Figure 1c Avago color sensor (Fig. 1d) is the third filter device,
providing color analysis measurements. Sensor output voltage output from the VR, VG,
and VB or analog-digital converted R, G and B digital values. Figure 1d The working
principle of the color sensor is divided into three different types of color sensors: light to
photocurrent conversion, light-to-analog voltage converter, light-to-digital conversion.
The former usually represent the actual color of the sensor input part, because the original
current amplitude is very low light, always require amplification to the optical flow into
the available levels. Therefore, the most practical analog output color sensor at least one
transimpedance amplifier, and provides the voltage output. The color of light to analog
voltage sensor from the back of the color filter array with integrated photodiode current
to voltage conversion circuit (usually a transimpedance amplifier) composition, as shown
in Figure 1.2. Fall of light on each photodiode current is converted into light, the
amplitude depends on the brightness and wavelength of incident light (due to color
filters). Figure 1.2: Light-to-analog voltage converter using the color sensor if no color
filter, a typical silicon photodiode would be visible from the area until the ultra-violet
wavelength region to respond to the infrared part of the spectrum close to the peak
response at 800nm region and between 950nm. Red, green and blue transmission color
filter to reshape and optimize the spectral response of photodiodes. Properly designed
filter will mimic the human eye photodiode array after filtering to provide spectral
response. Each of the three photodiode photodiode photocurrent will use current to
voltage converter, convert VRout, VGout and VBout. There are two color sensing modes:
reflection and transmission sensor sensing. Reflection in the reflective sensing sensors,
color sensors detect a surface or object from the reflected light, light and color sensors are
placed near the target surface. From the light source (such as incandescent or fluorescent
lamps, white LED or calibrated RGB LED module) to leave the light bouncing surface,
measured by the color sensor. Leave the surface reflection color and the color on the
surface. For example, the white light incident on the red surface, will be reflected in red.
Reflecting the impact of red light color sensor, producing R, G and B output voltage. By
interpreting the three-voltage, can determine the color. Since the three output voltage
linearly increased the density of the reflected light, so the color sensor also can measure
the reflection coefficient of a surface or object. Figure 1.3: The color of light reflected
depends on surface reflection and absorption of the color of the color sensor in the
transmission mode of transmission, the sensor toward the light. Filter color sensor with
photodiode array converts the incident light R, G and B light current, and then amplified
and converted to analog voltages. Since all three output will increase linearly with the
optical density increased, so the sensor can measure the color of the light and the total
density. Transmission sensor can be used to determine the color of transparent materials
such as glass and transparent plastics, liquids and gases. In this application, the light
through the transparent medium, and then hit the color sensor. Transparent medium
43
depends on the color of the color sensor voltage understanding. Figure 1.4: Sensor R, G
and B fall on the sensor output depends on the color of light Figure 1.5: color sensing
transparent materials, such as color filters, liquid or gas can be used to explain the color
sensor values of the three color sensor Analog output voltage directly controls the
hardware, or converted into digital values, which a digital processor to analyze the data.
Numeric values can then be obtained from these color and brightness information.
fig:
Fig: 2.29
Fig: 2.30
44
2.12.1 Infrared Sensors: Working Principle and Applications
Infrared technology is found in many of our everyday products. For example, TV has an
IR detector for interpreting the signal from the remote control. Key benefits of infrared
sensors include low power requirements, simple circuitry, and their portable feature.
Thermal infrared sensors – These use infrared energy as heat. Their photo
sensitivity is independent of wavelength. Thermal detectors do not require cooling;
however, they have slow response times and low detection capability.
Quantum infrared sensors – These provide higher detection performance and
faster response speed. Their photo sensitivity is dependent on wavelength. Quantum
detectors have to be cooled so as to obtain accurate measurements. The only
exception is for detectors that are used in the near infrared region.
A typical system for detecting infrared radiation using infrared sensors includes the
infrared source such as blackbody radiators, tungsten lamps, and silicon carbide. In case
of active IR sensors, the sources are infrared lasers and LEDs of specific IR wavelengths.
Next is the transmission medium used for infrared transmission, which includes vacuum,
the atmosphere, and optical fibers.
Thirdly, optical components such as optical lenses made from quartz, CaF2, Ge and Si,
polyethylene Fresnel lenses, and Al or Au mirrors, are used to converge or focus infrared
radiation. Likewise, to limit spectral response, band-pass filters are ideal.
Finally, the infrared detector completes the system for detecting infrared radiation. The
output from the detector is usually very small, and hence pre-amplifiers coupled with
circuitry are added to further process the received signals.
45
2.12.4 Applications
46
CHAPTER 3 Methodology
In our project we have used WinProladder for PLC programming. Before we explain our
project code lets first discus some basic principles of ladder diagram.
Ladder diagram is a type of graphic language for automatic control system it had been
used for a long period since world war 2. until today, it is the oldest and most popular
language for automatic control systems. Originally there are only few basic elements
available such as A-contact (normally ON), B contact (Normally OFF), output coil.
Timers and Counters. Not until the appearance of microprocessor based PLC, more
elements for ladder Diagram, such as differential contact, retentive coil and other
instructions that a conventional system cannot provide, became available.
The basic operation principle for both conventional and PLC Ladder Diagram is the
same. The main difference between the two systems is that the appearance of the symbols
for conventional Ladder Diagram are more closer to the real devices, while for PLC
system, symbols are simplified for computer display. There are two types of logic system
available for Ladder Diagram logic, namely combination logic and sequential logic.
Detailed explanations for these two logics are discussed below.
47
3.1.1 Ladder logic Software “WinProladder” software look
Fig: 3.1
Fig: 3.2
48
3.1.2 Combination Logic
Combination logic of the Ladder Diagram is a circuit that combines one or more input
elements in series or parallel and then send the results to the output elements, such as
Figure 3.3
The above example illustrated the combination logic using the actual wiring diagram,
conventional ladder Diagram, and PLC Ladder Diagram. Circuit 1 uses a NO(normally
open) switch that is also called 'A' switch or contact. Under normal condition(switch is
not pressed), the switch contact is at OFF state and the light is off if the switch is pressed,
the contact status turns ON and the light is on, in contrast circuit 2 uses a NC (normally
Close) switch that is all called "B" switch or contact. Under normal condition, the switch
contact is at ON state and the light is on, if the switch is pressed the contact status turns
OFF and the light also turns OFF.
Circuit 3 contains more than one input element. Output Y2 light will turn ON under the
condition when X2 is closed or X3 switches to ON, and X4 must switch ON too.
49
Operation manual for ladder program simulation
3.2 Features
Can simulate the FATEK PLC ladder program execution without PLC
connection.
With run time editing feature, during the simulation process the program
can be modified without stop the execution.
Fig: 3.4
50
3.4 Operation of program simulation
Follow the following main menu operation to open the “ ssi.pdw” project file.
File > Open project > Open file > select ssi.pdw. After select the project,
the screen will display as follows:
Fig: 3.5
51
3.4.3 Start execution of program simulation
Fig: 3.6
During the execution, there is a blinking red dot at the left side of status bar.
On the right of the red dot has SC:xx, xx means the number of time have been
scanned. During simulation, can use the status page to monitor or modify the
value of register or discrete point.
Main Menu: PLC > Pause Simulation or the easiest way is to click the space
Bar
At this point, the blinking red dot stop blinking and it will become pink color.
52
3.4.5 Proceed to program simulation
Main Menu: PLC > Resume Simulation or the easiest way is to click the
space bar
At this point, the dot becomes blinking again and the program continues the
operation.
Control scanning
Single scan
Fig: 3.7
53
Multiple scan
Fig: 3.8
Continuous scan
54
3.5 Project Ladder Diagram:
Fig: 3.9
Fig: 3.10
55
Fig: 3.11
This is the Ladder Logic Code of the Project. This program gives the PLC to perform the
automatic sorting system. This code works along with 5 Sensors used on conveyor belts.
The inputs X0 and X1 are used to detect the larger items, when both the sensors are ON
at the same time the object is detected and it Sets M0. When M0 is high the timer T50 is
activated for a specific amount of time to open the CD Rom which is connected to the
output Y0 through an SPDT Relay, and also increment the value in the register R0.
When T50 is UP, then another time is activated to close the CD ROM through output Y1.
Similarly the input X2 is used for the small items detection. And the program flow is
exactly the same.
X3 and X4 are used for the Metal and color sensors respectively.
M7 and M8 are used for the motors control from the SCADA, through a GUI application
designed in Win Log .
56
3.6 Hardware Methodology
Schematic
Fig: 3.12
57
Sensors wiring
Brown = +24v
Blue = Gnd
Black = signal
C0 And C1 are common contact and are internal short with the plc outputs when are in
ON condition.
The Hardware is controlled in two Portions , PLC alone and plus with SCADA.
the objects are detected by the sensors connected to the inputs (“X0 …..”). The input
from the sensors is processed by the plc stored In registers and then transferred to the
SCADA system for visual Display that can be seen by the operators in the control Room.
The opening and closing of the CD ROMs is achieved by using a 12v Relay. This relay is
ON and OFF according to the type of objects detected.
58
3.6.1 Project PCBs:
Relay module:
Fig: 3.13
59
H-bridge:
Fig: 3.14
The project PCBs are made in a computer application called CadSoft Eagle.
60
CHAPTER 4 Programming
61
62
CHAPTER 5 Results And Conclusion
This system can be easily updated. We can add more sensors without effecting the
previously installed sensors and their programming. We can also use HMI on the
machine itself. So that we get much powerful control over the system.
63