0% found this document useful (0 votes)
14 views9 pages

Design and Simulation

This document presents the design and simulation of a multi-tank water level controller using an Arduino Nano microcontroller. The system employs hydrostatic pressure sensors to measure the water levels in six tanks, allowing for automated control of water inflow and preventing overflow. The project aims to enhance efficiency in water management for multi-tank systems, addressing limitations of existing single-tank controllers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views9 pages

Design and Simulation

This document presents the design and simulation of a multi-tank water level controller using an Arduino Nano microcontroller. The system employs hydrostatic pressure sensors to measure the water levels in six tanks, allowing for automated control of water inflow and preventing overflow. The project aims to enhance efficiency in water management for multi-tank systems, addressing limitations of existing single-tank controllers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

GSJ: Volume 8, Issue 3, March 2020

ISSN 2320-9186 831

GSJ: Volume 8, Issue 3, March 2020, Online: ISSN 2320-9186


www.globalscientificjournal.com

Design and Simulation of a Multi Tank Water Level


Controller

Sunny Orike ; Folorunsho M. Odeyemi and Magnus E. Obasi.


[email protected],

1. INTRODUCTION:
ABSTRACT: Basic tank water level control utilizes 2 control
In this study, a multi-tank water level controller circuit switches; one low water level switches that
was developed using the Arduino Nano makes to ON the filling borehole pump and one
microcontroller board as the PLC of the system. high water level switch that breaks contact to shut
The use of this PLC allowed for flexibility of OFF the borehole pump power source. With this
control, display and reduction of human inference control, the level and volume of water in the tank
in operating the system. A hydrostatic pressure between these two control points is not known.
based approach was adopted in measuring the This simple design is ideal for a one-water Tank
volume of liquid in each of the six tanks. Six system, consequently, this water tank must be
MPX4115 pressure sensors were used in obtaining sufficiently big to meet the estate or building’s
the pressure in the tanks. The outputs of these water demand.Because conventional storage water
sensors are fed to the analog input of the Arduino level control assumes that the storage unit is ONE
Nano (PLC). These inputs are calibrated to a scale tank, most estate now resort to manual operation in
of 100% to give the volume of liquid in the tanks. refilling of the water in a multi-tank utility system.
The volume of liquid in each individual tank is This project aims to control the water inflow and
used in controlling the supply valve of that tank storage in 2-8 tanks using one Arduino Nano
when filling. When the volume of liquid in a tank is programmable logic controller.The level in each
less than 80%, the valve is opened to allow for tank is calculated by sensing the pressure due to
filling, and closed at 80% full. The volume of each the height of water column, that is, the hydrostatic
of the six tanks is summed to give the volume of pressure head of the water column. Each tank will
liquid in the entire system. This volume controls have a 0 -3psig MPX4115 pressure sensor attached
the borehole pumping machine. to it at the base to sense the hydrostatic pressure
Keywords: Programmable Logic Controller (PLC), due to the water height within the tank.With the
Arduino Nano, Multi tank, Water level controller, pressure sensed and inputted as a voltage signal
MPX 4115. into the analogue input of the Programmable Logic
Controller (PLC), the height of water in that

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 832

particular tank and hence its volume is calculated Alam (2016), developed an Automated Water
and displayed as a percentage. Pump Controller (AWPC). This system used three
Several attempts have been made by previous water level sensors to monitor the water level of
researchers in developing tank water level control both the ground-level water reservoir and the
systems. rooftop residential water tank. Once the supply of
Anyanwu (2012) in his work used MC14066 water decreases down to a point of concern,
integrated circuit to realize automatic regulator roughly 10% of the tank capacity, the controller
suitable for water level sensing and control. This turns off the water pump. This prevented the water
water level sensor was tested in real time pump from siphoning air which can result in the
application by using it to control the level of water water pump’s malfunction or complete breakdown.
in a tank fed by a single phase 0.5 HP AC pump. Similarly, the controller turned off the water pump
This system recorded inaccurate volume when the rooftop tank reached a water level of
calculation and display due to limited sensor greater than or equal to 95%. This prevented the
capabilities.Again, it is still limited to one tank per tank from overflowing and wasting water.
sensor per Arduino. Considering the works of previous researchers
In the works of Asaad et al. (2013), Arduino was reviewed in this chapter, the automatic water level
used in automating the process of water pumping controller and pump controllers developed thus far
into a tank by detecting the level of water in the fail to address the issues of presenting a graphic
tank per time using a floating water level sensor. indication or display of the volumetric amount of
This sensor was designed out of a floating material water present in the tank being studied or
attached to the arm of a potentiometer. The system controlled per time. They also failed to develop
had the ability to detect the level of water in a tank, water level controller systems which could be
switch on or off the pump accordingly and display applied in a multi-tank system where the pump and
the status on an LCD screen.This system was filling of the different tanks is dependent on the
limited to 12v pumps therefore making it collective average volume of water in all tanks and
unsuitable for industrial or domestic application. independent of the level of water in another tank
Erua & Anyasi (2014), developed a closed loop respectively.
automatic water level controller using a mercury This project looks at automating the water filling
float sensor. Their system incorporates two mains and availability aspect. It provides a system that
contactors which are energized to provide a direct can measure, to reasonable accuracy, the quantity
online start of the motor. An over load relay which of water used by a small community.The system
senses the presence of excess current and designed in this work is one which intends to solve
disconnect the supply and a mercury flood switch the afore mentioned challenges by developing a
which uses the Archimedes principle of floatation multi-tank water level controller, which can
to provide the electrical contact to switch ON or effectively control the pump (supply) of water to
OFF supply to the motor when the tank is empty or six tanks. This is to be based on the cumulative
full respectively. This was capable of providing a average volume of water in all six tanks. Also, in
seamless utilization of water at domestic and this system, filling of each tank is independent of
industrial level without causing spillage. This another tank as separate valves are to be used in
controller is not feasible for application in controlling the supply of water into each tank. This
residential homes as the mercury float sensor used work intends to achieve this using an Arduino
is expensive and not readily available. Nano, six MPA4115 pressure sensors, a pump, and
Yuriy et al. (2015) designed a PLC based system to six/eight valves. This work is to be designed and
control liquid level by using Radar sensor simulated on the Proteus professional Suite
remotely. This system measures the liquid level, environment, with the program governing the
volume, temperature, and pressure and controls system developed on the Arduino IDE.
these measurements remotely. The system consists 2. MATERIALS AND METHODS:
of the Radar sensor, temperature sensors, discrete The volume of liquid in a vessel of measure level
level sensors and a programmable logic controller. depends solely on the shape of the vessel. For the

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 833

proposed study, cylindrical water Tank is assumed


to be used. A typical tank used for water storage in
Nigeria is cylindrical in shape and has height of up
to 8 feet.
Considering a typical tank as shown in Fig 1,
Mathematically, therefore, the volume of water V
in the tank will be
𝑉𝑉 = ℎ ∗ 𝜋𝜋 ∗ R2 (1)
Where h is the height/level of water in tank, π is
3.142 and R is the Radius of the cylindrical tank.
Since R, radius of tank and π are constants, the
volume therefore varies directly with the Fig 2:Pressure due to liquid column of height H
height/level. Given;
Putting ℎ = 𝑝𝑝/ρ𝑔𝑔 in equation 3.3 will give A = πr 2 = cross sectional area of our cylindrical
tank
𝑉𝑉 = 𝑝𝑝 ∗ 𝜋𝜋 ∗ R2 /𝑔𝑔 (2) V = πr 2 ℎ = volume f the tank
Q1 =Input flow rate
Q2 = outlet flow rate.
H = Height of water in the tank.
h = Desired height of water in the tank.
g = Acceleration due to gravity.
C1= Valve coefficient
CA = coefficient of desired height.
From the law of conservation of matter, we can say
that;
Rate of accumulation of mass in the tank =mass
Fig 1:Pressure Exacted at the Base of a Container inflow – mass outflow.
with Liquid Level h. 𝑑𝑑𝑑𝑑
= 𝑄𝑄1 − 𝑄𝑄2 (3)
2.1 Mathematical Model for Tank water 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
inflow/outflow. 𝐴𝐴 𝑑𝑑𝑑𝑑 = 𝑄𝑄1 − 𝑄𝑄2 (4)
Modeling of a real time cylindrical tank which The outlet flow rate of the cylindrical tank is given
exhibit non linearity property will be considered in by the Torricelli’s law which states that the speed
this research work. or the outflow of a fluid through an edge hole at
This mathematical model of a cylindrical tank is the bottom of a tank filled to a depth is the same as
gotten by considering two variables namely; the the speed that a body would acquire in falling
control variable and the manipulated variable. freely from a height ‘h’.
While our desired level will be the control Hence
variable, the manipulated level is the inflow to the Q= �2gh (5)
tank. We can get this by controlling the input flows With respect to the size and shape of the valve, the
to the tank. outflow is given by
𝑄𝑄2 = C2 ∗ �2gh (6)
Putting equation 3.6 into 3.4 gives
𝑑𝑑𝑑𝑑
𝐴𝐴 𝑑𝑑𝑑𝑑 = 𝑄𝑄1 − C2 ∗ �2gh (7)
In steady state, we know that
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑
=0 (8)
Q1 = Q 2 (9)
That is that inlet flow = outlet flow

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 834
2 2
To linearize equation 3.4, around the desired p = pressure in liquid (N/m , Pa, lbf/ft , psi)
height, the out-flow equation can be linearized. ρ = density of liquid (kg/m3, slugs/ft3)
And equation 3.6 is rewritten approximately as: g = acceleration of gravity (9.81 m/s2, 32.17405
𝑄𝑄2 𝐶𝐶 ∗𝑎𝑎
≈ 2 = 𝑐𝑐1 (10) ft/s2)
2gH �2𝑔𝑔ℎ
𝑄𝑄2 = 𝑐𝑐1 ∗ 2𝑔𝑔𝑔𝑔 h = height of fluid column - or depth in the fluid
(11)
𝑑𝑑𝑑𝑑 where pressure is measured (m, ft).
𝐴𝐴 𝑑𝑑𝑑𝑑 = 𝑄𝑄1 − 𝐶𝐶1 ∗ 2𝑔𝑔𝑔𝑔 (12) For the purpose of this work, a MPX4115 pressure
Dividing through by A sensor is used.
𝑑𝑑𝑑𝑑 𝑄𝑄 𝐶𝐶 ∗2𝑔𝑔𝑔𝑔
= 𝐴𝐴1 − 1 𝐴𝐴 (13)
𝑑𝑑𝑑𝑑 MPX4115 pressure Sensor
Where
𝐶𝐶 ∗𝑎𝑎 This is an integrated Silicon Pressure Sensor
𝐶𝐶1 = 1 (14)
�2𝑔𝑔ℎ designed to sense pressure in an altimeter or
𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎
𝐶𝐶2 = 𝐼𝐼 (15) barometer (BAP) application. In interfacing the
𝑚𝑚𝑚𝑚𝑚𝑚
𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎 = 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 sensor to the Arduino Nano, only three pins are
𝐼𝐼𝑚𝑚𝑚𝑚𝑚𝑚 = 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 required. Pins 1, 2, and 3. Pin 1 is connected to an
Substituting C1 and C2 into equation 3.13 ADC pin of the Arduino Nano, pin 2 connected to
𝑑𝑑𝑑𝑑 𝑄𝑄 a∗𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎 ∗2𝑔𝑔𝑔𝑔 the common GND and pin 3 to the +5V output of
𝑑𝑑𝑑𝑑
= 𝐴𝐴1 − (16) the Arduino Nano. In this work, six of this sensor
�2𝑔𝑔ℎ∗𝐴𝐴∗𝐼𝐼𝑚𝑚𝑚𝑚𝑚𝑚
2.2 Circuit Components and Design are required to determine the pressure in all six
The multi tank water level controller designed in tanks. The connection of the six sensors to the
this work consists of an Arduino Nano PLC board, Arduino ADC pins is shown in Fig 3.
a MA4115 pressure sensors, a 16 X 2 LCD screen,
six 5V DC low trigger relays, 2N3904 NPN
transistors, IN4007 diodes and a 5V DC power
source. This design was executed on the Proteus 8
professional design suit.
i. Pressure Sensors/Transducers.
A Transducer is a device that converts variations in
a physical quantity, such as pressure or brightness,
into an electrical signal. This study is aim at
measuring Tank volume by it liquid level/height
and this height is calculated based on the pressure
a known column height of liquid will exert at the
tank base.
Fig 3: MPX 4115 Arduino Connection.
Consequently, the Transducer chosen for this ii. Relay
project is a differential pressure transducer. In order to effectively control the filling of the six
Considering Fig 1 and relating to storage tank tanks, relays are used in cutting off voltage supply
liquid (water) level measurement, Hydrostatic to the supply valves of the tanks and also in
pressure p can be calculated as controlling the switching ON and OFF of the pump
p=ρgh based on the average percentage water volume in
all six tanks. A total of seven relays are used. Six
for controlling the valves of the tanks and one for
Where
controlling the pump actuation. These relays
require a driver circuit in order to operate thus,
IN4007 diodes and 2N3904 NPN transistors are
used in driving/controlling the relays from the

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 835

Arduino digital output pins. The relay/Valve driver The Arduino Nano is a Programmable logic
circuit is shown in Fig 4. controller with an onboard ATMega 328
microcontroller IC chip. The Arduino Nano serves
as the main processor in this design. It is
responsible for interpreting and calibrating analog
inputs from the pressure sensors, performing the
actuations on the valve and pump and also
controlling the Display of the LCD.
v. Proteus 8.7 SP3 Professional
This is a version of the Proteus Design suite
developed by Labcenter Electronics. It is widely
used for electrical schematic design, PCB layout
design and Virtual simulation. This software
application is chosen for the purpose of this work
due to its user friendly interface, vast Library of
components, Virtual Terminal display and real
time simulation. The entire circuit is designed on
this platform. With each individual component
picked form the component library. The complete
circuit designed on Proteus can be seen in Fig. 6.

Fig 4: Valve Control Circuit


iii. 16 x 2 Liquid Crystal Display Screen
This is a Liquid Crystal Display (LCD) screen
consisting of two rows and sixteen columns. The
LCD is used in displaying combined average water
level in all six tanks. The LCD has 16 pins and is
connected to the Arduino Nano as shown in Fig 5.

Fig 6.Multi-Tank Water Level Controller Circuit.

vi. Arduino IDE and Software Design


The program which governing the entire system is
developed on the Arduino IDE (Integrated
Development Environment) in the form of sketches
written in C++ programming language. The
complete Sketch is compiled using the AVRISP
mkii programmer in the IDE. The compiled code
Fig 5Display Circuit Connection which is then uploaded to the ATmega 328 through
the Arduino Nano.
In developing the program, pins are first declared
iv. Arduino Nano for the Pressure sensors with storage memory

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 836

locations assigned to each pin these locations are


used in storing the analog data from the pressure
sensors. A maximum integer size is set at 1023 and
a minimum set at 0, the LCD library is called in
Height
of
Water Pressure
Column
h(m) (ft) (kPa) (bar) (atm) (psi)

1 3.28 9.81 0.098 0.097 1.42

2 6.56 19.6 0.196 0.194 2.85

3 9.84 29.4 0.294 0.29 4.27

4 13.1 39.2 0.392 0.387 5.69


Fig 7: Block Diagram of Water Tank Level
5 16.4 49.1 0.491 0.484 7.11
Control System.

3. RESULTS AND DISCUSSION:


6 19.7 58.9 0.589 0.581 8.54 The result of the calculated hydrostatic pressure
calculated for water up to 8meters is shown in
7 23 68.7 0.687 0.678 10
table 4.1.
8 26.2 78.5 0.785 0.775 11.4
Table 1: Hydrostatic pressure for water column up

and pins assigned to the LCD. Other memory to 8meters.


locations are assigned and the valve pins assigned.
The valve pins are set on OUTPUT mode
(pinMode, valvepin, OUTPUT) and serial
communication is initiated at 9600Bps. The analog
input from the pressure sensor is calibrated from 0-
1023 to 0-100%. The flow structure is designed
such that the for tank level less than 80%, the tank
valves are left open otherwise they are closed. The
water level in all six tanks are averaged and
displayed on the LCD screen. If this average falls
below 20%, the water pump is turned ON and
pumped till the average is at 80%.

Having designed the multi-tank water level circuit


on Proteus and the program file uploaded to the
Arduino Nano in the worksheet, the worksheet is
run and the characteristics behaviour of the system

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 837

observed. The results of this simulation are


presented in Fig. 8,9,10, and 11

Fig 10: Virtual Terminal Display of Water Level


in Each Tank.

Fig 8: Simulation of Multi-Tank Water Level


Controller

Fig 11: Pressure Sensor showing the Pressure


(KPa) in each Tank

From the results obtained from the simulation of


the multi-tank water level controller, it can be
observed that the pressure measured in each tank
by the pressure sensors is converted to a scale of
100%. When the pressure in Tank 1 is increased by
clicking the arrow key pointing upwards in Fig 11,
Fig 9: LCD showing Cumulative Average water the percentage water level in tank 1 is increased as
level. can be observed on the virtual terminal as shown in
Fig 10. Thus, any change in the pressure in the
tank results in an equivalent change in the tank
water level on the virtual terminal. Thus, the
pressure sensors are able to accurately measure and
display the volume of water per time in the storage
tanks.

In Fig 9, the LCD is observed to display


“SUMTOTAL=78%”, and “SUMTOTAL=81%.

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 838

PUMP OFF”. This percentage value is the


cumulative average of the water levels in all six The acknowledgments of people who provided
tanks. It is observed that, when the water level in assistance in manuscript preparation, funding for
any of the tanks is less than 80%, the valve research etc., should be listed in this section. All
controlling the supply of water to that tank is sources of funding should be declared as an
switched to the NO (Normally Open) configuration acknowledgement. Authors should declare the role
otherwise. When the cumulative pressure in all six of funding agency.
tanks drop to or falls below 20%, the water pump
is turned ON until the average is back to 80%. REFERENCES
Thus, through the use of the Arduino Nano, analog
inputs from the different pressure sensors on the Ajinkya, K., & Milind, R. (2017). Automatic
different tanks are able to calculate the individual Water Level Indicator & Controller (To
volume of each tank and sum the total cumulative control water level of overhead tank). .
average volume of all the tanks. This cumulative International Journal of Advanced
average is used in initiating a START and STOP Research in Electronics and
signal to the borehole pumps. Communication Engineering (IJARECE),
1289-1290.
4. CONCLUSION
Alam, D., Salguero, G., & Kyle, R. M. (2016).
Automatic water level controllers are devices that Automatic Water Pump Controller . San
are used in controlling the volume of water of Luis Obispo: California Polytechnic State
liquid in a tank. These devices make use of various University.
methods in determining the volume of water or Anyanwu , C. N., Mbajiorgu, C. C., & Anoliefo, E.
liquid in the tank. In this study, a multi-tank water C. (2012). Design And Implementation Of
level controller was developedusing the Arduino A Water Level Controller. Nigerian Journal
Nano microcontroller board as the PLC of the of Technology (NIJOTECH) Vol. 31, No.
system. The use of this PLC allowed for flexibility 1.
of control, display and reduction of human
inference in operating the system. A pressure based Anyanwu, C., Mbajiorgub, C., & Anoliefod, E.
approach was adopted in measuring the volume of (2012). Design and Implementation of a
liquid in each of the six tanks. Six MPX4115 Water Level Controller, 31(1). Nigerian
pressure sensors were used in obtaining the Journal of Technology (NIJOTECH). 30(1),
pressure in the tanks. The outputs of these sensors 89-92.
are fed to the analog input of the Arduino Nano
(PLC). These inputs are calibrated to a scale of Asaad, A., Mohammed, A. E., & Zhang, J. M.
100% to give the volume of liquid in the tanks. (2013). Automatic Water Level Control
The volume of liquid in each individual tank is System. . International Journal of Science
used in controlling the supply valve of that tank. and Research (IJSR) ISSN (Online): 2319-
When the volume of liquid in a tank is less than 7064, 5.
80%, the valve is opened to allow for supply, and
closed at 80% full. The volume of each of the six Bossart, E. (2014, December 11). Fundamentals of
tanks is summed to give the volume of liquid in the hydrostatic level measurement. Retrieved
entire system. This volume controls the borehole from www.wika.us:
pumping machine. https://www.wika.us/upload/TA_1114_ID
The system was able to satisfy all of its intended M_en_co_63032.pdf
aim and objectives as can be seen in the results Erua, J., & Anyasi, F. I. (2014). Design of an
obtained when the system is RUN. Automatic Water Level Controller Using
Mercury Float Switch. IOSR Journal of
5. ACKNOWLEDGEMENT:

GSJ© 2020
www.globalscientificjournal.com
GSJ: Volume 8, Issue 3, March 2020
ISSN 2320-9186 839

Electronics and Communication


Engineering (IOSR-JECE) 9(2), 2278-
2834.
Ishwar, C. M., & Laloo, K. Y. (2013). Low Cost
Automatic Water Level Control for
Domestic Application. Rourkela: National
Institute of Technology .
Mashud, M., Hoque, E., & Serajul, I. (2011).
Design and Implementation of a Single
Phase Water-Pump Controller . Dhaka,
Bangladesh: Institute of Electronics,
Atomic Energy Research Establishment,.
Oyndrila, R., Aranyak, R., & Debasis, R. (2016).
AUTOMATIC WATER LEVEL
INDICATOR. . International Journal of
Emerging Trends in Engineering and
Development Issue 6(2, 2249-6149.

GSJ© 2020
www.globalscientificjournal.com

You might also like