SMART GARDEN SYSTEM BASED ON INTERNET OF THINGS USING NODEMCU ESP8266

Gardening is an agricultural sector that requires control and monitoring of work. However, the management and monitoring are still done manually. Therefore, we developed an internet of the things-based smart garden to monitor and control plants. This study aims to determine the design and performance of the system. This research is a type of engineering research. The measurement technique is to measure directly by comparing air humidity, air temperature, soil moisture, and soil temperature with the standard tool. The indirect measurement is by analyzing the value of accuracy and precision of the instrument. The system uses a DHT11 sensor measuring air temperature and humidity, a soil moisture sensor, and a DS18B20 sensor to measure soil temperature. The device has nearly 100% accuracy in all parameters, especially in the range of 93.53% to 98.61%. Precision for all parameters of the selected devices is also close to 100% in the range of 98.6% to 99.8%. Based on these results, the design of the smart garden tool can work well.


I. INTRODUCTION
Indonesia has enormous agricultural potential as an agricultural country.The agricultural sector is one of the most important components that can support the economy of the Indonesian people [1].Horticulture is one of the agricultural areas widely recognized for improving overall health, quality of life, physical strength, fitness, resilience, cognitive skills, and socialization [2].Gardening has an important part, which is watering.Irrigation systems are used to provide water to maintain soil moisture for plant growth.The irrigation regime has an important aspect, which is the amount needed to water the plants and the right time to water the plants.But today, many gardeners still use manual systems to water their plants and monitor their growth.A proper watering schedule may not always be implemented due to time constraints and busy lifestyles [3].
The problem of watering or saving plants can be solved by using a smart garden system.This system uses the Internet of Things (IoT) in its work [4].The Internet of Things is a useful concept to extend a continuously connected Internet connection [5].IoT refers to objects that can be uniquely identified as virtual representatives in an Internet-based architecture [6].Smart Garden is an innovative IoT-based device useful for monitoring and providing the necessary beneficial resources that can make plant growth faster [7].Intelligent garden monitoring and control are expected to solve the irrigation problem.
Atmiasri and Tri Wiyono's research on smart gardens answered the sprinkler problem.However, this study only monitors soil moisture, monitors temperature, and spontaneous watering.Other physical parameters such as temperature and humidity and soil temperature have not been added [8].Temperature and humidity, on the other hand, have a major impact on the development of crop yields.Air temperature and humidity are maintained at a specified level to maintain plant health [9].Soil temperature also affects plants [10].These parameters can be controlled and monitored using a smart garden system.Smart garden tools have automatic functions and are equipped with various sensors for monitoring [7].Smart Garden uses the concept of the Internet of Things in its operating principles.This IoT can be applied to many technologies such as motion, temperature, humidity, weather, and sound [11].
The plants used in this study were horticultural, especially chili plants, eggplants, and tomatoes.The parameter values used were obtained from the results of previous studies.When it comes to soil moisture, 60-80% is ideal for chili plants [12], The ideal humidity for eggplant is 80-90% and for tomatoes 60-80% [13].The environmental temperature for chili plants is 18-24°C [1], the ideal temperature for tomatoes is 18-24°C, and the ideal temperature for eggplant is 18-24°C [14].The ideal humidity for horticulture is 80%.Based on data obtained from previous research, optimal conditions were created for all horticultural crop parameters [15].
Based on this, a smart garden was designed that can monitor and control soil moisture, air temperature, and soil temperature based on the Internet of Things with the NodeMCU ESP8266.The sensors used are the DHT11 sensor, the DS18B20 sensor, and the soil moisture sensor.The ESP8266 or NodeMCU ESP8266 module contains an integrated WiFi network that provides a connection to a WiFi router and collects signals from sensors, allowing it to be used as a microcontroller [16].A microcontroller is an electronic component that can be programmed and run by software [17].The DHT11 uses a capacitive humidity sensor to measure the ambient air (temperature and humidity) and outputs a digital signal to the information pen [9].DHT11 provides a digital signal and requires accurate data retrieval time [18].A soil moisture sensor is a sensor used to estimate the volumetric moisture content and soil electrical conductivity in real time [19].The DS18B20 sensor is a digital sensor with an internal 12-bit ADC used for temperature measurement [20].The measurement results are displayed in Blynk.Blynk is a platform that can quickly interface to control and monitor hardware projects from iOS and Android devices [21].
This research is important for producing tools that are useful for plants and can provide good plant growth parameters for implementing the methods developed by Rahim et al.To overcome the problems described [3].This research aims to define the design and performance specifications of a smart garden system so that these problems can be solved.Tool design is a form of intelligently designed garden tools.The performance specifications of the tool are the level of precision and accuracy that a smart garden tool achieves.

II. METHOD
This This research is a form of technical research.Engineering research is design research that is not routinely done and brings new contributions in the form of either processes or products.Engineering research has the steps of writing a tool that is built to meet certain specifications, designing modeling of the tool that is built and testing the tool.The final results of technical research are used to improve methods, test procedures, and improvements in the design activity itself [22].Engineering research procedures include ideation, clarity, conceptual design, functional engineering drafting, detailed design, prototyping, and testing.
Ideas and clarity are determined by seeking references from literature and reading sources such as books, journals, articles, and other relevant sources.As soon as a research idea is available, a design proposal is created.Conceptual design is the implementation of ideas before the formation of a research system.The placement levels of the system are arranged geometrically according to the function of each component used to design the smart garden system.The layout of the Smart Garden System is shown in Figure 1.  Figure 2 shows what the smart garden system looks like.This figure gives an overview of the smart park.The components used are designed according to the function of the individual components.Irrigation and temperature control systems are developed by adjusting soil moisture levels for irrigation and temperature to regulate ambient temperature.Irrigation is activated at below 60% humidity and deactivated at above 80% humidity.The fan turns on when the temperature reaches above 26°C and turns off when the temperature reaches below 24°C.In Figure 2 we have a black box, a component box that contains a microcontroller and a relay.The box is the brain of the smart garden system.The next stage is the construction of a prototype, made according to the schemes described.The last phase tests whether the created tool or system works properly

III. RESULTS AND DISCUSSION
The results of this study are consistent with the stated objectives.The result is the design and performance advantages of a smart garden system.A design specification is a description of the function of each component that makes up a system.A specific design feature is the series of each sensor (DHT11 sensor, YL-69 soil moisture sensor, DS18B20 sensor).The circuit for each system is shown in Figure 3. Figure 4b is the view inside the toolbox.The contents of the component box consist of microcontrollers and relays that control all sensors and batteries to run the designed programs.The data view appears in Blynk.Figure 5 shows a flickering screen.Performance specification results on the device are divided by device accuracy and precision.The data obtained is the data displayed in the Blynk software and on the serial monitor.Device accuracy data is obtained by comparing the measurement results in the device with the measurement results in the standard device.The device accuracy data in this study is divided into 3 parts according to the number of sensors.The accuracy data of the air humidity and soil humidity can be found in Table 1.  1 shows the accuracy data for air humidity and soil humidity.Air humidity is reflected in an average accuracy of 0.93 with an average error rate of 5.09%.The soil moisture data accuracy of the device using the YL-69 soil moisture sensor.The measurement results achieved an average accuracy of 0.94 with an average error of 6.17%.The accuracy results of the air temperature and soil temperature are shown in Table 2.

Table 2. Temperature accuracy data
Table 2 contains measurement data for the accuracy of the air temperature and soil temperature.Air temperature is proven with an average accuracy of 0.98 with an average error of 2.05%.The soil moisture data accuracy of the device using the YL-69 soil moisture sensor.The measurement results achieved an average accuracy of 0.94 with an average error of 6.17%.The measurement results of the instrument accuracy are also divided into three parts according to the number of sensors.Precision data is obtained by measuring the parameter at the specified parameter value and taking 10 measurements with the system instrument.The Air humidity and soil moisture sensor precision data is shown in Table 3.  4 shows the precision data obtained from the measurement results.The air temperature results achieved an average precision of 1.00 with an average measured value of 28.1 °C.The precision soil moisture measurement data form the DS18B20 sensor.The mean precision of soil moisture obtained according to the table is 0.99 and the mean reading is 94.4%.Device precision levels and sensor precision results are shown in Table 5.Table 5 shows the level of precision of the data received from the Smart Garden Tool.The measurement results obtained show that the accuracy of the device is very good since the values displayed are close to those of the standard device [22].The precision results of smart gardening tools are also said to be good due to the low accuracy values obtained [22].
Here are the results of the notification test on Blynk.Blynk sends notifications when the fan is on/off (Figure 6) and the pump is on/off (Figure 7).The fan turns on when the air temperature shows above 26°C and turns off when the air temperature shows below 24°C.Figure 6a shows when the fan is running and Blynk is sending notifications.Figure 6b shows the indicator when the fan is turned off and Blynk continues to send notifications.When the pump is turned on and off, Blynk will send notifications back to your smartphone.Notifications can be seen in Figure 7.   7 is a notification screen when the pump is on (Figure 7a) and the pump is off (Figure 7b).The pump will start when the soil moisture shows below 60% and the pump will stop when the humidity shows above 80%.The smart garden tool test was carried out for 4 days from July 5th to 8th, 2022.The Smart Garden Tool measurement data was created by measuring all parameters such as soil moisture, soil temperature, humidity, and air temperature.Data acquisition occurs every 1 minute, and then every 10 data is averaged.Then the data collected per day is plotted.Test result data as of July 5, 2022, is shown in Figure 8.There is bad data between 12:00 and 13:12.This is because the WiFi connection used on the device is disconnected during data collection, which prevents Blynk from storing any data.The 6 July 2022 dashboard is shown in Figure 9.   9 is also missing data due to the WiFi outage, which occurs from approximately 01:12 to 06:00 and 20:24 to 22:28.It can be seen in Figure 10 when measuring the smart garden tool on July 7, 2022.There are some anomalies in the test results, which can be seen in the graph.In the humidity and air temperature graph, the humidity decreases as the air temperature rises.This is due to the correlation between air temperature and humidity [23].The value of soil moisture in the soil moisture table decreases over time.This is because the water in the soil decreases due to evaporation or absorption by plants.Soil moisture is highly dynamic due to evaporation, transpiration, and infiltration on the soil surface [24].In the soil temperature chart, where the soil temperature drops at night and rises during the day.This is because the soil temperature is affected by the amount of solar radiation absorbed by the soil surface.Day and night soil temperatures vary greatly, when the soil surface is heated by the sun during the day, the air near the soil surface becomes high,

Fig 1 .
Fig 1. Smart garden system arrangementFigure1is the layout or schematic of the smart garden system.This system in the picture uses a NodeMCU ESP8266 as a microcontroller, a DHT11 sensor, a yl-69 soil moisture sensor, a DS18B20 sensor, a fan, a pump, a relay, and a smartphone connected to Blynk.The detailed design of this system is divided into two parts:

Fig 2 .
Fig 2. Smart garden tool design

Fig 3 . 4 .
Fig 3. Arrangement of the sensor circuit on the tool Figure 3 shows the series of each sensor used.The sensors we use are connected to the microcontroller according to the sensor inputs and the programs we write.The tip of the tool varies depending on the sensor.The DHT11 sensor has three connection points: GND, data, and VCC.The yl-69 soil moisture sensor has four pins: VCC, D0, A0, and GND.The DS18B20 sensor has three pins: VCC, GND, and Data.All sensors are arranged according to their connection ports as shown in Figure 3. Microcontrollers and relays are placed in the toolbox and sensors are placed outside the toolbox.A view outside the box and a view inside the box are shown in Figure 4.

Fig 5 .
Fig 5. Blynk view Figure 5 is a view of Blynk.The Blynk app can be used to control the Arduino, Raspberry Pi, and other components over the Internet[7].Setup in Blynk is done by dragging and dropping the used tool.The data presented in this study are soil temperature (ST), soil moisture (KT), air temperature (SU), and humidity (KU).Performance specification results on the device are divided by device accuracy and precision.The data obtained is the data displayed in the Blynk software and on the serial monitor.Device accuracy data is obtained by comparing the measurement results in the device with the measurement results in the standard device.The device accuracy data in this study is divided into 3 parts according to the number of sensors.The accuracy data of the air humidity and soil humidity can be found in Table1.

Fig 6 .
Display of notifications when (a) the fan is on or (b) the fan is off

Fig 7 .
Display of notifications when (a) the pump is on or (b) the pump is off

Figure
Figure7is a notification screen when the pump is on (Figure7a) and the pump is off (Figure7b).The pump will start when the soil moisture shows below 60% and the pump will stop when the humidity shows above 80%.The smart garden tool test was carried out for 4 days from July 5th to 8th, 2022.The Smart Garden Tool measurement data was created by measuring all parameters such as soil moisture, soil temperature, humidity, and air temperature.Data acquisition occurs every 1 minute, and then every 10 data is averaged.Then the data collected per day is plotted.Test result data as of July 5, 2022, is shown in Figure8.

Fig 8 .Figure 8
Fig 8. Measurement data on July 5, 2022 Figure 8 is a graph of measurement data as of July 5, 2022.Measurements are taken from 05:23 WIB to 23:53 WIB on July 5, 2022.Average values for humidity are 70.23%,air temperature 29.77°C, soil moisture 73.63 %, and soil temperature 26.13°C.There is bad data between 12:00 and 13:12.This is because the WiFi connection used on the device is disconnected during data collection, which prevents Blynk from storing any data.The 6 July 2022 dashboard is shown in Figure9.

Fig 10 .
Fig 10.Measurement data on July 7, 2022 Figure 10 is a graph of Smart Garden Tool measurement data as of July 7, 2022.Measurements were taken from 00:03 WIB to 23:53 WIB on July 7, 2022.The average humidity of the measurement data is 74.14%, the air temperature is 29.56 °C, the soil moisture is 70.35% and the soil temperature is 26.38.Measurement data from 8 July are shown in Figure 11.

Fig 11 .
Fig 11.Measurement data on July 8, 2022 Figure 28 is a graph of smart garden device measurement data as of July 8, 2022.The test will run from 00:03 WIB to 09:13 WIB on July 8, 2022.Average humidity readings are 78.38%,air temperature is 27.68°C, soil moisture is 71.08% and soil temperature is 25.88°C.There are some anomalies in the test results, which can be seen in the graph.In the humidity and air temperature graph, the humidity decreases as the air temperature rises.This is due to the correlation between air temperature and humidity[23].The value of soil moisture in the soil moisture table decreases over time.This is because the water in the soil decreases due to evaporation or absorption by plants.Soil moisture is highly dynamic due to evaporation, transpiration, and infiltration on the soil surface[24].In the soil temperature chart, where the soil temperature drops at night and rises during the day.This is because the soil temperature is affected by the amount of solar radiation absorbed by the soil surface.Day and night soil temperatures vary greatly, when the soil surface is heated by the sun during the day, the air near the soil surface becomes high,

Table 1 .
Humidity accuracy data

Table 3 .
Humidity precision data

Table 3
results of moisture precision calculation for the sensor.The obtained measurement air humidity precision results are 0.99 on average, and the average measurement is 80.6%.The exact soil moisture measurement data.The mean precision of soil moisture obtained according to the table is 0.99 and the mean reading is 94.4%.The air temperature and soil temperature precision data of the sensor is shown in Table4.

Table 4 .
Temperature precision data

Table 5 .
Data on the level of precision of smart garden tools Figure 9 is a graph of the Smart Garden Device metrics as of July 6, 2022.Testing is performed on July 6, 2022 from 00:03 WIB to 23:53 WIB.Average values for humidity: 76.72%, air temperature 29.35 °C, soil moisture 72.18%, soil temperature 26.36 °C. Figure