Design of Water Quality Monitoring System for Crab Larvae using IOT

Abstract Water quality is one of the determining factors in maintaining survival and growth of crab larvae, therefore we need a tool that can monitor water quality which includes temperature parameters, pH and salinity in real-time and online in crab larva culture. This system consists of several sensor nodes with the main component being Arduino Uno which is connected by several sensor nodes as a publisher and Raspberry Pi 3 (RPi3) board as a broker. Data from each sensor node will be sent to brokers with different topics and stored in a database using a wireless network. The application system used with the MQTT (Message Queue Telemetry Transport) protocol uses a red node. The Red node will display data of each sensor node in the form of a gauge and graph. In this study, a water quality monitoring system was designed and developed. This tool uses the MQTT (Message Queue Telemetry Transport) protocol to display sensor node data in real-time.Water quality is one of the determining factors in maintaining survival and growth of crab larvae, therefore we need a tool that can monitor water quality which includes temperature parameters, pH and salinity in real-time and online in crab larva culture. This system consists of several sensor nodes with the main component being Arduino Uno which is connected by several sensor nodes as a publisher and Raspberry Pi 3 (RPi3) board as a broker. Data from each sensor node will be sent to brokers with different topics and stored in a database using a wireless network. The application system used with the MQTT (Message Queue Telemetry Transport) protocol uses a red node. The Red node will display data of each sensor node in the form of a gauge and graph. In this study, a water quality monitoring system was designed and developed. This tool uses the MQTT (Message Queue Telemetry Transport) protocol to display sensor node data in real-time.


Introduction
Crab is food that has a high level of nutrition, this makes crab a source of export commodities. However, currently there is population degradation caused by overfishing and is not balanced with the level of demand. With these conditions, it is necessary to follow up in increasing the population of crabs, by conducting cultivation. But now crab cultivation is still using traditional methods, where farmers find a serious problem, especially in the level of water quality that is used does not have clear standards so that the impact on the minimum ratio of the number of larvae harvests.
Water quality monitoring is very necessary to determine the water conditions needed by larvae to maintain the viability of larvae from the zoea 1 larva stage to megalopa. Research by Sun et al. shows that the development of zoea 1 to 1 day young crabs require 15-18 days at 22-25ºC. Meanwhile according to Bryars & Havenhard (2006) shows that at the constant temperature needed is 22.5 ºC and 25 ºC [1] and the ideal level of salinity is 30-35 ppt [2]. This shows that water quality is a serious concern in producing crab culture, especially at the larval stage. But now farmers are still using conventional systems to monitor water quality and collect data on water samples used and then analyze them in the laboratory. This process requires a long time and expensive labor.
Based on this, the author raised the title of IOT (Internet of Things) based water quality monitoring system using the MQTT (Message Quequing Telemetry Transport) protocol to provide information on water quality data with parameters of temperature, pH and salinity that can be used as a reference for cultivation by means of the easy and economical price.

Monitoring system
The design of the monitoring system uses temperature sensors, pH and salinity in Fig. 1. Each sensor node has its own topic and sensor data will be sent through a network system with the MQTT (Message Queue Telemetry Transport) protocol shown in Fig. 2

Model description
The design model for this monitoring system consists of 3 sensors namely temperature sensor, Ph and salinity which are in the box and connected to Arduino Uno in this case is a publisher, and connected with Raspberry Pi as a broker. For reading data each sensor will be displayed in the form of a website and can be accessed using a device that is connected to a network system.
In general, the MQTT protocol for delivering messages from server to client or vice versa using low resources [3]. The system model of this research method can be described as follows.

Internet of Things
In general, the Internet of Things (IoT) is the concept of connecting several devices used to communicate or exchange data connected through the internet. The concept of IoT has been widely used in several objects and implemented almost in all sectors of life. Some assumptions predict that by 2020 in 50 billion objects will be connected to the Internet [4].
For the internet of things, in this study by connecting several nodes including Arduino Uno as the main node to process sensor data and send it to Raspberry Pi to be displayed to application services. The process of sending sensor data via a wireless router communication whose address communication is registered at Arduino Uno.

Temperature sensor
In this study water temperature sensors are used. Where this temperature sensor has analog and digital outputs. The use of temperature sensors has upper and lower limits, but for water temperature it is very necessary to maintain. Where the use of water temperature sensors is used analog output, temperature sensors are basically analog but can be converted in digital form [5] with DC input range 3.3 -5 V. Temperature data will be sent to the Raspberry Pi with a temperature topic that will be displayed by node-red application with gauge and graph models. Every data change on this sensor is set every 5 minutes to get a good temperature data range.
In the crab larvae, the optimum temperature needed is 30 0 C, which shows the highest average survival rate of 43.18 ± 7.32% [6]. By utilizing a temperature monitoring system, the temperature conditions relating to water quality in crab larvae can be maintained.

pH sensor
For the pH sensor in this study, the output used is analogous to DC input 5V. Data for the pH sensor will be sent to the Broker on the topic of pH with a time itemization every 5 minutes and the data will be displayed in the form of a percentage gauge and graph and saved to a local database of the raspberry pi.
The condition of water pH is one of the factors that influence the survival rate of crab larvae. The overall survival rate at each pH is 7.5 ± 0.1, 8.0 ± 0.1 and 8.5 ± 0.1 is 6.28 ± 0.12%, 6.76 ± 00.91% and 5.59 ± 0.53% [7].

Salinity sensor
In this research, salinity sensors have analog outputs that work to measure the salt content in larvae holding water with a capacity of 300 liters. The best growth of zoea to crab megalopa is treatment A, ie zoea which is maintained with water salinity ranging from 32-34 ppt.
The growth of the type of crustase is determined by a series of molting (skin change) processes from zoea1 to megalopa and even to adult crab. Normally the growth of crab larvae through 4 zoea stages and 1 megalopa stage that requires maintenance for 8-10 days, then from megalopa metamorphosis to crablet [8]. Salinity sensor data readings will be sent to Raspberry Pi with a gauge and graph percentage.

Raspberry Pi V3
Raspberry Pi is a small computer, it uses many different types of processors. Raspberry can install several versions of Linux, the operating system that appears and feels very much like Windows. Raspberry Pi is also used to surf the internet, to send emails to write letters using a word processor, but you can also do even more [9]. In this study, the tool that functions as a broker that communicates with Arduino Uno as a publisher is Raspberry Pi V3. Where raspberry Linux operating system has been installed with the mosquito library so that the data from Arduino in the form of sensor data can be received in the form of topics. Each topic that is sent will be displayed with certain time duration and sensor data is saved to the local database at any time in the previous settings. The database used in this case is MySQL which is connected to each sensor node sent by arduino.
Flow-based programming tool to help IoT developers integrate various I/O components with the Application Program Interface (API) and IoT services. Node-RED uses node.js so that it can run on a network or in the cloud. Now there are thousands of flows and nodes

Publisher
Broker Subscriber available in the NodeRED library so that connections can be made with many devices and services. Node-RED consists of Node.js-based runtime that directs to a web browser to access the flow editor. Through the web browser, the application can be created by dragging the available nodes in the palette to the workspace and then making a series.

Temperature water quality
Temperature is one of the factors that can influence the life of crab larvae about increasing or decreasing larval survival [10]The effect of temperature also has an impact on the length of change in metamorphosis, after feeding patterns and feed nutrients [11]. The results of the implementation of this design produce water temperature conditions in crab larvae ranging from an average of 29 0 C-to 30 0 C by recording data in the morning, afternoon and night by taking data every 5 minutes for reading and sending sensor data. Every data in 5 minutes will be saved into the database according to a predetermined time schedule. With a temperature sensor, monitoring can be done at any time as shown in Fig. 3.

pH water quality
For the pH sensor used, where the sensor reading data does not change too much on the water quality conditions in the larvae tub. This is because in larvae tanks for 200 liters capacity, the water is replaced every day by using the sipon model. And the data obtained for the pH sensor is ± 7.43. With a pH sensor, monitoring can be done at any time as shown in Figure 4.

Salinity water quality
In this study, the traffic conditions obtained were not too many changes, namely in the number 34.30 ppt. Because the location of the crab larvae is in an indoor location. So that salinity does not show a high increase. With a salinity sensor, monitoring is carried out with conditions not showing an increase or decrease in salinity as shown in Fig. 5.

Application monitoring
Each reading of the data of each sensor has been processed by Arduino Uno, so the data for each sensor is displayed in the form of a percentage gauge and a graph with a specified time interval. In this application, data reading is done in real-time to determine the state of water quality directly. The application display can be displayed by accessing the existing IP address on the Raspberry Pi connected to Arduino Uno and for the addressing conditions of the IP done dynamically on a wireless connection.
The pictures in Figs. 5-8 shows the percentage of each sensor in the website application using node-red which is one application that supports the MQTT protocol. To display the percentage, as shown above, flow-based is needed to compile and execute data that will be received through the publisher.  For each percentage displayed, it is designed in advance by making a flow at each node and must be connected. For each sensor, topic is listed in the flow node-red function. As in Fig. 9.

Conclusion and Future Work
The water quality monitoring system in crab larvae is very helpful for farmers in accessing water quality data through the internet. The monitoring system in this study only uses three sensors as parameters and each sensor data will be saved to the internal database of Raspberry Pi V3. The time interval every 5 minutes of taking sensor data makes the water quality data can be measured properly, and can be used as study material to determine the ideal water quality in crab larvae.