You are on page 1of 11

Aquacuhural Engineering 6 (1987) 27-37

A Computerized Environmental Monitoring and Control System for Use in Aquaculture


William C. Plaia
Florida Department of Natural Resources, Bureau of Marine Research, St Petersburg, Florida 33701, USA

ABSTRACT A computerized environmental monitoring and control system (CEMACS) has been controlling environmental parameters in finfish broodstock maturation systems for three years, including successful maturation regimes for gag grouper (Mycteroperca microlepis), red drum (Sciaenops ocellatus), and common snook (Centropomus undecimalis). The system monitors and controls photoperiod and temperature, and provides a continuous record of these parameters in digital form. It also monitors critical support equipment and notifies key personnel by telephone in event of equipment failure. Data may be analyzed using the system's computing capabilities or transferred to a more powerful computer for more s'ophisticated analysis. Similar systems could have wide application in commercial aquaculture, especially in intensive systems where equipment failure can be disastrous in only a matter of minutes.

INTRODUCTION

Recent advances in microcomputer technology have changed the way many things are done in society. Office microcomputers store, process and analyze information for even the smallest of businesses. Several recent articles suggest using personal computers for managing aquacultural enterprises (Stamp, 1978; Landless, 1981; Gardner and McCauley. 1982). Computer analysis of feed consumption, growth rates and market conditions may give the manager using the microcomputer a competitive advantage over the manager without access to this information. Microcomputers can also be used to monitor and control environmental conditions in aquaculture systems. Connecting the computer to a variety of sensors and control devices allows accurate and precise
27 .4qml('ultural Engineeri~g 0144-8609/87/S03.50-- Publishers Ltd. England. 1987. Printed in Great Britain Elsevier Applied Science

28

W.C. Plaia

control of environmental conditions. Information received by the computer is analyzed and compared with a mathematical model of the system's ideal condition that is stored in the computer's memory. Based on this comparison the computer executes preprogrammed procedures for keeping all controllable parameters within the limits defined in the model. For example, the computer might detect a dissolved oxygen (DO) reading of 2 ppm in a culture system. The monitoring program compares this reading with the limits defined in the model and finds it too low. The program then branches to a control routine which turns on an auxiliary aeration device and alerts the manager to the problem. Information about the reading and the system's response can be stored on a floppy disk or other permanent memory device for further analysis at a later date. Such a system allows a manager continuously to know the status of the culture units at any time without traveling to each one and measuring the parameters. Additional management aids could also be made available on the computer system. For example, by measuring DO and temperature, and using a model considering pond size, species and the size of the individuals, the computer could calculate an optimum feeding rate for each pond in the facility. This would help maximize production, eliminate wasted food and insure that time-to-market is not increased by under-feeding. In research facilities, computerized environmental monitoring and control systems (CEMACS) allow the monitoring and control of experimental regimes and protocols. CEMAC systems collect data automatically and store them in digital format. Control functions monitored through feedback loops assure positive control. This type of system may be very useful in broodstock maturation facilities and hatchery systems. Microprocessor-based laboratory control systems which have been suggested (Lockwood et al., 1982) are limited to one or two parameters, and have limited data storage capability as well as non-standard programming and hardware requirements. The personal microcomputer-based system overcomes most of these problems. These computers are easily programmed in high-level languages such as BASIC and PASCAL, inexpensive and capable of being expanded to handle virtually hundreds of channels. It is precisely this control and convenience that led me to develop such a system for use in our experimental culture units. HARDWARE A prototype CEMACS has been assembled and is in use at the Florida Department of Natural Resources Bureau of Marine Research in St

Computerized environmental monitoring and control system in aquaculture

29

Petersburg, FL (BMR). The system currently consists of a number of commercially available products: an Apple II Plus microcomputer with two disk drives, two 16-channel analog-to-digital/digital-to-analog converters, a real-time clock board, a modem, a BSR remote module controller, a printer, and an expansion chassis (Fig. 1 ). Three additional devices, a power supply for the sensors, a signal amplifier and a control interface for devices operating at 24 V a.c., were designed and constructed at the BMR. These were not readily available when construction began in 1980, but are now available from several companies as off-theshelf items.

sc

TELEPHONE 12Ova, ~'J

AC

Ol

Fig. 1. Diagrammatic layout of CEMACS hardware: AC, Apple 11 Plus e microcomputer: AS. analog sensor: BSR, carrier wave transmitter; BSRR, carrier wave receiver; DS. digital sensor: EC. expansion chassis; FL, fluorescent lamp; O1, output interface; PS, power supply; SC, signal conditioner; SV, solenoid valve.

The microcomputer is the heart of the CEMACS and performs all calculations and data management within the system. Programs needed to run the system are stored in the first drive and data are stored in the second. Larger CEMAC systems might require additional data storage capability which could be supplied by a hard disk or additional floppy disk drives. Culture system condition data are displayed continuously on the computer's monitor. A printer is included so data can be listed and graphed, and a permanent log of error messages is available. The CEMACS automatically recovers from power failures by running specified programs from the first disk drive when power is turned on. When line power is off, the system clock is powered by a rechargeable back-up battery, thus allowing all systems to return to proper conditions once power is restored. At the BMR, an auxiliary generator insures that power interruptions last only a few seconds. Computers that are not capable of automaticaih' running programs at power-up should not be considered

30

W. C. Plaia

for a CEMAC system unless equipped with an uninterruptable power supply. Several peripherals, in addition to those normally found in a personal computer system, are required to implement a CEMACS. Most important of these is the analog-to-digital (A/D) converter. Most signals from sensors as well as most parameters are analog in nature. The A/D converter translates these signals into digital form. The A/D converter used at the BMR is a 16-channel model with eight-bit resolution. This board also provides 16 channels of digital-toanalog conversion. The eight-bit capability allows the total range of the signal to be divided by 256 (28). A typical operating temperature range of 10C in a BMR culture system can be sensed to 0.04C. In practice, an averaging algorithm in the software improves this more than five times, to less than 0.01C. Analog-to-digital converters that resolve to 12 or even 16 bits (212 o r 1/4096 and 216 or 1/65536) are now available, allowing the same discrimination over a larger range or more precise sensing of the same range. Use of a 12-bit device would increase the program speed substantially by eliminating the need for an averaging algorithm. Speed enhancement could be important in large systems that sample many stations. Analog-to-digital channels may be used for any continuously variable data for which adequate sensors are available. The major problem is stability: sensors that must be recalibrated every few hours are difficult to use in CEMACS. Some of the A/D channels are used to sense digital data. (This was done for economic reasons: we did not require all of the A/D channels available and could avoid buying another peripheral board.) Water levels, compressed air supply, and light status are examples of the digital parameters. A digital input/output interface will be needed at the BMR in the near future and should be given a high priority in the design of any new CEMACS. Time is kept by a battery backed-up real time clock readable to 0.001 s. It is capable of generating timed system interrupts to facilitate background programming. This feature is very useful for schedule maintenance while the computer is out of the monitoring mode and being used for data analysis. External communications are provided by a modem. It is used primarily to transmit alarms to remote locations and, secondarily, to transmit data files to larger computers. The CEMACS controls lights by activating carrier wave-controlled switches (BSR). These switches respond to high-frequency signals sent via building 110 volt/60 Hz electrical wiring. This eliminates the need for complicated special wiring to control culture systems. Control of up

Computerized environmental monitoring and control system in aquaculture

31

to 256 separate channels is available. Any number of receiver switches may be set to any particular channel for duplicate responses. Fluorescent lights may only be switched on or off, but incandescent lights may be brightened or dimmed as required. This feature is used to simulate sunrise and sunset in our large culture systems. Carrier wave switches can be used to switch any electrical device that uses less than the rated capacity of the switch. Industrial duty switches that will handle three-phase 440 V devices are available. This capacity could be used for pumps, chillers, heaters, aerators, automatic feeders or any other electrical device commonly used in aquaculture. One difficulty with these devices is that electrical noise on the power lines can interfere with the control signals. This noise is normally of short duration and its effect can be avoided simply by repeating the signal several times. Critical functions should be monitored by a feedback loop to assure the programmed event has occurred. At the BMR, lights in critical culture systems are monitored in this way. Extra slots and power for peripheral interfaces are provided by an expansion chassis with its own power supply, thus reducing drain on the computer power supply caused by the peripheral boards. Each expansion chassis requires one expansion slot in the computer but provides eight additional slots. Four expansion chassis can be added to the Apple II Plus, providing a net total of 36 expansion slots versus eight without expansion chassis. Sensors for light, temperature, compressed air and water levels are currently used by the BMR CEMACS. Phototransistors used to monitor fluorescent lights are quite sensitive and multiple samples are required to avoid a false "off" signal during the 300/~s period in each power cycle that the light is off. Temperature is measured by thermistors in each culture system. The compressed air supply is monitored with a pressuresensitive switch. Water levels are measured with float switches. At the BMR heating and cooling systems are controlled in two ways: conventional heaters and air conditioners, by replacing the thermostats with relays that are activated by the CEMACS; heat exchanger systems, by supplying power to solenoid valves regulating hot water and chilled brine supplies (Schlieder. 1984).

SOFTWARE Software controlling the BMR system is a mixture of that supplied by manufacturers of various hardware items and custom programs written in BASIC and machine language. Software required by the CEMACS falls into two basic categories, realtime and utility. Realtime software

32

W. C. Plaia

consists of programs which acquire, interpret and respond to the data, and maintain schedules. These programs normally run at all times and control the system. Utility software programs provide information to the realtime programs in a non-realtime environment. A program which creates a file containing a light or temperature schedule is an example. These programs are loaded in the computer only when needed. Realtime software must deal with two distinctly different types of events, scheduled and random. Scheduled events are easier to handle. The computer is loaded with a schedule and performs the action required according to that schedule regardless of other conditions. A light schedule is an example: the computer is instructed to turn on a light at 0700; it simply waits until the clock reaches 0700 then sends the signal or closes the relay. In this instance the computer does not require any information from the environment to perform the task. However, other scheduled events that at first seem similar are actually much more complicated. A temperature schedule requires that the CEMACS determine the present temperature, decide if heating or cooling must be applied, activate the appropriate mechanisms, and then cease heating or cooling when the desired temperature has been reached. It then must monitor the temperature and maintain it within specified parameters until the next required change. Random events such as equipment failures are detected by polling the channels monitoring the equipment. Emergency procedures and alarms are triggered only if a failure is detected. Realtime software in the BMR CEMACS consists of two separate programs, the light scheduler and the alarm program. The light scheduler is a machine language program provided with the BSR controller. This program runs in 'background'. The realtime clock sends a signal once a second that triggers the funning of the program. It interrupts any program running in foreground, executes in a few thousandths of a second, and then returns to the foreground program. This slight interruption is not noticed by the user of the foreground program. If the time corresponds to that of a scheduled light change, the foreground program may be interrupted for 1-2 s while the proper signal is sent. The alarm program evolved from a simple program that triggered an alarm if something was out of preset parameters, hence the name "alarm'. This program is composed of several modules in a large loop along with a number of subroutines. The main loop modules are light monitoring, water level and air supply, temperature readings, temperature control, temperature alarm, time, and sunrise/sunset. Subroutines include the alarm, disk output, light output, and error handling. Set-up routines are executed when the program is started and every subsequent day at

Computerized environmental monitoring and control system in aquaculture

33

midnight. These routines read required data from the disk and configure the system. Utility programs are selected from a menu presented on the screen. Functions provided by these programs are creating fight and temperature schedules, setting temperature alarm levels, initiating sunrise/sunset, calibrating temperature sensors, updating phone-number files, retrieving data files, editing data files, creating special data files for graphics routines, and copying diskettes for archival purposes. Each of these programs has its own menu from which the actual operations are selected. The data file editor is very convenient for correcting erroneous data. In order to preserve data credibility, the editing program does not actually alter data in the raw data file but creates a new file clearly identified as being edited. Erroneous data have usually resulted from such human errors as removing a temperature sensor during tank maintenance and reading air temperature instead of water temperature. An early temperature sensor design tended to flood, also causing data errors.

RESULTS The prototype CEMAC system became operational at the BMR on 31 December 1981, and has had complete control of the major culture systems since that time. Over 68 000 temperatures and 13 000 fighting changes have been recorded. The system was fully operational 96.74% of the time during a 20-month analysis period. Many failures have been caused by human error. If these are removed from the calculations, the operational percentage increases to 97.67. Over half of the remaining failures (62%) were only partial, i.e. only some of the various functions failed. Total failures seem to be associated with lightning strikes and power dips, which do no permanent damage to the system, but cause it to shut down or 'hang" until manually restarted. Complete power failures are automatically handled by the computer's auto-start firmware and software. Overall system reliability improved greatly as the system was refined. If human errors are discounted the system has been fully operational over 99% of the time in the last six months. Temperatures have generally been maintained within the specified parameters (usually + 0.1 IC). Brief excursions from these parameters caused by system failures have seldom exceeded 0.5C and have never exceeded 2C. Light control is the most dependable parameter and has only failed during total system failures or due to human error. Light regimes are set

34

W. C. Plaia

up to simulate seasonal photoperiods on a natural or compressed time frame. Sciaenops ocellatus (Halscott, 1984, unpublished work) and Mycteroperca microlepis (Roberts and Schlieder, 1983) have both been spawned under control of the CEMAC system. Centropomus undecimalis has been matured under CEMACS control but has not spawned. Figure 2 is a reproduction of a graph produced on the CEMACS, showing the temperature cycle during an M. microlepis spawning regime. The graph was produced using the monthly plot option of the 'create' program. This option produces a graph based on a weighted daily average temperature. Figure 3 was produced using the daily option which plots all actual temperature changes.
QAG

REGIME 0CT/83

T E M P E R A T U R E

27 26

21 20 19 18

--I++HI++I"H"H+H-I"HH..H....H...I..F.
01234567891113151719212325272931 DAY

Fig. 2.

Dailyaveragetemperaturesduringa Mycteropercamicrolepisspawningregime.

The alarm feature has alerted us to pump and other failures that could have caused loss of experimental fish. On many occasions, overtemperature alarms have alerted us to sensor failure caused by flooding. This problem has been solved by embedding the sensors in catalyzed silicone rubber. Actual over/under-temperature condition alarms have been very rare and have alerted us to heating/cooling system failures. The timely warning provided by the CEMAC system greatly reduced damage from such failures.

Computerized environmental monitoring and control system in aquaculture

35

25--

TEMP GAG/E 0CT/15/83

T E R A T U R E

7'42322-

7'1-

ze ~FH-HVH..-I...V.F.V.H....H-..F.H.-.-I..+..V}. oi 2 3 4 5 6 7 8 10 12 14 16 18 20 7'2 7'4


HOUR
Fig. 3.

OF THE DAY

Actual temperature changes on one day of a Mycteroperca microlepis spawning regime.

DISCUSSION Monitoring of environmental parameters and support equipment is one of the most important and labor-intensive jobs in aquaculture. This is especially true in intensive systems where tolerances are minimal and equipment failure can be catastrophic in minutes. The ability to constantly monitor these parameters and equipment and to have the computer sound alarms or automatically respond by initiating back-up systems or emergency procedures greatly reduces the workload and increases the dependability of the culture system. In research, a CEMACS provides constant monitoring and accurate control of experimental parameters. Data supplied by the system are in digital form and easily manipulated for analysis. Large amounts of time are saved and accuracy is ensured by avoiding the transposition of analog charts and graphs into digital form. For sophisticated analysis beyond the capability of a microcomputer, data files can be transmitted via modem to large mainframe computers, avoiding keypunching or other labor-intensive data entry procedures. One of the major reasons for installing the microcomputer-based CEMAC system was economic. In 1980, the BMR was about to embark on a major expansion of its large-fish broodstock maturation facility (Schlieder, 1984). A quick examination of our budget showed that we

36

W. C. Plaia

could not afford conventional instrumentation: temperature recording and control devices (accurate to +0"IC) for the required 20 stations would have cost approximately $25 000. The conventional system also would have required constant maintenance and manual control. To double the capacity would have required another $25 000 investment for temperature control alone! Moreover, some of the functions available on the CEMACS simply cannot be implemented with a conventional system. BMR's current CEMAC system can monitor and record 24 temperature channels, control 16 temperature channels, monitor and record six light channels, control 16 light channels, monitor the facility's compressed air supply, and monitor water levels in the culture systems. The cost for the hardware for this system was less than $10000. The capacity of the system could be doubled for less than S2 000 with the only effect being a doubling of the time it takes to examine all the channels (currently each channel is examined once every 15 s if no recording is required). Expansion costs are not linear. A new BSR interface costing $350 will allow expansion of the carrier wave control (BSR) capability from 16 to 256 channels. It also has a battery backed-up realtime clock which would have eliminated the requirement for a separate clock in the original system. Unlike a conventional system, the hardware for a CEMAC system actually costs less in 1985 than in 1980. The Apple II Plus 'personal' microcomputer was chosen because it was the only one available at the time that had the expansion capability and peripherals available to perform the required tasks and still fit within our budget. Several other 'personal' microcomputers now have this capability and could be used to implement a CEMAC system. The type of CEMAC system presented here is not the only or even the best type for any particular installation. CEMACS similar to this one are suitable for intensive, compact, culture facilities. Extensive culture systems would require different strategies for data collection and control. Remote analog/digital and digital/analog conversion is available and is better suited to large pond facilities. The BMR CEMACS is built with components that are now several years out of date; 'state of the art' components make a much more sophisticated system practical. Computerized environmental monitoring and control could contribute greatly to the success of many aquaculture efforts and should be given careful consideration by culture system designers. REFERENCES Gardner, M. B. & McCauley, J. (1982). Microcomputers in aquaculture: valuable management tools. Aquacult. Mag., 8(6) (Sept./Oct.), 22-6.

Computerized environmental monitoring and control system in aquaculture

37

Landless, P. ( 1981 ). Fish and (silicone) chips. Fish Farmer, 3(6), 35. Lockwood, A. P. M., Jenkinson, N. W., Bolt, S. R. L., Dawson, M. E. & Jenson, A. C. (1982). Microprocessor systems as an aid to estuarine studies in the laboratory. Estuar. Coast. Shelf Sci., 15(2), 199-206. Roberts, D. E. and Schlieder, R. A. (1983). Induced sex inversion, maturation, spawning, and embryogeny of the protogynous grouper, Mycteroperca microlepis. J. World Maricult. Soc., 14_,639-49. Schlieder, R. (1984). Environmentally controlled sea-water systems for maintaining large marine finfish. Prog. Fish Cult., 46(4), 285. Stamp, N. H. E. (1978). Computer technology and farm management economics in shrimp farming. In: Proc. Annu. Meet. World Maricult. Soc. 9th, ed. J. W. Avault, 383-92.