Liquid Level Indication and Control System Using A
Liquid Level Indication and Control System Using A
arduino
Khalifa Dai Elnour Mohamed ( [email protected] )
university of Kordofan https://orcid.org/0000-0003-3520-2668
Research Article
DOI: https://doi.org/10.21203/rs.3.rs-1864108/v1
License: This work is licensed under a Creative Commons Attribution 4.0 International License.
Read Full License
Page 1/15
Abstract
Overflow from Liquid tank is a common problem which leads to the wastage of Liquid. Though there are
many solutions to it like ball valves which automatically stop the Liquid flow once the tank gets full. So a
simple device has been created. This device allow to detect the Liquid level and will raise an alarm upon
getting the Liquid tank full or a preset level show the level percentage on LCD, then controlling the process
of turn pump on and turn it off operation.
Liquid level indicator is a modern way of measuring the liquid level using latest technologies like Arduino
as as a programming unit and many different types of sensors like Ultrasonic, LDR,PIR, ……etc.
The main aim of the project is to calculate the Liquid level at any instant of time and to turn the pump on
when the tank is empty or at specific level and turn it off if the tank is filled completely.
As a result of this project the percentage of liquid’s level has shown on a display unit (16*2 Liquid Crystal
Display), and the fuel pump has been automatically controlled.
1.1 Introduction
The project has a simple circuit to control the pumps transferring fuel from the main tanks to the
operating tanks (day tanks) automatically, without the need for operation or supervision by technicians,
and this saves a lot of money and a lot of efforts, the use of this circuit also preserve the machine in the
station.
The Idea came from observing the daily work of the technician at the generation station, as they were
opening and closing the pumps to transfer the fuel from the main tanks to the operating tanks manually,
and this process takes not less than 10minutes until the technician reaches the control panel of the pump
and turn it on or off, one day there was overflow in the operating tank due the failure to stop the pump
after the tank was full, which caused the loss of a lot of fuel, in addition to the damage that could have
been caused to the machine and workers as a result of this.
Reducing the time wasted in the process of opening and closing pumps manually.
Reducing the efforts required when turning on and off the pump manually
Ensure that the machine operate efficiently and without damage
Saving money that may be spent as a result of wasting fuel when overflow occurs.
Page 3/15
waves to the bounce. Sound is known to travel through the air at about 344 m / s (1129 ft / s), so take the
time it takes for the sound waves to return and multiply by 344 meters (or 1129 ft) to get the overall
roundness. can do. Decision. The distance traveled by the sound wave. Round trip means that the sound
wave traveled twice the distance to the object before it was detected by the sensor. This includes a
"journey" from the sonar sensor to the object and a "journey" from the object to the ultrasonic sensor
(after the sound wave hits the object and bounces off). To find the distance to the object, simply split the
outer and return distances in half.
Optical sensors have transmitters and receivers, but ultrasonic sensors use a single ultrasonic element for
both transmission and reception. In a reflective ultrasonic sensor, one oscillator sends and receives
ultrasonic waves alternately.
Where L is the distance, T is the time from emission to reception, and C is the speed of sound. (T is the
round trip time, so multiply the value by 1/2.)
3. Experiment
I connected the ultrasonic sensor to the Arduino control board and from the Arduino output I connected
the relay, which in turn controls the opening and closing of the pump. The figure below explain the
connection of system.
Working of this project is very simple Ultrasonic sensor module has been used which sends the sound
waves in the Fuel tank and detects reflection of sound waves that is ECHO. First of all the ultrasonic
sensor module is need to been trigger to transmit signal by using Arduino and then wait to receive ECHO.
Arduino reads the time from triggering ECHO to receiving it. The speed of sound is about 340 m / s.
Therefore, the distance can be calculated using the following formula: Distance = (travel time / 2) * speed
of sound Where speed of sound is approximately, 340 m per second.
By using this method we get distance from sensor to Fuel surface. After it we need to calculate Fuel level.
Now I need to calculate the total length of Fuel tank. As we know the length of Fuel tank then we can
calculate the Fuel level by subtracting resulting distance coming from ultrasonic from total length of
tank. And I will get the Fuel level distance. Now I can convert this Fuel level in to the percent of Fuel and
can display it on LCD.
After calculating Fuel tank's level now I go to next stage using previouse result in control operation,
independs on the result the pump turned on or turned off, here in my experiment the tank hight is (22cm)
and the working values of system are shown in table below:
Page 4/15
Table (1): Operation system values
Fuel tank hight (H) cm Pomp state
H=5 ON
H=20 OFF
5 =< H < 20 ON
4. Software Implementation
The sensor collects the data and sends it to the Arduino and then it gives the desired signal to the pumps.
I can set our given level from the code. If the level crosses the given threshold the pump in the tank is
given a signal and it starts to pump the fluid out of the tank until its under the threshold. When the level
drops below the threshold above, the pump in the reservoir will start pumping the liquid to the tank. Only
the tank and one pump are used.The flow chart below explain the process of software steps and the code
which I need .
#include
<LiquidCrystal.h>
int pos = 0;
const int P = 7;
long duration;
int distance;
void setup()
{ lcd.begin(16, 2);
Page 5/15
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
lcd.setCursor(0,0);
lcd.print(FTH);
lcd.print("CM");
void loop()
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
distance = duration*0.034/2;
int h = FTH-distance;
Serial.println(h);
delay(500);
lcd.setCursor(11,1);
lcd.print(h);
lcd.print("CM ");
int x = h;
Page 6/15
if(h < = 10&&h > = 5)
analogWrite(buzz,200);
digitalWrite(P,HIGH);
lcd.setCursor(0,0);
lcd.print(FTH);
lcd.print("CM ");
delay(1000);
Serial.println("PUMP ON");
lcd.setCursor(0,1);
lcd.print("PUMP ON ");
analogWrite(buzz,200);
digitalWrite(P,HIGH);
lcd.setCursor(0,1);
lcd.print("PUMP ON ");
digitalWrite(P,HIGH);
Page 7/15
else if(h > 10&&h < 27)
analogWrite(buzz,0);
lcd.setCursor(0,1);
lcd.print(" ");
analogWrite(buzz,0);
lcd.print("PUMP OFF");
analogWrite(buzz,200);
analogWrite(buzz,200);
digitalWrite(P,LOW);
lcd.setCursor(0,0);
Page 8/15
lcd.print(FTH);
lcd.print("CM ");
delay(500);
Serial.println("PUMP OFF");
lcd.setCursor(0,1);
lcd.print("PUMP OFF");
Figure (5) shows the second fuel level representation by ultrasonic and arduino interface to turning the
pump OFF automatically.
5.2 Result
Level indicators are ideal for saving energy because we live in a country that suffers from energy
shortages and needs to be more aware of energy consumption. Normally, adjusting fuel levels consumes
power., Fuel is wasted. However, using automated control limits power consumption and requires less
fuel to regulate supply. Level controllers save money by limiting wasted fuel and electricity. These devices
precisely adjust the amount of energy used to prevent unnecessary fuel / electricity consumption. Over
time, the money saved will be considerable. Eliminating manual manipulation by timers minimizes the
frustration of manually monitoring the fuel tank. The automated operation of these devices keeps fuel
levels at the right level.
5.3 Disadvantages:
Fuel level controls need to be replaced every 3 years.
The rust, foul and deteriorate
Electronics are usually built separately
More difficult installation
Page 9/15
5.4 Applications & Uses:
The uses of a liquid level indication include the following applications:
5.5 Benefits:
There are many benefits of Liquid (Fuel) level indicator and controller including:
Easy installation
Minimal maintenance
Sends an alert to let you know Fuel is too high or too low
Low & High alarms
Compact design
6.1 Conclusions
After designing and operating this circuit and obtaining excellent results compared to manual operation
although there are some drawbacks the benefits are much more.
The time it takes to open and close the pump is greatly reduced.
The process of transferring fuel from the main tanks to the operating tank is now automated.
The risk on machine and worker due to overflow has been avoided.
Money wasted due to fuel overflow has been saved.
6.2 Recommendations
Page 10/15
Therefore I recommend activating automated systems always because they save a lot of effort and
money and work very efficiently times the efficiently that the most skilled workers can work with.
Finally through experience I found that the design is feasible from one side and can be used after
adapting to different working conditions.
Declarations
Competing interests
Funding
Author contribution
Acknowledgements
Not applicable.
References
1. ARDUINO.CC, “Arduino – Introduction”, 2015 [Online] Available:
http://arduino.cc/en/Guide/Introduction. [Accessed: 25- Feb – 2015].
2. Beza Negash Getu and Hussain A. Attia, Automatic Water Level Sensor and Controller System,
©2016 IEEE.
3. Priya J, Sailusha Chekuri, water level monitoring system using IoT, International Research Journal of
Engineering and Technology (IRJET) Volume: 04 Issue: 12, Dec-2017.
4. Madhurima Santra, Sanjoy Biswas, Sibasis Bandhapadhyay and Kaushik Palit, Smart Wireless water
level Monitoring & Pump controlling System, International Journal of Advances in Scientific Research
and Engineering (IJASRE), Vol. 03, Issue 4, May – 2017.
5. H. N. Norton, Handbook of Transducers, Englewood Cliffs, NJ: Prentice-Hall, 1989, 294–330.
6. W. H. KO, Solid-state capacitive pressure transducers, Sensors and Actuators, 10, 303–320, 1986.
7. C. S. Smith, Piezoresistance effect in germanium and silicon, Phys. Rev., 94, 42–49, 1954.
8. O. N. Tufte and E. L. Stelzer, Piezoresistive properties of silicon diffused layers, J. Appl. Phys., 34,
313–318,1963.
9. D. Schubert, W. Jenschke, T. Uhlig, and F. M. Schmidt, Piezoresistive properties of polycrystalline and
crystalline silicon films, Sensors and Actuators, 11, 145–155, 1987.
Page 11/15
10. K. E. Petersen, Silicon as a mechanical material, IEEE Proc., 70, 420–457, 1982.
Figures
Figure 1
system architecture
Figure 2
Ultrasonic sensor
Figure 3
Figure 4
System connection
Page 12/15
Figure 5
Flow chart
Page 13/15
Figure 6
Page 14/15
Figure 7
Page 15/15