Sie sind auf Seite 1von 8

Mechatronic Design Solution for Fuel Level

Monitoring using Pressure Sensor


J. A. Goundar, A. A. Chand, N. Tabua, R. Prasad, P. Chand, U. Metha, K. A. Mamun
School of Engineering and Physics
The University of the South Pacific
Suva, Fiji
E-mail: jowesh_g@yahoo.com; S11066659@student.usp.ac.fj
Abstract: Liquid levels are measured in a variety of
industrial applications, and are often measured manually,
which can be labor-intensive as well as time-consuming.
Rapid advances in electronic technologies have made a
variety of inexpensive sensing, monitoring, and control
capabilities available. A mechatronic design solution is
produced to solve a practical problem faced by Generation
Strategic Business Area at Cawaira power-station, a substation of Fiji Electricity Authority (FEA). A monitoring
system is developed, designed and evaluated for automatic
measurement and controlling of fuel levels in the fuel
supply tanks at this sub-station. The design was
demonstrated using a hardware model. The system is
composed of a pressure sensor, a microcontroller, solenoid
valves and a liquid pump. The pressure sensor measures
the pressure inside the air column submerged in the tank,
which is then calibrated to display level. The system is
designed to read real-time data to measure the fuel level
inside the tank as well as programmed with critical event
alarms which trigger upon the occurrence of an event such
as low fuel inside the tank, reaching maximum safety limit
and leakage in the fuel pipe line. The system is being tested
using the fabricated model and the system measurement
results are verified to those measured manually. This
system is inexpensive, easy to build, install, and maintain.
In addition to monitoring liquid level, the system could be
adapted to a variety of other measurements.

systems, Arduino provides an open-source platform for


creating programmable microcontroller with expansion
capability through add-on circuit boards, and a programming
environment to create software for the microcontroller. Today,
many industrial applications to monitor and control a system
such as in Power-stations, fuel and other liquid supply
industries as well as in agricultural application use inexpensive
sensors and Arduino development platform [1, 2].
Pressure sensing technology, used to measure pressure at
different heights/levels, has found useful applications in fluid
level monitoring systems. Placed at the top of the container, the
pressure sensor is connected to an open-ended tube that is
submerged in the container as indicated by Fig. 1. The amount
of water in the container exerts proportional amount of pressure
on the sensor via the trapped air in the tube [3]. The output
from the sensor therefore, produces voltage proportional to the
pressure inside the column. The voltage can then be calibrated
to give output response for the proportional height or level of
liquid in the tank.

Keywordsliquid; fuel; level; monitoring; controlling; pressure


sensor; microcontroller; mechatronics;
Fig. 1: Pressure sensor mounting [3].

I. INTRODUCTION
Rapid advances in electronic technologies have made a
variety of inexpensive sensing, monitoring, and control
capabilities available. Liquid-level monitoring plays an
important role in todays automotive, oil, water, pressure, and
gas industries to name a few. For example, pumping oil into a
storage tank requires liquid-level monitoring to prevent
spillage. Draining liquid out of a silo into bottles also requires
liquid-level monitoring for volume control.
For development of inexpensive sensing and monitoring

Niu et al. [3] has proven the use of multifunctional pressuretype liquidometer (MPTL) as a novel method of liquid level
and density measurement with application in airtight container
such as oil storage tank. Zhang et al. [4] has demonstrated an
asymmetric FabryProt fiber-optic pressure sensor is capable
to precisely measure liquid levels. In vivo blood pressure
sensing applications, Brox et al. [5] reported in producing a
novel micromachined capacitive pressure sensor fabricated on
a metal substrate without using a photolithographic process.

The research project was funded by the School of Engineering and Physics,
the University of the South Pacific, Fiji.

Page | 1

Moreover, Manzo et al.[6] and Liu [7] have demonstrated the


use of pressure sensor in fluid mechanics applications.
This paper is a mechatronic design solution for a practical
application for monitoring fuel level inside fuel supply tanks
and control desired processes at Cawaira sub-station, Fiji
Electricity Authority (FEA).
Generation strategic business area (SBA) at Cawaira is a
thermal Power Station set-up in Labasa (Fiji) to supply
electricity from Diesel Engines. The current consumption for
fuel per day is approximately 30,000 Liters, thus the station
requires the fuel tanks to be re-fueled daily. The station has
bulk storage facility for fuel in their reserve tanks known as
Bunker Tanks while the supply tank is named as Service Tank.
There are four (04) Bunker Tanks (BT) and two (02) service
tanks (ST). During the re-fuelling of the bunker tanks, at least
two technical staff needs to be available at the location of
bunker tanks to manually check the level of fuel in each tanks
to avoid overflows, which is an expensive task in terms of time
and human resources. They are also responsible to switch on
and off the pumps to fill the service tanks and monitoring their
levels as well. The process is quite long and is very hectic.
The station, therefore, requires a mechatronic design to be
implemented which can control the valves, monitor tank level
as well as can switch on and off the pumps to fill the service
tanks. This will allow the system to be placed in control and
will also give opportunity to monitor the system in real-time.
The time spent for manual label checking, can be utilized more
productively in some other proficient work towards production
of electricity. However this research output will help to solve
this problem.
II. METHODOLOGY
A. Designing Model Layout using CAD Application
1) Actual Site Layout
To study the actual system, the area of focus for the real
system was re-designed in CAD to plot and indicate which
areas for the fuel system has to be changed. These areas are
clearly labeled in Fig. 2, that is, which valves need to be
replaced, installation point of level sensor (pressure sensor)
and the pump to be controlled.

2) Layout for the Model tobe Designt and Tested


The model was constructed to build and test the
mechatronic system. It was not feasible to build the system
as the actual layout states, thus a simplified model was
created with one (01) bunker tank and one (01) service
tank. The 3D and 2D layout of the model designed for
testing are shown by Fig. 3(a) and Fig. 3(b) respectively.

Fig. 3: Layout for the designed model (a) 3D Layout (b) 2D line
drawing

B. Selection of Parts
1) Microcontroller
Arduino Mega 2560 [9] is used as a microcontroller for
this project to build a stand-alone system, hence the system
does not need to be required to connect to the computer.
Arduino provide an open-source computing platform. A
simple I/O development board is used to write the
programming. Moreover Arduino Mega 2560 boards can be
interfaced through any of the computer operating systems
such as Mac, OS X, Windows, and Linux. The pin
allocated for interfacing the components is shown below in
Fig. 4.

Fig. 4: Microcontroller pin allocation


Fig. 2: Fuel line layout in actual site, Cawaira sub/station, FEA.

Page | 2

2) Pressure Sensor
BMP085 Pressure Sensor [11] is used for level
monitoring in this context. BMP085 is optimized for use in
outdoor applications and for research purposes due to its
ultra-low power and low voltage electronics. It is based on
piezo-resistive technology for high accuracy, linearity and
long term stability. A schematic shown in Fig. 5 illustrates
the mounting of BMP085 in an air column.

A 24V washing machine solenoid valve is utilized to


construct the model. The coil for this valve is encapsulated
in a thermoplastic material (nylon glass) which has very
high permittivity and so it isolates the field created by the
solenoid coil from adjacent electronic components. This
enables it to be interfaced with the microcontroller safely
with affecting it or any of its electronics.
6) Pump
The pump used for the model construction is a 12V DC
Car Windscreen Washer Pump. This pump is used as an
actuator which is actuated when the critical level (fuel low)
in the service tank has reached or after 24hrs of service.
The bunker tank automatically starts filling the service tank
up to a safe filling limit of the service tank. Both tanks had
critical low level limit and maximum filling limit; discussed
further in software design sub-section.
C. Block Diagram of the Designed Model
It is essential to identify how each component is linked to
another. Fig. 7 illustrates a simple block diagram which
shows how each of the components is interfaced with other
to form a mechatronic system.

Fig. 5: Pressure sensor BMP085 mounted on PVC pipe (Air Column)

Microcontroller

3) LCD Display
A 16 X 2 LCD Display screen is used in this project.
The main purpose of the LCD is to display the current
status of the system such as fuel level of the tanks and event
status. A push button connected to external interrupt pin is
used to display the volume in the tanks at any given time.
4) Relay
OMRON G2R-1 Relay [13] was selected for use in this
project. The relay was soldered onto a printed-circuit board
(PCB) along with the ULN2003AN integrated chip(IC)
(Fig. 6). The chip is embedded with high power Darlington
transistor which amplifies the signal from the Arduino
microcontroller to powered up the relay.

Display

Alarm

Level sensor service tank

Motor controller

Level sensor bunker tank

Service tank

Pump

Bunker tank

Generator

Fuel Service
truck

Fig. 7: Block diagram for the model

D. Algorithm Design
1) Pressure Sensor Reading
The pressure sensor comes with a driver code. It is
connected to the serial data pin of the Arduino. There are
two pressure sensor and both will be operated by only one
driver code. Bunker tank pressure sensor will be read first
and data will be processed before the service tank pressure
sensor is read and processed. The code will switch between
these two continually.
2) Bunker Tank

Fig. 6: OMRON G2R-1 mounted on a PCB with ULN2003AN

5) Solenoid Valve

Firstly, the tank must be protected against overflow. In


the model, a 2L container represents the bunker tank. It has
been divided in to increments of 100mL. 1600mL, which is
the top most level is the over flow point. If volume reaches
this limit, the respective LED will light up and appropriate
display will be put on the LCD. All process will also stop

Page | 3

and a reset will be required. This will represent that the user
has to correct the problem and then reset the system.
Another point where the system will be required to be reset
is when the volume of fuel in the bunker tank goes below
critical_2 (200mL). A critical volume of 400mL is put in
place to raise an alarm to show that volume in the tank is
getting low and needs attention.
As stated earlier, a service truck fills the bunker tank
daily. To make the process automatic, a solenoid valve was
placed in the supply line to the bunker tank. When the truck
starts to fill, the solenoid button needs to be pressed to
allow the fuel to flow in the line. Once the fuel reaches
bunker limit volume (1500mL), the solenoid will
automatically turn off. All appropriate LCD and LED
output will be displayed.
3) Service Tank
The service tank also has similar limitations and
operation as above. The service tank is to be represented by
a 1L container with 200mL volume deviations. A volume
of 700ml is set as the safe filling limit and the pump should
be turned off here. The label of 800mL is the service
overflow volume and the system will require a reset at this
point. Here the label of 200mL is the critical_2 volume for

service and will also require a reset. Again 300mL will be


the point where the pump will turn on and start to transfer
fuel from bunker to service tank. These all situation is
accompanied with appropriate LED and LCD display.
4) Leakage
An additional feature of this system is to detect leakage.
The point of leakage will not be detected rather the presents
of leakage. The leakages may be at any point in the pipe
line between the bunker and service tank. The algorithm
will compare the volume displaced from the bunker tank
and the volume gained in service tank, due to the operation
of the pump. If the volumes do not match that means there
are leakage somewhere in the flow line (BT-ST); the alarm
will be displayed using the LED, LCD and system needs
reset action.
5) Volume Display
Once the button labeled as volume is being pressed;
LCE will display the volume of the bunker tank. If the
button is pressed again, the service tank volume will be
displayed. One button can be used to display both tanks
information which reduced the hardware components. Fig.
8 and Fig. 9 explain the above in a flow chart format.

Start

Initialize
Read sensor Bunker

Calculate bunker volume


Button press Display volume

Is solenoid button
pressed (interrupt)

Yes

Yes
Is volume <1500ml

Turn on
Solenoid

No

Yes
Turn off
solenoid,
off Led

Yes

Is volume =1500ml
No

Is reset pressed

No

Is volume >1600ml

Yes

light led,
display
LCD

Hold to
read reset,
LCD
display

No
display LCD, set
empty bunker flag

Yes

Is volume <200ml

Fig. 8: Source-code flow chart for bunker tank

Page | 4

A
Read sensor Service
Calculate volume
Button pressed - display vo
olume

Is volume < 300L

Yes

Store both tank


reading in new
variable

Turn on pump
B

No
B
Yes

Is volume = 700ml

Turn off pump

Calculate vol
l
displaced

No
Yes
Is volume>=
800ml

Compare vo
ol
with set vol
l

Yes

No
A

Is comparis
son ok

Yes
Is volume<=
200ml

D
No
o
light led, disp
play
LCD,

No
B

Fig. 9: Source-code flow chart for service tank

III. RESULTS
Table 1 shows the total cost that was
w incurred to
design the final model. It indicated that thhe cost is not too
much to build this model and hencee can be fully
integrated for installation at the finall site with recalibration of the sensor.
TABLE I.
Item

PROJECT MODEL COST ANALYSIS


N

Quantity

Arduino
MEGA

Programming
software

Pressure
sensor
BMP085
Small water
pump

Source
Radio Spares
[8]
Arduino
Development
[9]

Unitt price
(FJD
D) ($)

Price
(FJD) ($)

1
113

113

Adafruit [10]

3
37

74

Local market

4
45

45

Wires, power
supply

varying

Local market

7
75

75

Miscellaneous
items

varying

Local market

1
100

100

Total

$407.00

The calculation of volum


me is done using the experimental
results graphs that was obtaained from the pressure sensor
calibration process. The basiic equation of a line relationship
(1) is employed.
m +C
y = mx

(1)

Pressure sensor reading foor increments of 200ml was


recoded. A total of 5 trials were done and the pressure
reading for each increment was averaged out. The sensor
reading was linear as seen in Fig. 10.

Fig. 10: Calibration graph for prressure sensor

From the model set up,, the pressure sensor reading at


which the pump was turned on and off was recorded. These
volumes were 300 ml (pumpp start filling) and 700 ml (pump
stops filling). Reading was taaken only for the service tank as
Page | 5

this was the only tank that has the automated start and stop
filling process. Since the pressure sensor was identical,
bunker tank reading was not taken into consideration. Table
1 shows the results obtained when pump is turned off.
Equation (2) obtained from (1) is employed for the volume
calculations

The error associated with the pump turning on is give as:


Error pump stop = |300ml - 295ml| = 5ml

(2)

According to the algorithm, the pump is turned on only


when volume has reached 300ml. Due to error, the pump
turns on at a mean volume of 295ml with the experimental
range of 9ml.

This same equation was used in the algorithm coded in C++.

The final model is built and tested for accuracy and


performance. Fig. 11 shows the final project model that was
tested.

y = 0.98x + 101466
where, y is the pressure sensor reading and x is the
volume in the tank.

Table 2 and 3 depicts the experimental values of volume in


the service tank when the pump turns off and on
respectively.
TABLE II.

SERVICE TANK PRESSURE SENSOR READING WHEN PUMP


TURNS OFF

Trial
1

Pressure sensor reading


(Pa)

Calculated Volume (ml)

102159

708

102154

702

102153

701

102160

709

102162

710

Solenoid valve

Pressure sensor
bunker

Pipe line

Water (fuel) pump


Water (fuel) feed to
unker tank
Pressure sensor
service
Power supply for
solenoid and pump

Service
Service tank
outlet

Power supply for


control panel

LCD
Relay board

Arduino Mega

Average

706

The error for stopping the pump is therefore;


Error pump stop = |700ml -706ml| = 6ml
According to the algorithm, the pump is turned off only
when volume has reached 700ml. Due to error, the pump
turns off at a mean volume of 706 ml with the experimental
range of 9ml.
TABLE III.

SERVICE TANK PRESSURE SENSOR READING WHEN PUMP


TURNS ON

Trial

Pressure sensor reading


(Pa)

Calculated Volume (ml)

101757

297

101760

300

101752

292

101751

291

101756

296

Average

Fig. 11: Final model for testing.

Control panel

One of the major components of this project is the switch


debounce in hardware. Both the volume button and solenoid
valve button are attached to interrupt pins 18 and 19
respectively. In an interrupt subroutine program, delay does
not work since the clock that is responsible for the interrupts
is also responsible to generate delay. Therefore in Arduino,
once the program enters an interrupt subroutine program,
delay stops to function. Software solution for switch
debounce commonly uses delays, thus it is no longer
applicable. The solution to this was to build hardware which
directly takes care of the switch debounce.

295

Fig. 12: Debounce solution with Schmitt Trigger[11]

Page | 6

The Schmitt trigger (Fig. 12) is an investor with a preset


hysteresis function. When the switch is not pressed the
output of the circuit is low. Once the switch is pressed, the
output jumps to high and is held high till the switch is
released.

cylindrical, adding a diaphragm will be quite


easy. The sensor will then require re-calibration.
The final cost for this project was observed to be very
low (FJD $407.00). This mechatronic design project can
therefore introduce many benefits to South Pacific industries
such as:

IV. DISCUSSION
BMP085 pressure sensor has very high resolution which
affects final reading and output controls as temperature
fluctuated, since both temperature and pressure are
dependent variables. A software code can be written to
compensate for this variation. The results obtained were
satisfactory as all controls were properly actuated upon
sensor readings. The controls such as for switching off pump
upon reaching safe filling limit, overflow indications, alarms
triggering at critical levels were all functional.
The error range was calculated to be 9ml for both
scenarios (pump turning on and turning off volume). This
can be attributed to variations such as temperature
fluctuation, time taken for the pump to turn on/off, that is,
the volume in the tank reduces below the set lower limit due
to the time taken for the pump to turn on, moreover, the time
taken to completely stop the flow as the pump turns off
slightly increases the volume in the tank from the set upper
limit. These variations can be reduced by calibrating the
pressure sensor in accordance with temperature variations
either with built in temperature sensor as in BMP085 or an
external temperature measurement sensor, example,
Resistance Temperature Device (RTD) or thermistor. The
error caused due to variation in time caused by an actuators
functions can be minimized in an actual system by taking
several readings and calculating the error. This error can be
compensated for by using it to re-calibrate the sensor to an
optimum volume which gives the output of the required
amount.
The set up in this paper used water in relative to liquid
fuel. Since the pressure sensor is equipped with electronics
and if used with fuel, safety issue becomes a major concern.
FEA uses Industrial Diesel Oil (IDO) which has a minimum
flash point of 60C and is identified as moderate hazardous
towards fire by the National Fire Protection Association
(NFPA). Looking at these factors, concern towards safety is
paramount. Following approach can be taken place to make
this system safer:

The pressure sensor and its electronic


components is properly cased and put together
in a box framed unit. When mounting it on the
air column, the box unit is properly insulated
which should create a barrier (electrical)
between the air column and the unit.

A diaphragm (mostly used with industrial


pressure sensor applications) can be used in the
pressure sensor structure to separate the fuel
vapor from the pressure sensor. Since the
pressure measurement structure (air column) is

solve practical problems at very low cost

energy consumption is low, yet efficient

increases productivity

reduces wastage of resources

Pacific island countries are still under development and are


not exposed to technological benefits which other developed
countries like Japan, USA offer to its people. Mechatronics
can bring about simple design solutions to provide these
benefits to the people of the Pacific. If this project is
implemented and installed at Cawaira sub-station, the
resources will be better utilized in ways such as reduction of
fuel wastage in leakages and overflows. Technical staff
involved to manual monitoring the level of fuel in the tank
can be re-assigned to other tasks to in increase productivity.
Furthermore, this mechatronic design solution is energy
efficient since it does not require large power consumption
for operation.
V. CONCLUSION
This project was able to show that simple available
hardware and technology can be used to construct a robust
fuel level monitoring system. The system designed and
tested in this project presented the robustness of the
algorithm and also the low construction cost of the system.
Involving mechatronics in such design applications can
eventually solve many practical problems with ease,
reliability and at low cost. Mechatronics brings about many
advantages for the people of the Pacific towards
technological advancement.

ACKNOWLEDGMENT
For the successful completion of this project, assistance
from various parties was taken whom we would like to
acknowledge. Firstly, the technical staff of the School of
Engineering and Physics for providing with resources such
as use of lab facilities and equipment, and technical guidance
towards model construction. Next, we would like to
acknowledge the Staff of Fiji Electricity Authority for
allowing us to use their premises for designing the site layout
and providing useful data whenever required. Finally, the
engineering Staff at The University of the South Pacific for
providing with designs solution ideas and guidance
throughout the course of this project.
REFERENCES
[1]

N. W. Bergmann, M. Wallace, and E. Calia., "Low


cost prototyping system for sensor networks.,"
Proceedings of the Sixth International Conference
on Intelligent Sensors, Sensor Networks and

Page | 7

[2]

[3]

[4]

[5]

[6]

[7]

[8]
[9]
[10]
[11]

Information Processing (ISSNIP), pp. 19-24, 10


December 2010.
S. D. Hicks, A. K. Aufdenkampe, and D. S.
Montgomery, "Sensor networks, dataloggers, and
other handy gadgets using open-source electronics
for the Christina River Basin CZO," Fall Meeting,
American Geophysical Union, pp. 5-9, 2011.
Z. Niu, Y. Zhao, B. Tian, and F. Guo, "The novel
measurement method of liquid level and density in
airtight
container,"
Review
of
Scientific
Instruments, vol. 83, p. 125108, 2012.
T. L, Z. Li, D. Xia, K. He, and G. Zhang,
"Asymmetric FabryProt fiber-optic pressure
sensor for liquid-level measurement," Review of
Scientific Instruments, vol. 80, pp. 033104-033107,
2009.
D. Brox, A. R. Mohammadi, and K. Takahata,
"Non-lithographically microfabricated capacitive
pressure sensor for biomedical applications,"
Electronics Letters, vol. 47, pp. 1015-1017, 2011.
M. Manzo, T. Ioppolo, U. K. Ayaz, V. LaPenna,
and M. V. tgen, "A photonic wall pressure
sensor for fluid mechanics applications," Review of
Scientific Instruments, vol. 83, p. 105003, 2012.
Z. Liu, T. Hong, W. Zhang, Z. Li, and H. Chen,
"Novel liquid flow sensor based on differential
pressure method," Review of Scientific Instruments,
vol. 78, p. 015108, 2007.
Arduino, "Arduino Mega Atmel Atmega2560
MCU Board," R. Spares, Ed., ed, 2014.
GitHub, "Arduino Development ", 1.0.5 ed, 2014.
Bosch,
"BMP085
Barometric
Pressure/Temperature/Altitude Sensor- 5V ready,"
Adafruit, Ed., ed, 2014.
J. Gansale. (2008, A Guide to Debouncing. 3-26.
Available:
http://www.eng.utah.edu/~cs5780/debouncing.pdf

Page | 8

Das könnte Ihnen auch gefallen