Design of Aquaculture System based on Wireless Monitoring and its Testing

Aiming at the Chinese aquaculture’s status quo that the automation degree is low and the management is backward, this paper designed a set of wireless aquaculture monitoring system that can not only monitor the pond’s parameters of temperature, level, dissolved oxygen and pH value etc. in real time, but also monitor the fish condition through wireless camera in real time. This system consists of three parts of information acquisition module, control module and wireless communication module. The testing result shows that the independently designed feeding device can realize automatic feeding with the feeding area up to 24m2. This system can realize 24h monitoring of fish growth condition through image capture, accurate detection of residual amount of feed and wireless control of water temperature, level, water quality and feeding device and monitoring distance is up to 1000m. This system avoids low efficiency of artificial culture and untimely control to water quality and fish diseases and it has features of easy operation, accurate control and high economic benefit, so its applicability is wide.


INTRODUCTION
China is a giant of agriculture. As an important sector of China's agriculture, fishery is faced with challenges from resource, environment, market and technology [1][2]. These all restrict development of fishery. At present, China's aquiculture management is primarily guided by aquiculture experience, which hardly guarantees output and safety. Factory aquiculture and cage culture play the main part in China's existing aquiculture [3][4][5]. On the whole, China's aquiculture features diverse culture, unreasonable structure, outdated facility, low-level intelligence and culture safety needing improvement [6][7][8]16].
In China's "factory aquiculture", there are only basic facilities (e.g. filter, heating, water running, aerator) and outdated water treatment technology. With expansion of aquiculture scale, culture technology is being gradually improved while environmental pollution gets more severe [9][10]. At present, most domestic aquatic farms depend on experience, and adopt low monitoring technology. For large area, many monitoring points and complicated wiring have to be provided. Wireless sensor network technology is being introduced to some aquiculture monitoring systems, and partly solves the problem above [11]. Automatic monitoring of water level, temperature, pH and dissolved oxygen (DO) in existing aquiculture monitoring system [12][13][14], is of important significance for scientific aquiculture. However, such monitoring needs high cost, and its intelligence and scientific management are imperfect.

II. OVERALL STRUCTURE OF SYSTEM
The system designed in the paper is made up of information acquisition module (comprised of water level measurement, pH measurement, water temperature measurement, DO measurement and wireless camera), control module (comprised of water level control, aerator control, bait thrower control and upper computer) and wireless communication module (comprised of APC220, USB receiver and relay base station). Overall structure of the system is shown in Figure 1. Working principle of the system: (1) Information acquisition module collects water quality parameters and image information of fishpond. All information about water level, pH, water temperature, DO and residual bait quant. are sent to upper computer via APC220, while image information is sent to upper computer via USB receiver; (2) Upper computer analyzes and processes collected data (temperature compensation, error correction, etc.). Health of fish can be automatically determined based on image processing, result of which is displayed on HMI. If a parameter doesn't fall in established range, alarm will be given via pre-warning module; (3) Upper computer sends control information to STC89C52 (SCM) via APC220, and controls water level, aerator and bait thrower with the SCM.

III. HARDWARE STRUCTURE OF BAIT THROWER
Bait thrower designed in the paper is made up of charging device, bait valve, throwing device, delivery pipe, control unit, power configuration room and other equipment room. For its structure, see Figure 2. In Figure  2, STC89C52 acts as the core processor of control unit, REGULAR PAPER DESIGN OF AQUACULTURE SYSTEM BASED ON WIRELESS MONITORING AND ITS TESTING and sends information to upper computer via APC220. Residual bait measurement sensor is built in charging device. Bait valve is used as the leakage switch. Baits are sent to throwing device through bait valve and delivery pipe. Opening and closing of bait valve are controlled by valve motor M1. Bait valve can be opened/closed by 1s anticlockwise/clockwise rotation of the motor. Model of M1 is LT37GB90 with reduction ratio of 1:90, rated voltage of 12V, load speed of 40r/min, load current of 450mA and torque of 0.343N.m. Its driving circuit is L298N dual H-bridge type.
The distance of throwing device is controlled by throwing motor M2. Model of M2 is R775 with rated voltage of 12V, load speed of 3500r/min and load current of 3A. Its driving circuit is also L298N dual H-bridge type. Throwing port of throwing device is shown in Figure  3. Considering small part of bait can be leaked to the chassis of throwing bin from the gap between throwing disc and cylindrical throwing bin, the chassis is inclined backwards and at 45 degree angle, thus the baits leaked to the chassis can slip into the fish pond through throwing port. Voltages of 5V, 12V, 24V and 220V are available in power configuration room, which supports control center and bait thrower. Other equipment room has aerator, waterproof device and sun protection device.
When control unit that controls aerator receives signal from upper computer, it will control M1 and M2 for commencement of baiting, timed bating or bating stopping, meanwhile send information about residual bait quant. to upper computer on which whether lower limit of residual bait quant. is reached. If the limit is reached, bating stopping signal will be sent, and alarm will be given to management. If the limit is not reached, baiting will be finished as timed. For performance parameters of bait thrower, see Table 1.

IV. DESIGN OF INFORMATION ACQUISITION AND CONTROL MODULE
Information collected by the system provides data reference and basis for control decision-making, covering water level, pH, water temperature, DO and image of fishpond. The control system primarily controls water level, aerator and bait thrower. Collected information is sent to upper computer via APC220. APC220 provides wireless transmission as far as 1000m, and has strong immunity from interference. It undertakes wireless transmission of parameters monitored in real time to upper computer, which is connected to APC220 via serial port RS232. The port is initialized as 9600 in baud rate, 8 in data bit and 0 in check bit.

A. Water quality inspection
Measurement results are sent to upper computer via the wireless transmission module APC220.Polarogram oxygen electrode acts as DO sensor in the system. For measuring oxygen content, polarization voltage of 0.6~0.8v is applied between anode and cathode of oxygen electrode. Current measured on DO electrode is at the Change in electromotive force is measured by means of potentiometry to conclude pH. Weak voltage signal (-414mv~414mv) is output by pH sensor, and converted to 0~5v (corresponding to pH of 0~14) upon magnification and deviation. Water pH and permeability of permeable membrane of DO sensor are influenced by change in water temperature, needing temperature compensation. Temperature value collected by DS18B20 is sent to STC89C52 for pre-processing, and sent via APC220 to upper computer for display. At the same time, DO and pH are compensated as temperature.
B. Image information acquisition and processing USB2.4G digital wireless camera (450A) is adopted in the system. The camera is made up of 2.4G wireless camera, digital USB wireless receiver and power supply, free of demerit of complicated wiring compared to wired camera. Real-time photo of fishpond is taken by wireless camera, and transmitted to digital USB wireless receiver as wireless communication protocol. Monitoring system of upper computer snaps image regularly. Image processing program combines MATLAB and JAVA. Acquired image is true-color, and projected to gray space for median filtering. An image is often interfered during input, transmission and processing, thus gets lower in quality. Median filtering can inhibit interference and eliminate noise. For median-filtered image, see Figure 4.
The key for gray level image binarization is selecting optimal segmentation threshold to separate target image from background. Given the system is suitable for outdoors, optimal threshold is worked out by means of iterative algorithm, which is effective upon multiple tests. Gray level image is binarized as threshold from iterative algorithm. Given there are not a few white spots on binary image, and such spot is obviously not caused by diseased fish, it is necessary to smooth binary image before statistics of white pixel point. The system removes small spots by means of corrosion followed by expansion, to reduce interference. For smoothed image, see Figure 5.
Based on the processing above, number of pixel point all over an image is first worked out, followed by extraction of target matrix and statistics of pixel point on target matrix. Target area of the system is white area, namely the system is aimed to summing white pixel and working out percent of white area in overall image. Sometime the percent is higher than established threshold (25%, established upon multiple tests), which indicates abnormality of fish. Interval of image acquisition is automatically shortened. Increase of the percent in a continuous time interval indicates communicable disease or poisoning. In the case, emergency alarm is needed.

C. Water level control
Water level control module is made up of water level measurement circuit, 2 pumps, APC220, STC89C52 and upper computer. Water level measurement circuit is designed as electrical conductivity of water. STC89C52 finishes water level data acquisition as measured high/low electrical level. APC220 undertakes communication between upper computer and STC89C52. STC89C52 controls pump by connecting/disconnecting relay to control water level in normal range, and sends information about water level to upper computer for display. Normal range of water level and water changing frequency can be modified as season on HMI of upper computer. Specially, when 2 or more water quality parameters exceed established ranges, the system will automatically change water.

D. Aerator control
According to water standard of fishery in China [15], in continuous 24h, DO in aquaculture water body shall exceed 5 mg/L within more than 16h, otherwise healthy growth of fish can be impacted. Aerator in the system oxygenizes water body by means of fine bubble aeration, high-efficiency and energy-saving. When DO lower than lower limit is detected by DO sensor, upper computer will automatically send command on starting aerator. When receiving the signal via APC220, STC89C52 will immediately close normally-open contact of relay and start aerator. When DO up to upper limit is detected, upper computer will automatically send command on shutting down aerator to recover normally-open contact of relay to open state and shut down aerator.

E. Bait thrower control
For control process of bait thrower, see Figure 6. Bait thrower supports 2 control modes. In mode 1, user sets the parameters of daily baiting times, time point of each baiting, baiting duration (baiting quant.), lower limit of residual bait quant. and baiting distance on HMI of upper computer. In mode 2, user sets baiting start time, baiting duration (baiting quant.), baiting stop, lower limit of residual bait quant. and baiting distance on HMI of upper computer. After setting, when established time point (e.g. AM 8:00) arrives, upper computer will send command on starting baiting via APC220 to STC89C52. If receiving the command, STC89C52 will return baiting response signal to upper computer. If not receiving the response signal, upper computer will re-send the command every 1s. If not receiving the response signal in 3s, upper computer will give alarm until receiving the response signal. When STC89C5 receives the command, throwing motor will start, and 2s later baiting valve will open meanwhile information about residual bait quant, which will be sent by STC89C52 via APC220 to upper computer for display. If baiting time is 10min, when baiting ends (namely at 8:10), upper computer will automatically send command on stopping baiting. If STC89C52 detects that residual bait quant is lowered than established lower limit during baiting, upper computer will automatically send command on stopping baiting and give alarm, meanwhile record residual baiting time. When supplementation of REGULAR PAPER DESIGN OF AQUACULTURE SYSTEM BASED ON WIRELESS MONITORING AND ITS TESTING bait ends, upper computer will re-send baiting command to finish residual baiting. When upper computer sends command on stopping baiting, baiting valve will close, and 2s later throwing motor will be stopped to stop baiting. Baiting control process in mode 2 is identical to that in mode 1. In mode 2, operator can intervene baiting anytime.

V. DESIGN OF SOFTWARE SYSTEM
Software system is made up of 5 modules (data display, data storage & inquiry, hardware control, site video monitoring, alarm control). Hardware control module controls water level, aerator and bait thrower. Site video monitoring module monitors image of fishpond via wireless camera installed above fishpond and will capture video image in a timing way and carry out timing analysis for such image. Alarm control module judges abnormality alarm by monitoring data information passed back by STC89C52 in real time and image processing result of upper computer.
Interfaces of upper computer are main interface, video monitoring interface and baiting control interface. Main interface is made up of system menu bar, system quick toolbar, fishpond environment data real-time display area, dynamic curve chart display area and hardware control area. Video monitoring interface can display multiple fishpond images, and monitor site of fishpond in all-round way. Result of captured picture processing can be displayed to show situation of fishpond and whether there's dead fish. Baiting control interface supports baiting mode selection, bait setting, residual bait quant. display and setting of last baiting time.

VI. RESULTS AND DISCUSSION
After designed, the system was put into use in a fishery experiment park. Two neighbored 5m!5m fishponds in the park are marked as A and B, respectively, for comparative test. Carp fries from the same batch were put into the 2 fishponds. Fishes in fishpond A were fed with the system. Those in fishpond B were fed by means of artificial culture. As measured, distance between monitoring room and fishpond was about 1000m. The test was carried out from Jan 1, 2013 to June 30, 2013. To test objectiveness of result, feeder randomly selected one day of each week. PH, DO and water level were measured at AM 8:00, PM2:00 and PM 8:00, in fishpond A and B. PH sensor and DO sensor were installed (2 every 100m2) at depth about 1.2m, installed 2.5m from ends of fishpond. Water level measurement device was installed 2.5m from end of drainage pump pond. Camera was installed on one end of pond, about 5m above water surface. Bait thrower was installed on the other end of pond. The test covered water quality inspection, image processing, water quality (PH, DO), bait thrower and water level control system. For structure of the whole test system, see Figure 7.
Miss ratio of data transmission in Table II refers to times of error every 100 times of data transmissions. Accuracy of image judgment refers to times of conformity with actual conditions in 100 times of image processing on upper computer. The wireless communication system features transmission distance up to 1000m, short control response time, low and stable miss ratio of data transmis-sion and high accuracy of image judgment, and can meet requirements for control and information communication in the system. DO was tested under different temperatures. The test result is shown in Table III. Learned from the table, test value from DO measurement system is close to that from existing DO transmitter DO6309. However, polarogram oxygen electrode adopted on DO measurement system is inexpensive. Existing DO transmitter collects data in wired way, thus can't meet requirements of the system.
PHs of acid, neutral and alkali solution were tested under different temperatures, as shown in Table IV. Learned from the table, the system is slightly higher than existing pH transmitter CPI-505 in test accuracy. Learned from the experimental data above, the designed water quality inspection system can meet demands in aquiculture.  Livable temperature, pH, optimal pH, DO, optimal DO and water depth for carp are 25!~32!, 6.5~8.5, 7.5, >4.5mg/L, 6.5 mg/L and 1.2~1.5m, respectively. Mean of each parameter of the system and manual-control fishpond is shown in Table V. Learned from Table 5, each parameter under manual control significantly fluctuates. Control result of the system was accurate and stable within 180 days of the test.

VII. CONCLUSION
The wireless monitoring aquiculture system designed in the paper monitors temperature, pH and DO of fishpond in real-time way, and automatically controls them. It controls fish growth in full-time way by means of image acquisition, and implements real-time monitoring of fish health. Learned from test, net weight of bait thrower, maximum throwing area and rated power are 15kg, 24m2 and 42W, respectively. Supporting automatic baiting, the bait thrower can bait fishes timely and accurately. APC220 wireless data transmission module is 20MW in transmitting power and 1000m in maximum wireless monitoring distance, effective in aquiculture under wireless monitoring. These provide intelligent aquiculture mode where operation is easy under accurate control. The system avoids problems of low efficiency in artificial aquiculture and untimely and unreliable water quality and fish disease control.