Embedded System Improvement for Monitoring and Measuring Fuel Consumption System Automatically over Public IP

As usual, researches and knowledge are constantly evolving; these built prompts to more studies and researches in order to achieve the closest state of optimization. According to our previous (Reference 5). This proposal improves the algorithms by calibrate the flowmeter sensors (YF-S201) separately in order to reduce the manufacture error rate. In addition, a laser sensor (TF mini Lidar) were used instead of an ultrasonic sensor to measure the fuel volume of the main tank. In addition, four voltage sensors (AC type) and three clamp meters (model SCT- 013) were added to the system to indicate the electric in real-time. All these sensors are connected and controlled by two MEGA Arduino Microcontrollers and the information has been stored into the database that could be downloaded and displayed locally or remotely via internet as a Graphical User Interface (GUI) using Public IP. This proposal found that the error rate of calculating the fuel consumed in the generator is (3.8%), this is more accurate by (90%) than previous one. The fuel in the main tank noticed that the accuracy is increased by (3.1%), as well; it produced more security for fuel from leakage or pilfering. The abnormal behaver of generator can be reached immediately by monitoring the voltage and ampere on real-time mode.


Introduction
Currently, industrials and small factories are providing services heightenly to extend their products. Automatically, the remote monitoring systems (RMSs) are one of the major implemented mechanics by machine constructor to control and manage the relationship of agents, furthermore, to enhance their business representations in the digitally. However, the classical way of remote observation for the business cannot achieved distributed environments. So that, new techniques are necessary to build the remote connection in the industry [1]. While embedded system has produced the ability of electronics control devices to communicate by each other's with credible controllers, evolution in networking technology take it far to a point where Realtime (RT) information streamed obtained from embedded paraphernalia which connected in servers that maybe thousands of kilometres faraway [2,3]. There is no unique system can view many information at a central location such as monitor and report fuel level or consumption, engine state, hours of running, etc [3,4]. The proposal has discovered that a single system needed, not only for reporting, but an estimation or close approximation on fuel consumption in operation ON / OFF mode too, but also keep an hourly and daily tracking with all the conditions including: the engine operation hours, voltage state, load power, fuel consumed and fuel volume available etc... . The objective of the proposal has highlighted on the requirements for imbedded system enhancement based real-time according to the previous system proposal [5].
As related works: -Rajesh Bose, et al. provided useful techniques using IoT for monitor in real-time the consumption of fusel fuel for a constriction heavy trunk. Using GPRS technology could provide and transit data from anywhere remotely in the world by cloud computing infrastructure [2]. -Qi Zhao, et al. Usually the travel time can be estimated but the amount of fuel discharged cannot be estimated at the same time. In their research, they developed a technique to calculate the estimated fuel discharge based on the Vehicle Specific Power Distribution (VSPD) and the error rate was less than 20% [6].
-Sri Sangeetha R, et al. Used embedded system with IoT and via cloud to monitor the fuel in tanks, especially in mobile tanks which going for long distances, this is added transparency to workers in order to save fuel from losing (potential theft) by displaying the real discharging meter on a web page remotely [7]. -Komal D/o Shoukat Ali Khuwaja, et al. The researchers presented design and implementation a fuel monitoring system from the starting load point until its destination using an Arduino microcontroller, GPS and GPRS. Information is stored in a database firstly then sent the data to the owner's mobile or his computer, this provide automatic analysis and monitoring of the fuel level remotely in real-time [8].
-Mohannad Jabbar Mnati, et al. They build a system for monitoring electrical system (3-phase) using an Arduino micro-controller for reading the current and voltage from sensor(s) then via Bluetooth send wirelessly the collected data to a single remote monitor. The system approve it is safer and more reliable [9]. -M Husni, et al. Used embedded system devices to monitor oil in the mobile truck with different angles in the road. The system consists of some ultrasonic and microcontroller also GPRS / GPS / GSM shield module. The result consists of two conclusions depending on the road conditions tilt or flat is influencing the accuracy of the sensor(s) rate. But In the flat road, the accuracy rate was 99.330%, where in tilted road, the accuracy rate decreased until 84.0% [10]. -Nur Fitri Apsari, et al. analog measuring is very difficult to measure the height of a liquid and its accuracy is low. By using digital technology, the measure be more accurate. The study used was a direct comparison between the handy ruler as a standard measure and digital measuring. This device has used a gas gauge on the wagon and an Arduino-Uno to implement the process data then display it via LCD. The error rate of the instrument was ± 3% [11].
-Prisma Megantoro, et al. Researches on this system designed fuel-measuring device using Arduino Mega-2560 microcontroller, flow meter sensor and 4x20 LCD. The research began with searching for reference books, making hardware and programming, and finally testing the device. The test was performed by comparing the results that carried out every volume of 2000ml, 1500ml, 1000ml and 500ml. The results showed that the error value is 2.24% with the comparison of 1.91%. The great of error value caused by human factor [12]. The remain of this paper, the proposal system is the 2ed part, 3ed part illustrate the results, conclusion is the 4th part and the future works is the last part.

Proposal System Design
There are two main parts in this proposal, hardware part and software part. Two Arduino (MEGA 2560), two flowmeters (YF-S201), one TFmini Lidar, two transmitters (RS-485), three current transformers (SCT-013), four AC voltage sensor, 1000m of UTP cable; all of these are applied into the one electrical generator (Aqsa AC Armature + Perkins Engine / 500-550KVA). The TFmini Lidar is plugged-in under the top cover of the oval horizontal tank to calculate the volume of exist fuel. As well as the system has the ability to measure the amount of fuel in various sizes and shapes of tanks (Cube, Rectangular, Vertical Cylindrical, Horizontal Cylindrical and Elliptical). First Arduino (as a slave) is connect all the illustrated equipment. One of the ACv sensor is pinup on the power cable of the main grid. The clamp meter (CTs) connected with the three phases of armature as well as the Acv sensors pinup too. Then, a transmitter (RS-485) which transmit the signals to the second transmitter (RS-485) that connected to the second Arduino (as a master) this connection establish via UTP cable. The master plugin to the laptop that preparing by suitable software and connected to the internet via public IP.

Software requirements
Properly, systems management need software, the proposal design has some programs that could use and interconnect with each other, according to what is illustrate in the next words that the main calculations are programmed and performed in Arduino by the IDE Processing interface (V1.8.10), the results could show (locally or remotely via Public IP) by graphic user interfaces (GUI) that have been programmed in VB (2019) after the information received and stored in a DB using the SQL Server (2016). The main stages for the whole procedures could represent in layers as in figure (1)

The Mathematical and Operations Procedures
The basic mathematical calculations for fuel consuming in this project are depend mainly on subtracting two values from each other (first values -second values) according to calibration factor for each flow sensor because these sensors have an error rate equal to 3% − + even the accuracy is also influence by viscosity, density and the friction of the liquid in contact with the pipe [13]. As known, the fuel system in engines is in a closed environment: the fuel is draw from the tank to enter the engine so that the engine starts; then, the excess fuel is return to the generator tank again. The 4 algorithm of our system depends on the calculation of the difference between the two sensors values. In our previous research, the error correction factor was fixed statically on both sensors, and we suggested in future works that the error correction factor should be variable according to the amount of values exchange. This research relied on correcting the error value by new technique that corrects the error value rate (the industrial error) for each sensor separately. Additionally, some sensors are added to get the system more profession and more precise by connect CTs and VMs with the specific parts of generator on the one side and with the Arduino on the other hand. The programmatic mathematical model starts to work when the values is not equal to zero (in the GUI a green signal highlight which means the engine is ON) directly a DB creates temporary tables that stores the values which coming from all sensors (by Arduino). It works on taking the average for each 100 values, then, storing them in the permanent DB, so that the temporary tables will be reset to be ready to receive the next 100 readings and so on until the values is equal to zero (in the GUI a green signal highlighted which means the engine is OFF), this means there is no fuel consumption and the sensor of main grid could highlight (ON). Then the permanent table store the total information so that they can be display to the end users (authorized users) via GUI that were formed by VB. For measure the level of the main fuel tank, the program calculate the average for each 1000 values for high accuracy by the laser sensor were placed under the top cover of the main tank. The generator has 3 phases, so the clamp meters could have related with the cable that transit the electric, for each single phase there are one clamp meter, which could estimate the Ampere that loaded on real time. Because of the Armature has 3 phases, the volt meters chips connected with each single phase for detect the voltage, but the 4 th one connected with the main grid point to detect the electricity when it is gone off.  The main challenges to improve this proposal is depending on "H" which is a calibration factor that changed as needed for each water flow sensor separately in the main code to make the error manufactured balanced between the two sensors ≅ 0%.
A flowchart could drown to make the explanation clearer and minutely as in figure (2) and the algorithm beside as steps for the whole system design.

System Communication Technology
The system should still in standby mode to detect the electricity situation and the state of fuel volume that exist in the main tank. The flow diagram in figure (3) below; illustrate the design that satisfy the completely proposed system as described by operation procedure in the previous section.

Results
Fuel volume estimation using "TFmL Sensor" could represent in table (1) and diagram as in figure (4), which are illustrates the ten different consumptions tests by oval horizontal shape. The scale for the test used the manufactural pointed by factory, the unit is in liters.      (4) which was more precise than previous proposal as in figure (6). The test is about 5 hours.
Note that the real scale calculation depending on a special pointed container. The error percentage = 3.8%. from this ratio it could found the improvement comparing with previous proposal as in table (5) and figure (7) which meant the enhancement ≅ 90%.    From the up bar, can logout or login, edit setting according to polices that required, can create user, give the authorities to user, change the password, choose the tank shape that system used, obtain the tables that need to view or download, etc... . All these facilities can be achieved remotely or locally likewise. The date is display and the gages appear too with all the information (volume fuel, fuel in / out in realtime, generator state, running time, fuel used, ampere and voltages for each phases). always figure (9) represent the DB that can displayed remotely and saves all the information that illustrated while. From the convert section in figure (10) it could obtain different relations of the data that collected to display it as a diagram or export into the excel sheet.

Conclusion
According to the results above, this proposal is more precise than previous one; it enhanced the system information to be more accurate. The error rate has been greatly reduced, for both amount of fuel consumed in the generator and the fuel that available in the main strategy tank. The voltage could be available for monitoring by the system if there is any problem in the generator and the load can be evaluated and monitored as well if overloaded or any abnormality. With this proposal an hourly, daily, weekly, monthly or even annually report can be obtained locally or remotely via public IP as a data set for any future demand. As well, it produced more security for fuel from leakage or pilfering. The abnormal behaver of generator can be reached immediately by monitoring the voltage and current on real-time.

Future Works and Suggestions
As a future work: -Sensor(s) could added to measure the temperature.
-Add sensors to measure the emissions of toxic and harmful gases.
-Save information into the Cloud database. Instead of local computer.
-Controlled to turns off the generator automatically if any malfunction in the generator achieved, for example (run out of fuel, excessive heat, etc.).