Keywords

1 Introduction

The constant degradation of water systems, like rivers in most parts of the world, calls for close monitoring of water quality in these systems. In the Philippines, water from the rivers is the primary source of domestic water, especially for major urban areas. However, the neglect of existing government policies led to the present state where only one-third of the river systems are considered suitable for public water supply [1] due to pollution. The main source of pollution is untreated domestic and industrial wastewater [2], p. 4. According to the studies, the effects of pollution of water systems will continue to be felt in the country in the future. It is estimated that in 2025, water availability in the Philippines will be marginal in most of the major cities and in 8 of the 19 major river basins [2], p. 8. Water pollution also leads to problems in the fishing and tourism industries [3]. Water monitoring systems, especially for river systems, must be capable of covering lengthy and large target areas.

The proposed system monitors water quality remotely using radio frequency links to transmit and receive water data using sensors over long and wide target areas. The main feature of the proposed water monitoring system is its scalability, where more RPTs can be added to increase the coverage area. Further, it makes use of a communication system for the control and reception/transmission of sensor data, instead of using a public switched network as proposed in [4, 5]. All sensors used in this system are developed and calibrated using low-cost and locally available components. Figure 1 shows the general system setup of the proposed water monitoring system.

Fig. 1
figure 1

System configuration of the monitoring system

The monitoring system is composed of a CMU and several RPTs. The number of RPTs depends on the desired coverage area. In its ideal setup, the CMU communicates with RPT1, RPT1 communicates with RPT2, and so on. The CMU sends commands periodically to all RPTs for the latter to send their sensor data to the CMU. Each RPT can act as a relay station for the succeeding RPTs to receive the same command from the CMU. For the setup shown in Fig. 1, the command from the CMU will be received by RPT1 and the same command will be relayed by RPT1 to RPT2 and RPTN will receive the same command through RPT2. In the upstream operation, when RPT1 receives the command from the CMU, it transmits its sensor data directly to the CMU, where the data are stored and displayed. The other RPTs will also follow suit upon reception of the relayed command. However, for RPT2, its sensor data will be sent to and relayed by RPT1 to the MCU. The sensor data of RPTN will be sent to RPT2 and then to RPT1 and eventually to the CMU. If, for any instance, an RPT other than RPT1 receives the command directly from the CMU, the command will be discarded or ignored by that RPT. Likewise, if an RPT nearer to the CMU transmits its sensor data, all RPTs farther than the transmitting RPT will ignore the transmission.

2 System Design

The proposed water monitoring system using radio frequency links is designed to gather water sensor data from remote stations to a central monitoring station. A transceiver is used both at the CMU and at all RPTs. All RPTs have a microcontroller serving as the host to interface the sensors with the transceiver. Figure 2 illustrates the internal parts of the CMU and RPTs.

Fig. 2
figure 2

The monitoring system showing the major components inside the CMU and the RPT. The figure shows two RPTs only

2.1 Control Monitoring Unit (CMU)

The CMU consists of a transceiver that is connected to the computer via an interface cable. This is where all commands will be emanating for RPTs to send their sensor data. Also, all sensor data from RPTs will be received and displayed at the CMU through a graphical user interface (GUI). These data will be further processed and stored in a database and also at the CMU. At the CMU, a command is automatically and periodically issued by the system at a predetermined time set by the user. Commands can also be sent from the CMU manually by the user though the GUI. The GUI used in this project was developed using Visual Basic .Net 2005. The CMU is basically composed of a computer and a transceiver. Figure 2 shows the major components of the CMU and the RPTs.

2.1.1 The Computer

The computer serves as the command center of the system. It displays the current sensor data from the RPTs and other information on the GUI. It also contains and executes the set of instructions and programs following the system process flow. All prior data collected from all RPTs are stored in the database in the computer and can be retrieved in Excel format.

The graphical user interface (GUI) in the system displays the current sensor data from all RPTs, and it is where the system settings are modified. Figure 3 shows the GUI used in the prototype that was developed using visual basic [6].

Fig. 3
figure 3

The graphical user interface of the prototype

The proposed monitoring system uses a user-defined protocol developed by the authors for this particular application to make the system scalable and to avoid complications in the transmission and reception of data. At the CMU, it is used to command the RPTs to transmit their respective sensor data. Figure 4 shows the structure of the said CMU protocol.

Fig. 4
figure 4

User-defined protocol for the command data emanating from the CMU

The protocol starts with the header with a value of 33H (00110011B) in the prototype. This is the identifying information unique to the system. The destination indicates the destination RPT, e.g., 10H (00000010B), for RPT2. The source indicates the source of the data, in this case the CMU which is given 00H. The count is the number of RPTs deployed in the monitoring system. In the implementation of the system, the content of the checksum field is the sum of all bytes in the transmitted command data and is used in error detection.

The detailed process flow when the CMU sends the command data for the RPTs to send their sensor data is shown in Fig. 5a. In the chart are the values of the header (33H), and the destination (01H) means that the message is destined for RPT1 and the source (00H) is the default address of the CMU.

Fig. 5
figure 5

The flow diagrams that the CMU uses at a transmit mode and b receive mode

Figure 5b shows the process flow that the CMU follows when it is in the receive mode, particularly when receiving sensor data from RPT1. If the CMU receives sensor data from other RPTs, the information is discarded. The received data are also discarded if the transmission is from other wireless systems, that is, if the header is not 33H.

2.1.2 The CMU Transceiver

The commands generated by the computer are transmitted to their respective destination through the CMU transceiver. It is also its responsibility to receive the data from the nearest RPT for data processing. The transceiver at the CMU uses the Aerocomm, Inc. AC4790 transceiver module that operates at the 900 MHz ISM band. One unique feature of the transceiver module is its dynamic session extension and collision avoidance mechanism. This is done with the use of a proprietary scoring system to promote contention-free communication and to make sure that each node has fair access to the network.

2.2 The Remote Process Transceiver (RPT)

The RPTs in the monitoring system have the main function of gathering data from the sensors and send it to the CMU. Further, the first RPT will also serve as a repeater to retransmit the command data from the CMU to the second RPT and also can relay the data gathered by the second RPT to the CMU. An RPT is composed of a transceiver, a set of sensors, signal-conditioning circuits, and a microcontroller. Figure 6 shows all these components.

Fig. 6
figure 6

Diagram of remote process transceiver

The proposed water monitoring system has three sensors: temperature, level, and turbidity. The system makes use of sensor components that are of low cost and locally available. The temperature sensor used in the prototype is the LM35D. It has an output of 10 mV/°C with a basic range of 0 °C through 100 °C. A conditioning circuit is designed such that the maximum output voltage would be +2 V.

The turbidity sensor involves the use of a light source and a photosensitive device. In the prototype, a light-emitting diode (LED) is used as the light source and a phototransistor (BPW77N) as the light detector. Lesser light is detected when the turbidity is high. Again, a signal-conditioning circuit in the form of an amplifier is used to produce a maximum output voltage of +2 V.

The water-level sensor uses a simple modified R-2R ladder circuit. The circuit implementation is affordable and easy to mount. The resistors are enclosed in a pipe before they are being submerged in water. In the implementation of the prototype of the proposed monitoring system, every 10-cm change in the water level produces a particular output voltage being produced by the R-2R ladder.

In each of the RPTs, a transceiver is used in the transmission and reception of data. Aerocomm, Inc. AC4790 transceiver assemblies are used, the same as the CMU transceiver. The specifications of the AC4790 transceiver can be read in [7]. Based on the experience, it is worth noting that the transmitter buffer on the Aerocomm device is 256 bytes. The device will begin RF transmission only once the buffer gets to that RF packet size. This can be accessed in the chip’s EEPROM.

The microcontroller in the RPTs generally serves as an interface between the sensors and the transceiver located in each RPT. The microcontroller uses the Z8F6421 Z8 Encore microcontroller from Zilog. Specifically, the microcontroller performs the analog-to-digital conversion from the analog sensors. It also controls the transceiver through its UART port and performs the algorithm for the RPT. The sensor signals are applied at pins PB0, PB1, and PB2, while the transceiver is connected to it using its pins PD4, PD5, and PC0.

A user-defined protocol in the transmission of sensor data is used by the RPTs similar to the CMU protocol but with the inclusion of the 36-bit sensor data field. Figure 7 shows the format of the RPT protocol. The data field in the protocol contains the data from the temperature, turbidity, and level sensors, each with 12 bits.

Fig. 7
figure 7

Format of the user-defined protocol for RPTs

Figure 8 shows the operation of the RPTs in the reception and transmission modes. Upon receiving the command, the header and the destination are identified whether they are correct; otherwise, the packet will be discarded. The correct value of the destination depends on the RPT.

Fig. 8
figure 8

The RPT process flowchart

When the source value is less than the RPT number, it denotes that the data are a command from the CMU or a relayed command from a nearer RPT. This will tend each receiving RPT to gather data from its sensors and then transmit. The last RPT will receive a count value of 01, and the relaying of command should cease. When the destination and header are correct and the source is greater than the RPT number, the received transmission is from an immediate distant RPT containing its sensor data. This should be relayed by the receiving RPT to the CMU or to the next nearer RPT.

3 Results and Discussion

This part of the paper presents the implementation and the results of the tests conducted to determine the performance of the proposed water monitoring system. The system was implemented using two RPTs and one CMU. Each RPT has its own set of sensors. The number of RPTs in the prototype is enough to demonstrate the features of the proposed system, including its scalability. Also, range tests were conducted to determine the effective distance between stations where reliable data transmission can still be achieved. Figure 9 shows photographs of the prototype of the proposed system.

Fig. 9
figure 9

Photographs of the prototype. a Integration of sensors; b the Z8F6421 microcontroller with the associated components; c the AC4790 module transceiver assembly; d the transceiver components

3.1 Sensor Tests

When conducting the sensor tests, the distance between the CMU and RPT1 and between the RPTs are well within the normal range of operation of the transceivers. The exact distance covered is 136 m each, which makes the overall distance equal to 272 m. Further, 15 different actual values of water temperature, turbidity, and depth are used. Three trials are conducted in each actual value. Table 1 shows the average sensor readings as compared to the actual values.

Table 1 Sensor test results sent by RPT to the CMU

The accuracy of the data received at the CMU was tested by comparing the received sensor values at the CMU and the actual sensor values at RPT1 and RPT2. In the transmission of sensor data from the RPTs to the CMU, the received data at the CMU follow closely the readings of the sensors. The slight differences are due to the analog-to-digital conversion. All requests for sensor data by the CMU were replied with by the RPTs. The deviation of the CMU received data with the actual value is due mainly to the inaccuracies of the sensors.

3.2 Range Tests

The range tests were conducted to determine the maximum distance between stations where data transmission and reception are still possible. The distance between stations is varied every 100 m, and at each range value, transmission of command from the CMU and reception of sensor data from the RPTs are conducted. Table 2 shows the results of the range tests. Based on the results from three trials, the system as a whole is effective as a monitoring system up to about 1300 m between stations using the quarter-wave antenna supplied with the transceiver units. A much greater range can be achieved if higher-gain antennas are utilized.

Table 2 Effective distance between CMU and the RPTs

4 Conclusions

The scalable remote water monitoring system using radio frequency links was proposed with the purpose of developing a monitoring system that is of low cost and utilizes locally available components and does not necessarily involve importing expensive parts. It serves as an immediate medium to monitor the fast degradation of the river systems in the Philippines. The communications part of the system used in the sending and reception of command and sensor data is effective up to 1300 m between stations. Issues such as addressing, error control, and data collision in wireless communications systems are managed with the use of the user-defined protocol. Further, the user-defined protocol utilized in the proposed system is effective in the implementation of the scalability feature. The scalability feature extends the coverage area of the monitoring system, allowing the number of RPTs to a maximum of 255 (28 − 1). However, the researchers recommend the use of industry-grade sensors, especially if the budget permits, to achieve more accurate readings. The use of directional antennas to increase the distance between stations is recommended. The researchers envision the use of the system for the transmission of data from sensors in various applications. It is similar but not limited to the systems described in [8, 9]. These applications may include habitat and ecosystem, seismic, civil structural health, groundwater contamination, industrial process, perimeter security and surveillance, and automated building climate control.