*3.2.1.1 Fuel Filling*

The NFC RFID detects the ID number of RFID card and sends it to the Arduino Mega 2560 microprocessor when the RFID card or tag comes within range of the RFID reader. The ID codes of the RFID cards are already recorded in the microcontroller. The microcontroller checks whether or not this RFID card is valid. If the RFID card is

**Figure 7.** *Inside the control system box.*

authorized, the microcontroller displays the RFID card user on the LCD screen after a check; otherwise, nothing appears, indicating that the RFID card is unauthorized. If the RFID card is authorized, the microcontroller allows the consumer to enter the amount of gasoline via the keypad, which is then displayed on the screen. The microcontroller then checks to see if the RFID card's available balance exceeds the amount entered. If there are more than that, the microcontroller activates the fuel pump motor through a relay switch for a set amount of time before turning it off. If the user wants to examine the quantity of petrol dispensed and the remaining balance of the RFID card after the procedure is completed, the information on the amount of petrol dispensed and the remaining balance of the RFID card is displayed on the LCD screen. Algorithm of automatic fuel filling pump shown in **Figure 8**. All this information about users is visualized to the IoT ThingsBoard server which installed on raspberry pi as local server, using Wi-Fi module ESP-32S. On a local server, we keep track of the amount of gasoline distributed by users, which is protected by a password that is only known by the fuel company. If the customer's available balance is less than the amount entered, the RFID card can be recharged. In this case, the RFID card functions as a prepaid card that may be recharged at the fuel station.
