Monitoring and Control Food Temperature and Humidity using Internet of Things Based-on Microcontroller

ABSTRACT


INTRODUCTION
Tempe is one of the promising food commodities for entrepreneurship. Quality and food safety has received a lot of attention, raising the level of awareness of consumer health [1]. Lots of people take advantage of these opportunities. However, many manufacturers still use manual methods in the production process. Tempe Procer cannot know about the level of humidity and temperature in the fermentation process. Knowing temperature and humidity is very important in the process of making tempe. The fermentation process in tempe where the fermentation process can take 36 -47 hours. The growth of Rhizopus Oligosporus fungi in soybean tempeh was very good at an incubation space of 30-37ºC [2]. From the above problems, in the processing of tempe, a monitoring system is needed to determine the value of temperature and humidity. In adjusting the temperature and humidity levels, it is also necessary to add a control section.
Technology will increasingly develop, especially the internet. Many users are using the internet as a need. Along with the development of technology, we need to know that it has brought the industrial area towards the industrial revolution 4.0. technological developments that are increasingly developing to facilitate temperature and humidity measurements using the Arduino-based DHT22 sensor where the industry now uses internet connections and exchanges or transfers data so as to create a smart industry. A microcontroller board is used to connect all sensors and modules programmed with commands to integrate and run the device [3]. At this time, the internet network is also growing, which has reached rural areas. Take advantage of internet connectivity that is always connected at any time and can be easily accessed wherever you are or what is now better known as the Internet of Things [4]. For the sake of support of the industrial revolution 4.0, the information system needs to be upgraded to the online oriented system [5]. Online services are often used in the education, government, and E-Commerce sectors [6]. It makes it easy for users to explore data, such as displaying test data to web applications or android mobile applications [7]. Overall, this IoT-based system helps decrease human interaction intervention and involvement [8][9] [10].
Automatic Room Temperature Regulator for Making Tempe Based on Arduino. Tests were carried out on the fermentation process of tempeh in miniature rooms without using a room temperature control system, with detected indoor temperatures ranging from 30-31o C, requiring 33 hours of fermentation to produce good tempe [11]. The automatic monitoring system works by using DHT22 as an input sensor for cultivation. If the internet is connected, then nodes will send the information to the server as well as LCD Display [12]. DHT uses a capacitive humidity sensor and a thermistor to measure the surrounding air and spits out a digital signal on the data pin. Single-bus data format is used for communication and synchronization between microcontroller and DHT sensor [13]. A Library <DHT11> was needed for the two devices to communicate in C language, the Arduino programming language, by connecting between the predetermined Arduino Uno connected to the other side of the Jumper cable to DHT [14]. The study was initiated in one environment, and the logged data was tabulated and graphs generated from it [15].

RESEARCH METHOD
The system design in this research is generally divided into two stages, namely designing the hardware to build control Temperature and Humidity system and then designing the software and network architecture to send data monitoring. To obtain ideal results and in accordance with what is expected, designing this system refers to the theories and datasheets of components that have been obtained from various reliable sources. The first stage is a design stage, such as device architecture, and also imagine how to connect the system for data transmission using the internet. We know The internet opens a new dimension in the development of various technologies such as smart cities, smart homes, smart monitoring systems, etc. [16][17] [18]. Fig. 1 illustrated about flowchart of the system. In the Fig. 1, we can see the DHT sensor will read room temperature and humidity. after the sensor reads it, the data will be entered, and the microcontroller will process it. If the room humidity data read is more than 80RH, the module relay will turn on the heater. If the room temperature data read is more than 30 C, the module relay will turn on the cooler. Then the processed data will be sent using the esp8266-01 wifi module. Then the database will be received, and after that, the data can be displayed via the ThingSpeak web server. If it can be displayed on the webserver, then we can flexibly monitor anytime and anywhere.

Network Architecture
In Fig. 2, it can be seen about the Network architecture designed for IoT-based systems. In the system built, the ESP8266 is set to become a station in the data transmission process. In the process, esp8266 is set with the AT-Command instruction, with the AT-CWMODE = 1 instruction to make it station mode. On the IoT network architecture, the sensor or hardware will read the temperature and humidity values in the room. Then, data will be sent using ESP8266-01 WiFi Module. Some of the commands in the AT-Command instructions used on the ESP8266 are AT+CWJAP used to Connect with Access Points, AT+CIPSTART used to establish a TCP connection, UDP transmission or SSL connection, AT+CIPSEND used to sending data, AT+CIPCLOSE used to Terminate TCP connection, UDP transmission or SSL connection. The ESP8266, which has entered the station mode, will connect with the router to the internet network. The data will then be in the cloud by the internet and can then be accessed via the Thingspeak web server.

Designed and Build Hardware
The hardware design uses the Arduino board as a control and the esp8266 wifi module as a station for data transmission. Arduino functions more as a control system, while the esp8266 is a medium for data transmission. The wiring diagram is shown in Fig. 3. 01 Gets GND and VCC are also connected to the Arduino 3.3V Pin next because the Arduino program uses the Serial Software library, the TX on the ESP is connected to the RX on the Arduino, namely Pin ten digital and RX on the ESP connected to TX on Arduino, namely Pin nine digital. The relay module as a switch is connected to a cooler and heater that is connected to Arduino Digital Pin 2 and 3.

Data analysis using standard deviation
Furthermore, to make comparisons, repeated measurements were made to the process of making the tool to determine the accuracy of the measurement by finding the standard deviation value. Standard deviation or also known as standard deviation symbolized by (read: sigma) in the calculation of uncertainty against repeated measurements, is different from the uncertainty value in a single measurement whose uncertainty is obtained from half the value of the smallest scale of the instrument used. While the uncertainty value on repeated measurements uses the standard deviation value. The formula is Where S is Standard Deviation, N is the Amount of data, is Data to (i= 1,2,3…..n), and is Average of Sample.
Before getting the Standard Deviation value, it is necessary to find the Variant value first with the equation as The value of variance is used in determining the size of the distribution of data that will be compared with the average value of the data. The greater the variance, the more variation in data values occurs, and there may be a larger gap between one data value and another. If the data values are all close together, the variance will be smaller. However, this is more difficult to understand than standard deviation, because variance represents the result of squared values that may not be represented in the same graphical form as the original dataset. The standard deviation is usually easier to understand and apply. Standard deviation is expressed in the same unit of measure as the data, which is not necessarily the same as the variance.
Since Standard Deviation / Standard Deviation is the square root of the Variant, then: So the standard deviation is a reflection of the mean deviation of the data from the resulting mean. Standard Deviation describes how varied the data obtained. If the Standard Deviation value is much greater than the average value, then the mean data is an invalid representation of the entire data. Meanwhile, if the value of Standard Deviation is very small compared to the average value, then the average value is very good and can be used as a representation or reference of all data.

RESULTS AND DISCUSSION
Along with technological developments, a humidity and temperature data acquisition system has been developed using sensors with the type and Arduino, one of which is based on IoT. IoT devices are electronic devices in the form of a microcontroller connected to a sensor [19]. There are several devices that are connected to each other, which in testing requires the following stages. Fig. 4 is the external view of the assembly of temperature and humidity monitoring and control equipment in tempe fermentation and the result of assembling the tool installed on the inside of the fermentation room box. The parts in it are (1) Heater lamp infrared, (2) Fan DC 12v, (3) DHT22 Sensor Module.

Temperature Control Testing
Testing at this stage is carried out to determine the accuracy or accuracy of the measurement readings made by the DHT22 sensor. The test results will be displayed in the form of Table 1. In this experiment, the testing process is carried out by observing the sensor readings on the 16x2 LCD and as a comparison using the Temperature Clock Hygrometer HTC -2. In this tester, we can also see the performance of the hardware in helping to adjust the temperature to keep it in accordance with the predetermined set of temperature value points. As we know that the tempe mushroom rhizopus oligosporus will grow optimally and well at a temperature of 35 Celsius. There is 25 data result for analysis. The test was carried out for 2 hours from 07.00 -09.00 on a different day from the previous test, with the initial data read on the DHT22 sensor was 31.3 C and the HTC-2 reading was 32 C. Then the temperature jump occurred due to the help of Trigger from hot water. The temperature continues to rise on the 6th to 8th data, the temperature value is> 35⁰C according to the set-pont set when the temperature reading from the DHT22 sensor produces a temperature value above 35⁰C, the relay on the system will turn on the DC fan to help cool down.

Humidity Control Testing
The Humidity Setting test is carried out with an expected value in the range of 60 -80 RH%. So the set point for the conditions set in the system designed for humidity if it exceeds the value of 85% (> 85), the system will take action by turning on the relay to turn on the lamp as a heater to reduce the humidity value according to the desired set point. The result of the test can see in Table 2.
Analysis of Table 2 with data retrieval is carried out every five minutes in a span of two hours, resulting in 25 data, which is generated by the DHT22 sensor initially is 99.9% because the point set in the program is when the humidity value is above 80%. As the switch will be the Heater Lamp to heat the room so that the humidity drops, we can see changes begin to occur in data number 9 to 25 the measurement value decreases. The heater lamp can heat well.

Modul WiFi Testing
The Internet of Things (IoT) collects useful data by integrating communications between different devices. The case such as hardware and software [20], although basically an IoT-based system is formed by connecting physical devices [21]. IoT systems have focused on software-defined networking [22]. The result of this test is the output curve displayed by the ThingSpeak application for monitoring purposes [23]. ESP8266 capabilities inboard processing and storage through integration with sensors and other application-specific tools via the GPIO with minimal upfront development and minimal loading during processing time testing on the ESP8266 is carried out to find out that the data that has been read by the DHT22 sensor has been successfully sent via an internet connection. ESP-01 is run together with Arduino Microntroler on System using AT-Command Instruction in the programs. In this test, we can also see the success in sending data through the graphs displayed on Thingspeak. The result a graph of the temperature and humidity values in Fig. 5 and Fig. 5. We can see a graph of fluctuating temperature and humidity values with the fluctuating temperature and humidity reading values. The fluctuations that occur on the chart are caused by the control system settings that work to effect changes in temperature and humidity. The graphic also looks tight because the difference in the reading of the humidity value on the sensor and Thingspeak is very thin. In Fig. 7 and Fig. 8, the graphical display of the data presented on Thingspeak is as the temperature and humidity data sent by esp8266. This proves that esp8266-01 as a station mode has functioned well in data transmission. In the graphic display, it can be seen that the process of sending data at temperature and humidity has a time difference. This is because the data transmission esp8266 used is a serial type so that the data is sent alternately and sequentially.

Data analysis
Tempe mushroom fermentation process takes about 2-3 days with the optimum growth temperature is 35ᵒC, then data sampling is carried out for 3 days. The data analysis is calculated using standard deviation to process the data. The first step in the calculation is done by calculating the error value, this value is obtained from the calculation of the difference between the DHT22 Sensor read value and the HTC-2 read value as a comparison. The error value in the equation formula is symbolized by xi. after getting the error value from each data, the next step is to calculate the mean error value. Mean error is symbolized by . From the average error value obtained, it can be calculated from the variant value of the data.
The variance value is obtained from the square of the difference between the error value and the mean. Variant describes the size of how the distribution of a data is distributed. Variance is a measure of data variability, which means that the greater the value of the variance, the higher the fluctuation of data from one data to another. After finding the variance value of the data obtained, then the standard deviation value can be searched. The standard deviation or what is more commonly known as the standard deviation is the square root of the variant value of the data. The smaller standard deviation value, the values in the sample data tend to be closer to the mean value. and vice versa, the greater standard deviation, the sample values are more varied. This shows that if the standard deviation value is smaller than the mean value, the sample obtained from the testing process can represent the entire data for 3 days. The calculation result is shown in Table 3 and Table 4.  Temperature = 1.39778 ± 0.8708 and humidity = 1.13077 ± 1.1254. From the resulting standard value, it can be interpreted that when the standard deviation value is small, the resulting sampling is good enough to be used as a representation of the entire data.

CONCLUSION
Based on result testing with some of the step such as testing of hardware, software, and measurement accuracy, researchers can provide some conclusions as follows: Temperature settings can function properly by being able to cool the temperature with a fan when the temperature and the average temperature on the observation is 33.11 ⁰C, Humidity settings can function well by being able to reduce humidity with a heater when the humidity with an average humidity in the observation is 87.74%, Successfully Displaying the DHT22 Sensor value on thingsview which has been integrated with thingspeak, The results of the comparative analysis