Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

MANUFACTURING OF BOTTLE FILLING MACHINE

With
(CONVEYOR BELT AND AUDRINO)

A PROJECT REPORT
In partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
in
MECHANICAL ENGINEERING

Under the Guidance of


MR. SUSHIL KUMAR

Submitted by
AAKASH KUMAR SHARMA
Roll No. 1623140004

DEPARTMENT OF MECHANICAL ENGINEERING


R.D. ENGINEERING COLLEGE,
DELHI-MEERUT ROAD, DUHAI, GHAZIABAD UP-201206
AFFILIATED TO AKTU, LUCKNOW

August, 2021

i
CERTIFICATE

Certified that the dissertation Report entitled “MANUFACTURING OF BOTTLE


FILLING MACHINE is being submitted by AAKASH KUMAR SHARMA (Roll No.)
1623140004 in partial fulfillment for the award of the degree of B.Tech in Mechanical
Engineering in A.K.T.U. Lucknow, under my supervision and guidance during the academic
session 2020-21.

Mr. Sushil Kumar Dr. Sanjay Paliwal


(Project Guide) (H.O.D.)

Department of Mechanical Engineering


R.D. ENGINEERING COLLEGE GHAZIABAD
Affiliated to AKTU, Lucknow

ii
DECLARATION

I AAKASH KUMAR SHARMA (Roll No.) 1623140004 of B.Tech Mechanical Engineering


branch hereby declare that work done by me on the topic “MANUFACTURING OF
BOTTLE FILLING MACHINE” as project, under the guidance of SUSHIL KUMAR is
an indigenous piece of work.

AAKASH KUMAR SHARMA


Roll No. 1623140004

Department of Mechanical Engineering


R.D. ENGINEERING COLLEGE GHAZIABAD
Affiliated to AKTU, Lucknow

iii
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.

iv
TABLE OF CONTENTS

CERTIFICATE ii
DECLARATION iii
ABSTRACT iv
CHAPTER 1: INTRODUCTION 1-2
1.1 Introduction

1.2 Objectives

1.3 Description

CHAPTER 2: LITERATURE REVIEW 3-6


2.1 History
2.2 Conveyor belt
2.3 Sorting
2.4 Bottle filling
CHAPTER 3: MECHANICAL COMPONENTS 7-9
3.1 Bearing

3.2 Wooden shaft

3.3 Wooden rollers

3.4 Pulley

CHAPTER 4: ELECTRICAL COMPONENTS 10-15


4.1 Induction motor
4.1.1 Principle
4.1.2 Operation
4.1.3 Synchronous speed
4.1.4 Slip
4.2 Solenoid operated valve
4.3 Brushless Dc motor
4.3.1 Advantages
4.3.2 Disadvantages

v
CHAPTER 5: ELECTRONIC COMPONENTS 16-22
5.4 Microcontroller 89C51
5.5 LCD (20x4)
5.6 ULN 2003MCT 2e
5.7 Relay
5.8 IR sensor
5.9 Resistor
5.10 Capacitor
CHAPTER 6: STRUCTURE OF PROJECT 23
6.1 Dimensions of conveyor belt
6.2 Dimensions of Wooden Roller
6.3 Diameter of pulley
6.4 Diameter of bearings
6.5 Dimension of shaft
6.6 Dimension of structure
6.7 Types of wood
CHAPTER 7: IMPLEMENTATION AND CONTROL 24-28
7.1 Circuit diagram
7.1.1 Simulated circuit diagram
7.1.2 Working of circuit
CHAPTER :8 APPLICATIONS AND ADVANTAGES 29-32
8.1 Application of sorting through conveyor belt
8.1.1 Advantages
8.1.2 Applications of liquid filling
CHAPTER 9: CONCLUSION AND FUTURE WORK 33
9.1 Conclusion
REFERENCE 34
GLOSSARY 35
APPENDIX 36-47

vi
LIST OF FIGURES

Figure 1.1 Automatic sorting and bottle filling machine 1

Figure 2.1 Conveyor belt 4

Figure 2.2 Sorting 5

Figure 2.3 Bottle filling 6

Figure 3.1 Bearing 7

Figure 3.2 Wooden roller 8

Figure 3.4 Pulley 9

Figure 4.1 Induction motor 10

Figure 4.2 Solenoid valve 13

Figure 4.3 Brushless Dc motor 14

Figure 5.1 microcontroller 16

Figure 5.2 LCD 20x4 17

Figure 5.3 ULN 2003 logic diagram 18

Figure 5.4 MCT 2e 19

Figure 5.5 Relay 19

Figure 7.1 Measurement system 25

Figure 7.2 Feedback system 25

Figure 7.3 Circuit diagram 26

Figure 7.3.1 Circuit diagram of project 27

Figure 7.3.2 Simulated circuit diagram 27

vii
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.

Figure 1.1 automatic sorting and bottle filling machine

1
1.2 Objectives

The main objectives of our project are:

 Sorting of bottles on the basis of their respective sizes

 Filling of bottles using SOV

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 height sorting

system is applied.

After that these bottles are filled up to some specific level. For that purpose bottle filling

system is required. This type of system provide following benefits:

1. Stability and safety

2. Easy to operate and maintain

3. Factory price

4. Low running cost

In order to automate a process we need a control system .The control system is implemented

through some physical device, it is usually based on mathematical logic to get desired result.

We have used AT89C51 to implement the control in our project.

2
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 coal

mines which revolutionized the mining industry.

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 durable by

constructing them from several layers of different materials.

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;

3
2.2 Conveyor Belt

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 a number of commercial

applications of belt conveyors such as those in grocery stores.

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.

Figure 2.1 Conveyor

4
2.3 Sorting

Sorting is any process of arranging items in some sequence and/or in different sets, and

accordingly, it has two common, yet distinct meanings:

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). Sorting is also a

naturally occurring process that results in the concentration of ore or sediment.

Fig 2.2: Sorting

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.

5
Bottle filling:

The second part of this project is to design a microcontroller based

automatic 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 bottle few seconds,

Figure 2.3: Bottle filling

6
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 of operation, as

well as by the directions of applied loads they can handle.

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 sliding against each other.

Figure 3.1: Bearings

7
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.

3.2 Wooden rollers

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.

Figure 3.2: Wooden roller

3.3 Wooden shaft

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. The

diameter of each shaft is 2 inch.

3.4 Pulley

A pulley is a wheel on an axle that is designed to support movement of a cable or belt 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

8
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 drives in order to

transmit power from one rotating shaft to another.

Figure 3.4 Pulley

9
CHAPTER 4
ELECTRICAL COMPONENTS

4.1 Induction Motor

An induction or asynchronous motor is a type of AC motor where power is supplied to 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 electrical

energy into mechanical energy.

Figure 4.1 Induction motor

4.1.1 Principle

Induction principle, in other words it depends on Faraday's law of induction (i.e. when a

conductor moves in a magnetic field, it gets some voltage (induced voltage)

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

10
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 (ns ), or the 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, induction motors are sometimes referred to

as asynchronous motors.

4.1.3 Synchronous speed

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 synchronous speed ns in revolutions per minute (RPM) is given by:

11
Where, f is the frequency of the AC supply current in Hz and p is the number of 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 line frequency of 50 Hz the synchronous speed

is 3000 RPM.

4.1.4 Slip

Slip s is the rotation rate of the magnetic field, relative to the rotor, divided by the absolute

rotation rate of the stator magnetic field

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 good speed regulation and are considered

constant-speed motors.

4.2 Solenoid operated valve

A solenoid valve is an electromechanically operated valve. The valve is controlled by an

electric current through a solenoid: A solenoid valve has two main parts: the solenoid and the

valve. The solenoid converts electrical energy into mechanical energy which, in turn, opens

or closes the valve mechanically.

12
Figure 4.2: Solenoid valve

4.3 Brushless DC motor

Brushless DC motors (BLDC motors, BL motors) also known as electronically commutated

motors (ECMs, EC motors) are synchronous motors which are powered by a DC electric

source via an integrated inverter, which produces an 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 equivalent to a reversed DC commutator motor, in which the magnet

rotates while the conductors remain stationary.

BLDC motor has no commutator and brushes, it requires electronic control for operation.

They often have external position sensors used by control unit, but sensorless control is also

possible.

BLDC motors are really AC motors, it is the controller implementation that 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

13
current and it should work fine, just as you can connect them to a Controller which uses DC.

There are generally two methods of winding BLCD motors, Delta and Wye:

Figure 4.3: Brushless Dc motor

The trade-offs are as follows:

Delta windings provide (compared to "Wye" windings):

 Higher RPMs

 Lower torque at low RPMs

 Lower efficiency (but still much higher than normal motors)

Wye windings provide (compared to "Delta" windings):

 Lower RPMs

 Higher torque at low RPMs

 Higher efficiency

 More accurate positioning

14
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 "Wye" configuration, as pushing air at slower

RPMs can contribute to quieter operation. A quick way of getting a rough idea of what type

of winding you have is to look at the number of connectors you motor has. Delta

configurations 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

initial identificataion (further observation using a multimeter can confirm).

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 Magnetic coupler like isolation

o No gearbox, speed controlled by electronic unit

o Good size/power ratio

o Water cooling

Disadvantages

o Modifying CD-ROM/floppy motors can be tricky

o Need dedicated BLDC controller

15
CHAPTER 5
ELECTRONICS COMPONENTS

5.1 Microcontroller (89C51)

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 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 be programmed to

operate at different baud rates. Including two timers & hardware interrupts, it has a total

of six interrupts.

Figure 5.1: Microcontroller

16
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, while other displays have

large elements

Figure 5.2: LCD

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

17
5.3 ULN 2003

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.

Figure 5.3: ULN 2003 logic diagram

5.4 MCT 2e

 Gallium Arsenide Diode Infrared Source Optically Coupled to a Silicon n- p-n Photo

transistor.

 High Direct-Current Transfer Ratio. Base Lead Provided for Conventional Transistor

Biasing

 High-Voltage Electrical Isolation

18
 1.5-kV, or 3.55-kV Rating

Figure 5.4: MCT 2e

5.5 Relay

A relay is an electrically operated switch. Many relays use an electromagnet to operate a

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 must be

controlled by one signal.

Figure 5.5: Relay

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

19
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 manufactured to operate

quickly. In a low-voltage application this reduces noise; in a high voltage or current

application it reduces arcing.

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 which

propagates mostly in return direction or in a direction opposite to that of the 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

A resistor is a passive two-terminal electrical component that implements electrical resistance

as a circuit element. The current through a resistor is in direct proportion to 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 relation is represented by

Ohm's law:

20
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 is constant,

independent of the current. Resistors are common elements of electrical 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 made of a high-resistivity

alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits,

particularly analog devices, and can also be integrated into hybrid and printed circuits.

5.8 Capacitor

A capacitor (originally known as condenser) is a passive two-terminal electrical 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

of electrical circuits in many common electrical devices. When there is a potential 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 plate. Energy is stored

in the electrostatic field. An ideal capacitor is characterized by a 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,

21
resulting in a breakdown voltage, while the conductors and leads introduce an undesired

inductance and resistance.

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, with very high

brightness. When a light-emitting diode is forward-biased (switched 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 components may be used to

shape its radiation pattern. LEDs present 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 heat management than compact fluorescent lamp

sources of comparable output.

22
CHAPTER 6
STRUCTURE (HARDWARE) OF PROJECT

6.1 Dimension of conveyor belt

Length == 12 feet Width == 21 inch

6.2 Dimension of wooden roller

Length == 28 inch Diameter of roller == 4 inch

6.3 Diameter of pulleys

Pulley 1 == 24 inch Pulley 2 == 12 inch Pulley 3 == 2 inch Pulley 4 == 2 inch

6.4 Diameter of bearings

There are four bearings used in our project, each having diameter 1.5 inch.

6.5 Diameter of shaft

There are four shafts at the end of rollers. Each shaft has diameter equal to 1.5 inch.

6.6 Dimension of structure

Length == 6 feet Width:

Upper border == 26 inch Lower border == 29 inch

Height == 18 inch

6.7 Types of wood

 Shesham

 cheerh

23
CHAPTER 7
IMPLEMENTATION AND CONTROL

In order to automate a process, first of all we need some sort of control system and also a

physical device to implement that control system. Actually, control system is 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 device such as

microcontroller or PLC etc is required.

Following are the basic components of an automated system

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 converts

it into a signal which can be read by an observer or by an (today mostly electronic)

instrument.

For example, a mercury-in-glass thermometer converts the measured temperature into

expansion and contraction of a liquid which can be read on a calibrated glass tube.

A thermocouple converts temperature to an output voltage which can be read by 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)

24
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 include cars,

machines, aerospace, medicine, manufacturing and robotics.

A sensor is a device which receives and responds to a signal. A sensor's sensitivity indicates

how much the sensor's output changes when the measured quantity changes.

2) Signal conditioning

Figure 7.1: MEASUREMENT SYSTEM

Figure 7.2: Feedback system

25
Similarities between our project and the above feedback system are as follows:

Controller == Microcontroller 89C51

Sensor == IR sensor

Actuator == Dc motor Push mechanism

Signal conditioning == Transistor darling-ton pair IC ( ULN 2003)

7.1 Circuit diagram of project

Figure 7.3 Circuit diagram

26
Figure 7.3.1: Circuit diagram of project

7.1.1 Simulated circuit diagram

Figure 7.3.2: simulated circuit diagram

27
7.1.2 Working of the circuit

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.

28
CHAPTER 8
APPLICATIONS AND ADVANTAGES

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 project

were automatic sorting and liquid filling.

8.1 Applications of automatic sorting

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, whereas automated

systems may require lengthy troubleshooting and diagnostics.

Following are the application of automatic sorting:

1) Parts handling

 Conveying product from machine to packaging area or bowl feeders

 Conveying process waste and scrap products to granulator

 Separation of sprues in injection moulding process (closed loop)

 Soft Drop conveying systems for PET performs to eliminate damage

 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.

29
 Parts Conveyors linking with pick and place robots, including interface and guarding

 Multiple machine conveying systems for central packaging via PLC control

2) Pharmaceutical, food beverage

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.

3) Separation of defective parts

Automatic sorting is also useful in separating defective parts. In Balochistan glass

industry where production of glasses takes place, defective pieces are sorted out.

Later on, these defective pieces are reproduced.

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.

5) Ceramic and tiles

In Master tiles, in which heavy boxes are produced with high accuracy and speed. It

is the best application of automatic sorting.

8.1.1 Advantages of conveyor

 Reduce labor by automation

 Enables central packaging of product

30
 Eliminates manual sorting of mouldings and sprues

 Reduces possibility of surface damage to product

 Promotes good 'housekeeping

 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

using belt conveyors.

 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

operates by forming a continuous loop on rollers or metal sliders. Power is provided by

motors operating at constant or variable speed.

8.2 Applications of liquid filling

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 corrosive environments. We pride ourselves on providing the

product your business needs, from big aseptic beverage or drum filling machines to

filling machines that can handle containers as small as a cup, tube, vial, or ampoule.

31
1. Automatic capsule filling machine. This machine is designed and further

improved on the base of original full auto capsule filling machine from

home and aboard.

Type: Filling Machine

2. Milk filling

32
CHAPTER 9
CONCLUSION AND FUTURE WORK

Our objectives of making this project are:

 to increase productivity and

 provide safe material handling operations,

 reduce cost and

 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. The

operation of filling of bottles can be improved by using level sensor.

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 place the

bottles on the conveyor.

33
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_mot r

 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

\
34
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 be

used in amplifying or switching applications

Electromagnetic induction

The phenomenon in which emf is induced in a conductor, when it is moving through the

magnetic field.

Electromotive force (emf)

It tends to cause current to flow.

35
APPENDIX
PROGRAM CODE

ORG 0H CLR P2.6 CLR P2.3 CLR P2.4

MOV A,#38H ACALL COMNWRT ACALL DELAY

MOV A,#0CH ;;;DISPLAY ON CURSOR OF BUT IF WE USE 0E THEN DISPLAY WILL

BE ON BUT CURSOR WILL ALSO BE ON

ACALL COMNWRT ACALL DELAY MOV A,#01

ACALL COMNWRT

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

ACALL DELAY ;give LCD some time

MOV A,#'A' ;cursor at line 1, pos. 5 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 1, pos. 6

36
A CALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 1, pos. 7

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'C' ;cursor at line 1, pos. 8

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 1, pos. 9

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'S' ;cursor at line 1, pos. 10 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'O' ;cursor at line 1, pos. 11 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'R' ;cursor at line 1, pos. 12 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 1, pos. 12 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 1, pos. 13 ACALL DATAWRT ;call DATA subroutine ACALL

37
DELAY ;give LCD some time

MOV A,#'N' ;cursor at line 1, pos. 14 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'G' ;cursor at line 1, pos. 15

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#0C0H ACALL COMNWRT ACALL DELAY

MOV A,#'&' ;cursor at line 2, pos. 1 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time MOV A,#' ' ;cursor at line 2, pos. 2

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'B' ;cursor at line 2, pos. 3

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'O' ;cursor at line 2, pos. 4 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 2, pos. 5

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 2, pos. 6

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

38
MOV A,#'L' ;cursor at line 2, pos. 7

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'E' ;cursor at line 2, pos. 8

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 2, pos. 9

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'F' ;cursor at line 2, pos. 10 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 2, pos. 11 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

t line 2, pos. 12

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'L' ;cursor at line 2, pos. 13 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'L' ;cursor at line 2, pos. 14 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 2, pos. 15 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'N' ;cursor at line 2, pos. 16 ACALL DATAWRT ;call DATA subroutine

ACALL DELAY ;give LCD some time

MOV A,#'G' ;cursor at line 2, pos. 17 ACALL DATAWRT ;call DATA subroutine ACALL

39
DELAY ;give LCD some time

MOV A,#94H ACALL COMNWRT ACALL DELAY

MOV A,#'2' ;cursor at line 3, pos. 1

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time MOV

A,#' ' ;cursor at line 3, pos. 2

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'L' ;cursor at line 3, pos. 3

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 3, pos. 4

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 3, pos. 5

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'R' ;cursor at line 3, pos. 6

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'E' ;cursor at line 3, pos. 7

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 3, pos. 8

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'B' ;cursor at line 3, pos. 9

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'O' ;cursor at line 3, pos. 10 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

40
MOV A,#'T' ;cursor at line 3, pos. 11 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 3, pos. 12 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'L' ;cursor at line 3, pos. 13 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'E' ;cursor at line 3, pos. 14 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 3, pos. 15 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'=' ;cursor at line 3, pos. 16 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 3, pos. 17 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#0D4H ;cursor at line 4, pos. 1 ACALL COMNWRT ;call command subroutine

ACALL DELAY ;give LCD some time

V A,#'1' ;cursor at line 4, pos. 1

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time MOV

A,#' ' ;cursor at line 4, pos. 2

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

41
MOV A,#'L' ;cursor at line 4, pos. 3

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'I' ;cursor at line 4, pos. 4

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 4, pos. 5

ACALL DATAWRT ;call DATA subroutine

ACALL DELAY ;give LCD some time

MOV A,#'R' ;cursor at line 4, pos. 6

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'E' ;cursor at line 4, pos. 7

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 4, pos. 8

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'B' ;cursor at line 4, pos. 9

ACALL DATAWRT ;call DATA subroutine ACALL DELAY ;give LCD some time

MOV A,#'O' ;cursor at line 4, pos. 10 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 4, pos. 11 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'T' ;cursor at line 4, pos. 12 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

42
MOV A,#'L' ;cursor at line 4, pos. 13 ACALL DATAWRT ;call DATA subroutine

ACALL DELAY ;give LCD some time

MOV A,#'E' ;cursor at line 4, pos. 14 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 4, pos. 15 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#'=' ;cursor at line 4, pos. 16 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV A,#' ' ;cursor at line 4, pos. 17 ACALL DATAWRT ;call DATA subroutine ACALL

DELAY ;give LCD some time

MOV TMOD, #01100110B SETB P0.1

SETB P0.2

SETB P3.4 ;;COUNTER0 SETB P3.5 ;;COUNTER1 MOV TH0, #0FFH

MOV TH1, #0FFH

AGAIN:

B TR0 SETB TR1

:JB P0.1,TWO_LITER_BOT ; ;KEEP MONITORING VALVE TWO CLR P2.3

JB P0.2,ONE_LITER_BOT ;KEEP MONITORING VALVE ONE 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

43
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

ACALL COMNWRT ;call command subroutine ACALL DELAY ;give LCD some time

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

SETB P2.3 ;OPEN VALVE OF 2 LITRE BOTTLE ACALL DELAY1

SETB P2.5

CLR P2.3 SETB P2.6

ACALL DELAY2 CLR P2.6

44
LJMP BACK

ONE_LITER_BOT: ACALL DELAY3 CLR P2.5

ACALL DELAY

SETB P2.4 ;OPEN VALVE OF 1 LITRE BOTTLE 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:

MOV P1,A ;copy reg A to port 1 CLR P2.0 ;RS=0 for command

CLR P2.1 ;R/W=0 for write SETB P2.2 ;E=1 for high pulse

ACALL DELAY ;give LCD some time CLR P2.2 ;E=0 for H-to-L pulse

RET

DATAWRT: ;write data to LCD MOV P1,A ;copy reg A to port 1 SETB P2.0 ;RS=1 for data

45
CLR P2.1 ;R/W=0 for write SETB P2.2 ;E=1 for high pulse

ACALL DELAY ;give LCD some time CLR P2.2 ;E=0 for H-to-L pulse

RET

DELAY: MOV R6,#20 ;250 or higher for fast CPUs HERE2: MOV R7,#200 ;R4 = 255

HERE: DJNZ R7,HERE ;stay until R4 becomes 0 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

W:MOV R6,#210 ;250 or higher for fast CPUs W1: MOV R7,#100 ;R4 = 255

W2: DJNZ R7,W2 ;stay until R4 becomes 0

DJNZ R6,W1 DJNZ R5,W RET DELAY3:

MOV R5,#4

IRFAN:MOV R6,#255 ;255 or higher for fast CPUs IRFAN1: MOV R7,#255 ;R7 = 255

IRFAN2: DJNZ R7,IRFAN2 ;stay until R7 becomes 0 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

46
DELAY5:

MOV R5,#17

LAIQ:MOV R6,#255 ;255 or higher for fast CPUs LAIQ1: MOV R7,#255 ;R7 = 255

LAIQ2: DJNZ R7,LAIQ2 ;stay until R7 becomes 0 DJNZ R6,LAIQ1

DJNZ R5,LAIQ RET

END

47

You might also like