Real-Time Fuel Consumption Monitoring System Integrated With Internet Of Things (IOT)

Fuel is an important aspect in the operation of ships that require high costs. The high cost of fuel is not followed by an automatic fuel monitoring process. By not using the fuel consumption monitoring method that works automatically, the shipping management does not know for sure the ship's fuel consumption is in accordance with the shipping mileage, thus triggering fraud committed by the ship's crew against the ship's fuel. Fuel consumption monitoring is carried out primarily to identify opportunities to improve energy efficiency and reduce costs. By following technological developments, Internet of Things (IoT) technology has begun to be applied in various industrial fields because it can transmit data in real-time via the internet network without human-to-human or human-to-computer interaction. In this research, the design of models and experiments related to a monitoring system for fuel consumption was carried out using sensors and microcontrollers integrated with the internet to obtain accurate and real-time data. The test results show that the volume of fuel available in the tank, the volume of fuel discharged, the flow rate of fuel, and the location of the system can be known by the user in real-time via the IoT website. Based on the results of measurements using an ultrasonic level sensor, it is known that the measurement results are quite accurate with a deviation of ± 0.5 cm. Meanwhile, the measurement results by the flow sensor are less accurate because the fuel flow only relies on the force of gravity.


Introduction
Ships are a common mode of transportation used to transport passengers and cargo. In order to operate the engine, the ship needs fuel. Fuel became an important aspect of ship operations. The cost for purchasing fuel is quite high, especially for voyage costs, which become the most expensive component. Fuel consumes 66% of the voyage cost and 47% of the total cost of running ships [ 1 ]. This is also influenced by the relatively volatile global fuel prices.
The high price of bunker fuel is not followed by a proper fuel monitoring process. The absence of a method of monitoring fuel consumption automatically results in shipping management not knowing for sure the ship's fuel consumption is in accordance with the voyage distance, so this has triggered fraud committed by the ship's crew against the ship's fuel, such as selling it illegally for personal gain. One of the common methods of stealing ship fuel is by falsifying documents, in which captains overstate how much fuel their ship is using, then sell the excess. Commonly used methods used in fuel consumption monitoring are Bunker Delivery Notes, tank sounding, fuel flow meters, and direct emissions monitoring.
Fuel consumption monitoring is carried out for several reasons, mainly to identify opportunities to increase energy efficiency and reduce costs. Monitoring data is used for internal reasons, such as benchmarking and target setting purposes and satisfying sustainability-related reporting requirements [2], Along with technological developments in the era of the 4.0 industrial revolution, the term Internet of Things (IoT) emerged. IoT is a concept in which an object has the ability to transfer data over a network without the need for human-tohuman or human-computer interaction [3]. Currently, IoT technology has been applied in various fields, such as industry, transportation, and home use. In the field of transportation, especially on ships, IoT began to be used and developed. IoT technology is helpful for monitoring ship conditions in real-time, one of which is to monitor fuel consumption. Fuel consumption monitoring using internet-based technology has begun to develop. Research on fuel consumption monitoring has been widely carried out. This is related to the regulations issued by the International Maritime Organization (IMO), which focuses on greenhouse gas (GHG) emissions on ships. Capezza et al. [4] conducted research related to ship fuel consumption monitoring and fault detection related to C02 emissions on the Grimaldi Group's Ro-Ro Pax cruise ship using a statistical approach method by utilizing navigation data obtained from the multi¬ sensor system installed on the ship. The method used in this study has been shown to be capable of supporting fault detection and verifying the C02 savings achieved after energy efficiency initiatives. However, the statistical method used is difficult to apply to shipping companies due to unpreparedness in using the automated system used for statistical analysis of emission data to verify coherent C02 emissions with ship characteristics.
Hakimelahi et al. [5] analyze the impact of the fuel consumption patterns on the estimated travel needs. The method used is to evaluate and calibrate travel demand estimation using software and its relationship with fuel consumption. The study's findings show that the use of fuel is closely linked to the trip generation process by exogenous and endogenous variables. Wijaya et al. [6] conduct studies on fuel consumption monitoring and predict gas emissions based on ship performance using Automatic Identification System (AISITS) data. The method used in this research is to perform calculations using the empirical formula, namely the Holtrop Method and the Stawave Method. For calculating basic resistance, the Holtrop method is used. Wind resistance, waves, draft changes, and water properties are all calculated using the Stawave method. These calculations are made using the PHP scripting language. This study could serve as the foundation for creating a software interface that generates real-time monitoring data on fuel, EEOI, and emissions on each ship. With the relationship between fuel consumption and emissions emitted, fuel consumption monitoring is critical because it helps calculate emission estimates by considering engine and fuel types [7], Many research and developments are also carried out in technology, such as the Internet of Things (IoT). IoT technology aims to simplify a process in various fields, ensure system efficiency, and improve the quality of life, becoming one of the main pillars in the era of industrial digitization [8], IoT technology has begun to be developed and used in various fields, such as in industry [9], the concept of smart cities [10], gadgets, buildings or smart homes, power management [11], agriculture [12], waste management [13], healthcare [14], and transportation [15], In the industrial sector, IoT technology is used to increase the efficiency of the production process and the efficiency of communication and networking between operators and machines to increase the productivity of these companies in the market by developing, designing, and integrating various sensors used in industrial applications [16], In smart cities, IoT technologies will allow the use of various devices, improving the quality of life as well as the efficiency of various daily services such as transportation, security, smart metering, smart energy systems, smart water management, and so on [17], Implementing IoT technologies in agriculture will undoubtedly aid in meeting adequate food demand and improving the overall efficiency of agricultural production processes. Various useful data about crops could be obtained and used for yield monitoring and early detection of possible diseases that could drastically reduce crop yields. Soil and nutrient monitoring will help rationalize agricultural production processes and save water, which is valuable in certain geographical areas and could be used by smart irrigation systems [18], In waste management, IoT has been developed and implemented a lot. The developed solutions are primarily focused on smart waste bin monitoring [19], which includes bin filling level detection, waste temperature and fire detection, bin vibration occurrence and bin tilt, presence of waste operators, waste humidity, bin GPS location, and so on. In general, IoT devices can effectively support smart waste management systems. In the healthcare system, IoT has implemented, and the concept of e-health has emerged.
IoT funding for patient health data collection may be used to improve the service quality of healthcare systems. Smart medical devices have a lot of potential for various uses, like tracking various critical human functions, including heart rate, skin temperature, activity monitoring, and so on [20], The most important task of IoT technologies in smart grids in smart power management is to save energy through efficient distribution [21], Many have begun to develop and apply IoT technology in transportation in response to the extremely rapid growth of transportation infrastructure. IoT technology is currently used in the definition of "internet of vehicles". The design of smart vehicles is the most important IoT application field [22]. The use and optimization of various internal functions in cars supported by IoT technology were considered in the smart car concept. Tire pressure, refuelling, early detection of possible failures, routine maintenance measures, and other data are collected using IoT. Not only in cars, but IoT technology is also widely developed and implemented in other modes of transportation, such as trucks [23], buses [24], trains [25], and ships [26], In general, IoT technology in the mode of transportation is used to monitor fuel consumption and the vehicle's location, including ships. The use of IoT on ships is very much needed, especially in monitoring fuel consumption so that the estimated emission value can be known.
In this research, experiments will be carried out related to a fuel consumption monitoring system that is integrated with the internet using level sensors, flow sensors, and microcontrollers. By doing this research, the fuel consumption monitoring system integrated with IoT is obtained to get accurate and real-time results to estimate the cost and correct maintenance planning.

System Design
The design of the fuel consumption monitoring system will consist of two tanks. The flow sensor will be installed at the output of Tank 2. In the tank, several levels of ultrasonic sensors will be installed to measure the availability of fuel. The system block diagram can be seen in Figure 1. The design of the fuel consumption monitoring system consists of two tanks of different sizes. The inner dimensions for Tank 1 are length: 29 cm, width: 19 cm, and height: 30 cm. The inner dimensions for Tank 2 are length: 19 cm, width: 19 cm, and height: 30 cm, as shown in Table 1. The tank model is made of acrylic material with a thickness of 0.5 cm so that the results of the tank design that have been assembled can be seen in Figure 2a

Microcontroller Concept on The System
The microcontroller concept on the system that has been designed is a flow sensor, level sensor, temperature and humidity sensor, and GPS will be connected to the microcontroller in the system to program the sensor and get the data obtained on each sensor. The output data will be displayed on the LCD and will also be sent using the Wi-Fi module to the IoT Cloud, and the data can be accessed by users via the IoT website, as shown in Figure 3.

Electronic and Microcontroller Specification
Flow Sensor Specification Flow sensors are used to measure the flow of the fuel that is discharged from the tank. The specifications of YF-S201 flow sensor are inch size, the working voltage is 5 to 18V in DC (Direct Current), the maximum current is 15mA, the working flow rate is 1 to 30 liter/minute, the accuracy is around 10%, working temperature range is -25 to 80 QC, and the maximum pressure is 2.0 MPa, it can be seen in Table 2. The reason for choosing this type of flow sensor is because flow sensors can be used to measure flow that only relies on the force of gravity so that it does not require high pressure for the fluid to move the measuring component on the flow sensor. Ultrasonic level sensors are used to measure the distance of an object by utilizing ultrasonic waves. In this study, the ultrasonic sensor was used to measure the fluid level in the tank to obtain the volume using the formula in Eq. (1). The specifications of HC-SR04 level sensor are 5V in DC (Direct Current), the working current is 15 mA, working frequency is 40 Hz, working temperature range is -15 QC to 70 QC, measuring range is from 2 cm to 400 cm with measuring an angle is 15 degree, as shown in Table 3. The reason for choosing this type of level sensor is that the ultrasonic level sensor can read with the shortest minimum distance compared to other types of level sensors, which is 2 cm. (1) where V is the volume of the fuel. A surface area of the fuel, h fluid depth in the tank.

Microcontroller Specification
The microcontroller used is the Arduino MEGA which functions as a microcontroller for the fuel consumption monitoring system. The Arduino MEGA will receive input from connected sensors and the GPS module to send the fuel volume, flow, and location data to the server. The specification of Arduino MEGA 2560 are the microcontroller board based on the ATmega2560, the operating voltage is 5V, the recommended input voltage is 7 to 12V, and for the limits input voltage is 6 to 20V, has 54 digital Input/Output pins (of which 15   GPS (Global Positioning System) works to obtain latitude and longitude coordinate data so that the position of the system can be known. The specifications of Ublox NEO-6M GPS is 50 channels GPS LI frequency, C/A code, the input supply voltage is 2.7 to 6V in DC current, the main chip is NEO-6, the position accuracy is 2 m, and the operating temperature of the device is from -24 to 84°C, it can be seen in Table 5. The reason for choosing this type of GPS is because Ublox NEO-6M has Time to First Fix (TIFF) up to 27 seconds, and it can receive as many as 50 satellite signals. The Wi-Fi module used is the ESP8266 which is used to transmit the data that has been obtained to the Webserver. The specifications of ESP8266 Wi-Fi Module are the maximum operating voltage of the module is 3.6V in DC, the flash memory is 512 KB to 1 MB, the power supply is from 2.5V to 3.6V in DC, and the recommended power supply for this module is 3.3V, the type of networking is Wi-Fi, and the operating temperature is -40 to 125°C. The detailed specification of ESP 8266 can be seen in Table 6. The reason for choosing this device is that it can be connected and programmed with a microcontroller easily to connect to an internet connection to transmit data.

Fuel Consumption Monitoring System Model
After the system is designed and the components are selected, these components are assembled into a system model, as shown in Figure 5 and Figure 6, that can be used by programming the microcontroller using Arduino IDE so that the sensors used can function and the system created can work properly.

How The System Work
This system consists of two tanks connected to each other, as shown in Figure 5. In each tank, several level sensor points are used to measure the availability of fuel in the tank. Tank 1 showed 3 points of ultrasonic level sensor, while in Tank 2 there are 2 points of ultrasonic level sensor because Tank 2 is smaller than Tank 1, as shown in Figure 6. The difference in the number of points of the ultrasonic level sensor in the two tanks is related to the way the ultrasonic level sensor works, which by paying attention to the distance between sensors, it is expected to avoid sound wave intervention which results in the measurement by the ultrasonic level sensor being inaccurate. At the output of the second tank, a flow sensor is installed, which is used to measure the outflow. This system is also equipped with a GPS which is useful for knowing the location of the system. All these sensors are connected to a microcontroller in the form of an Arduino Mega so that all sensors can be programmed according to their functions as input data on the Arduino, as shown in Figure 3.
The level sensor used is an ultrasonic level sensor that measures the distance between the sensor and the object by reflecting sound waves and receiving the reflected waves. The distance between the sensor and the object is known. By knowing the distance between the sensor and the fuel, the volume of the air space will be obtained. The average distance from the sensor to the fuel surface will be multiplied by the surface area of the tank to find the total tank capacity. So that the full tank volume can be reduced by the volume of air space so that the volume of fuel can be determined. ( Where A surface area of the tank (see Eq. 2). Sensor accuracy is affected by the speed of sound. So to calibrate this sensor, it is necessary to know the ambient temperature and humidity through the temperature and humidity sensors. In this research, the flow sensor is used to determine the amount of flow released from the tank. If the value issued by the flow sensor matches the volume reading by the sensor level and the actual volume issued, the flow sensor is said to be valid.
Thus, the data sent by the system to the internet network via the Wi-Fi module is data on the volume of fuel in Tank 1 and Tank 2, the amount of flow that discharged from the system, and the location of the system, which is monitored via GPS, which users can then see via IoT website.
is the volume of the fuel.
Volume of the tank capacity. Average distance from the sensor to fuel surface.

Sensor Calibration
After the assembly process, the sensors used need to be calibrated because the sensor measurement results still have a difference when compared with the measurement results using standardized tools. The calibration process is carried out so that the readings from these sensors are more precise.

Level Sensor Calibration
At the sensor level, distance measurements are carried out using sound waves (ultrasonic). The ultrasonic sensor works based on the principle of sound wave reflection to detect the presence of an object in front of it. The signal is emitted as a sound wave by an ultrasonic transmitter with a frequency and time duration to measure the distance of objects. Generally, the frequency used is 40 kHz with a speed of 340 m/s. When hitting an object, the signal will be reflected by the object. After the reflected wave reaches the receiver, the signal will be processed to calculate the object's distance. The following is an experimental process of taking data from ultrasonic sensor measurements at a certain distance. The level sensor measurement results are shown in Table 7. Based on the data obtained, the actual fuel height is 20 cm, but the measurement results with the level sensor before calibrated have different results such as a result from Sensor 1 is 20.76 cm, Sensor 2 is 6.58 cm, and Sensor 3 is 1.12 cm. Based on the data collection experiment results, there is still a difference between the sensor measurement results and the measurement results using standardized tools, a ruler. Calibration is needed to get more accurate results.
The calibration of the ultrasonic sensor is done by adding the temperature and humidity factors to determine the speed of sound in the working area of the sensor [27], The sensor is strongly influenced by the type of medium and temperature according to the principle of the speed of sound. The ambient temperature and humidity factor must be considered for precise distance measurements. The formula for the speed of sound in air with temperature and humidity factors is shown inEq. 3. Where C is the speed of sound. 331.4 speed of sound at 0QC and humidity 0%. T temperature. H relative humidity.
In this research, the medium is air with temperature and humidity, which the DHT22 sensor will detect to obtain a value of the speed of sound suitable for ambient. The specification of temperature and humidity sensor is the operating voltage is 3.5 to 5.5V in DC, the operating current while measuring is 0.3 mA and 60 uA while standby, the output of the sensor is in the form of serial data, the temperature range is -40 to 80" Celcius, and the accuracy is 0.5" C and 1%, as shown in Table 8. Choosing this type of sensor is because the level of accuracy in measuring temperature and humidity is enough to be used in this project. 95  So that the measurement results by the ultrasonic sensor after calibration is shown in Table 9, according to the data obtained, the actual fuel height is 20 cm, the measurement results with the height sensor after being calibrated have results that are close to the actual fuel height such as from Sensorl is 21.33 cm, Sensor2 is 20.07 cm, and Sensor3 is 21.26 cm. Flow Sensor Calibration The flow sensor calibration process is done by measuring the volume of flow out per unit time. This process is carried out using a measuring cup and a stopwatch. So, it can be seen the time it takes to discharge one liter of fuel. If there is a difference in measurement between the flow sensor, level sensor, and actual volume, adding a calibration factor to the flow sensor setting program is necessary. Based on the experimental results in Table 10, it is shown that the actual fuel volume discharged from the tank for 60 seconds (1 minute) is 550 mL, but the measurement result by the flow sensor is 448 mL. When the actual volume of fuel discharged from the tank is 750 mL, the time required is 83 seconds, while the measurement result by the flow sensor is still 448 mL.

System Data Retrieval and Analysis
Data retrieval is done by operating a monitoring system model. Data is obtained in the system running, fuel volume in both tanks, the volume of discharged fuel, and flow rate. Based on the data retrieved, as shown in Table 10, it is known that there is a delay in the measurement time on each sensor, as well as in the subsequent data collection. The time delay that occurs between the initial data and subsequent data is around 1-2 seconds. That is useful for stabilizing the performance of the temperature and humidity sensors which function to calibrate the ultrasonic level sensor. The sensor level measurement results indicate the tank's suitability in the tank with manual measurement. From Table 11, it can be seen that from the volume measurement results, there is a fluctuation in the measurement results. That occurs due to movement in the tank and causes the fuel in the tank to become dynamic. Besides that, the sensor level measurement is still quite accurate even though it has a deviation. From the test results, can be seen in Table 9, the deviation occurs regularly at ±0.5 cm. So that the deviation value cannot be a percentage because the farther the distance between the sensor and the fuel surface, with the deviation mentioned before, the error will not be significant, and the distance measurement by the sensor is more accurate.  Table 11, the flow sensor has a weakness, which it cannot measure very small flows (less than 1 liter/minute) which relies on ordinary gravitational force because with a minimum flow rate is 1 liter/minute, the height of the fuel in the tank affects the ability of the flow sensor to work which causes the flow sensor cannot carry out its duties at a certain height (lowest). The test results show that when the actual total volume of fuel discharged is 750 mL, the result of flow sensor measurement is 448 mL. So that by only relying on the gravity force, the flow sensor is very inaccurate. Then booster equipment is needed for the fuel, which is a pump.

Internet of Things Integration
The integration of the system with the internet is to make the measurement results by the system can be accessed in real-time via the IoT website. The integration process between the system and the internet is by using the Wi-Fi module so that the data received by Arduino will be sent to the Webserver so that the data can be accessed online by the user.
The IoT website that is used to monitor the online system is ThingSpeak. ThingSpeak is an IoT analytics platform service that allows users to aggregate, visualize, and live data streams in the cloud. Users can send data to ThingSpeak from the devices, create instant visualization of live data, and even send alerts. The data sent from Arduino to the website is the volume of fuel in Tank 1, volume of fuel in Tank 2, volume of fuel discharged, and fuel flow rate. The interface of the online monitoring, ThingSpeak website, shows measurement results, such as fuel volume on Tank 1 (Supply Tank Volume), fuel volume on Tank 2 (Operation Tank Volume), fuel volume discharged (Total Drain), and fuel flow rate in graphic form, can be seen in Figure 7. The data displayed on the graph is as much as 38 data from 40 data as in the experimental data, shown in Table 11. In the chart in Figure 7, both for Supply Tank Volume and Operation Tank Volume, there is a volume and time amount because the data obtained is volume data in liters, and the data collection time can be seen when accessing the channel on the website by pointing to the dot on the chart. That also applies to the chart of the Flow Rate and the total volume of fuel drained. In the chart of Supply Tank Volume and Operation Tank Volume, it can be seen that there are fluctuations in the measurement data, as explained in the System Data Retrieval and Analysis section. In the Flow Rate chart display, the chart looks flat because the changes are not significant. In the Total Drain chart display, it can be seen that there is an increase in volume, as indicated by an increase in the chart.  This research can contribute to the academic world by providing insight into how the system works and calibrating the sensors used. This research requires system improvements, such as automatic controls and an increase in measurement accuracy by sensors. The system can be developed on an industrial scale, especially in the maritime industry. 99

Conclusion
Based on the results, it is known that the Arduino microcontroller can be used as an automatic fuel monitoring tool. The ultrasonic level sensor connected to Arduino can automatically measure the volume of fuel in the tank. Flow sensor connected to the Arduino is used to measure the volume of discharged fuel and fuel flow rate. The measurement results from these sensors will be displayed via the LCD installed on the system and sent to the IoT Cloud on the website using the Wi-Fi module. Based on the results of data collection, it is known that the measurement results of the level sensor are quite accurate with deviation ±0.5 cm, while the measurement results of flow sensors still have a large difference because the flow of fuel less than 1 liter/minute is not measured by the flow sensor. Based on the experimental results, the actual fuel volume discharged is 750 mL, while the fuel volume measured by the flow sensor is only 448 mL.