Automatic Sorting, Counting and Bottle Filling System: January 2012
Automatic Sorting, Counting and Bottle Filling System: January 2012
net/publication/310800445
CITATION READS
1 15,918
4 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Motion Synchronization Control For Heterogeneous Drive Actuation system involving HA/EHA for Large Civil Aircraft View project
All content following this page was uploaded by Waheed Ur Rehman on 25 November 2016.
SESSION 2008-2012
Supervisor
ENGR.KHURRAM SALEEM
Submitted By
July 2012
Automatic Sorting, Counting and Bottle Filling System
ABSTRACT
This project is aimed at automating the sorting and bottle filling. This project will
automatically sort bottle according to their size by using IR sensors. Then it sorts the
bottle on the designated portion of conveyor belt and passes it to the Solenoid Operated
Valves to fill the bottles. The overall system is liberated from human intervention. The
system is comprehensive and efficient, thus can help in automating the sorting and bottle
filling.
UNDERTAKING
We certify that research work titled “AUTOMATIC SORTING & BOTTLE FILLING”
is our own work. The work has not, in whole or in part, been presented elsewhere for
assessment. Where material has been used from other sources it has been properly
acknowledged/ referred.
_________________
(08-MCT-18)
_________________
HASSAN ELAHI
(08-MCT-63)
_________________
WAHEED-UR-REHMAN
(08-MCT-67)
__________________
(08-MCT-70)
ACKNOWLEDGEMENTS
Firstly, we thank Almighty Allah for all the blessings and help in the completion of this
project. Secondly, we would like to express our gratitude to Engr. Khurram Saleem, our
supervisor, for all the help that he extended to us during the course of this project.
Table of Contents
ABSTRACT
UNDERTAKING
ACKNOWLEDGEMENTS
CHAPTER 1: INTRODUCTION
1.1 Introduction
1.2 Objectives
1.3 Discription
2.1 History
2.3 Sorting
3.1 Bearing
3.4 Pulley
4.1.1 Principle
4.1.2 Operation
4.1.4 Slip
4.3.1 Advantages
4.3.2 Disadvantages
5.4 MCT 2e
5.5 Relay
5.6 IR sensor
5.7 Resistor
5.8 Capacitor
8.1.1 Advantages
Conclusion
References
Appendix A
Glossary
List of Figures
Chapter 1:
INTRODUCTION
1.1 Introduction
Industrial Automation plays an increasingly important part in the global economy and
also in daily experience. At present, for companies, the purpose of automation has shifted
from growing productivity and reducing costs to broader issues. This work takes the idea
of automatic sorting and bottle filling. The control system uses microcontroller. Sorting
of bottles is done on the conveyer belt via IR sensors and then these bottles are filled by
actuating the solenoid valves. The conveyors are used in many automated industries for
moving parts from one place to another. The second concern is the bottle filling. Once the
bottle is sorted, conveyer belt transfers it under the water tank for filling.
1.2 Objectives
1.3 Description
In automated factories production rate is very high, so sorting and filling of bottles
need to run at fast speed. To separate the bottle on the basis of their sizes, shapes or
After that these bottles are filled up to some specific level. For that purpose bottle
3. Factory price
get desired result. We have used AT89C51 to implement the control in our project.
Chapter 2:
LITERATURE REVIEW
2.1 History
Conveyor belts were used since the 19th century. In 1892, Thomas Robins began a series
of inventions which led to the development of a conveyor belt used for carrying coal, ores
and other products. In 1901, Sandvik invented and started the production
of steel conveyor belts. In 1905 Richard Sutcliffe invented the first conveyor belts for use
In 1913, Henry Ford introduced conveyor-belt assembly lines at Ford Motor Company's
Highland Park, Michigan factory. In 1972, the French society REI created in New
Caledonia the then longest straight-belt conveyor in the world , at a length of 13.8 km.
Hyacynthe Marcel Bocchetti was the concept designer. In 1957, the B. F. Goodrich
Company patented a conveyor belt that it went on to produce as the Turnover Conveyor
Belt System. Incorporating a half-twist, it had the advantage over conventional belts of a
longer life because it could expose all of its surface area to wear and tear. Mobius
strip belts are no longer manufactured because untwisted modern belts can be made more
In 1963-64, First Indian Small Scale Industrial Unit with Japanese Plant for Rubber Belts
for Conveyor / Elevator / Transmission was installed near National Capital Territory of
Delhi and its Mr Belts Conveyor Belting has been widely used in Steel, Cement,
Fertilizer, Thermal Power, Sponge Iron Plants and Coal / Mineral establishments / Mines,
Port Trusts and similar material handling applications of Industry for the last over four
decades;
A conveyor belt (or belt conveyor) consists of two or more pulleys, with a continuous
loop of material - the conveyor belt - that rotates about them. One or both of the pulleys
are powered, moving the belt and the material on the belt forward. The powered pulley is
called the drive pulley while the unpowered pulley is called the idler. There are two main
industrial classes of belt conveyors; Those in general material handling such as those
moving boxes along inside a factory and bulk material handling such as those used to
transport industrial and agricultural materials, such as grain, coal, ores, etc. generally in
outdoor locations. Generally companies providing general material handling type belt
conveyors do not provide the conveyors for bulk material handling. In addition there are
The belt consists of one or more layers of material. They can be made out of rubber.
Many belts in general material handling have two layers. An under layer of material to
provide linear strength and shape called a carcass and an over layer called the cover. The
carcass is often a cotton or plastic web or mesh. The cover is often various rubber or
plastic compounds specified by use of the belt. Covers can be made from more exotic
materials for unusual applications such as silicone for heat or gum rubber when traction is
essential.
2.3 Sorting
UET Taxila, Chakwal Campus Page 16
Automatic Sorting, Counting and Bottle Filling System
Sorting is any process of arranging items in some sequence and/or in different sets, and
1. ordering: arranging items of the same kind, class, nature, etc. in some ordered
sequence,
2. categorizing: grouping and labeling items with similar properties together (by
sorts)
Various sorting tasks are essential in industrial processes. For example, during the
extraction of gold from ore, a device called a shaker table uses gravity, vibration, and
flow to separate gold from lighter materials in the ore (sorting by size and weight).
of ore or sediment. Sorting results from the application of some criterion or differential
stressor to a mass to separate it into its components based on some variable quality.
Materials that are different, but only slightly so such as the isotopes of uranium, are very
difficult to separate.
Bottle filling:
bottle filling system. When the IR sensor detects the bottle the conveyor belt
stops at the moment. At the same time signal from the microcontroller
actuates the solenoid valve, and the filling starts. The time required to raise the
CHAPTER 3:
Mechanical components
3.1 Bearings
A bearing is any of various machine elements that constrain the relative motion between
two or more parts to only the desired type of motion. This is typically to allow and
promote free rotation around fixes axis or free linear movement; it may also be
to prevent any motion, such as by controlling the vectors of normal forces. Bearings may
be classified broadly according to the motions they allow and according to their principle
A ball bearing is a type of rolling-element bearing that uses balls to maintain the
separation between the bearing races. The purpose of a ball bearing is to reduce rotational
friction and support radial and axial loads. It achieves this by using at least two races to
contain the balls and transmit the loads through the balls. In most applications, one race is
stationary and the other is attached to the rotating assembly (e.g., a hub or shaft). As one
of the bearing races rotates it causes the balls to rotate as well. Because the balls are
rolling they have a much lower coefficient of friction than if two flat surfaces were
Ball bearings tend to have lower load capacity for their size than other kinds of rolling-
element bearings due to the smaller contact area between the balls and races. However,
they can tolerate some misalignment of the inner and outer races.
We used two wooden rollers in our project, clamped on the structure. They allow
conveyor belt to roll on, by providing sufficient amount of friction between the surface
contacts. There are two shafts at both end of the rollers. The diameter of the rollers is 4.5
inch each.
There are two shafts at the ends of each roller. Out of four shaft one shaft is connected to
the motor via pulley. The motor rotates the shaft and hence conveyor belt starts moving.
3.4 Pulley
along its circumference. Pulleys are used in a variety of ways to lift loads, apply forces,
and to transmit power. A pulley is also called a sheave or a drum and may have
a groove between two flanges around its circumference. The drive element of a pulley
system can be a rope, cable, belt, or chain that runs over the pulley inside the groove.
Hero of Alexandria identified the pulley as one of six simple machines used to lift
weights. Pulleys are assembled to form a block and tackle in order to provide mechanical
advantage to apply large forces. Pulleys are also assembled as part of belt and chain
Chapter 4:
Electrical components
the rotor by means of electromagnetic induction, rather than a commutator or slip rings as
in other types of motor. These motors are widely used in industrial drives. The induction
motor in our project is used to drive the rollers and conveyor belt. The motor converts
4.1.1 Principle
Induction principle, in other words it depends on Faraday's law of induction (i.e. when a
4.1.2 Operation
In both induction and synchronous motors, the stator is powered with alternating current
(poly phase current in large machines) and designed to create a rotating magnetic
field which rotates in time with the AC oscillations. In a synchronous motor, the rotor
turns at the same rate as the stator field. By contrast, in an induction motor the rotor
rotates at a slower speed than the stator field. Therefore the magnetic field through the
rotor is changing (rotating). The rotor has windings in the form of closed loops of wire.
The rotating magnetic flux induces currents in the windings of the rotor as in a
transformer. These currents in turn create magnetic fields in the rotor, that interact with
(push against) the stator field. Due to Lenz's law, the direction of the magnetic field
created will be such as to oppose the change in current through the windings. The
cause of induced current in the rotor is the rotating stator magnetic field, so to oppose
this the rotor will start to rotate in the direction of the rotating stator magnetic field to
make the relative speed between rotor and rotating stator magnetic field zero.
For these currents to be induced, the speed of the physical rotor must be lower than that
of the stator's rotating magnetic field ( ), or the magnetic field would not be moving
relative to the rotor conductors and no currents would be induced. As the speed of the
rotor drops below synchronous speed, the rotation rate of the magnetic field in the rotor
increases, inducing more current in the windings and creating more torque. The ratio
between the rotation rate of the magnetic field as seen by the rotor (slip speed) and the
rotation rate of the stator's rotating field is called "slip". Under load, the speed drops and
the slip increases enough to create sufficient torque to turn the load. For this reason,
The synchronous speed of an AC motor is the rotation rate of the rotating magnetic field
created by the stator. It is always an integer fraction of the supply frequency. The
Magnetic pole pairs per phase. When using total number of poles, use 120 as constant
instead of 60. For example, a small 3-phase motor typically has six magnetic poles
organized as three opposing pairs 120° apart, each powered by one phase of the
supply current. So there is one pair of poles per phase, which means p = 1, and for a
4.1.4 Slip
Slip s is the rotation rate of the magnetic field, relative to the rotor, divided by the
where is the rotor rotation speed in rpm. It is zero at synchronous speed and 1
(100%) when the rotor is stationary. The slip determines the motor's torque. Since the
short-circuited rotor windings have small resistance, a small slip induces a large
current in the rotor and produces large torque. At full rated load, typical values of slip
are 4-6% for small motors and 1.5-2% for large motors, so induction motors have
main parts: the solenoid and the valve. The solenoid converts electrical energy
into mechanical energy which, in turn, opens or closes the valve mechanically.
AC electric signal to drive the motor; additional sensors and electronics control
the inverter output. A brushless DC motor is electric engine where the stator is a
classic 3 phase stator and the rotor has surface mounted permanent magnets. It is
BLDC motor has no commutator and brushes, it requires electronic control for
operation. They often have external position sensors used by control unit, but
makes them DC. Most BLDC motors are 3 phase motors, so they have poles that
are sets of three (e.g. 3 poles, 6 poles, 9 poles, 12 poles, etc...). You can connect
a BLDC motor to a three phase AC current and it should work fine, just as you
There are generally two methods of winding BLCD motors, Delta and Wye:
• Higher RPMs
• Lower RPMs
• Higher efficiency
As we can already see, it would make sense that a CD-Rom motor is a Delta
configuration, as high speed is more important than low speed torque (a plastic
disk is not that heavy, so it does not need a lot of energy to accelerate). Likewise,
it is most likely that BLDC motors used for things like fans are probably of the
operation. A quick way of getting a rough idea of what type of winding you have
usually have 3 connectors, while "Wye" 4. Note that this is just a rough estimate,
you can get either configuration with 3 or 4 wires, but it is still useful as quick
As for controlling them, most digital controllers will happily work with both, but
some cheap controllers will only work with the "Wye" configuration (and of
those, only the 4 wire version), as they need the centre point to function.
Advantages
o Water cooling
Disadvantages
Chapter 5:
ELECTRONICS COMPONENETS
89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and
128 bytes of RAM. It can be erased and program to a maximum of 1000 times.
In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports
are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except
P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are
written to these port pins, they are pulled high by the internal pull-ups and can be used as
inputs. These ports are also bit addressable and so their bits can also be accessed
individually.
Port P0 and P2 are also used to provide low byte and high byte addresses, respectively,
when connected to an external memory. Port 3 has multiplexed pins for special functions
like serial communication, hardware interrupts, timer inputs and read/write operation
from external memory. AT89C51 has an inbuilt UART for serial communication. It can
5.2 LCD
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals (LCs). LCs do not emit
light directly.
LCD displays are available to display arbitrary images (as in a general-purpose computer
display) or fixed images which can be displayed or hidden, such as preset words,
digits, seven segment displays, etc., as in a digital clock. They use the same basic
technology, except that arbitrary images are made up of a large number of small pixels,
Very High Quality Yellow/Green 20x4 High-Density Character LCD with LED
Backlight.
This LCD is only slightly larger than a typical 16x2 module. The compact size of
this LCD fits nicely on the development boards' LCD pin connector and greatly
expands a user's ability to display more data using the same code libraries
The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays.
It consists of seven NPN darling-ton pairs that feature high-voltage outputs with
common-cathode clamp diode for switching inductive loads. The collector-current rating
of a single darling-ton pair is 500mA. The darling-ton pairs may be parralleled for higher
current capability. Applications include relay drivers, hammer drivers, lamp drivers,
display drivers (LED gas discharge), line drivers, and logic buffers. The ULN2003 has a
2.7kilo ohm series base resistor for each darling-ton pair for operation directly with TTL
or 5V CMOS devices.
5.4 MCT 2e
Transistor Biasing
5.5 Relay
switching mechanism mechanically, but other operating principles are also used. Relays
are used where it is necessary to control a circuit by a low-power signal (with complete
electrical isolation between control and controlled circuits), or where several circuits
When an electric current is passed through the coil it generates a magnetic field that
activates the armature, and the consequent movement of the movable contact (s) either
makes or breaks (depending upon construction) a connection with a fixed contact. If the
set of contacts was closed when the relay was de-energized, then the movement opens the
contacts and breaks the connection, and vice versa if the contacts were open. When the
current to the coil is switched off, the armature is returned by a force, approximately half
as strong as the magnetic force, to its relaxed position. Usually this force is provided by a
spring, but gravity is also used commonly in industrial motor starters. Most relays are
5.6 IR sensor
When IR rays gets emitted from LED, it moves in the direction it is angled. When any
obstacle interferes in the path, the IR rays get cut and it produces secondary wavelets
primary waves, which produces the net result like reflection of IR rays.
Infrared photo receiver is a two terminal PN junction device, which operates in a reverse
bias. It has a small transparent window, which allows light to strike the PN junction. A
photodiode is a type of photo detector capable of converting light into either current or
voltage, depending upon the mode of operation. Most photodiodes will look similar to a
light emitting diode. They will have two leads, or wires, coming from the bottom. The
shorter end of the two is the cathode, while the longer end is the anode.
5.7 Resistor
the voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a
resistor's terminals to the intensity of current through the circuit is called resistance. This
Where I, is the current through the conductor in units of amperes, V is the potential
difference measured across the conductor in units of volts, and R is the resistance of the
conductor in units of ohms. More specifically, Ohm's law states that the R in this relation
networks and electronic circuits and are ubiquitous in electronic equipment. Practical
resistors can be made of various compounds and films, as well as resistance wire (wire
within integrated circuits, particularly analog devices, and can also be integrated
5.8 Capacitor
component used to store energy in an electric field. The forms of practical capacitors
vary widely, but all contain at least two electrical conductors separated by
a dielectric (insulator); for example, one common construction consists of metal foils
separated by a thin layer of insulating film. Capacitors are widely used as parts
difference (voltage) across the conductors, a static electric field develops across the
dielectric, causing positive charge to collect on one plate and negative charge on the other
single constant value, capacitance, measured in farads. This is the ratio of the electric
charge on each conductor to the potential difference between them. The capacitance is
greatest when there is a narrow separation between large areas of conductor, hence
capacitor conductors are often called "plates," referring to an early means of construction.
In practice, the dielectric between the plates passes a small amount of leakage current and
also has an electric field strength limit, resulting in a breakdown voltage, while the
Capacitors are widely used in electronic circuits for blocking direct current while
allowing alternating current to pass, in filter networks, for smoothing the output of power
supplies in the resonant circuits that tune radios to particular frequencies, in electric
power transmission systems for stabilizing voltage and power flow, and for many other
purposes.
5.9 Led
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator
lamps in many devices and are increasingly used for other lighting. Introduced as a
practical electronic component in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet, and infrared wavelengths,
on), electrons are able to recombine with electron holes within the device, releasing
energy in the form of photons. This effect is called electroluminescence and the color of
the light (corresponding to the energy of the photon) is determined by the energy gap of
the semiconductor. LEDs are often small in area (less than 1 mm2), and integrated optical
many advantages over incandescent light sources including lower energy consumption,
longer lifetime, improved robustness, smaller size, and faster switching. LEDs powerful
enough for room lighting are relatively expensive and require more precise current and
Chapter 6:
Length == 12 feet
Width == 21 inch
Length == 28 inch
Pulley 1 == 24 inch
Pulley 2 == 12 inch
Pulley 3 == 2 inch
Pulley 4 == 2 inch
There are four bearings used in our project, each having diameter 1.5 inch.
There are four shafts at the end of rollers. Each shaft has diameter equal to 1.5 inch.
Length == 6 feet
Width:
Height == 18 inch
• Shesham
• cheerh
Chapter 7:
In order to automate a process, first of all we need some sort of control system and also a
mathematical logic through which we can get results whatever we desired. It provides
ON/OFF, proportional control, PID control but to implement this method, a physical
1. Sensor
2. Signal conditioning
3. Control unit
4. Actuator
5. Feedback
1) SENSOR
A sensor (also called detector) is a converter that measures a physical quantity and
expansion and contraction of a liquid which can be read on a calibrated glass tube.
a voltmeter. For accuracy, most sensors are calibrated against known standards.
Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile
sensor) and lamps which dim or brighten by touching the base. There are also
innumerable applications for sensors of which most people are never aware. Applications
indicates how much the sensor's output changes when the measured quantity changes.
2) Signal conditioning
that it meets the requirements of the next stage for further processing. Most common use
done) and a processing stage (normally carried out by an ADC and a micro-
controller). Operational amplifiers (op-amps) are commonly employed to carry out the
voltage and current, frequency and electric charge. Sensor inputs can
bridge, and LVDT or RVDT. Specialized inputs include encoder, counter or tachometer,
timer or clock, relay or switch, and other specialized inputs. Outputs for signal
isolation and any other processes required to make sensor output suitable for processing
after conditioning.
3) Control unit
In a general sense a control unit (CU) is a central (or sometimes distributed but clearly
The control unit coordinates the components of a computer system. It fetches the code of
all of the instructions in the program. It directs the operation of the other units by
providing timing and control signals. All computer resources are managed by the CU. It
directs the flow of data between the Central Processing Unit (CPU) and the other devices.
The control unit was historically defined as one distinct part of the 1946 reference model
of Von Neumann architecture. In modern computer designs, the control unit is typically
an internal part of the CPU with its overall role and operation unchanged.
The control unit is the circuitry that controls the flow of data through the processor.
4) Actuator
fluid pressure or pneumatic pressure, and converts that energy into some kind of motion.
An actuator is the mechanism by which an agent acts upon an environment. The agent
can be either an artificial intelligence agent or any other autonomous being (human, other
animal, etc.
5) Feedback
Feedback is a process in which information about the past or the present influences the
forms a circuit or loop, the event is said to feed back into itself.
Similarities between our project and the above feedback system are as follows:
Sensor == IR sensor
The IR sensors are clamped at specific height to detect the bottles according to their
heights. When the sensor detects the bottle, it gives signal to the controller. Controller
drives the dc motor for push mechanism, in this way sorting of bottle is done. In second
stage, after sorting, when the bottle reaches near to the water reservoir. IR sensor detects
bottle again it generates the logic 1. The controller receives that signal, and at the same
time it performs two functions by switching two relays. The first relay stops the motor
which is driving the conveyor belt. Secondly, solenoid valve is actuated via second relay.
Chapter 8:
In previous chapters we have discussed about the project. Now it’s turn to come to know
about the applications and advantages of this project. Due to these applications which we
shall discuss in this chapter, we preferred to choose this idea. The main aims of our
Automated sorting systems will feature computerized controls that will allow materials to
be sorted without human control or interaction. This is suitable for high-volume jobs that
would require high levels of manpower otherwise. Automated systems tend to be more
expensive than manual systems, and operators of these machines will usually need to
undergo significant training before the system can be used effectively. Manual systems
tend to be less expensive and far easier to use; they are also more easily serviceable,
1) Parts handling
• Parts distribution for multiple box filling - The Duck is designed to convey parts from a
conveyor into boxes. Programmable to dispense precise number of parts into each box.
• Parts Conveyors linking with pick and place robots, including interface and guarding
• Multiple machine conveying systems for central packaging via PLC control
Pharmaceutical industries like Glaxo and Abbot Pakistan make variety of products. These
products are transported through conveyor belt. They are sorted out according to their
similarities. Automating sorting can be applied in the food and consumer goods
producing industries like Nestle and uniliver because they have variety of products.
industry where production of glasses takes place, defective pieces are sorted out. Later
4) Separation of boxes
In packages industry Lahore, variety of boxes are produced, which are further used for
packing for example milk pack. The boxes are separated from one another on the basis of
their size.
In Master tiles, in which heavy boxes are produced with high accuracy and speed. It is the
• Belt conveyors are capable of handling a wide range of bulk materials from very fine to
large lump sizes. Very fine materials such as portland cement are loaded at terminals
using belt conveyors. Large lump size materials such as coal are transported from mines
• Belt conveyors require less horsepower to operate than other types of conveyors. Bulk
materials are carried on top of the belt and remain static, therefore requiring much less
energy to move.
• Conveyor belts are mechanical apparatuses that contain a continuous moving belt that is
used to transport materials, packages and people from one point to another. The belt
E-PAK Machinery, Inc. offers a wide variety of liquid filling machine technologies
capable of filling viscous and non-viscous liquids as well as foamy products with a high
degree of accuracy and many options to choose from. Our filling systems are fully
capable of meeting the needs of food grade, sanitary, pharmaceutical, hazardous, and
needs, from big aseptic beverage or drum filling machines to filling machines that can
improved on the base of original full auto capsule filling machine from home and
aboard.
2. Milk filling
Chapter 9:
• manpower
We did sorting on the basis of height of the bottles. However, sorting can be improved
through image processing. In image processing bottle can be sorted on the basis of colors
and shapes.
The second part of our project was bottle filling, for which we used solenoid operated
valve. We did programming in such a way that it actuated the valve for a few seconds.
For further improvement of material handling operations Scara Robot can be used. The
robot is very helpful in picking and placing of bottles. But in this project we manually
References
http://en.wikipedia.org/wiki/Conveyor_belt
http://en.wikipedia.org/wiki/Sorting
http://en.wikipedia.org/wiki/Bearing_(mechanical)
http://en.wikipedia.org/wiki/Pulley
http://en.wikipedia.org/wiki/Induction_motor
http://www.ziva-vatra.com/index.php?aid=26&id=RWxlY3Ryb25pY3M=
http://www.engineersgarage.com/electronic-components/at89c51-microcontroller-
datasheet
http://en.wikipedia.org/wiki/Liquid_crystal_display
2003http://www.datasheetcatalog.org/datasheets/120/489337_DS.pdf
http://www.datasheetcatalog.org/datasheets/90/424848_DS.pdf
http://en.wikipedia.org/wiki/Relay
GLOSSARY
Sensor
A device that measures a physical quantity and converts it into a signal which can be read
by an observer or by an instrument
Sorting
Sorting is any process of arranging items in some sequence and/or in different sets.
Transistor (BJT’s)
Three terminal electronic device constructed of doped semiconductor material and may
Electromagnetic induction
The phenomenon in which emf is induced in a conductor, when it is moving through the
magnetic field.
Appendix
Program code
ORG 0H
CLR P2.6
CLR P2.3
CLR P2.4
MOV A,#38H
ACALL COMNWRT
ACALL DELAY
ACALL COMNWRT
ACALL DELAY
MOV A,#01
ACALL COMNWRT
UET Taxila, Chakwal Campus Page 60
Automatic Sorting, Counting and Bottle Filling System
ACALL DELAY
MOV A,#06H
ACALL COMNWRT
ACALL DELAY
MOV A,#80H
ACALL COMNWRT
ACALL DELAY
MOV A,#'A'
ACALL DATAWRT
ACALL DELAY
MOV A,#'U'
ACALL DATAWRT
ACALL DELAY
MOV A,#'T'
ACALL DATAWRT
ACALL DELAY
MOV A,#'M'
ACALL DATAWRT
MOV A,#0C0H
ACALL COMNWRT
ACALL DELAY
MOV A,#94H
ACALL COMNWRT
ACALL DELAY
SETB P0.1
SETB P0.2
AGAIN:
SETB TR0
SETB TR1
BACK:
CLR P2.3
CLR P2.4
JB P0.3,CDROM
CLR P2.6
MOV A, TL0
ACALL CONV
ACALL DISPLAY
JB TF0,WAHEED
MOV A, TL1
ACALL CONV
ACALL DISPLAY1
JNB TF1,BACK
CLR TR1
CLR TF1
MOV TL1,#00H
SJMP AGAIN
WAHEED:
CLR TR0
CLR TF0
MOV TL0,#00H
SJMP AGAIN
CONV:
MOV B,#10
DIV AB
MOV R2,B
MOV B,#10
DIV AB
ORL A,#30H
MOV R4, A
MOV A,B
ORL A,#30H
MOV R3,A
MOV A,R2
ORL A,#30H
MOV R2,A
RET
DISPLAY1:
MOV A,#0E5H
MOV A,R4
ACALL DATAWRT
ACALL DELAY
MOV A,R3
ACALL DATAWRT
ACALL DELAY
MOV A,R2
ACALL DATAWRT
ACALL DELAY
RET
TWO_LITER_BOT:
ACALL DELAY5
CLR P2.5
ACALL DELAY
ACALL DELAY1
SETB P2.5
CLR P2.3
SETB P2.6
ACALL DELAY2
CLR P2.6
LJMP BACK
ONE_LITER_BOT:
ACALL DELAY3
CLR P2.5
ACALL DELAY
ACALL DELAY4
SETB P2.5
CLR P2.4
LJMP BACK
CDROM:
SETB P2.6
ACALL DELAY2
CLR P2.6
LJMP BACK
DISPLAY:
MOV A,#0A5H
ACALL COMNWRT
ACALL DELAY
MOV A,R4
ACALL DATAWRT
ACALL DELAY
MOV A,R3
ACALL DATAWRT
ACALL DELAY
MOV A,R2
ACALL DATAWRT
ACALL DELAY
RET
COMNWRT:
RET
RET
DJNZ R6,HERE2
RET
DELAY1:
MOV R1,#6
HERE6:MOV R2,#25
HERE5:MOV R3,#250
HERE4:MOV R4,#250
HERE3:DJNZ R4,HERE3
DJNZ R3,HERE4
DJNZ R2,HERE5
DJNZ R1,HERE6
RET
DELAY2:
MOV R5,#100
DJNZ R6,W1
DJNZ R5,W
RET
DELAY3:
MOV R5,#4
DJNZ R6,IRFAN1
DJNZ R5,IRFAN
RET
DELAY4:
MOV R1,#8
SALEEM6:MOV R2,#10
SALEEM5:MOV R3,#250
SALEEM4:MOV R4,#250
SALEEM3:DJNZ R4,SALEEM3
DJNZ R3,SALEEM4
DJNZ R2,SALEEM5
DJNZ R1,SALEEM6
RET
DELAY5:
MOV R5,#17
DJNZ R6,LAIQ1
DJNZ R5,LAIQ
RET
END