Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
72 views7 pages

Abdussamad Umar Jibia and Aliyu Abdullahi: Ajumar@buk - Edu.ng

n;k

Uploaded by

Aravind Kumar
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)
72 views7 pages

Abdussamad Umar Jibia and Aliyu Abdullahi: Ajumar@buk - Edu.ng

n;k

Uploaded by

Aravind Kumar
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/ 7

ATBU, Journal of Science, Technology & Education (JOSTE); Vol.

3 (3), August, 2015 ISSN: 2277-0011

A MICROCONTROLLER- BASED FUEL LEVEL INDICATOR

By
1
Abdussamad Umar Jibia and 2 Aliyu Abdullahi
1
Department of Mechatronics Engineering,
Bayero University, Kano, Nigeria,
2
Department of Electrical Engineering,
Kaduna Polytechnic, Kaduna, Nigeria,
1
[email protected], & [email protected]
ABSTRACT
The paper presents a microcontroller-based petrol level gauge for a horizontally mounted underground cylindrical
tank. The major blocks are a magnetostrictive level sensor, a microcontroller and a liquid crystal display (LCD) unit.
The sensor basically senses the position of a permanent magnet to determine the distance between the permanent
magnet and the sensor head. The output of the sensor is an analog signal, which is fed to the microcontroller. In order
to determine the contents of tank fitted with petrol level sensor, the microcontroller is programmed with an algorithm
employing a mathematical expression for computing data value based on petrol level sensor output and tank
dimension. The output of the programmed microcontroller is read out to give the height in meters and volume in litres
via an LCD display. The prototype meter measures petrol in the range of 0 to 22.773 litres, with an accuracy of ±1.8 %,
which is acceptable in comparison with commercial analogue petrol level gauge.

INTRODUCTION However, this approach has two limitations. One of


In most petrol filling stations, fuel is first them is the large amount of force required when
discharged into the underground storage tank and moving the sliding contacts. Secondly, the sliding
subsequently pumped into the dispensing machine as contacts can wear out and become misaligned.
the need arises. There is thus need to know the level of Another method is by means of ultrasonic
fuel in the underground tank at all times. In the very sensors (Sakharov et al (2003), Sighn (2009)). This
old method of measuring fuel level, an un-calibrated method uses the principle of sending a sound wave
steel rod is dipped into the tank to give an indication of from a piezoelectric transducer to the contents of the
the approximate level of fuel in the tank in terms of vessel. The time it takes the wave to return to the
low, medium or high. This is very inaccurate and transducer is inversely related to the level of liquid. In
subject to abuse. The rod may not reach the bottom of addition to the fact that this method is only suitable
the tank or may slant slightly thereby giving an for containers of uniform dimension, obstacles such
erroneous indication of fuel level. With high cost of as powders, heavy vapour, surface turbulence and
fuel, there is the need to ascertain the actual quantity ambient noise can affect the returning signal.
of fuel purchased and the rate at which it is used up so Other methods include fibre optic methods (Vazquez et
as to minimize fraudulent activities. al, 2004, Kersey & Dandridge, 1990, Golnabi, 2004)
A number of methods for level measurement of fuel which are inherently safe and suitable for use for
have been reported. For example, Idris (2004) used a combustible liquids. This is because the light signal
potentiometric transducer and a voltage-controlled propagated through the fibre is modulated not
oscillator. The frequency of the VCO is converted to a electrical signal. The main problem with this approach
digital display calibrated to indicate the volume of fuel.

69

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

is the electromagnetic interference that affects the existing counterparts, it is not affected by vibration.
support system. Both the height and volume of the tank will be
In this paper, a petrol level gauge using a low displayed unlike existing fuel meters which display
cost, 10-bit microcontroller, utilizing a high resolution either the height or the volume.
magnetostrictive level sensor is presented. A marked
improvement over potentiometers for long stroke SYSTEM DESIGN
position measurement, the magnetostrictive level Fig. 1 shows the block diagram of the proposed petrol
sensor possesses exceptional linearity, even over level gauge. A magnetostrictive sensor is used. The
lengths up to 120 inches (3 m), with repeatability up to sensor output is analog and is fed to analog to digital
0.002 % of the measurement range. By utilizing converter embedded in the 18F4520 microcontroller.
magnetostrictive technology (Fraden, 2010), the The ADC has a 10-bit resolution (Microchip, 2008). The
proposed gauge requires no contact between parts microcontroller scales and processes the signal and
that cause friction or premature wear, offering high the output ASCII data is fed to the liquid crystal
reliability and extended life. In addition, unlike the display.

Fig. 1 Block diagram of the proposed level gauge

The tank used is a cylindrical tank mounted in cross-sectional area and is not a linear function of
a horizontal position. The vertical capacity and volume height. The volume is given by (Islam, 2011)
of a horizontal cylindrical tank vary with the horizontal
= cos 1− −√ − − (1)
where Vcyl= Capacity of the cylindrical tank
= Diameter of cylinder
= Length of cylinder
= Unknown height
The prototype tank was designed by first petrol container. Therefore the volume of the petrol
considering the maximum volume of petrol required. tank is given by
For portability sake it was desired to design a 30 liters
= (2)
Where,
=Volume of petrol tank
=Radius of petrol tank
=Length of petrol tank
Choosing l to be 0.52 m, equation (3) becomes

70

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

0.03 = 0.52
.
 = .
= 0.136

 Diameter of the tank, = 2 = 0.272


The cylindrical shape is obtained considering
the circumference (width of the metal sheet) of the
tank. The circumference, C, is given by,
= 2 (3)
 = 2 (0.136) = 0.8546
This circumference and the length of the tank Fig. 2 shows the flow chart for the system. The
are folded to produce the cylindrical shape. microcontroller was programmed using microC in an
MPLAB environment.

Fig. 2 Flow chart for determining volume of a horizontal cylindrical tank


components. A voltage regulator 7805 was used in the
The schematic circuit diagram of the system power supply to give precisely 5 V voltage and a
is shown in Fig. 3. Basic electronic design techniques maximum current of 1 A. The picture of the prototype
were used to determine the values of pheripheral gauge is shown in Fig 4.

71

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

Fig. 3: Schematic diagram of a microcontroller based petrol level gauge

Fig. 4 Picture of the prototype gauge


RESULTS AND DISCUSSION value (M), the expected value (E) and the displacement
Simulation was carried out using proteus are shown in Table 2. The second test was carried out
software and results are shown in Table 1. The first to compare with the results obtained in Table 1. Table 3
test was carried out to ascertain the calibration of the presents the results of the test.
gauge, using premeasured fuel quantity. The measured

72

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

Table 1: Simulation Readings of Displacement and Volume


x(m) 0.011 0.025 0.039 0.051 0.063 0.074
Vs (litres) 0.392 1.297 2.415 3.586 4.864 6.092
x(m) 0.085 0.095 0.105 0.113 0.122 0.130
Vs(litres) 7.301 8.474 9.667 10.728 11.793 12.783
x(m) 0.138 0.146 0.153 0.160 0.166 0.173
Vs(litres) 13.766 14.667 15.485 16.287 17.004 17.701
x (m) 0.179 0.185 0.190 0.196 0.201 0.206
Vs (litres) 18.315 18.965 19.474 19.960 20.420 20.851
x(m) 0.211 0.215 0.220 0.225 0.229 0.233
Vs(litres) 21.205 21.530 21.818 22.065 22.237 22.350

Table 2: Measured and Expected value of the measurand


x(m) 0.019 0.033 0.044 0.054 0.063 0.072
M(Liters) 0.908 1.947 2.946 3.983 4.958 5.979
E(Liters) 1 2 3 4 5 6
x(m) 0.081 0.098 0.106 0.114 0.122 0.130
M(Liters) 6.965 7.976 8.987 9.974 10.948 11.989
E(Liters) 7 8 9 10 11 12
x(m) 0.138 0.147 0.155 0.164 0.173 0.182
M(Liters) 12.973 13.939 14.966 15.974 16.956 17.972
E(Liters) 13 14 15 16 17 18
x(m) 0.182 0.193 0.204 0.217
M(Liters) 18.941 19.969 20.956 21.973
E(Liters) 19 20 21 22

Table 3: Tests Meter Readings of Displacement and Volume


x(m) 0.011 0.025 0.039 0.051 0.063 0.074
VT (litres) 0.391 1.305 2.487 3.670 4.958 6.188
x(m) 0.085 0.095 0.105 0.113 0.122 0.130
VT (litres) 7.468 8.713 9.824 10.873 11.999 12.973
x(m) 0.138 0.146 0.153 0.160 0.166 0.173
VT (litres) 13.939 14.821 15.688 16.539 17.163 17.972
x(m) 0.179 0.185 0.190 0.196 0.201 0.206
VT (litres) 18.560 19.190 19.676 20.311 20.747 21.158
x(m) 0.211 0.215 0.220 0.225 0.229 0.233
VT (litres) 21.541 21.807 22.167 22.441 22.611 22.758

73

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

The results obtained indicate very slight proportional to the displacement of the sensor for
discrepancies when values of Table 1 are compared both the practical and simulation.
with those of Table 3. These differences are the An error analysis was performed between the
errors. Graphs of these two values, i.e. Tables 1 and 3 simulated values and the measured values using the
are plotted in Fig. 5. The graph shows that the volume formula of equation (4).
of the petrol in a horizontal cylindrical tank is

Error = (4)
The highest error recorded is
= |(22.773 − 22.363)/22.773| = 0.018 1.8 %
Therefore, accuracy = ± 1.8 %

25

20
VOLUME IN LITERS

15

PRACTICAL VALUE
10
SIMULATED VALUE

0
0 0.05 0.1 0.15 0.2 0.25
DISPLACEMENT IN METERS

Fig. 5 Graph of volume versus displacement for both practical and simulation value

CONCLUSION accuracy of ±1.8 %, which is acceptable in comparison


A digital petrol level gauge was implemented with commercial analogue petrol level gauge
using microchip’s 18F4520 10-bit microcontroller. An
additional feature is the use of magnetostrictive level
sensor technology, possesses exceptional linearity,
even over lengths up to 120 inches (3 meters), with
repeatability up to 0.002 % of the measurement REFERENCES
range. Besides, no contact between parts that causes Fraden, J. (2010). Handbook of Modern Sensors:
friction or premature wear, offering high reliability Physics, Designs, and Applications. Springer
and extended life. The developed meter measures Science & Business Media, LLC.
petrol in the range of 0 to 22.773 litres, with an

74

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)
ATBU, Journal of Science, Technology & Education (JOSTE); Vol. 3 (3), August, 2015 ISSN: 2277-0011

Golnabi, H. (2004). “Design and Operation of a Fiber


Optic Sensor for Fluid Level Detection,” Microchip, T. I. (2008). PIC18F4520 Data Sheet,
Optics and Lasers in Engineering, Vol. 41, pp www.microchip.com.
801-812.
Sakharov, V. E., Kuznetsov, S. A., Zaitsev, B. D.,
Idris, K. (2004). Development of a digital fuel meter for Kutnetsova, I. E., and Joshi, S. G. (2003).
cylindrical tank, Unpublished MEng “Fluid Level Sensor Using Ultrasonic Lamb
Dissertation, Department of Electrical Waves” Ultrasonics, Vol 4, pp 319-322.
Engineering, Bayero University, Kano.
Singh, S. (2009). Industrial Instrumentation & Control.
Islam, M. S. (2011). A comprehensive analysis of amount New Delhi: Mc Graw-Hill Publishing company
of liquid in a horizontally mounted right Ltd.
cylindrical tank. Global Journal of Science
Frontier Research, vol. 11, issue 8, pp. 22-26. Vazquez, C., Gonzalo, A. B., Vargas, S., and Montalvo, J.
(2004). “Multi-Sensor System Using Plastic
Kersey, A. D., and Dandrige, A. (1990). “Application of Optical Fibers for Intrinsically Safe Level
Fiber-Optic Sensors,” IEEE Transactions on Measurement,” Sensors and Actuators A , Vol.
Components, Hybrids, and Manufacturing 116,.
Technology, Vol 13, No. 1,

75

Abdussamad, U. J. & Aliyu, A. Copyright © 2015 JOSTE. All Rights Reserved (www.atbuftejoste.com)

You might also like