Smart IoT CPO Storage Tank

Indonesia’s crude palm oil (CPO) production from year to year continues to increase, at the end of 2020 it reached 17.35 million tons, up 3.6% from the previous year. Increasing production will result in more CPO stock and require good storage. The storage process that occurs is to maintain the temperature of the CPO so that the quality is not damaged. This temperature regulation is still done manually and raises the risk of work accidents. The purpose of this research is to create a temperature control system and automatic volume measurement that can be monitored from a smartphone. The manufacture of a control system used ESP8266 NodeMCu microcontroller, temperature sensor, proximity sensor, and 1000-Watt heater. Programming used the Arduino IDE and C++. The result of this study was an IoT CPO Storage Tank design equipped with sensors and microcontrollers. The temperature was measured with the DS18B20 sensor had a data accuracy of 99.19% while the volume measured with the HC-SR04 sensor had an accuracy of 99.78%. Data obtained from the sensor could be seen through the Thingspeak application from a computer or smartphone.


Introduction
Palm oil mills (POM) in Indonesia process an average of 1,200 to 1,800 tons of fresh fruit bunches (FFB) per day, with a factory production capacity of 45-90 tons of FFB per hour, and the average duration of processing per day is 20 hours [1]. Indonesian palm oil production continues to increase from year to year. At the end of 2020, crude palm oil production reached 17.35 tons, an increase from the previous year of 3.6% [2].
The most important process in a storage tank is controlling the temperature of the oil using a heating system. The temperature of crude palm oil (CPO) in the storage tank was maintained at a temperature of 40-60°C using a steam coil [3]. This was done to deactivate the lipase enzyme that could catalyze the oil hydrolysis process, thereby increasing free fatty acids (FFA) and having an impact on decreasing oil quality. Heating should be carried out at the optimum temperature and evenly distributed throughout the CPO storage tank. Temperatures that are too high in the storage tank can accelerate the decrease in the content of -carotene which will reduce the quality of CPO [4], while low temperatures can cause oil to clump and require a lot of time and heat to convert it into its original (liquid) form.
The increase in FFA of CPO by 1% will be reducing the density of CPO by 0.22 kg/m3 which is a decrease from 0.91 gr/cm 3 to 0.69 gr/cm 3 [5]. The decrease in CPO density will affect increasing the tonnage at the time of sale because the CPO which was originally liquid turns into a solid form [6,7]. If the CPO price is USD 623 per ton or equivalent to IDR 8.722.000 [2] and the average storage tank in the POM has a capacity of 500 tons, the producer will lose 0.22 kg/m 3 × 500 m 3 = 123.59 kg per 1% increase in FFA in storage tanks. Meanwhile, in sales calculations, the company will lose 0.123 tons × USD 623 = USD 77 or equivalent to IDR 1.078.004 per 1% increase in FFA in one storage tank. These losses will increase again when the POM has more than 1 storage tank or a capacity of more than 500 tons.
Measurements of volume, temperature, and quality of CPO are carried out in storage tanks at an altitude of 6-12 meters, 2 times a day (in the morning and evening) [8]. Measurement of the volume, temperature, and the quality of CPO were considered very dangerous to the safety of employees if it was carried out at night and in conjunction with heavy rain conditions. Constraints included the absence of a way to determine the amount of CPO stock available, the amount of CPO transferred or received in the storage tank and the limitation of the amount of CPO that can be accommodated (levelling) in realtime.
The results of measurements of volume, temperature, and quality of CPO were very useful for monitoring daily CPO production gains in POM. In addition to being time-consuming, manual measurements require experienced workers for inspection, potentially resulting in contamination of CPO with air and water which could reduce the quality of CPO. In addition, the possibility of work accidents in terms of several aspects that exist in the storage tank environment such as leaks, fires, failure of emergency measures and controls, and inadequate facilities are very dangerous for workers [9].
Based on this background, this study aimed to develop an automatic temperature control system for oil palm storage tanks on an experimental scale. The study also built an automatic volume measurement tool for palm oil storage tanks on an experimental scale and an information system on CPO storage tanks that could be monitored via smartphones.

Related works
The increasing use of wireless sensor technologies has enhanced the sensing capabilities of devices. Therefore, the Internet of Things (IoT) concept has been extended to include ambient intelligence as well as autonomous control [10,11]. The IoT enables all things to exchange data and, when necessary, a process that data in accordance to predefined guidelines, decreasing costs and time spent on processing [12,13].
The algorithms required to handle distributed data in real-time are too complex to run locally on lowpower Wireless Sensor Network (WSN) nodes. However, in the context of IoT, all objects will be interconnected, and therefore the computational overhead can be easily transferred to the cloud or distributed among more than one connected device [14].
Specially designed to support agriculture and floriculture supply chains [15,16], IoT management tools provide all the appropriate tools to build and maintain such infrastructure [17] and services. Agricultural data are automated processed [18], corrected, and linked in the modern agricultural scenario under the AI algorithms [19][20][21], machines learning technologies [22,23], and models-driven decisionmaking systems [24], enabling the extraction of knowledge about phenomena that cannot be directly measured [25].
The information technology infrastructure for genotyping studies in agriculture [26][27][28] must provide fast processors, a flexible and scalable data storage and backup system, a large memory to process data, and methods to retrieve relevant variables [29]. The infrastructure must also provide sufficient bandwidth to transfer files between different sites [30] and researchers. Using a mobile application, CropX provides optimal irrigation mapping and planning for farmers, which includes soil sensors that measure soil moisture and temperature and upload data to the cloud [31].

Methods
This prototype was carried out at the Pilot Plant of the Department of Agricultural Engineering, Faculty of Agricultural Technology. The algorithm of the design for the storage tank with an automatic temperature control system and volume measurement could be seen in Figure 1.
As shown in Figure 2, the design of this Internet of Things-based (IoT) storage tank is made from aluminium. The storage tank was equipped with a temperature sensor, a proximity sensor to measure the volume, and a microcontroller for the control system. This storage tank could adjust the temperature automatically and measure the volume which displayed the measurement data on the Smartphone.  The tools and materials used to manufacture and calibrate this system were as follows: 1). Tools: aluminium tank; 1000-watt heater; jumper cable; adaptor; temperature sensor DS18B20; proximity sensor; printed circuit board (PCB); electric socket; drill bit; solder; hand grinder; rod thermometer; iron ruler; ESP8266 NodeMcu; 2). Materials: crude palm oil (19 litres); heat resistant glue; soldering tin

Design of CPO storage tank
Aluminium had been used to make the storage tank which had a capacity of 45 litres and it was fitted with a heater of 1000 watts. A pair of DS18B20 temperature sensors and an ultrasonic sensor were utilized on the tank. Control of the system was achieved through the ESP8266 NodeMCU, which had been equipped with a WIFI module to enable the real-time transmission of data.

Programming
The program was developed using the Arduino IDE program and the C++ language. Arduino and sensors had been installed in the CPO storage tank, which was mounted to be automatically controlled. Sensors transmitted data via the Thingspeak application to smartphones. The program was developed based on an algorithm shown in Figure 3.  Figure 3. IoT algorithm of automatic temperature control and temperature measurement system.

Calibration
Temperature calibration was carried out on the thermostat and temperature sensor DS18B20. Calibration of the proximity sensor was done with a roll meter comparator. Calibration of the pump discharge was done by comparing the measuring cup. The calibration process was performed several times according to the ability of the sensor.

Testing
Testing was held on levelling measuring instruments, temperature measuring instruments, setting methods, and reporting systems.

CPO storage tank design
This palm oil storage tank was designed with a maximum capacity of 45 litres with a tank height of 500 mm and a diameter of 340 mm. This CPO storage tank was made from corrosion-resistant aluminium. Supporting equipment installed in the CPO storage tank were two DS18B20 type temperature sensors, a 1000-Watt electric heater, a proximity sensor, and an ESP8266 NodeMcu.

Sensor calibration results
The calibration result for the DS18B20 sensor was shown in Figure 4. The vertical axis illustrated real temperature and the horizontal axis illustrated sensor temperature result. The lowest temperature was 41.75°C and the highest temperature was 66°C. The real temperature and the temperature sensor measurement results show a linear relationship.
From the linear regression analysis, it was shown that the effect of the independent variable (X) on the dependent variable (Y) could be symbolized by R 2 . As shown in Figure 4, the value of the R 2 was 0.9919. Therefore, the value of the determination coefficient was 0.9919. This figure represented that the real temperature variable (X1) and temperature sensor measurement results variable (X2) simultaneously affect the performance variable IoT for palm oil tanker (Y) by 99.19%. Furthermore, 0.81% was influenced by other variables outside this regression equation or variables that were not considered. In this study, the correlation of real temperature and temperature sensor measurement results was significant.
Proximity sensor calibration results were displayed in Figure 5. Based on this result it could be shown the lowest distance was 11 and the highest distance was 55. Comparing the real distance and distance measured results with proximity sensor had shown linearly.
The coefficient of determination or R 2 is shown on 0.9978 (or 99.78%). This value described that the real distance variable (X1) and distance measured results with proximity sensor variable (X2) also affected the performance variable IoT for palm oil tank (Y) by 99.78%. The other variables outside of this regression equation influenced 0.22%. Hence, the real distance and distance measured results with the proximity sensor in this study had influenced performance.

The CPO Storage Tank Prototype
The IoT-based storage tank prototype was shown in Figure 6. It had been made from corrosion-resistant aluminium material with a diameter of 340 mm and a height of 500 mm. This CPO Storage Tank had been equipped with sensors and a heater. This tank had a capacity of 45 litres.

Programming Result
The program was developed using the Arduino application program, which used the C++ programming language. The program consisted of one page consisting of logic and work orders from components installed on the CPO storage tank prototype. The information obtained from the sensor was displayed in the form of numbers and graphs in the Thingspeak application. This application was used as a solution for monitoring temperature and volume in the storage tank in real time. At the same time, an electronic circuit for the microcontroller program has been built. This circuit was used to make PCBs as shown in Figure 7.

Automatic temperature performance test results
Automatically, the heater was turned off when the storage tank temperature reached 50°C. The experimental performance test was shown in Figure 8. CPO temperature had a significant difference (more than 5°C), with the top temperature sensor reached 42.5°C and 37.25°C at the bottom sensor. The heater was turned on because of the temperature below 40°C. While the heater was turned off when the top temperature sensor reached 48.44°C and the bottom sensor showed a temperature of 40°C. The performance of this system on the CPO storage tank prototype had succeeded to set the temperature in the storage tank without having to turn the heater off and on manually.

Thingspeak application test result
The results of home Thingspeak, tank volume, top tank temperature sensor, and bottom tank temperature sensor were shown in Figure 9, Figure 10, Figure 11, and Figure 12 respectively. The displayed data was reloaded every 10 seconds and could be monitored continuously by a graph-based display.     test of the storage tank prototype with a capacity of 19 litres, it had shown a significant difference in CPO temperature (the initial heating temperature) which had a temperature difference of more than 5°C. The heater turned on because the bottom sensor has not shown a temperature of 40°C. The heater was turned off when the top sensor shows a temperature of 48.44°C and the bottom sensor showed a temperature of 40°C.

Conclusion
An automatic volume meter was developed using the HC-SR04 proximity sensor. The accuracy of the sensor was 99.78%. An application called Thingspeak, which could be accessed by a smartphone or a computer, display real-time data for temperature and volume in palm oil storage tanks.
The program that had been developed only provided information on a real-time basis data. It could not store large amounts of data and calculate the volume of CPO in the storage tank. In future research, a more complete program can be built to solve this problem. Sensors for FFA, DOBI numbers, moisture content, and dirt levels can be added to get the advanced result.