Automation of aquaponics systems through integration of RTC modules, turbidity sensors, and water level sensors

ABSTRACT


INTRODUCTION
In the modern agricultural era marked by demands for sustainability and efficiency, integrated approaches such as aquaponics systems are increasingly receiving attention.This system, which combines fish and plant farming in one controlled environment, promises high resource efficiency and sustainable food production.As technology develops, automation becomes a critical point to improve the control and sustainability of aquaponics systems.Aquaponic systems, as an innovative form of sustainable agriculture, combine integrated plant and fish farming, creating a symbiotic environment where fish nutrients are used as a source of nutrients for plants, while plants clean water for fish.Although this concept promises high efficiency and productivity, the main challenge in its operations is the lack of adequate automation.The basic human need that must be met at all times is the issue of food [1].Food plays a very important role in the life of a nation, the emergence of economic instability due to the availability of food that is smaller than its needs.As a result, various social and political turmoil can also occur if food security becomes disrupted, because the impact that can be seen today is that food crises can threaten Indonesia.Efforts that can be made by various parties to start saving and growing local food, it takes a long process to create awareness of community members to be able to realize this activity, take advantage of living at home with gardening and budidya fish One way to fix one of the problems in urban areas is food security, in line with regulations set by the Minister of Marine Affairs and Fisheries of the Republic of Indonesia Number 17 / PERMEN-KP / 2020 on the Strategic Plan of the Ministry of Marine Affairs and Fisheries In 2020-2024, it states that the strategic target of fulfilling fish consumption per kilogram per capita in 2020 is targeted at 56.39 kilograms, and in 2021 at 58.08 kilograms [2].Of course, with this target, efforts are needed to provide fish to the community in order to meet sufficient amounts, especially in areas that do not have fishing areas (ground lock).Like the sea, alternative sources of fishery product provision are expected to come from freshwater fish farming activities through fish farming systems in ponds or aquaponics [3].Freshwater fish farming and maintenance generally require land as a development location, food needs are increasing, but narrow land in urban areas is a problem for urban people because they cannot garden and raise fish, only narrow land use is through the aquaponics system, The basic concept of aquaponics is that the waste produced by fish (for example, fish excrement) becomes a source of nutrition for plants, The plant then takes those nutrients, cleans the water, and returns them to the culture system for reuse by the fish [4].
One type of fish that is easily grown in an aquaponics system is tilapia.Indigo (Oreochromis niloticus) Being one type of fish that is widely consumed and quite economical [5].This tilapia also contains nutrients needed for the human body, such as carbohydrates, proteins, fats, calcium, phosphorus, and iron [6].In addition, tilapia is also one of the main commodities in the national program [7].Fish contribute the N or P element to fish excrement and feed waste, bacteria convert fish feed and feces into nitrates, substances that serve as sources of nutrients for plants, while plants supply toxic gas-free water from metabolic waste that domestic fish during rearing, through the process of using nitrogen (NH3-N, NO2-N and NO3-N) and carbon dioxide (CO2) produced from fish farming.Fish excrete 80-90% ammonia through osmoregulation, while feces and urine excrete 10-20% of total ammonia nitrogen.Total ammonia-nitrogen (TAN) consists of non-ionized ammunition (NH3) and ionized ammonia (NH4), which is the result of protein metabolism [8].In addition to the narrow land in urban areas for tilapia cultivation, farmers also experience problems when cultivating tilapia both on a large scale and in aquaponic systems.The problems include unstable freshwater temperatures for tilapia, so that tilapia growth is hampered.The sensitivity of water to the value of solid particles in water must be stable, and the level of pH of the water and the turbidity of the water also affect the growth rate of tilapia [9].
Given the problems raised, the purpose of this study is expected to overcome these problems.The innovation used relies on coordinated IoT (Web of Things), this system is equipped with sensors and modules that can measure water turbidity, water level detection, which can be monitored in real time using mobile devices such as website-based smartphones, and technology using RTC modules for automatic feeding based on a predetermined time, with the monitoring and control system can make it easier for fish farmers to monitor and take early action if the condition of the aquarium water is abnormal, so as to reduce the risk of crop failure, besides that in addition to IoT technology there is also a portable system in determining the position of this aquaponics (for example, inside or outside the home).
Many explorations have been completed to provide a solution, one of which has been completed is a Smart Growbox System Design, an IoT system that uses Arduino Uno as a microcontroller, then paired with ethernet shiled in order to function as a cloud server for its IoT system (Literature 1) [10].The main limitation of this study is the speed limitation, and the connection still uses superior communication technologies such as using ESP32 to ensure a faster and reliable connection.The use of IoT in aquaponics uses raspberry pi as an IoT support stage or as a sensor receiving server and some other sensor assistance as data reading, some sensors are used such as light sensors, ultrasonic temperature.(Literature 2) [11].The main limitation of this study is the high power consumption, because the Raspberry Pi tends to have a higher power consumption compared to RTC modules and special sensors.This can increase operational costs and require more intensive energy monitoring.There is research on PTurbidity Sensor Measurement and Water Level Measurement in IoT Systems.Water turbidity monitoring system in aquaponics using Arduino Uno which does not use an Androidbased monitoring system (Literature 3) [12].A major limitation of the study is the limited functionality of Arduino Uno in processing and storage capacity, which may not be sufficient to efficiently manage and store water turbidity and water level sensor data.In addition, there is research on Bangkok Tilapia Pond Remote Monitoring System Internet of Things (IoT).The esp8266 node-based MCU is performed by (Literature 3) [13].The limitation in this study is that it still uses ESP8266 so it still has limitations in data processing and storage capacity.This can be a bottleneck when handling complex data from aquaponic sensors.There are studies that use water quality monitoring systems in freshwater fish ponds based on water level measurements, based on water turbidity Mobile Website by using Arduino Uno and wifi 8266 as microkontoller (Literature 4) [14].The limitations in this study also have limitations in processing and storage capacity.This can be a bottleneck when handling more complex sensor data and water quality information.Research on this system can monitor the condition of pool water automatically and in real time using one of the mini computers, namely the Raspberry Pi with technological developments in the Internet of Things (Literature 5) [15].The limitation of this study is that the Raspberry Pi tends to have higher power consumption compared to RTC modules and special sensors.This can increase operational costs and require more intensive energy monitoring.In addition, there is related research, namely IoT technology for monitoring the water quality of Betta fish farming using turbidity sensors [16].Design of the water level control system in tilapia farming using Esp8266 as the microcontroller and the water level sensor to measure the water level (Literature 6) [17].The limitation in this study is still using water level sensors so that monitoring is not optimal.As for the title of the study Choy Sum and Nile Tilapia Aquaponics Automation Using Arduino Microcontroller using the main tools used to build this automation including Arduino ESP-32, GY-302 Ambient Light Intensity Sensors, DFRobot Gravitation Analog pH Sensor, DS18B20 temperature sensor, DC 3-6V DC motor R140, 12V Channel 6 relay module, DS130 and SR04 RTC Module Ultrasonic censorship (Literature 7) [18].
The aquaponics research was conducted by Zulfikar, Ahmad Muslih, Khoirun Nisak, Ana Fitria with the title "Training in Making Simple Aquaponics for Optimization of Narrow Land in Pulorejo Village, Tembelang Regency" in the study.It was observed for 1x24 hours on Friday, November 12, 2021 in East Java Province, which is an area that has abundant wealth in Indonesia [19].The environment is the unity of space with all objects and the unity of living things including humans and their behavior that carries out the life and welfare of humans and other living things.Humans as the masters of the environment on earth play a major role in determining environmental sustainability [20].Therefore, the study found that the village has land potential to produce aquaponics, but the community is expected to have innovations to develop hydroponics or aquaponics with a more modern concept to support the economy and food needs of the community of Perlang village in the future.Based on these problems, IoT technology is needed to solve problems and problems from observations made and support Indonesia's program for the industrial revolution 4.0 which was also conveyed by the Minister of Industry, Airlangga Hartarto.He said that Indonesia can compete with other countries in the industrial field, and that Indonesia must also follow the trend."The Industrial Revolution 4.0 is a transformation effort towards improvement by integrating the online world and production lines in the industry, where all production processes run with the internet as the main support" [21].
The hardware design starts with the creation of NFT (Nutrient Film Engineering) modules.NFTs are systems that use a "film" of nutrient solution.A thin film or layer is a nutrient solution 1-3 mm thick, pumped and flowed through the roots of plants continuously at a flow rate of about 1-2 liters per minute [22].According to S. Wibowo and A. Asriyanti, the more inclined the gutter, the higher the productivity of plants.The advantages of using this method include making it easier to control the root area of plants, water needs are met well and easily, uniformity of nutrients, and the level of concentration of nutrient solutions needed by plants can be adjusted to the age and type of plant, low maintenance, relatively more protected from pests and diseases, and does not require special fertilization.While in aquaculture, the author uses the sump filter method to drain the water into the bucket tube, but by replacing the camber with a bucket tube, the water that has been flowed into the bucket tube will be pumped up to drain water into the aquaponics pipe [23].

METHOD
In this section, the method implemented in this study is designed to achieve optimal integration between RTC modules, turbidity sensors, and water level sensors in order to improve the automation of aquaponic systems.Our methodological approach includes careful steps to integrate the hardware and software involved, as well as accurate data collection methods to evaluate system performance.The following is a detailed description of the methodological steps adopted in this study to design, implement, and test this innovative aquaponics automation system.

Components
In this chapter, the author will explain the results of testing tools that have been designed along with discussions to find out the results of designing and implementing the tools carried out.The table and discussion below are data from sensors implemented in IoT systems in modern aquaponics: This research uses esp32 microcontroller and Arduino UNO as well as several sensors such as turbidity sensors, Water Level, RTC modules.There are also several supporting components such as Power Supplay, StepDown, Relay, Buzzer.
As a microcontroller, ESP32 is used to control various electronic devices and other sensors, as shown in Figure 1.The RTC module is used for RTC (real time clock) or digital timing to be used to provide time conditions for when to fish automatically based on the time specified by the rtc module, as shown in Figure 5.
Figure 5. RTC module Relays are used to connect or disconnect electrical current to a circuit when a specific control signal is applied, as in Figure 6.Power supply that functions as the sum of all power of all components so that the electronic circuit can work.Power Suppy is an important component in tool design, as shown in Figure 8.The Arduino IDE, as an integral software development software in the context of aquaponics farming, plays an important role in designing and implementing system control programs.Using the Arduino IDE, intelligent programs are built to integrate RTC modules, turbidity sensors, and water level sensors.The selection of Arduino IDE as a development platform highlights the flexibility and ease of creating responsive microcontroller-based solutions, forming a solid foundation to achieve effective automation in aquaponics systems, such as, in Figure 9. Fritzing software is an invaluable tool in the visualization and design of electronic circuits for aquaponics systems.Using Fritzing, the author can clearly describe the connection and layout of the hardware, from the integration of the RTC module to the turbidity sensor and water level sensor.The advantages of visualization provided by Fritzing play a crucial role in facilitating understanding of aquaponics system design, connecting each element clearly and providing a solid foundation for hardware implementation, as in Figure 10.

Flowchart
The development of automation systems in aquaponics involves the integration of RTC modules, turbidity sensors, and water level sensors requiring systematic and structured design.To give a visual overview.Below is a flow chart of the running of an aquaponics system and a flow chart of how the system can process displaying sensor data to a smartphone, which can be seen in Figure 2: Here is the flow chart description in Figure 9: 1) Initial initialization: The system starts by connecting to esp32, then the turbidity sensor and the water level sensor are physically and logically connected to the esp32 pin pin.2) The system determines the value: The system continues to determine the value after it is detected with water, The next step is executed.3) Data collected and sent: After determining the value, the data is collected and sent to esp32 in the form of packages to be prepared for delivery, then the data is sent to a smartphone via a wireless connection such as wifi.4) Data received: then the data sent esp32data will be received in the database, and data processing occurs for the purpose of being displayed on the smartphone.5) Results appear on the smartphone: The data received by the smartphone is processed and displayed in a form that can be understood by the user through the user interface.
Figure 13.Flowchart how the system works in the process of displaying data to a smartphone Here is the flowchart description in Figure 13: 1) Initialization: The system starts by connecting to esp32, then the water level sensor measures the water level and is ready to receive data from the sensor.2) Water-level sensor reading: The sensor reads the water level measured by the water level sensor, and the water level data is received and calculated.3) Sensor conditioning: after receiving the sensor data, the system checks that the water level is equal to 4 cm, if yes, the system turns off the sounding buzzer, and if it is more than 4 cm, the system activates the buzzer.4) Data sent and received: then the data sent esp32data will be received in the database, and the data process occurs for the purpose of being displayed on the smartphone.Here is the flowchart description in Figure 14: 1) Initial initialization: The system starts with the RTC Module DS3231 readout.
2) Adjusting time conditions: The system checks the time read from the RTC, if the time to feed has arrived next execution.3) Active servo motor: after the time arrives according to predetermined conditioning, the servo motor will be active to drive the feeding mechanism.4) Automatic feeding: then the system delivers feed automatically according to a predetermined schedule, and the servo motor rotates to open and close the feed door.
Figure 15.Flowchart of how the system works in the automated feeding process

Block Diagram
Block diagrams are a series that explains the design outline in this study.The mechanism of the tool to achieve the value is Water Level, as shown in Figure 16.Here is the flowchart description in Figure 14: 1) The 12V 20A is used as a device to convert AC current to DC.
2) The LM2596 is used as a mains voltage reducer.
3) NodeMCU ESP 32 is used as a microconnector to connect to the sensor and serves as a Wi-Fi signal receiver that the user connects to the device via the Internet network.
4) Arduino UNO is used to transmit serial data from the Turbidity sensor and the Water level sensor to ESP32 so that sensor values can be displayed on the website.5) Relay is used for microcontroller-controlled automatic switch.6) Turbidity sensors are used to detect water turbidity in aquariums of tilapia.
7) The water level sensor is used to detect the water level in the aquarium filter.8) The RTC module DS3231 is used to measure digital time for automatic feed purchase.9) The buzzer is used as an alarm if the water level filter touches the water level sensor.

Test Plan
Evaluate the timeliness of RTC (Real-Time Clock) module synchronization in managing operational schedules, test the turbidity sensor's response to variations in water turbidity by considering temperature changes and calibration continuity, and measure the ability of water level sensors to detect water level changes precisely, to ensure successful automation of aquaponics systems.

RESULTS AND DISCUSSIONS
In the results of the research discussion on aquaponics system automation through the integration of RTC modules, turbidity sensors, and water level sensors, operational sustainability and system efficiency are the main highlights.Through successful integration, the system is able to provide accurate timing, real-time monitoring of water quality, and precise water level management.An in-depth analysis of the test results highlights the significant benefits derived from implementing this technology in the context of sustainable agriculture.

Testing
The first test was carried out by experimentally displaying turbidity sensor data and water level sensors in the smartphone, to determine whether there was an error in sending data from the Arduino uno and esp 32 microcontrollers into the database and then displayed to the smartphone, the successful display of sensor data displayed on the smartphone can be seen in Figure 18 below.The experiment was carried out over five days to test the response of the turbidity sensors to variations in the turbidity of the water in aquaponics systems.Measurements are made periodically and the results are recorded in Table 1.These measurements provide a deeper understanding of changing water conditions over time, enabling early identification of changes in water quality that may affect fish health.These data form the basis for decision making and corrective actions taken to maintain aquaponics environmental conditions within optimal limits.The turbidity sensor testing was carried out for 5 days with a daily sensor data collection, the day to the condition of the fish stress due to the water turbidity in fish caused by soil from vegetables and the water required to drain the water so that the turbidity returned to the optimal range, which can be seen in Table 1.

Table 1. Turbidity sensor test results
This experiment was carried out by measuring the value of the water level sensor in the aquaponics system for five days.Table 2 displays the results of those measurements, along with sensor height values, water filter conditions, and associated buzzer status.Detailed observations of these values give an idea of how water levels change over time.
On day 4, it is detected that the water level is reaching the specified maximum limit (full water), and the buzzer status indicates that the water level is above the undesirable limit.These measurements reflect the success of the water level sensor in detecting full water conditions, and the corresponding buzzer response provides a warning signal.This information becomes the basis for the arrangement, and the action of this test will reduce the risk that the water filter container becomes full so that the aquaponics system improves.The water level sensor test was carried out for 5 days with a daily sensor data collection and the cause of day 4 of the full filter water container due to incorrect installation of the water palaron, which can be seen in Table 2.
Table 2. Water level sensor test results Table 3 is the result of the test of the DS3231 RTC module during three days of monitoring.Each monitoring time is scheduled for feeding (1st feed and 2nd feed).The results show that the DS3231 RTC module consistently ensures that the grantmaking schedule is met on a daily basis.This success confirms the accuracy and reliability of the RTC module in ensuring the synchronization of time required for efficient operation of aquaponics systems.This information contributes positively to the management of feeding times and schedules, which are crucial elements in the overall success of the aquaponics system automation.The DS3231 RTC module is used to manage scheduling on servos, as well as time storage.Where the RTC DS3231 Module will send the Arduino time scheduling program command to set the servo that functions for fish feed, the following are the test results of the DS3231 RTC Module, which can be seen in Table 3. introduction, this research focuses on the application of the Internet of Things (IoT) system in aquaponics with the aim of improving tilapia development and plant efficiency, as well as for efficient use of narrow land in urban areas.This effort was motivated by a desire to introduce IoT frameworks as a potential solution to more effective monitoring and management.The results of this study reveal several important aspects that can be concluded that the implementation of IoT systems in aquaponics allows monitoring environmental parameters such as water turbidity, measuring the level in water, and feeding automatically based on a predetermined time.This increases the efficiency of monitoring aquaponic conditions.With accurate data collected, farmers can take faster and more precise action when there are changes in environmental conditions.Better control helps prevent extreme fluctuations that can negatively impact fish and plant growth.And IoT implementation can help ensure that environmental parameters are always within the optimal range according to the needs of tilapia and plants.In this case, it is expected that from previous tests, the test results will prove the optimization of the performance of the aquaponics system.This includes efficient use of resources, stability of the aquaponics environment, and the ability of the system to respond quickly to changing conditions and be easily usable by users, including in terms of installation, day-to-day operation, and routine maintenance.This has the potential to increase the productivity and quality of agricultural products.The research also confirms that IoT technology can play an important role in improving sustainability in aquaponics aquaculture.By avoiding wastage of resources and reducing risks to the environment, aquaponics becomes more environmentally friendly.On the basis of the results and discussion, development prospects include increased integration with artificial intelligence (AI) technology and human artificial awareness.This step can result in a more automated and adaptive aquaponics management system, improving efficiency and responsiveness to complex environmental dynamics.This prospect is in line with the research direction for agricultural technology and sustainability.
Further studies can further explore the implementation of IoT technology on a broader scale, involving more environmental variables and plant/fish species.Additionally, integration with AI technology can be improved to provide more accurate predictions and more sophisticated automation.

Figure 1 .
Figure 1.ESP 32 As a microcontroller Arduino UNO is used to transmit the temperature sensor and the water level sensor values to ESP32 by parsing the data, as shown in Figure 2.

Figure 2 .
Figure 2. Arduino UNO This sensor is used to measure the quality of the water by detecting its turbidity.Detecting suspended particles in water by measuring transitance and scattering of light directly proportional to the total rate of suspended solids (TTS).As in Figure 3.

Figure 3 .
Figure 3. Sensor turbidity dfrobotThis tool is used to measure the value of the water level and find the state of the water in the aquarium and display the condition of full or not full water through the website.as in Figure4.

Figure 6 .
Figure 6.RelayThis tool is used to lower or reduce the higher input voltage to a lower output voltage level according to the established configuration, as in Figure7.

Figure 12 .
Figure 12.Tool design top view and rear view

Figure 14 .
Figure 14.Flow diagram of how the monitoring system works in the process of the water level sensor

Figure 18 .
Figure 18.Display sensor data on the web

Table 3 .
DS3231 RTC module test result4.CONCLUSIONThis research applies the application of the Internet of Things (IoT) system in the development of current aquaponics to expand the development of tilapia (Oreochromis niloticus) and plant efficiency, In the