Design and Implementation of an Aquarium Automation System Using a NodeMCU

. Ornamental fish enthusiasts are sometimes busy with matters that take a long time to handle so they do not have time to care for their pet fish. Therefore, automation in maintaining fish in the aquarium is needed. This study aims to make it easier to maintain ornamental fish in the aquarium by automated feeding activities, replacing water, and adjusting water temperatures. This automation uses the prototype method so that it is easy to improve continuously. The data collection is done by collecting several articles related to the title taken by the author. NodeMCU is used as a temperature sensor data reader, pH, ultrasonic and servo data receiver, relay to turn on the valve, pump, heater, and fan. The results of the data will be sent wirelessly to smartphones via the Blynk application. The result of this study is a tool that can feed fish according to a predetermined schedule, replace water according to the acidity of the water's pH and adjust the temperature to its natural habitat. Thus, this automation tool will be useful for fans who are busy with their work, especially those who often go out of town for days.


Introduction
Considering the function of ornamental fish to be enjoyed for its beauty, the management of its health is very important, the condition of an unhealthy or sick ornamental fish will have an impact on its beauty [1]. Ornamental fish are usually very sensitive or sensitive to changes in water quality and temperature, so some things must be taken care of so that ornamental fish can grow and be healthy, by managing the schedule of feeding time, acidity or pH of the water and water temperature to maintain the body resistance of ornamental fish in the aquarium [2].
Obstacles in maintaining ornamental fish usually occur when ornamental fish enthusiasts are busy with other matters and do not have time to control the fish feeding schedule, the state of the aquarium water which makes the fish limp and susceptible to parasites so that the ornamental fish is stressed that can result in death [1]. Therefore, fans of ornamental fish need a tool that can help them maintain fish in the aquarium that can be done remotely.
Based on a research conducted by Rizko Oktaprianna, Yamato, Bloko Budi Rijadi entitled "Smart Aquarium Design Using Arduino Atmega 2560 Based on the Internet of Things (IoT)," the tools they designed can read indicators of water volume, water temperature, water pH, can feed automatically. and can turn on and off devices contained in the aquarium such as ultraviolet lights, pumps, and heaters. The tools can work manually or automatically through a box control panel and a smartphone [3].
Different from the previous studies, this research includes automatic feeding according to a predetermined schedule, automatic water replacement based on pH acidity, and temperature control to adjust its natural habitat, which can be controlled using a smartphone.
Ornamental fish enthusiasts need for an aquarium that can monitor water conditions and can also feed fish in the aquarium automatically at a predetermined time. This automatic tool can help and expedite the owner's activities so that he does not have to worry about forgetting or having to be there when it is feeding time, and he can also know the condition of the aquarium water so that he can maintain the health of the fish in the aquarium.
Therefore, the research is entitled "Design and Implementation of Aquarium Automation Systems Using NodeMCU" in the hope of helping to care for ornamental fish in the aquarium, so that it can feed fish automatically and monitor water conditions. With this tool, it is hoped that that fish can grow according to its age and can always be in good health.

Previous relevant studies
The research by Rizko Oktaprianna, Yamato, Bloko Budi Rijadi entitled " Smart Aquarium Design Using Arduino Atmega 2560 Based on the Internet of Things (IoT)" was designed with a tool that can read indicators derived from various sensors installed therein such as water volume indicators, water temperature, and water pH. Also, this tool can provide feed automatically and can turn on and off devices found in the aquarium such as ultraviolet lights, pumps, and heaters. It can also work manually or automatically by controlling it through a box control panel and a smartphone [3].
The research by Prof. Arun S Tigadi, Tejaswini Khilare, Nayan Kesarkar, Zaid Kittur, Tejas Kambale entitled "Aquarium Automation Usiong IOT" designed a water temperature control device, aquarium environment lighting, fish-eating, water level sensing all automatically controlled by Adafruit Io dashboard. The lighting system can also be manually controlled where users can turn on and off the lights via Google Assistant/button provided on the dashboard [4].
The research by Ahmad Suci Ramadona, Edy Victor Haryanto, M. Rusdi Tanjung entitled "Automated Aquarium Water Replacement Design Based on Microcontroller Atmega8" applied an Automatic Aquarium Water Replacement tool. This designed tool uses RTC and turbidity sensors to determine when the tank water must be replaced, and 2 mini water pumps are used to drain and fill the aquarium water [5].
The research by Budi Santoso, Agung Dwi Arfianto with the title "Automatic Aquarium Water Replacement System Based on Turbidity and Freshwater Fish Feeder Using Microcontroller ATMEGA 16" designed a turbidity detection device and fish feeder in a freshwater aquarium that consisted of a series of sensors to detect turbidity, and the ATmega16 microcontroller as the control center on the sensor, and the DC motor driver functioning as an open and close food box. The substitution of water is controlled by a water pump based on the level of light intensity received by the LDR. The fish feed system is based on the time input by the owner [6].
The research by Eltra E. Barus, Andreas Ch. Louk, Redi K. Sengka entitled "Automated pH Control System and Temperature Information in Aquarium Using Arduino Uno and Raspberry Pi 3" designed an automation tool to control pH levels and temperature information. The pH level is measured by using a pH sensor E-201-C and the temperature is measured by using a DS18B20 sensor. The pH control process is done by adding liquid pH up and pH down and equipped with a solenoid valve [7].

Definitions of terms
Aquarium comes from Latin aqua which means water and rium which means a place, so it can be defined as "a place for fish, plants and aquatic organisms to be seen". Aquariums with materials from glass are very commonly used in the maintenance and cultivation of ornamental fish. This container is very good because besides being easy to make, it is also easy to manage because fish are easily seen from the outside, making it even easier to monitor the fish inside. Aquariums are also not difficult to make and can be arranged to save space. They can be moved according to place and taste. Placement in the room can also be managed easily [8].
NodeMCU is an IoT platform that is an open source. It consists of hardware in the form of System on Chip ESP8266 from ESP8266 made by Expressive System. NodeMCU repackages ESP8266 to a board that has been integrated with various features like a microcontroller and assessable to Wi-Fi and a communication chip in the form of USB to serial. Thus, the programming only requires a USB cable. Because the main source of NodeMCU is ESP8266, which is the ESP-12 series, including ESP-12E, the function of NodeMCU will be more or less like ESP-12. It is like the 10 GPIO Port features of D0 -D10, PWM Functionality, I2C and SPI Interfaces, and 1 Wire 5. ADC Interface [9].
pH is the degree of acidity used to inform the acidity or basicity of a solution. It is defined as the dissolved hydrogen ions (H +) activity algorithm. The hydrogen ion activity coefficient cannot be measured experimentally, therefore its value is based on theoretical calculations. The pH scale is not an absolute scale. This refers to a set of standard solutions, whose pH is determined by international agreements. If the pH 7 of the solution is neutral, the pH below 7 solutions is acidic, and the pH above 7 solutions is basic [10]. DS18B20 temperature sensor is a sensor with output operations in a digital form by using only one cable or also called a 1-Wire bus that uses the one wire protocol. This protocol only requires one cable for data (and ground) connected to the microcontroller. Thus, one Wire protocol can be utilized to operate many DS18B20 sensors at once with the same connecting cable [11].
Ultrasonic sensor HC-SR04 is a sensor that works by emitting a wave and then calculating the reflection time of the wave. The advantage of this sensor is that it only requires 1 signal (GIS), in addition to 5 V and a ground path. Ultrasonic sensors detect the distance of an object by emitting ultrasonic waves (40 KHz) and then detect the reflection. The PING sensor emits ultrasonic waves according to the control of the controlling microcontroller [12].
Relay is an electrically operated switch and is an Electromechanical component consisting of 2 main parts namely Electromagnet (Coil) and Mechanical (a set of Contact Switches/Switches). Relays use the Electromagnetic Principle to move the Contact Switch so that with a small electric current they can conduct electricity with higher voltage [9].
A pump is a machine or mechanical device used to move fluids from the lowlands to the highlands or to flow liquids from the low-pressure zone to the high-pressure zone, and it functions as a flow amplifier in the pipeline. This is achieved by creating low pressure on the inlet side and high pressure on the outside or pumping out of the pump. The pump can also be used in processes that require a high hydraulic pressure. This can be found among others in heavy equipment. The use of pumps for this purpose is the Aquarium Water pump [13].
DC fans are components that require a voltage current to move. Therefore, in this system DC fans have their own movers to regulate their speed [14].
A heater serves as an aquarium warmer. The atmosphere in the aquarium is made warm so that fish can develop properly. The temperature setting of each fish is not the same, but it should be adjusted according to the type of fish in the aquarium [15].
A solenoid valve is a valve that is controlled by AC and DC electric current through a coil / solenoid. This solenoid valve is most used in liquid systems such as in pneumatic systems, hydraulic systems or in machine control systems that require automatic control. It has two ways of working, namely NC and NO. Thus, the function is only to close / open the channel because it only has 1 inlet hole and 1 outlet hole, or in the solenoid with three channels with 1 inlet hole, 1 outlet hole, and 1 exhaust / exhaust. The inlet hole functions as the entry of the fluid, while the outlet hole functions as the discharge of the fluid, and the exhaust functions as the discharge of the trapped fluid / liquid. These three channel solenoids are usually used or applied to pneumatic actuators [16].
Servomotor is a direct current motor that is regulated and controlled by an electric current. This standard machine has three slip positions: 0, 90 and 180 degrees. The shaft of the servo motor is usually connected to another mechanism of motion [11].
To start the Arduino program (to make it do what we want), we use the Arduino IDE (Integrated Development Environment). It is an open-source piece of software that allows us to program the Arduino language in C. The IDE allows us to write a program step by step and then to upload the instructions to the Arduino board [17].
Blynk is an application service used to control microcontrollers from internet networks. The application submitted by Blynk himself must still be arranged as needed. The use of the Blynk application in this study is based on the easy implementation of the Blynk program with a microcontroller, the ease of installation on a smartphone, the preparation of the application display that can be adjusted according to taste, and the Blynk application is free [18].

Research Methods
The research methods used by the authors for this study are:  Literature study: At this stage, the researcher searches for and collects several existing article papers related to the title.  Literature review: At this stage, the researcher identifies gaps, avoids re-making, identifies methods that have been done, and combines and develops from an existing research.  Prototyping: It is an iterative process in developing systems where requirements are changed into working systems that are continuously being improved through collaboration between users and analysts.
The prototype can also be built through several development tools to simplify the process. define the format of all software, identify all needs, and outline the system to be made.  Building prototyping: Building prototyping is done by making temporary designs that focus on serving customers (for example by making input and output formats)  Evaluate prototyping: This evaluation is carried out by the customer whether the prototyping that has been built is in line with the wishes of the customer [19].

System Design
Circuit schematic and hardware block diagram consist of NodeMCU microcontroller components, pH sensor, DS18b20 temperature sensor, ultrasonic HC-SR04 sensor, 4chanal relay, servo, solenoid valve, water pump, heater, and fan. The systems used in this schematic are feeding systems, water replacement, and temperature adjustments.

System Testing
To find out the work of the tool that has been made, the tool work testing is done manually. The tool is mounted on the side of the aquarium measuring 30cmx30cmx50cm.
Testing of fish feeding is done by filling in the time of feeding or it can also be done by pressing the manual feed button. Servo motors that have been connected to the assembled feedlot will move the fish feed according to the feeding time. After testing, when doing the experiment 4 times the tool always works by following the scheduling time of feeding that has been set, and after the device does the feeding, the smartphone will get a notification that the activity is done.
Water replacement testing is done by means of a sensor dipped in aquarium water if the pH value is smaller or greater than normal pH. The pump is turned on to make a reduction in water after the water level is read by an ultrasonic sensor 15. The pump is off, and the valve is open to refill the water until water level 2 valve closes. After testing, the replacement of water will work if the water pH is below the value of 5 and above the value of 8, and after the device replaces the water, the smartphone will get a notification that the activity is carried out.
Temperature control testing is done using a sensor dipped in aquarium water if the temperature value is lower than the normal temperature specified by the user, then the appliance will activate the heater connected to relay 3. If the detected temperature exceeds the normal temperature, the appliance will activate the connected Fan with relay 4. After testing, the heater will be active if the temperature sensor gets a value below 24, and the heater will be inactive when the temperature sensor gets a value of 26. If the temperature sensor gets a value above 28, the fan will be active until the temperature is at a value of 26. The fan is inactive, and after the device makes the temperature adjustment, the smartphone will get a notification that the activity is done.

Conclusion
Based on the results of the design, manufacturing process, and discussion of "Design and Implementation of an Aquarium Automation System Using NodeMCU", several conclusions can be drawn as follows: First, the use of fish feed automation tools, aquarium water replacement, and water temperature control is more efficient than the manual one because it can expedite the users' activities, especially for fish keepers who often leave town or leave the aquarium for days.
Second, the automatic feeder works according to the scheduled time. This tool only replaces water according to the acidity of the pH of the water and has not been able to overcome aquarium cleaning.
Last, when the equipment is feeding, changing the water and adjusting the temperature of the device will be notified through the smartphone that the activity is being carried out.