Sunteți pe pagina 1din 5

55.

2:: An Internet and Microcontroller-Based Remote


Operation Multi-Sensor System for Water
Quality Monitoring
0. Postolache P. Gir%o M. Pereira H. Ramos
Inst. Telecomunicaqbes Inst. Telecomunicaq6es Inst. TelecomunicaqBes Inst. Telecomunicaqbes
EST/IPS ISTAJTL EST/IPS IST/UTL
Seikbal, Portugal Lisboa, Portugal Lisboa, Portugal Lisboa, Portugal
poctav@alfa.ist.utl.pt psgirao@alfa.ist.utl.pt joseper@est.ips.pt hgramos@alfa.ist.utl.pt

Abstract The solution reported is implemented to maximize the


The paper presents the architecture of a microcontroller- flexibility of a distributed monitoring system capable of
based multi-sensor able to measure different quantities performing the measurement of water quality both in the
used to characterize water quality and, at the same time, to laboratory and in the field (e.g. Tagus River-Portugal).
disseminate data over the Internet. The architecture of the Water quality parameters now considered are turbidity, pH
system includes a sensitive unit (that performs pH, and temperature. The system structure offers the possibility
temperature and turbidity measurements), a data to add, without hard investments, other water quality
acquisition, processing and communication unit, (16F877 measuring capabilities (e.g. conductivity, dissolved
microcontroller), and a RTL8019 LAN controller. The oxygen).
system also incorporates GSM communication capabilities The measurement of the above-mentioned parameters is an
in order to allow stand-alone operation in places such as important part of a water quality monitoring system. The
river basin waters. pH of water determines the solubility (amount that can be
dissolved in the water) and the biological availability
Keywords (amount that can be utilized by aquatic life) of chemical
Telemetry, Web sensors, Water quality monitoring. constituents, such as nutrients, influencing the growth of
water plants. The two other parameters, turbidity (TU) and
temperature (T), play an important role in water plants life.
INTRODUCTION Different distributed measurement solutions have already
Environment has turned into a major issue in particular been reported [l-41 and generally keep separated the
during the last decade. The ozone hole with its problems related with measurement itself from those
consequences (acid rains, rapid weather changes) and the concerning the communication. In this article, we present
increasing levels of pollution all over the world, alerted not elements about water quality parameter measurement and
only rulers but mainly the population all over the world, about a solution for communication between different
particularly in developed or under development countries, measurement nodes or between measurement units and an
to the importance of preserving and improving the advanced control and processing unit (e.g. PC) via Internet.
environment. It is generally accepted nowadays that quality The proposed solution utilizes a PIC16F877
of life depends on many aspects, including environment, microcontroller and a RTLSO19 LAN controller in order to
and that growth must take them all into consideration offer the direct connectivity of a multi-sensor unit to the
(sustainable growth). ‘The impact of these preoccupations in Internet (normal Internet or wireless Internet) [2-31.
metrology has been and will continue to be extraordinary.
The need for measuring systems, both for soil, water and air SYSTEM DESCRIPTION
monitoring and for forensic reasons, boosted research and The architecture of the system consists of a measurement
development in several domains, particularly in sensors. and communication component organized in two
The demand of portable, easy to operate equipment leads to operational blocks: a Web-sensor measurement block and a
electronic equipment based on electric transducers. Also Web-sensor communication block.
increasingly demanded is telemetric, stand-alone equipment
Web-sensor measurement block
for continuous operation, namely for sea and river water
The Web-sensor measurement block represents the main
monitoring. By introducing an Internet and microcontroller-
part of the water quality monitoring system and includes
based remote operated multi-sensor-measuring system, the
the sensors, the conditioning circuits and the
present paper aims at to contribute to this demand. It is the
microcontroller that performs the acquisition, the
first approach to a system to be built and installed in the
processing of acquired data in order to extract the
near hture for river water quality monitoring in selected
numerical value of the measured parameters.
Portuguese rivers.

0-7803-7454-1/02/$17.0002002 IEEE 1532


Sensors The Model 11 pH sensor used is a field sensor that is
The measurement block includes a IS1 pH meter Model 11, suitable for submersion. It features a recessed probe design
a WQ7700 turbidity sensor from Water Global and a that tends to be self-cleaning even for solutions containing
PtlOOO resistor used as a temDerature sensor. suspended solids. The reference cell is a patented liquid
junction chemically inert and the pH glass electrode is
Web sensor
made up of a patented material designated Plunger. The
measuring range is 0 to 14 pH with the theoretical slope
block
provided by the manufacturer of k59.16 mV/pH unit at
V
25°C.
Referring to the temperature measurement a RTD probe
(PT 1000) is used.
ConditioningCircuits
To obtain pH, temperature and turbidity values, different
conditioning circuits (CCs) are designed and implemented.
A few meters may separate sensors and microcontroller. In
order not to degrade the analog signals output by the
... sensors, the transmission between each sensor and the
microcontroller is in current. Thus, the main components of
CCpH, CCT and CCnr conditioning blocks (Figure 1) are the
preconditioning circuits, which adapt sensors outputs to the
inputs of 4-20 mA transmitters, and 4-20mA current loop
receivers.
The pH sensor output impedance is higher than 500 MQ.
Thus, a MAX406 micro-power, precision operational
amplifier is connected to sensor's output for impedance
adaptation purposes. The main features of this operational
Web sensor
amplifier that recommend its use are the low supply current
measurement
block (less than 1.2pA) and input offset voltage (0.25mV). The
output signal of op amp is directly input to a XTRlOl 4-20
mA two wire transmitter to convert the input voltage
received from the MAX406 into a current corresponding to
pH values (ex.20 mA. for pH=l and 4 mA for pH=ll).
After 4-20 mA transmission, the current signal is converted
near the microcontroller analog input into a voltage (UpH)
included in the 0+5V interval. The current-to-voltage
conversion is made using a RCV420 4-20 mA current loop
receiver.
In what concerns the temperature sensor, the resistance-to-
current features of XTRlOl are used. Thus, using the
PtlOOO together with a XTR101, a 4 to 20 mA current is
-igure 1. Web-sensor proposed architectures, A I ant obtained for the temperature values included in the 5+3OoC
A2.
temperature interval. The 4-20mA current signal is
The WQ770 is a submersible turbidity meter with the converted into a voltage, UT,using also a RCV420.
sensor mounted in a rugged anodized housing and fully The WQ770 turbidity-sensing unit includes two remote
encapsulated, to be used in-situ environmental monitoring. selectable measuring ranges (O-SONTU, 0- 1000NTU) for
The probe has a light emitting diode (LED) as light source higher sensitivity. In our application (river water), the 4-
and optical lenses that are able to focus light into a dark- 20mA WQ770 output for O-5ONTU is normally
field sample region. Two detectors with limited acceptance recommended. Once again the current to voltage conversion
angles collect light: one collects direct light and the other is performed before microcontroller's input using a
collects light at 90" to the focused beam. The sensor RCV420. The results obtained with this sensor are
operates from battery power and ratio measurements are presented in Figure 2.
computed. The measured light level is converted into an
electrical signal, filtered, resulting in a raw 4-2OmA signal. Microcontroller
The manufacturer guarantees a linearity of f0.05 NTU in Voltages Upw, UT and UTu delivered by CCpH, CCT and
the range 0.1 to 200NTU. CCTU are acquired using the analog input channels

1533
ANO+AN2 of a I'IC16F877 microcontroller. One of To publish sensors data pages, both architectures are
microcontroller's digital outputs, RCO, is used to select the considered in two versions, one using a cable connection
turbidity sensor operational range (RCO=l for 0-50 NTU, between the Ethernet controller and the Internet service
and RCO=O for 0-1000NTU). provider (normal Internet connection), and the other using a
GSM to assure that connection (wireless Internet
connection).
apH, b p H

Figure 2. The turbidity transducer characteristic for five


calibration points (TU={O, 20,200,800, 1000).
Referring to the processing component, three blocks are
implemented in the microcontroller to perform the UpHto
pH conversion, UT to temperature conversion and Um to
turbidity conversion. Taking into account the linearity of
the above-mentioned transducers (0.8% for pH transducer,
0.4% for T transducer and 0.9% for TU transducer), a Figure 3. Evolution of apHand bpHcoefficients versus
linear conversion of the acquired voltages is performed. temperature.
The characteristics associated to pH, T and TU are The first architecture, A l , uses the RS232 of the PC to
expressed and implemented in the following form: receive pH, temperature and turbidity values sent by a
PH = 'IpH ( T ) ' U p H bpH (1) MAX232 multi-channel RS232 driverheceiver connected to
microcontroller's USART port. The received data is
T = UT 4-bT (2) processed in LabVIEW and published on the Web using the
TU=am.UTU+bTU (3) Datasocket Transfer Protocol and LabVIEW Web
where the aT=7 "Cllr, bT=O"C, am=293.7 NTUN, b T F - Publishing capabilities [4-51. Using the LabVIEW Web
330 NTU. In the pH case, apH and bpH are temperature publishing tool together with a client Web browser (e.g.
dependent. Thus, a look-up table is used to extract the Internet Explorer), the front page of the virtual instrument
temperature corrected pH information. To reduce the implemented on the PC that is RS232 connected to the
required memory, the table includes the values of apH and microcontroller is published on the Web (Figure 4) and may
bpHfor temperatures in the 5+30"C interval. In Figure 3 the be accessed by remote users. The Web page is refreshed
evolution of apH and bpH versus temperature is presented. every 10 minutes. However, and since the system is
continuously measuring, if the level of any of the measured
The information obtained at the numerical conversion quantities is overcome, the refresh time is reduced up to the
blocks output is used to generate specific alarms ( A p ~ : lower limit of 1s [6].
pH>>pHnOmI,AT: T>>Tnomal,AT": TU>>TUnOma~) or is The second architecture, A2, is based on the utilization of
made available to the Word Wide Web. PIC16F877 to implement a microcontroller Web server that
Web-sensor communication block automatically publishes the values of pH, temperature and
The architectures considered to transform the multi-sensor turbidity. The microcontroller is characterized by 8Kbx14
unit into a Web multi-sensor are: words of FLASH program memory, 368x8bytes of Data
A l : microcontroller- RS232 - PC - Ethernet controller - Memory (RAM), 256x8 bytes of EEPROM data memory
Internet service provider - www and interrupt capabilities satisfies the minimum
A2: microcontroller - Ethernet controller - Internet service requirements, in terms of processing capabilities, for a Web
provider - www. sensor. A critical factor associated with Web pages storage

1534
is microcontroller's memory capacity. A Web server needs
ample storage for Web pages, and the on-chip ROM is
clearly inadequate for this [7]

Multi-web sensor

Water parameters
__I

118 2

Status page

Home Pwe

Figure 5. Architecture A2:Web page.

The software for the automatic generation of the pH,


temperature and turbidity on the Web is developed in PIC C
Compiler.

CONCLUSION
Figure 4. Architecture A I : Web page. Taking into consideration the application of the telemetric
system to be built, a wireless Internet connection version of
To overcome this limitation, a 32K EEPROM external architecture A2 is chosen. In fact, the wide coverage of
memory (Microchip 24C32.) is included in the system. The GSM services in Portugal makes possible the operation of
communication between the microcontroller and this mobile communication-based telemetric systems all over
external memory is made using the 12C two wires bi- the country and, in particular, in critical points of the most
directional interface [81. Also connected to the important Portuguese rivers such as in the Tagus estuary
microcontroller through 12C bus is a real time clock. This near Lisbon. Presently, a Siemens M20 GSM cellular
clock is read every time the Web page is refreshed and the engine is utilized to connect the Ethernet controller to the
corresponding time published together with the values of Internet service provider. This mobile phone is hlly
the measured quantities. The Ethernet connection is made controlled by the microcontroller using dedicated
using a Realtek RTL8019 Ethemet controller that includes commands. If proved necessary, a GPRS dual mode GSM,
the network interface controller, a serializer and a buffer such as Siemens MC35, will replace the M20.
RAM [91. As strength of the proposed solution it can be underlined
The microcontroller drives the Ethernet controller the data sensor acquisition (pH, turbidity and temperature
simulating ISA bus activity. For that purpose, the data), linearization and on-line correction (temperature
microcontroller performs actions such as address and data correction in the pH case) and wireless distribution of the
lines setting. To implement those actions, 15 processed data, making it available to any user on the
microcontroller digital lines are used (MO, RB1 for read World Wide Web.
and write outputs, M 2 e R B 7 Ethernet address lines, As already referred, the work here reported represents a
RCO+RC7 Ethernet data lines). From the above-mentioned first step in the design and implementation of a stand-alone
lines, only the first two are used full time to drive the Web-based telemetric system for water river quality
Ethernet interface. monitoring. The final equipment will include several other
The main components necessary to materialize the multi- sensors to measure namely conductivity, dissolved oxygen,
Web sensor architecture A2 just described are included in content of heavy metal ions (lead, copper, mercury, etc).
Microchip MPLAB-ICD and Microchip PICDEM.net. Presently, we are studying the possibility of integrating
Figure 5 shows the Web page published using that several of these sensors into an integrated tailor-made
architecture. circuit. The results will be presented in the near hture.

1535
ACKNOWLEDGMENTS Institutului Politehnic din Iasi, Tomul XLV (IL) Fax.
This work was supported in part by Portuguese Science and 5A, pp. 285-290, Iasi, Romania, November 1999.
Technology Foundation PRAXIS XXI program [4] National Instruments, "Using LabVIEW with TCP/IP
FCT/BPD/2203/99 and the Project FCT PNAT/1999 and UDP", Application Note 160, National Instruments
EEV15052. This support is gratefully acknowledged. We Corporation Press, July 2000.
would also like to thank the Centro de Electrotecnia [5] National Instruments -"Integrating the Internet into
Te6rica e Medidas Elktricas, IST, Lisboa, for their Your Measurement System - Datasocket Technical
important technical support. Overview", National Instruments Corporation Press,
November 2000.
REFERENCES [6] 0. Postolache, P. Silva G i r b , H. Geirinhas Ramos, M.
[l] A. Bacciagalupi, A. Bemieri, D. Capriglione, "A Web- Dias Pereira,' "A Distributed Virtual Instrument for
based Network fix Distributed Measurements", Proc. Indoor Air Monitoring", Proc. ICEMI'2001, Guilin,
l l t h IMEKO TC-4 Symposium, pp. 182-185, Lisbon, China, November 2001.
Portugal, September 2001. [7] J. Bentham, "TCP/IP Lean -Web Servers for Embeded
[2] F. Toran, D. Ramirez, A. E. Navarro, S . Casans, J. Systems", CMP Books, 2000.
Pelegri, J.M Espi, "Design of a virtual instrument for [8] J.Peatman, "Design with PIC Microcontrollers",
water quality monitoring across the intemet", Sensors Prentice Hall, New Jersey, 1997.
and Actuators B, 3766, pp. 1-5, June 2001. [9] Microchip, "PICDEM.net Intemet Solutions",
[3] Paul0 Maia Santas and Pedro Silva GirBo, "Telemetry Microchip Inc. Press, 2001.
Using Cellular ]Mobile Communications", Buletinul

1536

S-ar putea să vă placă și