Temperature and Humidity Control System with Long Range in Mushroom Barn Using Fuzzy Logic

ABSTRACT


INTRODUCTION
Indonesia is known as an agrarian country that relies on the agricultural sector.Most farmers use traditional methods to grow crops.One way to increase crop yields is to apply https://doi.org/10.24036/tip.v16i2.77094 P.ISSN: 2086 -4981 E.ISSN: 2620 -6390 tip.ppj.unp.ac.id efficient automated modern technology.Many crops can be cultivated, including oyster mushrooms (Pleurotus Ostreatus) [1].However, not all regions in Indonesia have suitable temperatures and humidity for oyster mushroom cultivation [2].Oyster mushrooms depend heavily on their surroundings for growth.Temperature, humidity, light, and air are some environmental elements that have a significant impact on the growth of oyster mushrooms [3].Oyster mushrooms can produce fruiting bodies at temperatures below 30, with an air humidity range of 80%-90% [4].Farmers still physically wet the soil with a sprayer to keep the humidity and temperature stable for the growth of oyster mushrooms.
A control system must be implemented in order for farmers to automatically control the temperature and humidity.In previous research [5], the fuzzy logic method was used to create a watering control system in mushroom cultivation.The method of fuzzy logic was chosen to determine the sensor data at the input into data at the output in running the watering control system.The sensor test has produced comparison findings for the DHT11 sensor values.The average inaccuracy of the DHT11 sensor is 4.07%.Ten experiments were run to evaluate the watering control system.The percentage error obtained in this test is 16.66%.The test interval is 45 seconds, with a difference of 500 millimetres of water released.While using fuzzy logic to water plants is more accurate and may be customized to the specific needs of the mushroom barn, manual watering testing takes longer.
From the description above, fuzzy logic implementation testing has been made on controlling temperature and humidity in Lora-based mushroom barns [6].The control system uses IoT based fuzzy logic with the main components of Lora, ESP32, and DHT22.In this study, Transmitter and Receiver are used in the Transmitter, there is an Esp32 MCU Node component to control the performance and process the program in the form of a DHT22 sensor, turn on the pump, turn on the fan and display data on the LCD16x2 and LoRa module, to send data to the Receiver.The receiver has components such as an Esp32 MCU Node, 16x2 LCD and LoRa module to receive data.

RESEARCH METHOD
In this work, a mechanism to regulate humidity and temperature in oyster mushroom barns was developed.The first stage is the design of the hardware for this device.The transmitter and receiver are part of the hardware in the system in the mushroom barn that controls temperature and humidity.The transmitter is in the mushroom barn, and the receiver is in the mushroom farmer's house.The input, process, and output components make up the input hardware design of the transmitter.Reading of data is done at the input section.Furthermore, in the process section, data processing is carried out to be processed to the output.Finally, in the output section, a data display is carried out.
The input section consists of a power supply, DHT22 and LDR sensors.The DHT22 is a sensor that measures the humidity and temperature in a space [7].The LDR sensor is https://doi.org/10.24036/tip.v16i2.77095 P.ISSN: 2086 -4981 E.ISSN: 2620 -6390 tip.ppj.unp.ac.id used to measure the light intensity value [8][9].The process section contains the NodeMCU ESP32 microcontroller and Arduino nano.ESP32 is used to process data obtained from inputs.After that, the data processed by ESP32 will be sent to Arduino Nano which will then be sent to the output.These outputs include the water pump, exhaust fan, I2C LCD and the Lora transmitter.The parts contained in the transmitter can be seen in Figure 1.After the transmitter processes the data, the data will be sent to the receiver.At the receiver, the data will be received by the Lora receiver as input.Following that, the NodeMCU ESP32 microcontroller will process the data.The final result, data will be displayed on the I2C LCD at the receiver [10].

Figure 2. Receiver Diagram of Control System
The mushroom barn's temperature and humidity are maintained by the humidity and temperature control mechanism [11].When the transmitter and receiver are activated, the device starts working.When the control system device is activated, the water jets in the misting will be sprayed in the form of dew.The fan will turn on if the room temperature is hot.The exhaust fan will turn off if the temperature is cold and normal.The control system is set up on the transmitter part of the appliance.As described in Figure 3.After the device design was done, the data processing was carried out using the fuzzy logic method of Mamdani.Application of fuzzy logic method as watering automation recognition [12].The fuzzy logic approach is used because fuzzy logic is an approachable and essential mathematical idea in reasoning [13] [14].Another way to think of fuzzy logic is as a murky or gray value that links the input space and the output space [15].A model of the fuzzy logic approach used to determine the watering procedure is called fuzzy Mamdani.In Figure 4, The temperature and humidity levels in the mushroom cave are taken into account while determining the pump's turn-on time.By applying the fuzzy logic method as a control system, because fuzzy has a simple mathematical concept to determine the rules to be addressed [16].Before the entire execution is complete, the process of mapping the input space to the output space is fuzzy [17].Since each temperature and humidity sensor value has a unique membership, the fuzzification stage maps the sensor membership set.Fuzzification is a process that identifies or maps the sensor membership set [12].Each measurement from the temperature and humidity sensors has a unique membership.

Figure 5. Temperature Membership Set
If the temperature variable's input value is represented by the horizontal axis, and its membership degree is represented by the vertical axis.
Three fuzzy sets are defined in the humidity variable: dry, normal and wet.The dry fuzzy set is represented by a descending linear form, the normal fuzzy set by a trapezoidal form, and the wet fuzzy set by an ascending linear form [18] [19].https://doi.org/10.24036/tip.v16i2.77099 P.ISSN: 2086 -4981 E.ISSN: 2620 -6390 tip.ppj.unp.ac.id source in the form of an adapter.In addition to the adapter, this control system device can use a power bank as a voltage source.Figure 8 displays the outcomes of this control system hardware.The test's results are broken down into two sections: data on the comparison of the DHT22 sensor's values with those from a hygrometer to assess the accuracy of the sensor; and test results obtained using the fuzzy mamdani approach.This test attempts to assess the degree of accuracy between the Hygrometer measuring device and the DHT22 sensor readout.

Time DHT22
℃/% In the table above, it can be seen that the difference between temperature and humidity is different.However, the comparison results obtained are accurate.In the temperature result data between DHT22 and Hygrometer has a total difference of only 6 ℃ or 2.08%.The percentage difference and accuracy level can be calculated as follows:

Hygrometer
x 100 (%) This test aims to make the temperature and humidity in the barn stable by using the fuzzy method.This fuzzy method also aims to regulate watering carried out in mushroom barns after knowing the temperature and humidity levels.In this fuzzy method, the membership of the watering carried out has been determined.So that the value of the pump power is known and the membership set is known when watering.Testing the fuzzy method by placing the system in a mushroom barn is the steps.Program code reading utilizes writing with the Arduino IDE development configuration.

Jurnal Teknologi Informasi dan Pendidikan
The system is then run, the temperature and humidity sensor values obtained will be converted into cold, normal and hot membership sets, on dry, normal and wet humidity sensors.

CONCLUSION
The control system uses IoT-based fuzzy logic with the main components of Lora, ESP32, and DHT22.In this study, Transmitter and Receiver are used in the Transmitter, there is an Esp32 MCU Node component to control the performance and process the program in the form of a DHT22 sensor, turn on the water pump, the fan, and the LCD 16x2 and LoRa module to display data and transfer it to the receiver.This control system has a good level of accuracy against the DHT22 sensor and Hygrometer which has a difference of 1 ℃ or a difference of 2.08% while for humidity, it has a total difference of 16% or 97.61%.When testing using fuzzy logic, the resulting temperature and humidity are stable and watering is carried out by the predetermined fuzzy logic.

Figure 1 .
Figure 1.Transmitter Diagram of Control System

Figure 4 .
Figure 4. Flowchart System Control Program