Professional Documents
Culture Documents
Project advisor:
Mr. Kasiye T.
June, 2017
Bahir Dar, Ethiopia
Automatic water level indicator and control system 2017
Declaration
We declare that this final project is our original work, and it has not been presented for a project
in this or any other universities, and all sources of materials that will be used for the project work
have been fully acknowledged.
Name Signature
1. Alemu Birhane _____________
2. Andualem Molla _____________
3. Yayew Fetene _____________
4. Yewulzaf Mekonnen _____________
This project proposal has been submitted for examination with my approval as a university
advisor.
Project advisor Signature
Mr. Kasiye T. _______________
Acknowledgment
Firstly, we would like to express our deepest gratitude to our respected advisor Mr. Kasye T. for
his humble guidance, encouragement, patient enthusiasm, invaluable support and motivation
through the whole completion of this project. This project would not be succeeded without his
continuous support.
Secondly, we would like to drop our sincere appreciation to thank to our co- workers who have
been tolerant, motivated us and support us all these semester in accomplishing this project.
Thanks for their encouragement, love and emotional supports that they had given to us. Last but
not least, we would like to express our heartiest appreciation to our friends and those whom
involve directly or indirectly with this project. There is no such meaningful word thank, thank
you so much.
Contents
Declaration ......................................................................................................................................................
Acknowledgment .......................................................................................................................................... ii
Abstract ........................................................................................................................................................ vi
Chapter One .................................................................................................................................................. 1
1 Introduction ................................................................................................................................................ 1
1.1 Background ......................................................................................................................................... 1
1.2 Statement of the Problem .................................................................................................................... 2
1.3 Objectives ........................................................................................................................................... 2
1.3.1 General Objective ........................................................................................................................ 2
1.3.2 Specific objectives ....................................................................................................................... 3
1.4 Significance of the project .................................................................................................................. 3
1.5 Scope of the project ............................................................................................................................ 3
1.6 Methodology ....................................................................................................................................... 3
1.7 Limitation of the Project ..................................................................................................................... 4
Chapter Two.................................................................................................................................................. 5
2 Literature Review....................................................................................................................................... 5
Chapter Three................................................................................................................................................ 7
3 Component Description, Design and specification of the system.............................................................. 7
3.1 Overall operation of the system .......................................................................................................... 7
3.2. Component Description, Design and Specification ........................................................................... 8
3.3 Flow chart for software simulation ................................................................................................... 23
Chapter 4 ..................................................................................................................................................... 25
4 Results and Discussions ........................................................................................................................... 25
4.1 Software Simulation Results and Discussions .................................................................................. 25
4.2 Hardware Results and Discussions ................................................................................................... 27
Chapter Five ................................................................................................................................................ 28
5 Conclusion and Recommendation ........................................................................................................... 28
5.1 Conclusion ........................................................................................................................................ 28
5.2 Recommendation .............................................................................................................................. 29
References ................................................................................................................................................... 30
Appendix ..................................................................................................................................................... 31
List of figures
List of Acronyms
AC……………………………………….....Alternative current
DC………………………………………….Direct current
DOD…………………………………….. ...Depth of discharge
IC………………………………………….. Integrated circuit
IDE…………………………………………Integrated drive electronics
LCD…………………………………………liquid crystal display
LED………………………………………...Light emitting diode
PI…………………………………………...Proportional integrator
PLC………………………………………...Programmable logic control
SCADA.........................................................Supervising control and data acquisition
SG……………………………………………Specific Gravity
TDH………………………………………….Total Dynamic Head
Abstract
Water scarcity is one of the major problems facing major cities of country and wastage
during transmission has been identified as a major problem. This is one of the motivations for
project, to deploy computing techniques in creating a barrier to wastage in order to not only
provide more financial gains and energy saving, but also help the environment and water
cycle which in turn ensures that save water for future.
This project works by embedding a control system into an automatic water pump controller
through the use of different technologies in order to design and implement. The system use
Arduino microcontroller to automate the process of water pumping from source tank to the
over-head tank storage system and has the ability to detect the level of water in a top tank and
source tank, switch on/off the pump and buzzer accordingly and display the status on an LCD
screen.
This project provides an improvement on existing water level controllers by its use of
calibrated circuit to indicate the water level and use of DC instead of AC power thereby
eliminating risk of rectification. In general the microcontroller orders the motor, buzzer and
LCD depending on the information obtained from the sensors that are connected to the two
tanks. Depending on the pressure or force of the water that presents in tank the output of the
level sensor changes. The change of voltage in the level sensor produces change of
information in microcontroller. When the level sensor senses there is need of water in tank
the microcontroller sends message information as current to the motor and buzzer through the
transistor as base of current.
Key word: arduino, motor, buzzer and relay
Chapter One
1 Introduction
1.1 Background
In the past centuries, tanks were filling using manual system, so filling tank were full, energy
consuming and time consuming. Now we are going to design water level controller that uses
single motor and Arduino microcontroller. In many industrial processes, control of liquid
level is required. It was reported that emergency shut-downs in the nuclear power plant are
caused by poor control of the steam generator water level. Such shutdowns greatly decrease
the plant availability and must be minimized.
The project "automatic water level control system" is designed to monitor the level of liquid
in the tank. The system has an automatic pumping system attached to it so as to refill the tank
once the liquid gets to the lower threshold, while offing the pump once the liquid gets to the
higher threshold. Sustainability of available water resource in many reason of the word is
now a dominant issue.
In most houses and buildings, including Bahir Dar University BiT, water is first received and
stored in the ground or sometimes underground tank. The received water supply is allowed to
fill the source tank first, and a water pump motor is then switched on manually so that the
water from the lower tank is pumped and shifted into the upper tank on the roof. Once the
water from the lower tank is transferred into the upper tank until it completely fills, the pump
is again manually switched off. This results in the unnecessary wastage and sometimes non
availability of water in the case of emergency.
The water level control system automatically maintains the desired level of water in series of
tanks, when source tank water empty the microcontroller send signal to the buzzer to give
sound. On the top tank, it switches ON the pump when the water level in the tanks goes
below a predetermined minimum set level and switches it OFF as soon as the water level
reaches the predetermined maximum level in the tanks to prevent them from overflowing,
thus maintains the water at a five fixed levels. The five levels of the tank are displayed on the
LCD as ERROR, EMPTY, QUARTER, HALF, ¾FULL and FULL. User has the flexibility
to decide the water level set points for the operations of pump. It ensures no overflows there
by saving energy and water. Moreover the system consumes very little energy for continuous
operation. Water is provided to the housing by a water tank that is situated on top of the
building and water tank is supplied by a source. Once the source has enough water, it is the
duty of the household to switch on the motor, which then pumps water from the source to the
tank that is situated on the roof or terrace. The project automates this process by placing
sensor unit in the tank that periodically take measurements of the water level and that control
the motor automatically, the system controls the desired level of liquid tanks.
In the context of most country, people are still using manual process for water pumping and
motor control that used in home, office and industries. An operator has to arrive at a
particular interval of time and made the motor on for pumping; regardless of the water level
in the upper tank. Manual controlling process is difficult and time consuming when the water
tank is located at higher buildings and controlling from ground level. If they are unable to
monitor continuously, there will be loss of energy sources for pumping water as well as loss
of natural resources due to overflowing of water from tank. Even if the automatic water level
controller that applied in most industries does not consider the level of source tank, it only
concentrates on the top one. The water level controller designed in this project can be used to
control water flow. However, there is no way of knowing whether the source of water,
actually has water or not. If no water source is present, then the submersible pump would
start running unnecessarily and overheat itself. This could be taken care by implementing
another sensor.
This problem can be reduced by designing an automatic control system which checks the
condition both top and source water tank and display the present status.
Microcontroller reads the status of system and gives desired output by switching motor and
displaying on LCD. The Automatic Water Pump Controller system monitors the water levels
and controls the pump as necessary to prevent breakdown and maximize water storage
without overfilling the roof top tank and wasting water, the water level digital control system
automatically maintains the desired level of water in a tank.
1.3 Objectives
The general objective of this project is design and implementation of automatic water level
indicator and controller.
Design and simulate automatic water level control circuit by using proteus software
Construction of design for the driver circuit
Sizing and selection of water pump and discharge
Design the system in prototype
1.6 Methodology
First select the title and retrace different literature review, after this collect data, analysis it
and, selection of appropriate materials.
Revised literature
Implementation
Figure 1.1: Methodology of the work
It is significant to know that this design is limited to 12V power supply, 30amps electric
pump rating and cannot be used to control industrial water pump above 30 amps. When the
water flow is turbulent the signal is high and this affect the output of sensor. If the water
moves down quickly such that the sensor wire still has a film of moisture on it from the
previous water level ,this affect the reading of the sensor.
The operational characteristics of most electronic components are compared against working
temperature range from 0 to 70 0c.
Costs for each device are calculated based on the whole sale of the suppliers, not the
price of single unit in the electronics shop, hence minimum cost is considered.
The life time of each device are assumed to be as mentioned in the data sheet of
manufacturers, less consideration we have made related to working environment
and fault caused aging.
The organization of this Thesis report is well detailed and vast in its coverage it covers all the
activities encountered during the research work. The first chapter of this work took care of
the introduction, aims and objective, scope, Justification and thesis report organization.
Chapter two highlight on literature re-view, chapter three highlight on description of system
and some of the component used were emphasized.
Chapter four highlight on the system design simulation results and discussions
implementation, construction, testing and packaging of the pump. Chapter five is all about the
conclusions problem encountered recommendation.
Chapter Two
2 Literature Review
Many earlier works dealt with various techniques of monitoring and controlling of liquid
levels in industrial and domestic applications. Broadly this automatic control problem can be
achieved under two means: mechanical methods and electrical methods. Float ball type liquid
level control is a popular method of control still used in practice for normal applications such
as overhead tank overflow restrictors etc. The electrical methods of control include
microcontroller-based circuits which automatically predict the liquid levels and accordingly
active the circuit to operate motors. In spite of several such available methods, still there are
new techniques in this application so avoid dangerous operating conditions in industrial
boilers.
A water level control system for nuclear steam generator. The control system consisted of a
feedback controller and a feed forward controller. The robustness and performance of both
the controllers are analyzed and tuning of the two parameters of the controllers. It is shown
that the proposed gain scheduled controller can achieve good performance at high and low
power levels. Control of UTSG water level strongly affects nuclear power station availability.
There has been a special interest in this problem during low power transients because of the
dominant thermal dynamic effects known as shrink and swell. Also, the non-minimum phase
property, changing parameter according to power level, make it difficult to control the water
level of SG to control the water level of a steam generator. [1].
Automatic water level control for domestic application. The water level controller designed
in this project can be used to control water flow. However, there is no way of knowing
whether the source of water, which in this case is the UGT, actually has water or not. If no
water source is present, then the submersible pump would start running unnecessarily and
overheat itself [2].
A control strategy to achieve desired tracking of drum water level. Transfer function between
drum water level (Output) and feed water Vs steam mass rate were considered [3].
Highlighted the principal dynamic phenomena which determine the structuring of Boiler
turbine control systems, clarifying the essential connections of such phenomena with the
Physical nature of the process [4].
Analyzed the water level control of pressurized water reactor nuclear power station using PID
and fuzzy controllers [6].
An adaptive estimator based dynamic sliding mode control method for water level control
[7].
A proportional controller with partial feed forward compensation and decoupling control for
the steam generator water level [8].
The concept of Fuzzy Logic was conceived at the University of California at Berkley. He
presented fuzzy set theory not as a control methodology, but as a way of processing data by
allowing partial set membership rather than crisp set membership or non-membership. This
approach to set theory was not applied to control systems until the 70's due to insufficient
small-computer capability prior to that time. Professor Zadeh reasoned that people do not
require precise, numerical information input, and yet they are capable of highly adaptive
control. If feedback controllers could be programmed to accept noisy, imprecise input, they
would be much more effective and perhaps easier to implement.
Likewise, neural networks are also capable of representing the precise information from
existing data sets. These intelligent control techniques like neural networks, fuzzy logic and
genetic algorithms have been used in liquid level control for the last two decades [9].
Investigated self-organizing fuzzy logic controller for water level control of steam generators.
An automatic water level control detects the water level in the tank and also ensures
continuous water flow round the clock because of its automatic, this automatic water control
is made up of microcontroller written in C programming language this program is burn into
an IC called AT89S52 with 40 pins [10].
The level measurement consist of determining the distance from the upper surface of a liquid
in a reservoir or vessel or any arbitrarily chosen mark located above or below this surface by
itself the level is not an independent physical quantities describing the state of a substance
through direct and indirect level, some examples of direct level measurement are dip-stick,
the bubbler, immersion electrode, capacitor type, liquid level radiation type liquid level
measurement.
Chapter Three
This project is aimed to maintain the desired level of liquid or water level in top and source
tank Using a single12V DC motor, water level sensor, relay, buzzer and microcontroller. The
microcontroller sends a signal to set the motor ON, when the water level in the tank or
container goes below a predetermined minimum set level and it makes the motor OFF, when
the levels in the top tank reach a predetermined maximum set level and the source tank is
empty. Thus the water level in the tanks is maintained in between two fixed levels (minimum
and maximum). The user decides the set points by him/her.
When the tanks have different level, the sensor detects it and the arduino microcontroller
takes command from the sensor then it sends a signal to the transistor base and the transistor
amplifies the current to drive the motor. The tanks are connected to each other through strong
pipes. The connecting pipes are attached at the bottom of the tanks, and the top tank is
connected to the motor. When the motor is activated the tank connected to it fills water until
it reaches the predetermined maximum level.
There are level sensors connected to the top tank and source tank. Those sensors sense the
level and give information to the microcontroller. Then the microcontroller controls the
motor according to this information. But the signal which is given from the microcontroller is
not enough to activate the motor. Therefore, a transistor is used as relay driver. The base
current is amplified and given as collector current to the motor, then the motor activates. The
motor switches OFF, when the water in the tank reaches a predetermined maximum level.
When the source tank has no enough water levels to be pumped, motor becomes off and the
buzzer gives sound. When the water level in the top tank is at the predetermined minimum
level and source tank has enough water, the motor becomes ON.
LCD
Top tank
water level Relay
Relay Motor
sensor driver
Arduino
microcontroller
1 Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and
electrical power. It is composed of semiconductor material with at least three terminals for
connection to an external circuit. A voltage or current applied to one pair of the transistor's
terminal changes the current through another pair of terminals. Here we are discussing about
NPN transistor switching circuit. We have to connect the base resistor (Rb) to limit the base
current otherwise the transistor become damage. Transistor switching circuits are also
employed in DC motor driver circuit.
Transistors are commonly used as electronic switches, both for high-power applications such
as switched-mode power supplies and for low power applications such as logic gates.
Transistors function as current regulators by allowing a small current. The controlling (base)
current and the controlled (collector) currents must be going in the proper directions to
control a larger current. The amount of current allowed between collector and emitter is
primarily determined by the amount of current moving between base and emitter. The choice
between NPN and PNP is really arbitrary. All matter is that the proper current directions are
maintained for the sake of correct junction biasing.
2 Relays
A relay is electromechanical switch which is used in industrial application to provide
isolation between high voltage and low voltage circuits. These two circuits have different
voltage rating. One might be a low voltage side and other high voltage side. For example, in
microcontrollers based circuits, relay is used to isolate microcontrollers from 220 volt AC
supply. There are various types of relays, but all of them operate in the same way.
When current flows through the coil, the relay is operated by an electromagnet to open or
close one or more sets of contacts. Relays take advantage of the fact that when you pass an
electric current through a wire; a magnetic field is generated surrounding the wire as
well. This is called induction. When you place two pieces of ferrous metal near a coil of wire
and pass current through the wire, the magnetic field can move the two pieces of metal
towards each other. Those pieces of metal can form a switch, which can be turned on and off
by putting current through the coil. The connection between a microcontroller and a relay
must never be made directly. Microcontroller interfacing circuits are used for this purpose.
Driver circuit should be used between them because of two main reasons:
1. As the relay has to move its contacts mechanically therefore a lot of current is
required for the energizing of coil. The source or sink current of a microcontroller is
just 25mA whereas an amount of 50 to 100mA current is required by a relay to
function properly.
2. Due to the presence of back emf, the negative voltages can reach the microcontroller
and damage it.
Relay driver circuit using NPN transistor is given below. The transistor acts as a switch.
Microcontroller provides high or low input signals to NPN transistor. NPN transistor
provides high driving current to electro mechanical relay through 5 volt external power supply. The
amount of current needed for the relay operation is carried by this transistor. The transistor
used here is BC547. This transistor gets turned on when the output pin of the controller is at a
high potential. Therefore the current starts flowing through the relay.
Following components are used in relay driver circuit using transistor:
NPN transistor
12 volt dc power supply
A freewheeling diode is also connected across the relay in this circuit. The purpose of this
diode is to protect the microcontroller as well as the transistor from the back emf of the coil;
otherwise it can damage them both. A fast switching diode 1N4148 has been used here. A DC
voltage supply of 12V is given to the microcontrollers.
motors used in pumping applications and the important factors to consider when sizing a DC
motor for a hydraulic pump.
4.1 Pump Types
Hydraulic pumps are classified in two broad categories: rotodynamic (centrifugal) and
positive displacement. Centrifugal pumps employ a rotating impellor that uses centrifugal
force to drive fluid from the inlet to the discharge side of the pump. Common types of
centrifugal pumps include submersible, priming, and axial flow. Positive displacement pumps
are the other broad category of hydraulic pumps. These pumps typically use gears, vanes,
diaphragms or pistons to force a fixed amount of fluid through the inlet to the discharge side
of the pump. Generally a large number of pump types exist, but for simplicity, is divided into
the following main categories:
1 Jack Pump: is actually a mixture of the two types. The motor, gears and electrical are on
the surface, but move a shaft (sucker rod) that attaches to the pump which is submerged.
Good for very deep wells. Example: Solar motor Jack Pump.
2 Submersible Pumps: The submersible pump is one of the most recent developments in the
water well pump industries. Submersible pumps can deliver water from any depth at a wide
range of capacities, may be installed in wells three inches or more in diameter, require no
well house or frost proofing, and have proven to be a very dependable type of pump. The
submersible pump has an electric motor and pump assembly that is suspended in the well
below the pumping water level on the pump discharge pipe. It has a special water-proof
electrical cable. The intake for the pump assembly is located directly below the pump section
and above the electric motor.
3 Surface Pumps: These types of pumps use a suctioning approach and are good for
applications with shallow wells, ponds, streams or storage tanks. Surface Pumps are not
waterproof. They must be located in weatherproof area near the water level, usually a pump
pit or pump house. All electrical parts are located away from the water. If the pump is too
high above the water level, these pumps will have suction problems that can make the system
unreliable or damage the pump. Examples: Shurflo pressure pump, Dank off Flow light
pressure pump, hot water circulator. The maximum possible suction for any pump is about 20
feet but if you push them to lift more than a few feet they will become noisy and come under
more strain.
Among the various types of pumps available, we have selected Submersible Pump for it’s the
following characteristics and distinctive features.
Applicable in drinking water supply, livestock watering, pond management, irrigation
Max. efficiency 92 % (motor + controller)
Reduces the high cost of water pumping, cost-effective pumping
Simple installation
Lifts up to 240 m
Flow rate up to 11.0 m3/h
High reliability and life expectancy
Maintenance-free
4.2 Pump Parameters
As with most pumps, the primary specifications to consider when discerning DC powered
pump performance are flow rate, pump head, pressure, horsepower, and efficiency.
Volume flow rate (Q), also referred to as capacity, is the volume of liquid that travels
through the pump in a given time measured in gallons per minute or gpm . It defines the rate
at which a pump can push fluid through the system. In some cases, the mass flow rate is
also used, which describes the mass through the pump over time. The volume flow rate is
related to mass flow rate by the fluid density ρ via the equation:
When selecting pumps, the flow rate or rated capacity of the pump must be matched to the
flow rate required by the application or system.
Pressure is a measure of resistance: the force per unit area of resistance in the system. The
pressure rating of a pump defines how much resistance it can handle or overcome. Pressure,
in conjunction with flow rate and power, is used to describe pump performance. Centrifugal
pumps, however, typically use head instead of pressure to define the energy or resistance of
the pump, since pressure in a centrifugal pump varies with the pumped fluid's specific
gravity. When selecting pumps, the rated operating or discharge pressure of the pump must
be equal to or more than the required pressure for the system at the desired flow rate.
Head is the height above the suction inlet that a pump can lift a fluid. It is a shortcut
measurement of system resistance (pressure) which is independent of the fluid's specific
gravity. It is defined as the mechanical energy of the flow per unit weight. It is expressed as a
column height of water given in feet (ft) or meters (m).
Pump head (H) can be converted to pressure (P) using the specific gravity (SG) of the fluid
by the equation:
Or by the density of the fluid ρ and the acceleration due to gravity (g):
When selecting centrifugal pumps, the rated pump head must be equal to or greater than the
total head of the system (total dynamic head or TDH) at the desired flow rate.
Power: Net head is proportional to the power actually delivered to the fluid, called output
power (Pout) or the water horsepower (measured in horsepower or hp). This is the horsepower
rating which describes the useful work the pump will do to the fluid. It can be calculated by
the equation:
Pout
Where:
ρ is fluid density
g is the acceleration due to gravity
Q is the volumetric flow rate
H is the pump head
is the mass flow rate
In all pumps there are losses due to friction, internal leakage, flow separation, etc. Because of
these losses, the external power supplied to the pump, called the input power (Pin) or brake
horsepower, is always larger than the water horsepower. This specification is typically
provided by the pump manufacturer as a rating or in the pump's performance curve and is
used to select the proper motor or power source for the pump.
Pump efficiency (ηpump) defines the percentage of energy supplied to the pump that is
converted into useful work. It is the ratio between the water horsepower and brake
horsepower (useful power vs. required power):
ηpump = Pout/Pin
The above two parameters are taken from our usual observations and experience in the
project area.
4.3.2 Servo motor: Servo motor is a special type of motor which is automatically operated
up to certain limit for a given command with help of error-sensing feedback to correct the
performance. There are some special types of application of electrical motor where rotation
of the motor is required for just a certain angle not continuously for long period of time. For
these applications some special types of motor are required with some special arrangement
which makes the motor to rotate a certain angle for a given electrical input (signal). For this
purpose servo motor comes into picture. This is normally a simple DC motor which is
controlled for specific angular rotation.
There are two fundamental characteristics of any servo motor. These are:
The motor output torque is proportional to the voltage applied to it (i.e. control voltage
developed by amplifier in response to an error signal).
The instantaneous polarity of control voltage governs the direction of torque developed
by servomotors.
There are various types of dc servomotors which are series motors, split series motors, shunt
control motor and permanent magnet shunt motor.
A. Series motors: The series motor has a high starting torque and draws large current .Speed
regulation of this kind of motor is poor. Reversal can be obtained by reversing the polarity of
field voltage with split series field winding. This method reduces motor efficiency to some
extent.
B. Split series motors: Split series motor are the dc series motor with split-field rated with
some fractional kilowatt. This type of motor can operate as a separately excited field-
controlled motor. The armature is supplied with a constant current source. Split series motor
has a typical torque-speed curve. This curve denotes high stall torque and a rapid reduction in
torque with increase in speed. This results in good damping.
C. Shunt control motor: DC shunt type servomotor is not different from any other dc shunt
motor. It has two separate windings; field windings placed on stator and armature winding
placed on the rotor of the machine. Both windings are connected to a dc supply source. In a
conventional dc shunt motor, the two windings are connected in parallel across the dc supply.
In case of a servomotor, the windings are supplied with separate dc source.
D. permanent magnet shunt motor: Permanent magnet shunt motor is a fixed excitation
motor where the field is actually supplied by a permanent magnet. Performance is similar to
armature controlled fixed field motor. In case of field controlled dc motor, the field is excited
by the amplified error signal mentioned earlier. The armature winding is energized from a
constant current source. Torque developed is proportional to field current (If) up to saturation
level. This method is applied in small servomotors. It has longer time constant owing to
highly inductive field circuit so dynamic response is slower than armature controlled dc
motor. But in armature controlled dc motor, the motor armature is energized by amplified
error signal and field is supplied from a constant current source. High field flux density also
increases torque sensitivity of motor (torque proportional current times flux).
There are many types of motor that can be selected in pump design. Currently, several types
of motors being used in the world are: Step-motor, Servo-motor, AC asynchronous motor,
permanent magnetic DC servo motor, permanent magnetic brushless synchronous motor, etc.
Finally we have selected 100v serious GYS401D5 DC servo motor with the following
standard specifications.
Max. Torque [Nm] =3.58
Rated current [A] =4.8
Rated speed[r/min] =3000
Rated output [kW] =0.375
5 Arduino Microcontrollers
Microcontrollers must contain at least two primary components. Random access memory
(RAM) and an instruction set. RAM is a type of internal logic unit that stores information
temporarily. RAM contents operation, the microcontroller will step through a program (the
firmware). Each valid disappear when the power is turned off. While RAM is used to hold
any kind of data, some RAM is specialized, referred to as registers. The instruction set is a
list of all commands and their corresponding functions. During instruction set and the
matching internal hardware that differentiate one microcontroller from another.
Microcontroller has basically three functions these are sensing, communicating and
controlling. It senses what the input says and using this input, communication among
different devices takes place. Finally it controls the output based on the microcontroller. The
type of microcontroller we have used for this project is called Arduino uno R3 type
microcontroller. Arduino has 14 digital input-output ports and 8 analog input-output ports. In
this project Arduino receives an input from level sensors and it controls the pump motor
according to the level of the water.
Arduino Uno: Arduino is a tool for making computers that can sense and control more of the
physical world than your desktop computer. It's an open-source physical computing platform
based on a simple microcontroller board, and a development environment for writing
software for the board. Arduino can be used to develop interactive objects, taking inputs from
a variety of switches or sensors, and controlling a variety of lights, motors, and other physical
outputs. The Arduino programming language is an implementation of Wiring, a similar
physical computing platform.
The current version of the Arduino hardware reference design is called the “Uno” or “One”
in Italian) and is published by the Arduino team. It provides four basic functional elements:
A simple 5V power supply
A USB-to-serial converter for loading new programs onto the board
I/O headers for connecting sensors, actuators, expansion boards, etc.
It is a feature of most Arduino boards that they have an LED and load resistor connected
between pin 13 and ground; a convenient feature for many simple tests. The previous code
would not be seen by a standard C++ compiler as a valid program, so when the user clicks the
"Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file
with an extra include header at the top and a very simple main () function at the bottom, to
make it a valid C++ program.
6 Level Sensor
In this project the type of sensors that we have selected is water level sensor which is float
potentiometer which is a displacement sensor.
Finally it controls the output based on the Microcontroller has basically three functions these
are sensing, communicating and controlling. It senses what the input says input. The type of
microcontroller we have used for this project is called Arduino uno3 type microcontroller.
Arduino has 14 digital input-output ports and 8 analog input-output ports. In this project
Arduino receives an input from level sensors and it controls the pump motor according to the
level of the water.
6.1 Potentiometer
The potentiometer is an electrical device comprising a resistor with a sliding third con-tact,
often termed a wiper, which allows the voltage to be varied depending upon where the slider
is positioned along the length of the resistor. Manual adjustment of the wiper along the length
of the fixed resistance produces a variable voltage at the wiper. The magnitude of this output
voltage is directly proportional to its relative position along the length of the resistor. If the
potentiometer wiper is appropriately connected to a moving system then any movement in
that system will cause the wiper to move and so change the output voltage. This signal
provides a direct measurement of position or change in position, water level in our cases.
Hence, although still a potentiometer, it is of use as a sensor for measuring linear
displacement.
Let Vs is the input source to the potentiometer, Vo output to any load and Rp is the total
resistance of the potentiometer.
The relationship between and when the wipe moves some distance X by any cause of
movement is any kind of load is connected at the wipe terminal.
In our assumption Ω
7 Tanks
The thanks that we used for this specific project are different in size and are connected in a
cascaded or interacting way so that they filled water at the same time. Those tanks must be
strong to prevent themselves from any hazardous external environments. The sensor is
connected to the tank with a highest volume. The collected water in the tank is supplied by
the voltage source. Hence, the water in the tank becomes electrically conducting.
LCD with Arduino UNOR3 is an amazing tool for physical computing it's an open source
micro-controller board, plus a free software development environment. Use it to make cool
interactive objects that can sense inputs from switches, sensors, and computers and then
control motors, lights, and other physical outputs in the real world.
9 Buzzer
A buzzer is a device which makes a buzzing or beeping noise. There are several kinds; the
most basic is a piezoelectric buzzer, which is just a flat piece of piezoelectric material with
two electrodes. This type of buzzer requires some kind of oscillator (or something more
complicated like a microcontroller) to drive it. If you apply a DC voltage you will just get a
click. They are cheap and can be very loud without using very much power and also very
thin, so they can be used in flat objects like “singing” greeting cards.
There are also electromechanical buzzers, which use a coil and a moving electrical contact.
When the coil is energized, the contact is pulled toward the coil, but this breaks the circuit
and the contact rapidly moves back to its original position. This makes a loud buzzing sound.
The circuit shown here uses a NPN transistor to connect the buzzer to the Arduino. The
transistor allows the buzzer to be powered from a different voltage to the Arduino. Any NPN
transistor that can handle the current drawn by the buzzer can be used. With a NPN transistor
and base resistor, the circuit can be used to operate a buzzer that draws up to about 200mA.
In this topic we will describe the flow chart, algorithm and program code of the operational
project task. These are the main parts of the project design. The controller we have used is
software dependent. Then the operational principle of this software will be shown in the last
sections of this purpose.
Chapter 4
4 Results and Discussions
The level sensor is connected to the input side of the Arduino UNOR3, and the motor and
LCD is connected to the output side of the Arduino UNOR3. 5V voltage is given to the motor
to be energized. Since the water in the tank is conductive because of the 5V voltage source
given to the tank. The level sensor senses the level of the tank to which it is connected to the
Arduino and take action to control the system.
The motor becomes on if the source tank has enough water to pump and top tank is empty,
quarter, half and ¾ full.
Figure 4.1: overall circuit of automatic water level indicator and control
When the source tank is empty the LCD display “Error”, the buzzer pin energized and the
motor becomes OFF.
Result when the source tank is empty
When the top tank is full, the LCD display as” TANK IS FULL” and the motor becomes
OFF.
Result when the top tank is full
Chapter Five
5.1 Conclusion
Automatic water level control system automatically maintains the desired level of water in a
tank. When source tank is empty the microcontroller send signal to the buzzer to give sound.
When the source tank have enough water, it switches ON the pump as the water level in the
top tank goes to minimum set level and switches it OFF as soon as the water level reaches the
maximum level. It can be used in hotels, factories, homes, apartments, commercial
complexes, drainage, etc.
Designing the controlling part of the proposed system, as being the main task of our project,
has been achieved with great success, supported by simulation results and hard ware
implementation. Water pump sizing and selection with its power source requirement and all
accomplished in prior to the allocated time frame.
From the hardware circuit, one can find that very few external components are needed and we
are forced to replace water level sensor by push button, others with related equipment. We
know that the hard ware is challenged compared to that of software implementation. From
this project we get little knowledge about automatic level controller and indicator.
Generally this project plays a vital role in avoiding wastage and scarcity of water and
everyone can buy with in a low price and use as a house appliance to save the energy and
time.
5.2 Recommendation
When we did this project, we had faced different problems such as lack of access to internet,
computer services and room to do hard ware. We cannot get the necessary material in the
time that we want and the school did not supply the material. Therefore we strongly
recommended that the department should facilitate such kind of services to encourage the
students in performing such a rare and splendid project and initiates the student to do
prototype. A user who wants to improve this project can progress it by using a metal
connected to the tanks and a resistor is connected to the metal microcontroller too in order to
amplify the power that is given to the microcontroller and to use the system as a switch. Also
he can also use a number of sensors to increase efficiency and to sense their own level
measure.
References
[1] S. al, "water level control system for horizontal generators using quantitative feedback
theory".
[2] M. al, "control strategy to achive desired tracking of drum water level".
[3] Maffezoni, "Boiler turbine dynamics in power plant control";control Eng practical
volume 5., 1997.
[4] Z. &. L.S.Hu, "Water level control sysytem using PI controller", 2006.
[5] Z. e. al, water level control using Pid and Fuzzy controller.
[6] A. e. al, Adaptive estimator based dynamic sliding mode control method for water level
control.
[7] L. e. al, controller with partial feed forward compensation and decoupling control for
steam generator water level.
[8] P. Lotfizadeh, "Concept of fuzzy logic", Berkley, 1965.
[9] G. a. P.H.Seong, "Application of a self-organizing fuzzy logic controller to steam
generator level contro"l;Nuclear Engg.,Design, vol.167, 1997.
[10] Tan, "water level control system for nuclear steam generator", vo,24, 2011.
[11] P. a. Seong," Self organizing fuzzy logic controller for water level control of steam
generators".
Appendix
#include<LiquidCrystal.h>;
int motorpin=8;
int buzzerpin=7;
LiquidCrystal lcd(12,11,5,4,3,2);
int s=A0;
int q=A1;
int h=A2;
int q_3=A3;
int f=A4;
int quat=0;
int half=0;
int quar_3=0;
int full=0;
int sump=0;
void setup() {
pinMode(motorpin, OUTPUT);
pinMode(buzzerpin, OUTPUT);
pinMode(quat, INPUT);
pinMode(half, INPUT);
pinMode(quar_3, INPUT);
pinMode(full, INPUT);
pinMode(sump, INPUT);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("TANK");
lcd.setCursor(0,1);
lcd.print("AMOUNT:");
//delay(100);
//V1=map(analogRead(A0),0,1023,0,5);
//V2=map(analogRead(A1),0,1023,0,5);
lcd.setCursor(7,1);
lcd.print(full);
//lcd.clear();
void loop() {
while(1){
quat=digitalRead(q);
half=digitalRead(h);
quar_3=digitalRead(q_3);
full=digitalRead(f);
sump=digitalRead(s);
//lcd.clear();
digitalWrite(motorpin,LOW);
digitalWrite(buzzerpin,HIGH);
lcd.setCursor(5,0);
lcd.print("ERROR");
lcd.setCursor(7,1);
lcd.print(quat);
delay(1000);
if(sump==HIGH && quat==LOW && half==LOW &&quar_3 ==LOW && full==LOW) //when tank is
empty
//lcd.clear();
digitalWrite(motorpin,HIGH);
digitalWrite(buzzerpin,LOW);
lcd.setCursor(5,0);
lcd.print("IS EMPTY");
lcd.setCursor(7,1);
lcd.print(quat);
delay(1000);
// start motor
else if(sump==HIGH && quat==HIGH && half==LOW && quar_3==LOW && full==LOW)
//lcd.clear();
digitalWrite(motorpin,HIGH);
digitalWrite(buzzerpin,LOW);
lcd.setCursor(5,0);
lcd.print("IS Quar");
lcd.setCursor(7,1);
lcd.print(quat);
delay(1000);
//lcd.clear();
digitalWrite(motorpin,HIGH);
digitalWrite(buzzerpin,LOW);
lcd.setCursor(5,0);
lcd.print("IS Half");
lcd.setCursor(7,1);
lcd.print(half);
delay(1000);
//lcd.clear();
digitalWrite(motorpin,HIGH);
digitalWrite(buzzerpin,LOW);
lcd.setCursor(5,0);
lcd.setCursor(7,1);
lcd.print(quar_3);
delay(1000);
//lcd.clear();
digitalWrite(motorpin,LOW);
digitalWrite(buzzerpin,LOW);
lcd.setCursor(5,0);
lcd.print("IS Full");
lcd.setCursor(7,1);
lcd.print(full);
delay(1000);