International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 IoT-Driven Solutions for Improved Plant Care in Terrariums Diva Septiawan1. Misbahuddin2. Giri Wahyu Wiriasto3 Department Of Electrical Engineering Of Mataram University. Mataram. Indonesia divaseptiawan75@gmail. com, 2misbahuddin@unram. id, 3giriwahyuwiriasto@unram. 1,2,3 *Corresponding author, misbahuddin@unram. AbstractAiThe rapid advancement of Internet of Things (IoT) technology has revolutionized various sectors, including smart agriculture. This study explores an IoTdriven solution to enhance plant care in terrariums by automating maintenance and optimizing growth conditions. The proposed system monitors key environmental parameters temperature, humidity, and soil moisture while automating irrigation using an ESP32 microcontroller. DHT11 and YL-69 sensors, a relay, and a mini DC pump. Android application, developed with Android Studio and Arduino IDE, integrates the system via Firebase for real-time data access. A 14-day observation of Rombusa plant growth revealed that the optimal soil moisture level ranges between 6070%, averaging 65%. The findings confirm that IoT-driven plant care enhances growth efficiency and simplifies maintenance, offering a more effective alternative to traditional methods. Keywords: environmental parameters, internet of things (IoT). IoT-driven plant care, soil moisture, terrarium. This work is licensed under a CC BY-SA. Copyright A2025 by Author. Published by Universitas Riau. INTRODUCTION The rapid advancement of information and communication technology has significantly transformed various fields, including agriculture and horticulture. One of the most impactful innovations in this era is the Internet of Things (IoT), which integrates hardware and software to create intelligent, efficient systems. IoT enables real-time environmental monitoring and automated control through sensors for data collection and actuators for executing specific tasks . A growing application of IoT in agriculture is automated plant care systems. The use of sensors, such as temperature and humidity sensors, alongside actuators like DC motor pumps and servo motors, facilitates the automation of plant maintenance. This automation reduces the complexities of plant care, making it more convenient for users who may struggle with the detailed attention required for proper maintenance . A terrarium is a self-contained ecosystem housed within a transparent container, providing an aesthetically Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. pleasing indoor plant care solution. Maintaining optimal temperature and humidity is crucial for plant growth within a terrarium. However, a major challenge in terrarium care is the need for continuous monitoring and manual intervention, which can be a barrier for individuals with limited time or knowledge in plant maintenance . In this context. IoT technology presents a highly relevant solution. By employing sensors to measure environmental parameters and integrating an automated watering system, plant care in terrariums can be significantly enhanced. In this study, the IoT has been programmed to be able to enables automated actions, such as triggering irrigation when soil moisture drops below a predefined threshold, while also allowing remote monitoring and control via an Android-based application. This approach not only provides greater convenience and flexibility for users but also optimizes plant growth conditions . This study aims to develop an IoT-based terrarium system that simplifies plant care and enhances plant growth. integrating automation and remote control capabilities, the proposed system offers a practical solution for efficient plant maintenance, particularly benefiting users with time constraints or limited horticultural expertise . METHOD Tools. Material, and Sketch Design To develop an IoT-based terrarium, the following IoT components are utilized: ESP32 microcontroller. YL-69 soil moisture sensor. DHT11 temperature and humidity sensor, singlechannel relay, mini DC pump, and a 5V adapter. These components enable automated monitoring and control of the terrarium environment. For software development. Android Studio is used to create an Android application named Terrarium Controller, which facilitates remote monitoring and control. Additionally. Arduino IDE serves as the programming platform for configuring and managing IoT devices. The terrarium consists of a glass container. Rombusa as the primary plant, a suitable growing medium, and a water reservoir integrated into the system. The IoT implementation is designed to ensure both aesthetic appeal and optimal functionality while maintaining a compact and organized setup. Conceptual Sketch of the IoT-Integrated Terrarium in Figure 1. Figure 1. Conceptual Sketch of the IoT-Integrated Terrarium International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 Development of Terrarium Controller Application Android Studio is a widely used integrated development environment (IDE) that provides comprehensive tools for mobile application development, including efficient coding, debugging, and user interface (UI) design . In this study, an android application named terrarium controller was developed to monitor and automate the maintenance of the IoTbased terrarium system. The application features a main monitoring page that displays key environmental parameters, such as soil moisture, temperature, and humidity. These environmental parameters are measured by sensors and transmitted to the application in real The mathematical model representing the sensor measurements can be expressed as: St= fs. Tt= ft . Ht= fh . where St. Tt. Ht are the soil moisture, temperature, and humidity readings at time t, respectively. Vs. Vt. Vh represent the sensor output signals, and fs, ft, fh are calibration functions for each sensor . Furthermore, the application includes an automatic watering settings page, allowing users to adjust watering duration, as well as a dashboard page that provides insights into the terrarium's conditions, including historical data and watering activity. The automatic watering system is controlled based on the soil moisture threshold Sth. If the measured soil moisture level St falls below Sth, the system activates the water pump according to the following . where Wt = 1 indicates that the pump is activated, while Wt = 0 means it remains off. Users can also set the watering duration (D), which determines the total volume of water dispensed: Vw= Q. where Vw represents the volume of water dispensed. Q is the flow rate of the pump . iters per secon. , and D is the watering duration . To enable real-time communication between the mobile application and IoT devices. Firebase Realtime Database was used. This cloud-based solution ensures seamless data synchronization, enabling instant updates of sensor readings and control commands . The synchronization process ensures that the latest environmental data is continuously updated according to the following model: Xt 1= Xt OIX where Xt represents the environmental data at time t. OIX is the change in data from new sensor readings, and fsync is the synchronization frequency with Firebase . The IoT system itself was programmed using Arduino IDE, an open-source platform widely used for writing Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. and uploading code to microcontrollers, making it an essential tool for IoT development . The integration of these technologies ensures efficient data management, real-time monitoring, and automation within the IoT-based terrarium system. By employing this approach, the terrarium controller application effectively maintains optimal conditions in the terrarium while reducing manual intervention. All of the equation are approximation made by the researcher. IoT-Based Terrarium System Architecture The IoT-based terrarium operates by integrating IoT devices with the terrarium controller application, utilizing firebase real-time database as the communication medium. This system allows users to monitor environmental parameters, such as soil moisture, temperature, and humidity, within the terrarium. It also automates the watering process, enabling users to adjust the watering duration via the Android application. In addition, users can access detailed insights and historical data about the terrarium's conditions through the application's A detailed schematic of this system can be seen in Figure 2. Figure 2. IoT-Driven Terrarium System Architecture Wiring Diagram and Device Connections Figure 3 presents the wiring diagram of the IoT-based terrarium system, showing the connection paths for each device used in the system. The components include the ESP32. YL-69 soil moisture sensor. DHT-11 temperature and humidity sensor, single-channel relay with adapter, and a DC mini pump. The ESP32 is the central microcontroller responsible for processing data from the sensors and controlling the relay. It is connected to the sensors via digital and analog pins. The YL-69 soil moisture sensor is connected to one of the analog pins on the ESP32 to monitor the soil moisture levels, while the DHT-11 sensor is connected to a digital pin for measuring temperature and humidity. The single-channel relay serves as an intermediary between the ESP32 and the DC mini pump, allowing the system to control the activation and deactivation of the pump based on the moisture readings. The relay is controlled through one of the digital pins on the ESP32, while the DC mini pump is connected to the relay to manage the watering process. The wiring diagram also illustrates the power supply connections for each component, ensuring proper voltage and current for the ESP32, sensors, and the pump. Power is supplied to the system through an external power source, while the ESP32 handles the low- International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 power requirements of the sensors. This setup ensures that the IoT-based terrarium system can effectively monitor and automate environmental controls within the terrarium. The wiring diagram in Figure 3 provides a clear understanding of how each device interacts within the Additionally. Table 1 summarizes the specific connection paths and pin assignments for each device. Figure 3. IoT based terrarium wiring diagram Table 1. IoT Based Terrarium Wiring Diagram Component DHT-11 YL-69 Relay Adapter 5v Mini dc pump Component pin Vcc Gnd Data Data Vcc Gnd Vcc Gnd Output ( ) Output (-) Positive Negative Pin connection path D4 (ESP . 3v3 (ESP . Gnd (ESP . D28 (ESP . 3v3 (ESP . Gnd(ESP . D5 (ESP . 5v (ESP . Gnd (ESP . NO ( Rela. COM (Rela. COM (Rela. Gnd (Adapte. RESULT AND DISCUSSION IoT-Based Terrarium System Modeling and Setup The developed IoT-based terrarium system consists of two glass containers: one serving as the terrarium environment and the other functioning as a water reservoir for the automatic irrigation system. These containers are placed on a two-tier stand, with the upper tier Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. featuring a slightly inclined wooden panel at the front. This panel acts as a cover to conceal the installed IoT components, ensuring a neat and organized appearance. Proper enclosure and arrangement of IoT components are essential to protect sensitive electronics from environmental factors and improve system longevity . Figure 4. IoT-Based Terrarium System Setup and Component Layout The terrarium environment is positioned on the top tier, while the water reservoir is located on the lower tier. A hose is connected to a mini DC pump, which is controlled by a relay module, to facilitate water distribution. Automated irrigation systems with relay-controlled pumps have been widely utilized in smart agriculture to optimize water usage and reduce manual intervention . Inside the terrarium, a DHT-11 sensor is installed to monitor air temperature and humidity, while a YL-69 soil moisture sensor is embedded in the soil near the roots of the rose plant. The ESP32 microcontroller and relay module are mounted on the ceiling of the lower-tier rack. The ESP32 is a widely used IoT microcontroller due to its low power consumption and Wi-Fi connectivity, making it an efficient choice for real-time environmental monitoring . A more detailed illustration of the system is presented in Figure 4. User Interface of the Terrarium Controller Application The Terrarium Controller application features a user-friendly interface consisting of three main pages: the main page, the automatic watering page, and the dashboard page. Main Page: On this page, users can monitor key environmental parameters of the International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 terrarium, such as temperature, humidity, and soil moisture. There is a button that allows users to navigate from the main page to the automatic watering page, as well as a Dashboard button to switch to the dashboard page . Automatic Watering Page: This page allows users to set the watering duration in seconds. After entering the desired duration, users can save the settings by clicking the Save Settings button. This page includes algorithms to input the watering duration and store the value entered previously . Dashboard Page: On the dashboard page, the application retrieves sensor and actuator data from Firebase. The system then calculates the average values of air temperature and soil moisture and displays them on the dashboard . Figure 5. Terrarium controller app interface Testing Result Traditional Terrarium Care System Testing The traditional terrarium care system refers to the manual maintenance process, where the terrarium is cared for without the support of an IoT-based system. In this test, the researcher assumes the role of a beginner with limited knowledge of terrarium care. The serissa plant is used for testing, and the growing media includes pumice, crushed charcoal, cocopeat, fertile soil, peat moss . r humu. , and moss. The manual maintenance process involves tasks such as watering the plant, where careful and accurate data recording plays a vital role in ensuring the system's success. Proper documentation of environmental conditions and watering routines allows for informed decisions about plant care. By tracking these parameters, researchers can optimize the care routines, recognize patterns, and improve plant health. Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. The results of the manual maintenance testing are summarized in Table 2, showing the impact of manual care on the terrarium's environmental parameters and the plant's overall During manual maintenance, the researcher watered the plant once daily with a volume equivalent to half a small tea glass. Up to day 7, the plant showed normal growth, with new leaf buds sprouting and fresh leaves emerging. Watering was done because the external environment of the terrarium appeared dry, similar to the initial condition when the plant was first placed inside. However, by day 8, the environment inside the terrarium began to feel noticeably humid, and the moss on the surface looked significantly wetter than before. On day 9, thin threads resembling spider webs started to form around the plant's leaves, and some leaves began to fall off, though new buds continued to grow. On day 10, the condition remained unchanged, with increased leaf drop. Table 2. Manual Maintenance Data History Day Watering Information growth normally growth normally growth normally and new leaves is born growth normally and the environment looks good growth normally and the environment looks good growth normally and the environment looks good growth normally and the environment looks good the environment starts to look humid white threads appear that looks like a spider webs the leaves start to fall, but new leaf buds still grows More leaves falls the color of the stem and leaves darkens, and new leaves stop growing when watering, the front part of the soil collapses the plant starts to lose its leaves and is removed from terrarium for recovery In an attempt to address this issue, the researcher moved the terrarium to a location with better light exposure, but this did not lead to significant improvement. Initially, the soil's surface appeared normal and not overly wet. However, by day 12, visible moisture became At this point, the researcher refrained from watering. After three days without watering, on day 13, the plant was watered again. Upon watering, the soil at the front of the terrarium collapsed, revealing that the inner soilAiparticularly around the plant's rootsAiwas excessively wet. This hidden moisture was identified as the primary cause of the plant's declining health. Finally, on day 14, the plant was removed for recovery. A comparison of the plant's growth between day 1 and day 13 is shown in Figure 6. Monitoring environmental conditions in closed ecosystems like terrariums is crucial, as excess moisture can lead to fungal growth and root rot, and it happened in day-9 of this research as explain in table 2. Study . explain the effect of humidity in a closed terrarium Improper watering, particularly in enclosed environments, can create imbalances that negatively affect plant health. Previous studies have emphasized the importance of maintaining optimal humidity levels and ensuring adequate air circulation to reduce the risk of microbial growth and plant decay . International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 Figure 6. Day-1 and day-13 compartment IoT-Based Terrarium Care System Testing IoT-based terrarium maintenance involves continuous monitoring of environmental parameters, including air temperature, humidity, and soil moisture. Automated watering is facilitated by adjusting the watering duration through the mobile application. The plant maintained in this experiment is rombusa, which shares similar characteristics and environmental needs with serissa, the plant used in the previous manual maintenance test. The planting medium consists of pumice stone, charcoal chips, cocopeat, fertile soil, peat moss or humus, and moss. When compared to manual maintenance. IoT-based terrarium management provides several key advantages: C Precise measurement of environmental parameters: The use of sensors integrated with the Android application enables accurate monitoring of key environmental factors such as temperature, humidity, and soil moisture. This allows for automatic watering based on soil moisture levels as a reference point. C Optimized watering volume: By setting the watering duration in the Android application, the volume of water applied can be adjusted to optimize plant growth, ensuring that the plants receive the right amount of water without excess. This study aimed to determine the optimal watering volume required to ensure normal plant growth, in contrast to the manual maintenance approach previously employed by the Key considerations in this experiment included: C Calibration of soil moisture: The researcher calibrated soil moisture levels and established that the watering threshold occurs when soil moisture drops below 60%. Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. C Adjustment of watering duration: The researcher adjusted the watering duration to determine the optimal volume of water necessary to maintain adequate soil moisture levels conducive to plant growth. C Daily environmental parameter checks: Environmental conditions were monitored daily at 16:00 to ensure consistency in the data. Accurate monitoring and automation in agriculture have been shown to improve efficiency and plant health . A study in . demonstrated that the implementation of IoT-based soil moisture sensors optimized water usage and enhanced plant growth conditions, leading to improved crop health and resource efficiency. Similarly, research in . found that integrating IoT technology in smart farming allows for real-time environmental monitoring and automated control, further confirming the benefits of precision agriculture in increasing productivity and sustainability. The integration of IoT in plant care allows for real-time data collection and precise water management, effectively preventing issues like overwatering or underwatering common problems in traditional manual maintenance . Furthermore, automated irrigation systems contribute to maintaining stable environmental conditions, which are essential for plant growth in controlled environments such as terrariums . The record of IoT-based terrarium maintenance conducted in this study is summarized in Table 3. In the IoT-based terrarium maintenance system, environmental conditions are continuously monitored through the Terrarium Controller application. Irrigation is not performed routinely but is triggered only when the moisture threshold for automatic irrigation is reached. The first irrigation occurred on day 3, with a duration of 5 seconds. The minimum moisture level required to activate automatic irrigation was set at 60%, and after the 5-second irrigation, the moisture level increased from 58% to 69%. The next irrigation took place on day 6, with the same 5-second duration, increasing the moisture level from 59% to 71%. Throughout this period, plant growth appeared normal, with flowers and new buds continuing to develop. Table 3. IoT-Based Maintenance Data History Day Watering Soil moisture (%) Before After Plant condition growth normally flower buds starts to grow Growth normally 2 flower buds starts to bloom new flower buds and branches start to grow 1 flower buds starts to bloom new leaves grows growth normally soil moisture is high, a bunch of leaves is fallin the plant start to grow normally again, 1 flower is bloom The flower buds grows, and new leaves grows The flower buds blooms growth normally growth normally new leaves grows growth normally International Journal of Electrical. Energy and Power System Engineering Vol. No. February 2025 e-ISSN: 2654-4644 Subsequently, the researcher increased the irrigation duration to 15 seconds to observe the impact of higher soil moisture on plant growth. On day 8, the irrigation duration of 15 seconds raised the moisture level to 8285%. The following day, some leaves started to drop, although new leaf buds continued to grow. Recognizing that excessive moisture negatively affects rombusa plants, the irrigation duration was reduced back to 5 seconds. To further reduce soil moisture, the terrarium was relocated to a spot with higher light intensity and better air circulation. By day 10, the plant showed signs of recovery, and its growth returned to normal. No further automatic irrigation was needed until day 14, as the moisture level remained stable, and growth continued normally. Based on these observations, it can be concluded that the optimal soil moisture range for healthy plant growth is between 60% and 75%. This condition was maintained with an automatic irrigation duration of 5 seconds. Based on these observations, it can be concluded that the optimal soil moisture range for healthy plant growth is between 60% and 75%. This condition was maintained with an automatic irrigation duration of 5 seconds. When the irrigation duration was increased to 15 seconds, the plant exhibited signs of stress due to excessive moisture, evidenced by leaf drop the following day. Monitoring and managing optimal moisture levels are crucial in IoT-based agricultural Previous studies have demonstrated that excessively high soil moisture can lead to root rot and hinder plant growth . Moreover, the use of sensors in smart farming systems allows for more precise control of irrigation, reducing the risks of overwatering or underwatering . With IoT systems, environmental conditions can be monitored in realtime, enabling rapid responses to changes that could affect plant growth . A comparison of the plant's growth between day 1 and day 14 is shown in Figure 7. Figure 7. Day-1 and day-14 compartment Received: January 28, 2025. Revised: February 25, 2025. Accepted: February 28, 2025 https://doi. org/10. 31258/ijeepse. IJEEPSE Ae Vol. No. February 2025 https://doi. org/10. 31258/ijeepse. CONCLUSION The implementation of an IoT-based system in terrariums significantly simplifies plant care and enhances plant growth compared to traditional manual methods. This conclusion is supported by a 14-day experimental comparison, where the plant in the IoT-based terrarium exhibited superior and more sustained growth, while the plant in the traditional system showed signs of decline. A similar study by Kurniawan and Sanjaya . further validates these findings, demonstrating that an IoT-based terrarium system integrating an adaptive hysteresis regime and data fusion techniques significantly improves plant growth rates compared to conventional manual care methods. Furthermore, the integration of IoT technology with an Android application greatly enhances the convenience of terrarium plant care, particularly for beginners. The automatic irrigation system and real-time environmental monitoring provided by the application contribute to more efficient and precise plant growth Additionally, the IoT system enables users to identify and maintain optimal environmental conditions for plant health. This study found that the ideal soil moisture level for rombusa plant growth in a terrarium ranges between 60% and 75%, with an average of 65% recorded over a 16-day period. These findings highlight the critical role of maintaining proper soil moisture in ensuring healthy and sustained plant growth. ACKNOWLEDGMENT The author sincerely acknowledges and expresses gratitude to all the lecturers who, as coauthors, have contributed to this study. Their invaluable guidance, support, and assistance throughout the research process, from the initial stages to the completion of this work, have been indispensable. Special thanks are extended to those whose expertise and encouragement have greatly enhanced the quality and success of this research. The author also appreciates the cooperation and feedback from colleagues and participants involved in the study, as well as the institutions that provided the necessary resources for the research. REFERENCES