IMPLEMENTING OF LIQUID TANK LEVEL CONTROL USING ARDUINO-LABVIEW INTERFACEING WITH ULTRASONIC SENSOR

The aim of this paper is to use an economical technology to built the liquid tank level control the liquid level using arudino UNO microcontroller as data acquisition with LabView software interfacing with ultrasonic sensor. The ultrasonic sensor is used for better accuracy and stability in different conditions. The front panel of labview is display the liquid level in the tank


INTRODUCTION
Water is commonly used in home and industry applications.Automatic Water level Controller is used in hotels, factories, homes apartments, colleges, commercial complexes, etc...There are several studies that have been done previously associated with the design of control system.Parvat et al. (2015) presented the mathematical model of a coupled tank system.The simulation is being done using the MatLab/ Simulink Toolbox.Laith (2015) are used proportionalintegral -derivative (PID) controller to remove the steady state error.More performance and stability are obtained by using the Fuzzy logic controllers.From the results, the conclusion that the Fuzzy Logic controller is better than PID controller.(Abdul Latheef et al., 2015) 2013) is used the single chip microcomputer and LabVIEW design to control the level.The measurement and conversion can get by using the field signal with the SCM hardware circuit.Ejiofor et al. (2013) are used microcontroller in design a control system.The microcontroller is used to automate the process of water pumping for detect the water tank level, switch the pump (ON/OFF) depending on the level.The status is displayed on LCD screen.Namrata et al., (2013) analyzes the effectiveness of water level control using fuzzy logic.Transistor switching principle is used to sense the water level in the tank.The system used a PIC16 microcontroller.
The measurement of discontinued act distance and an sensor that transmits and receives a reflected signal from the object can be designed.The transmitted energy may be in form of any radiation, electromagnetic in the optical and microwave range, acoustic, etc.For velocity detectors and ultrasonic range meters the transmission and reception of ultrasonic energy is a basic of operation.Ultrasonic waves are mechanical acoustic waves.It covered frequency range, over 20 kHz, of human ears (Jacob, 2010).This paper is focused on the description of the procedure from the modeling and simulation to the adaptive control of model of the water tank.The system is designed using the Arduino UNO card with LabView interface.MATLAB is used to study the response of the system.

THE PROPOSED SYSTEM DESIGN
The ultrasonic sensor used to measure the water tank level and gives the information about the depth which can use to set minimum and maximum level, also the ultrasonic sensor sent data to the arduino.The relay connected to the arduino used to control the motor.The block diagram and circuit diagram of the proposed liquid level control system is shown in Figs. 1 and 2 respectively.

Mathematical model for liquid tank
The design system uses water as liquid media; a schematic diagram of water tank is illustrated in the following diagram (Fig. 3).The tank can be represent by the equations (Laith, 2015): (1) Where: Qin = the flow rate of inletwater in the tank.
Qout=the flow rate of outlet water from the tank (cm 3 /sec).
A= the tank cross sectional area =100 cm 2 .
a= the area of the tank outlet =0.473 cm 2 .g = the gravitational constant.
The pump and the liquid level gains are gets from a sensor characteristic.

MATLAB/SIMULINK Simulation
The model can be implemented in MATLAB/SIMULINK.The simulation diagram is shown in Fig. 4. Starting with zero initial conditions, the simulation gives the response of level as shown in Fig.

Arduino ultrasonic measurement distance Sensor
The Ultrasonic Sensor with Arduino used to calculate distances among objects.It has 4 pins connecting with peripheral device.The 4 pins related Power, Ground, Trigger and Echo respectively.The arduino provides 5V used to connect the sensor the ultrasonic Sensor is illustrated shown in Fig. 6.

Arduino card
Arduino UNO is a physical computing platform, which is open source.It is a microcontroller board that has six pins can be used as PWM outputs and six analog inputs that can be controlled using (C) language.It is 16 MHz ceramic resonators, a power jack, a reset button, an ICSP header, and USB connection (Massimo, 2011).It is having a hardware, which consists of an Atmel AVR, which is an 8-bits single chip microcontroller, and software that consists of a boot loader and compiler.Programmed Arduino hardware is using a language, similar to (C++) with some development, called Wiring-based language, and a Processing-based integrated development environment (Mike, 2009).

LABVIEW
Laboratory Virtual Instrumentation Engineering Workbench (LabVIEW) programs is a graphical programming language which uses icons for creating applications such as instrumentation, data-acquisition, communication and control with automation.It is also called virtual instruments, or VIs (Hans-Petter, 2014).It is developed software, like various program languages such as C/C++ and Graphical language offers an advantage of the users that have the ability to change graphical representations of hardware by examining their dynamic link libraries or respective hardware drivers (Sivaranjani, 2015).A set of tools and objects can be used to build a user interface which is called front panel.By using a graphical representation of functions, the code is adding to control the front panel objects .In addition, a simulation with LabVIEW software saves project development time.LabVIEW debugging tool is self-adaptive and easy it is implement and which saves considerable amount of time (Laith, 2015).

LABVIEW ARDUINO INTERFACING (LIFA)
It is easily to connect sensors and physical objects to a microcontroller by using Arduino, but it still requires how to write code in C/C++ language which is not easy for everyone.LabVIEW is a graphical computing environment used to automate measurements, signal processing and system design.(Marco, 2015).
The LIFA makes an interface between LabVIEW and an Arduino, It is tested and more developed using an Arduino Uno and will works with most hardware compatible with Arduino.
LIFA includes an open source firmware for the Arduino.The Arduino Tool pallet contains groups of VI's specifically design to communicate with the Arduino.High level VI's are incorporate most of the logic needed to do more pieces of the program task and Low level VI's are do some of the overall task.The LIFA toolkit is a package that allows the users to get data from the Arduino microcontroller and processing in LabVIEW program (Sivaranjani, 2015).
The LINX is an updated version of LIFA.It provides an interface between LabVIEW and Arduino.It was tested and developed using an Arduino Uno and designed to work with most Arduino compatible hardware.This means that LINX provides the flexibility to add support for any device virtually.In addition LINX provides better error handling, Ethernet and Wi-Fi support and more sensor support.It is really very easy to interface LabVIEW and Arduino, which means that we will be able to control Arduino projects without having to write a code with single line.(Marco, 2015).

THE EXPERIMRTAL SETUP
Before running the system, the microcontroller within the arduino board by using C++ Language must be programmed.The computer is connected to system through USB bus.
LabVIEW is software installed in a computer with Arduino interface.
The Pump is fixed in the tank.The ultrasonic sensor is used to measure the distance of water for calculating the status of the tank The pump is switched ON when the level of water is low, and switched OFF when the level high.The input signal to the arduino is analog comes from the sensor.The analog output of sensor is fed as input signal to the digital write of arduino board.The output of Arduino is given as a signal to the relay .The motor turns on or switched off depending on the water level.When the water level is low the pump turns on and when the water level is high the pump switched off.The proposed water level control system using Arduino-LabView interface microcontroller is shown in Fig. 9.

MONITORING OF LIQUID TANK LEVEL CONTROL
The LabVIEW interface for Arduino is written and distributed by NI (it is a VI based API), Arduino embedded program must be included in the code and loaded to the device.The LabVIEW program gives commands to the Arduino by USB bus to run the program on it.Also the same bus is used to sent the back data to the computer from the digital inputs.The LabVIEW used to read the digital inputs, control the input/output digital lines and use many other features of the Arduino hardware (Jagdish, 2014).This paper is valid to work on data acquisition of digital inputs with Ardunio board and LabVIEW software.Fig. 10 shows the block diagram of the data acquisition process where digital voltage is fed into the (7, 8) pins of the Ardunio board.
In initialized, the microcontroller reads the digital inputs.The LabVIEW front panel shows the output voltage in which it is converted to corresponding level in cm.

Labview programming
After running the program, the motor switched on and it pushes the water to the tank at low levels Fig. 11, the water continuously rises to higher level and the motor switched OFF, Fig.
12, If the water decreased, the motor switched on and the water level will rising again to reach to a higher level and so on, this because the system settings at high levels which can be change the settings to another levels ,the deformation in the form of signal is due to the ripples in the surface of the water level .

CONCLUSION
This paper explains the design and implementation of control system for liquid tank level by using arduino-labview interfacing with ultrasonic sensor.The LabVIEW system has been used to realize the level setting, monitoring, displaying and recording.The Mathematical modeling helps in furnishing a convenient and flexible design that provides good performance.The system used different liquid with different densities.
are implement virtual instrumentation controllers for cylindrical tank system.This Virtual Instrumentation PID controller implementation is possible on software called LabVIEW developed by National Instruments.The Data Acquisition board (DAQ) is used for interfacing with the hardware.(Janani, 2014) are presents the monitoring and controlling of Temperature, Pressure, Flow and Level of water by using Labview.The values are measured and converted into Digital Signals which controlled by LabView.Moyeed and Rajendra (2014) are design and develop an automatic water level controller with digital technology.The electrical probes are used along with power supply and motor.Erua (2014) presents the design of an automatic water level controller.The system incorporates two mains contactor, an over load relay and a mercury flood switch.Neena.et al. (2014) presents a programmed ATmega 32A microcontroller as the basic component for the water level indicator to indicate the level of water.Vishal (2014) has created remote access for control the water level by using LabView software with the help of Smartphone & Cross-platform Communication Toolkit platform.Jagdish et al. (2014) are implemented Proportional Integral controller using LabView.The interfacing with the hardware is implemented by using the Data Acquisition board.Xing (

Fig. 9 .
Fig. 9.The complete proposed water level control system.

Fig. 10 .
Fig. 10.Block diagram for monitoring of liquid tank level control.

Fig. 11 .
Fig. 11.LabView front panel shown the liquid at low level.

Fig. 12 .
Fig. 12. LabView front panel shown the liquid at high level.