Monitoring System of Fisheries Water Quality Based on Microcontroller

A prototype of the water quality online monitoring system with Temperature, DO, Ph and ATMega 328 microcontroller-based salinity monitoring has been made. Initial detection of water quality, through (a) sensor integration to the ATMega 328 microcontroller system and (b) ATMega 328 microcontroller programming for system operation.Integration of the sensor into the microcontroller system, in the form of: (i) utilization of pins on the microcontroller board for conductivity sensors only 4 of the 8 pins are available, each of which is used for data (pin-1), clock (pin-3), ground (pin -4), and +5 volt dc power supply (pin-8); (ii) the port on the microcontroller board for the thermistor, namely C-port (PC) with PC0 for reading and writing data, while PC1 is used to synchronize the communication process router to the website and (iii) the five main ports on the ATMega 328 microcontroller board used,namely for: (i) 5 volt dc power supply at ATMega 328, (ii) conductivity and temperature sensors, (iii) pH sensors, (iv) DO sensors, (v) turbidity sensors, (vi) 2x16 LCDs and (vii) output. Programming the ATMega 328 microcontroller for system operation, planting Clanguage programs is carried out in eight stages, namely: (i) pin configuration, (ii) variable declaration (variable), (iii) declaration of constants (constants), (iv) initialization, (v) initialization, (v) ) main program, (vi) display, (vii) retrieve and send data, and (viii) output: Measurement of system performance in the form of a validation test by displaying Temperature, DO, pH and salinity values on the website with the lab-android.com page. Website pages are equipped with database, SQL, block diagrams and export and import data. Website can be accessed from a PC / laptop or mobile phone. Keywords— water quality, microcontroller, ATMega 328, website, data.


I. PRELIMINARY
The development of science and technology in this era is an important and inseparable factor in efforts to improve technology and the welfare of every society. As is the case with the level of community needs for tools that can work automatically, efficiently and save energy nowadays. Not only in large industries, medium industries, small industries, but also in households who want convenience and cost-effective in meeting their needs and completing work (Oktariawan, 2013).
Cultivation is greatly influenced by various factors such as land area, feed, stocking density and water quality. One factor that will be discussed is water quality. This water quality is very important to guarantee a healthy period of shrimp life from aquaculture (usually 100 days from vaname type shrimp). Water quality for aquaculture activities is affected by many factors, including temperature, pH, conductivity and Dissolved Oxygen (DO) parameters. In this study an online water quality monitoring system has been designed for aquaculture. Water quality monitoring in aquaculture is usually only done manually by taking water samples and then brought to the laboratory for analysis. The periodic monitoring process tends to be impractical, requires expensive labor costs, and a high level of human error. Another drawback is the limitation in storing large data, so it cannot be used as a prediction to study water quality characteristics in the area of cultivation. To overcome the problem of monitoring water quality manually, an online monitoring system was designed. ( In the online monitoring system that will be made this will include websites and android applications. By using the Android application will be easier because it can be monitored anytime, anywhere, and by anyone with an application that has been installed on his smartphone. Water quality monitoring data is obtained by using an Arduino microcontroller that will be connected to computers and mobile phones. The data generated can be recorded in a computer so that it produces an effective curve to see the development of water quality elements such as PH, DO, temperature and water salinity.
This tool is expected to reduce pond operational costs and is also expected to simplify pond management by adding a control system that will work automatically.

II. METHODOLOGY
This study consists of several stages of the procedure following the general pattern of scientific research as follows:

Literature review
This stage is carried out by tracing various sources on the internet and scientific journals to obtain data that supports and reinforces issues regarding the ATMega 328 microcontroller and sensors relating to this research. Connecting Arduino and data generated from sensors to the website.

Data collection
To collect data, the author conducted a field assessment to see how the conditions in the shrimp ponds and see if later this application can be compatible with existing field conditions.

System planning
In this case the system design method used the Waterfall method. The reason for using this method is the system used to design a system that consists of:

Arduino Uno
Arduino Uno is a microcontroller based board on ATmega328. This board has 14 digital input output pins (of which 6 pins can be used as PWM outputs), 6 analog inputs, 16 MHz crystal oscillator, USB connection, power jack reset button. These pins contain everything needed to support a microcontroller, only connected to a computer with a USB cable or a voltage source can be obtained from the AC-DC adapter or battery to use it. The top view of ATMega 328 can be seen in figure.

DS18B20 temperature sensor
Water temperature is very important to know the level of pollution experienced by water, because it can affect the life of organisms that are in it, because if the factory waste is carelessly discharged the temperature around the river tends to rise from normal limits, but the temperature of this water depends on the climate in the place itself and divided based on its deviations, to measure the temperature of this water using the DS18B20 shown in the figure.

Fig.3: Physical form of DS18B20 & Waterproof Probe
The DS18B20 temperature sensor is the latest series of digital temperature sensors from Maxim Integrated Products. This sensor is able to read temperatures with a precision of 9 to 12-bits, a range of -55 ° C to 125 ° C with accuracy (± 0.5 ° C). Each sensor produced has a unique 64-Bit code embedded on each chip, allowing the use of sensors in large numbers through only one cable (single wire data bus / 1-wire protocol). This is an extraordinary component, and is a benchmark for many temperature-based data logging and control projects.

PH Meter Sensor
A pH meter consists of an electrode (measuring probe) connected to an electronic device that measures and displays the pH value. The main working principle of the pH meter is located on the sensor probe in the form of a glass electrode by measuring the amount of H3O + ions in solution. The tip of the glass electrode is a 0.1 mm thick glass layer that is round (bulb). This bulb is paired with a non-conductor glass cylinder or an elongated plastic. The pH sensor core is located on the surface of the glass bulb which has the ability to exchange positive ions (H +) with a measured solution.

Fig.4: pH sensor
In the use of a pH sensor a calibration method is needed so that the sensor can be measured its level of accuracy, and can be accounted for, therefore a calibration powder is needed which has a level of accuracy ± 0.1 pH, which is mixed with aqua dm ie water that has been distilled twice as much 250 milli liters entered in the measuring cup, calibration powder has varying pH degrees of 4.00, 6.18 and 9.18.  .org/10.22161/ijaers.77.46  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 410

TDS Sensor (Total Dysollved Oxygen)
In measuring the TDS level, a TDS sensor module circuit is used. This module consists of a sensor module circuit and a TDS sensor signal conditioning circuit as shown in figure.

Fig.6: DFRobot Analog TDS Sensor Arduino
The workings of the circuit are started with the sine wave generation by the Wien Bridge Oscillator circuit with a 5.3 kHz oscillation frequency and then amplified by a large nonreversing amplifier whose gain is based on the magnitude of the resistance value obtained from the conductivity sensor output. The AC signal that occurs is converted into a DC signal to be processed by a microcontroller through the AC to DC signal converter circuit.

Router
TL-MR3020 allows users to directly setup their security by simply pressing the WPS button on the router and automatically establishing a secure WPA2 connection, which is more secure when compared to WEP encryption. Not only is it faster and safer than normal security setups but it is more convenient for users so there is no need to remember passwords. Compatibility is the most important aspect to consider when choosing a 3G / 4G router. To ensure the best compatibility between the router and modem you will use with the router, TP-LINK has made a 3G / 4G Router that is compatible with ISPs wherever they are used.

Hardware design and assembly (Modeling and System
Engineering) The device designed in this study was divided into four main parts, namely the sensor section, the processor section, the data sender section, and the output section. This device is also part of the processor consists of ATMega 328 which will regulate the work functions of the sensor system and give commands to the output device. A router is a device that functions to send data and connect to a computer network. While the output part consists of a PC / Laptop and LCD as a monitoring and control device that will display the results of data processing from the sensor readings.  Vol-7, Issue-7, Jul-2020]  https://dx.doi.org/10.22161/ijaers.77.46  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 411 uploads data bundles into the database using data links via TP-links to the website. Users can visit the website to see the results.  /dx.doi.org/10.22161/ijaers.77.46  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 412

Software
The design of software in this automation system is made using the Arduino IDE (Integrated Development Environment) application. Arduino IDE is a very sophisticated software written using C. The Arduino IDE consists of:  Program editor, a window that allows users to write and edit programs in the Processing language.
 Compiler, a module that converts program code (Processing language) into binary code. a microcontroller will not be able to understand Processing language. What can be understood by a microcontroller is binary code. That is why a compiler is needed in this case.  Uploader, a module that loads binary code from a computer into memory on an Arduino board.  /dx.doi.org/10.22161/ijaers.77.46  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 413

Test and Verification (Testing and Verification)
After completing the Arduino IDE, you should check the error level generated in making the program. Usually we are told in the Arduino IDE at the bottom. Then the hardware is connected to the PC / laptop so that the data generated by the sensor can be read by the microcontroller. The data generated is displayed on the website using signals from TP-LINK routers. This stage the tools are made to work according to their functions and this research is documented in every process.

Webpage
Monitoring the quality of aquaculture fish ponds in this study is based on the website. Web is a display in a browser with a special domain address. The web can be built using PHP and HTML with a display using CSS language. The web is stored on one computer as a server. In addition to saving web programs, the server also stores a database to be accessed by the admin or client from the browser. The website was built using the notepad ++ program.
Domain name is the name that will send the message to the hosting server's IP address. So, when writing a domain name in the address bar, what is actually accessed is the IP server to be addressed to. To save costs and time, the authors use thephpmyadminweb page with localhost server that can be accessed for free and does not need to buy web hosting. In the web the Domain Basis data has been given, MySQL, status, data export and data import. This domain is used as a storage database that can be accessed by the web.
The function of the database is as a storage media that can be accessed by the web. The database was built using phpmyadmin which can be opened by accessing the page http://lab-android.com/phpmyadmin from the browser by first installing the XAMPP application (X, Apache, MySQL, PHP, Perl). This database is designed to store tables

Care (Maintenance)
After testing the tools and verification of the device should be carried out maintenance of hardware and software. Care is needed and there are still many bugs to be found. Every time it finds a bug the researcher has to fix it then do an update or update. Development is needed when there are changes from external and input data from fish farmers such as when there is a change in the operating system, or other devices.

V. CONCLUSION
After designing an online monitoring system for water quality based on the ATMega 328 microcontroller, it can be concluded that this tool works well and can be applied by fish farmers, especially in fishponds. In designing this tool used sensors that are connected (compatible) directly with the microcontroller ATMega 328. The sensor used to determine water quality uses DS18B20 temperature sensor, DHT11 sensors, Salinity sensors, pH sensors, and turbidity sensors which all use voltages below 5 V, so that it can be read by an ATMega 328 microcontroller. Hardware is connected to the website through a router. Data generated from these sensors are calibrated to their respective units and arranged so that they appear clearly on the website that has been created. This data can be viewed on the labandroid.com/dbadminwebsite. On the website we can see the data that can be arranged so that it displays graphic designs that make it easier to control.