ARDUINO-BASED VEHICLE FUEL THEFT DETECTOR SYSTEM

Fuel shortage is a common problem in Indonesia. This prompted many cases of vehicle fuel theft. As a solution to this problem, an Arduino-based vehicle fuel theft detector system is implemented. Arduino-based vehicle fuel theft detector system is a prototype that uses Arduino UNO as a microcontroller, IComSat v1.1 SIM900 GSM/GPRS Shield to communicate with mobile phone, fuel level sensor as a volume detector, and push button as a detector to check whether the fuel tank@s lid is open or closed. The working principle of this system is to detect the state of the fuel tank lid. When the lid is open, the system will make a phone call. Then, the system will keep track of fuel volume. If there is a drastic decrease in volume, the system will send information about the decreasing volume in the form of a short message to the owner of the vehicle. The success rate of the communication system between Arduino UNO and other electronic devices is 100%. Accuracy of fuel level sensor is 90%. Success rate of push button switch in detecting the state of fuel tank@s lid is 100%. Success rate of GSM Shield communication is 90%.


INTRODUCTION
Fuel shortage is a widespread problem in Indonesia. Data from Directorate General of Oil and Gas shows that Indonesia's fuel reserves are decreasing, which causes fuel shortage in many areas [1]. Meanwhile, fuel is essential for motor vehicles to operate. Fuel shortage leads to many cases of fuel theft in Indonesia. In some areas, vehicle fuel theft is such a common incident, fuel thieves consider it as a reliable source of income [2]. Fuel thieves commonly operates by opening the target vehicle's fuel tank and using a long hose to suction the target vehicle's fuel to a container, then selling the stolen fuel to a retail stall. Vehicle fuel theft is especially unsettling to company owners [3,4]. In order to propose a solution to prevent vehicle fuel theft, this paper will discuss the design of an Arduino-based fuel theft detector system. Some solutions to prevent fuel theft have already been proposed and implemented in the past [5]. Anti-siphons device is a device that is shaped like a filter, used to prevent fuel theft by preventing fuel hose from being inserted further than fuel hose in fuel stations. However, the device can be forcefully pushed to fall into the vehicle's fuel tank. Diesel Dye is a special dye that can change fuel color so the fuel cannot be resold, however the fuel color can be reverted back to its original color by drying it under the sun in a transparent container for 2-3 days. Tanklocks and Alarm Padlocks can be used to lock the fuel tank so it cannot be easily opened, however this means that every time the vehicle needs refueling, there must be someone present who can open the locks. CCTV can be used to monitor vehicle and driver's movements but requires intensive monitoring and can be costly to implement.
A system to detect fuel theft based on GPRS, GPS and microcontroller has been developed by Sidabutar et al [1]. The system uses password to open and close the fuel valve and can detect potential theft attempt by using ultrasonic sensor at the fuel valve. If valve is opened without password or incorrect password is input three times, system sends a warning to the owner using Short Message Service (SMS) along with the coordinates of the vehicle [6].
An Arduino-based system to measure motorcycle fuel consumption has been developed by Rilwano using Low Current Sensor Breakout (LCSB) to measure voltage in float sensor in the fuel tank, and GPS is used to measure speed, path, and time required to travel the given path. The system is able to measure fuel consumption during morning, afternoon and evening in liters [7].
Mirzazoni and Zaini developed a system to measure fuel consumption in motor vehicles, using LCSB to measure said vehicle's rolling resistance and aerodynamic drag. The system is able to calculate average fuel consumption in km/liter and kinetic energy decrease in kilojoule during morning, afternoon, and evening [8].
The purpose of this research is to design a system that can detect vehicle fuel theft by obtaining information about unusual decrease in fuel level, including the time and place of said incident, and send the information to the vehicle's owner or person in charge (PIC) of the vehicle using SMS.

METHODS
The method used in this research is literature study about hardware design of the system, vehicle fuel theft detection method, electronic components used in the research, and theory and characteristics of the microcontroller used in the system. After that, experimental study is conducted to assess the accuracy of sensors used in the system, test the communication between sensors and microcontrollers, and finally test the workings of the whole system.

System Block Diagram Design
The block diagram of the proposed fuel theft detection system can be seen in Figure 1. Arduino UNO is used as the main controller of the system. It can sense the environment by receiving inputs from various sensors, processes the input received and generates specific output to control various output devices. Arduino UNO is a low-cost microcontroller board based on ATMega328 microcontroller. It has 14 digital input/output pins, 6 analog input pins, 16Mhz crystal oscillator, Universal Serial Bus (USB) connection, power jack, In Circuit Serial Programming (ICSP) header, reset pin, 32Kb flash memory, 2Kb SRAM, and 1 KB EEPROM non-volatile memory. Arduino UNO is programmed using Arduino IDE (Integrated Development Environment) and the programming language used is Arduino programming language, which is based on wiring [9,10].
To detect vehicle fuel level, a fuel level sensor is used. The sensor used is ALAS I Adjustable Fuel Sender, 6-15 3/4", 3-180 Ohm, with Low Fuel Warning Contact. The lever arm of the sensor is shaped like a buoy and is used to detect fuel level in the vehicle's fuel tank. Sensor's resistance value varies from 240 Ω (Empty) to 33.5 Ω (Full). The measured resistance value can be used to approximate the fuel tank's capacity. This sensor gives an analog output that can be converted to digital and requires one I/O pin in Arduino [11].
A push button switch is used to detect whether the fuel tank is opened or closed. Push button switch is used to connect or disconnect electrical current flow. Current flow is connected when the switch is pressed (ON) and disconnected when the switch is not pressed or released (OFF) [12,13].
IComSat v1.1 SIM900 GSM/GPRS Shield module is used to communicate the fuel tank's condition to the vehicle's owner. This module can be used to send and receive phone calls and send and receive SMS messages [14].
The system receives two inputs, from the pushbutton switch and the fuel level sensor. Input from the switch is used to detect whether the fuel tank is opened or closed. Analog input from fuel level sensor is converted to digital data using Analog to Digital Converter (ADC) in Arduino UNO, and then stored in the EEPROM memory of the microcontroller. The output of the system is a notification in form of a phone call when the fuel tank is opened, and SMS message about fuel theft incident to the vehicle's owner or PIC.

System Flow Chart Design
The flow chart of the system can be seen in Figure 2. The system waits for input from push button switch in "check pushbutton state" phase and checks whether the fuel tank is opened or closed in the "Is fuel tank lid open?" phase. If pushbutton switch input is in "OFF" state (switch not pressed), the fuel tank is open, and system is activated. Microcontroller sends instruction to GSM Shield to make a phone call in "Dial owner as warning" phase.
After that, the system will take measurements from fuel level sensor in "Check vehicle fuel level" phase. There are two variables used to check fuel level, namely flow1 that measures fuel level every 1 second, and flow2 that measures fuel level every 2 seconds. These two variables are used to measure fuel level in order to improve accuracy of the data. The system will take measurement in 30 seconds or 15 measurements. The next phase, "Is fuel decreasing drastically?", is to determine whether a fuel theft occurs or not. Fuel flow rate is used to find the average in flow1 and flow2. The condition used as indicator whether fuel theft has occurred is when the average of 15 measurements is less than -0.01. When a significant decrease in fuel level occurs, data is stored in microcontroller in the "Save data to EEPROM Memory" phase, and microcontroller sends instructions to GSM Shield to send an SMS message in the "Send SMS Notification" phase. GSM shield sends information of fuel volume decrease via SMS to the vehicle's owner. After SMS is sent, the system becomes inactive, system waits until the fuel tank is open again.
To convert from sensor value read by the fuel level sensor to liters, equation of a straight line is used (1). (1) Where: x = Fuel tank volume (liter) x1 = Lower limit, fuel tank empty (liter) x2 = Upper limit, fuel tank full (liter) y = Fuel level sensor reading (sensor value) y1 = Lower limit, sensor reads fuel tank empty y2 = Upper limit, sensor reads fuel tank full After testing, it was found that the upper limit of sensor value (y2) is 965 and lower limit of sensor value (y1) is 54. Capacity of the prototype of the fuel tank is 4.59 liter, thus the upper limit (x2) is 4.59 liter and the lower limit (x1) is 0 liter. Plugging those values into (1), the formula to convert sensor value reading into liters can be seen in (2).

RESULT AND DISCUSSION
The prototype of the system can be seen in Figure 3. The dimension of the prototype fuel tank is 27x 17 x 10 cm. The prototype is made using acrylic material. Acrylic is used because it is light, firm and does not change shape easily. The output of Arduino Serial Monitor can be seen in Figure 4. When the fuel tank is empty, system reads sensor value of 54 and 0.00 liter. When push button switch is not pressed (OFF), the fuel tank is open, system is active and takes fuel tank volume measurement for 15 measurements, starting from 0. If pushbutton switch is pressed (ON), system is deactivated and will only be active when fuel tank is open (switch is OFF). When fuel tank is open, system will restart fuel measurement from 0. The faucet in Figure 3 can be opened slightly to simulate fuel decrease, and fully opened to simulate fuel theft. Figure 5 shows the output of Arduino Serial Monitor, where system successfully detects average fuel volume decrease that is higher than the specified rate, which indicates fuel theft. After detecting fuel theft, system sends a phone call and an SMS message to the phone number registered in the system, as can be seen in Figure 6. Several tests were conducted to check whether the system performs according to expectation and manages to successfully detect fuel theft attempt by measuring fuel level in the fuel tank and send notification to the vehicle owner or PIC. The tests conducted are fuel level sensor testing, system testing when there is a 1cm decrease in fuel volume, system testing when fuel theft occurs, push button switch testing, and system communication using phone call and SMS message. The purpose of the fuel level sensor testing is to determine whether the fuel level sensor can accurately measure fuel level in the fuel tank when the fuel level is decreasing. Two tests were conducted, and 11 measurements were taken from each test. The result of the fuel level sensor testing can be seen in table 1.  Table 1, test 2 shows higher fuel level values than the previous measurement, which should not happen when fuel level is decreasing. This is expected to be caused by noise or signal interference. The accuracy rate of fuel level sensor in measuring fuel volume is at 70%.
To improve measurement accuracy, a Low Pass Filter (LPF) is used to reduce noise and interference by filtering high frequencies and passing low frequencies. The LPF circuit can be seen in Figure 7.

Gambar 7. Low Pass Filter Circuit
The LPF circuit is added to the fuel level sensor, and the sensor is tested again with the same testing scenario from Table 1. The result of the fuel level sensor measurement with LPF can be seen in Table 2.
It can be seen in Table 2 that using LPF improves the accuracy of the measurement as there are only 2 measurements that reports higher values. The accuracy rate of fuel level sensor measurements with LPF is 90%. The next testing is to determine whether the system accurately measures a 1cm decrease in fuel volume or not. 1cm in the fuel tank prototype signifies 10 liters in the actual fuel tank. The capacity of the prototype is 4.59 liters and the capacity of the actual fuel tank is 100 liters. The prototype has height of 10cm, thus 1 cm in the prototype is 0.459 liters, which signifies 10 liters in the actual fuel tank. Two tests are conducted, and 15 measurements using variables flow1 (every 1 second) and flow2 (every 2 seconds) are taken from each test. The result of this testing can be seen in Table 3.  Table 3 shows that although there are some measurements that shows significant differences between flow1 and flow2, the final result obtained from both variables and both tests shows the same value, which is 2.63 liters. The difference between the starting value and the final measured value is 3.09 -2.63 = 0.46 liters, which corresponds to the theoretical value obtained from fuel volume decrease of 1cm, thus it can be concluded that the system is able to accurately measure fuel decrease.
The next testing is to determine whether the system can successfully detect fuel theft when the vehicle is stationary, and the fuel tank is open. 15 measurements of the fuel level are taken in this test, using variables flow1 and flow2 and checking the fuel condition (stable or decrease) between each measurement. The result can be seen in Table 4 below. The system successfully detects fuel decrease level that is above the specified average rate. Upon detection, the system displays a message in the Arduino Serial Monitor like in Figure 5 and sends SMS message to the vehicle owner like in Figure 6. The next testing is to determine whether the push button switch can accurately detect whether the fuel tank is open or closed. When the fuel tank is open, push button enters OFF state, and system makes 15 measurements of the fuel level. If the fuel tank is closed, push button enters ON state and system resets fuel measurement to 0. The result of this testing can be seen in Table 5. It can be seen from Table 5 that the system  successfully makes measurements when the fuel  tank is open (condition OFF) and resets measurement when fuel tank is closed (condition RESET), which means the accuracy of push button switch is 100%.
The next testing is to check whether the system successfully makes a phone call when fuel tank is open. The result of this testing can be seen in Table 6. Ten tests were conducted, and in nine of them the phone call was successful. One phone call failed because the smartphone did not receive a signal. Thus, it can be concluded that the success rate of making a phone call is 90%. The next and final testing is to determine whether the system successfully sends SMS message when fuel theft occurs. The result of this testing can be seen in Table 7. Ten tests were conducted, and in nine of them the SMS message was successfully sent. In one of the tests, the sending failed because the smartphone did not get a signal. Thus, it can be concluded that the success rate of sending SMS message is 90%.