An Automated Rainfall Monitoring System

The paper describes a system to automate the monitoring and recording of rainfall using cellular network infrastructure. The paper describes the hardware and the software components and the data communication aspects of the design, and their integration as a complete system. Ancient Sri Lanka had been proud for centuries, of a very successful agricultural economy. Today, even though Agriculture still plays a key role in the Sri Lankan Economy, the agricultural sector has failed to keep up with the adoption of advancing technology and has thus fallen behind many other developing nations. Weather information such as rainfall is critical for successful agricultural activities. Unfortunately present methods of monitoring such information utilize manual observation and recording of data which is highly error-prone. Automation of these monitoring methods can not only increase the reliability, but also improve the timely availability of data, and hence contribute significantly to the betterment of agriculture in day-to-day activities as well as to long-term planning. The system consists of rain gauges with wireless interfaces and a central station. The rainfall information is transferred via SMS (Short Message Service) messages to the central station via a GSM cellular network. The information is received in a database at the central station and can be accessed via the Internet, and the data analyzed. Tndex Terms-Rainfall, Tipping Bucket Rain Gauge, SMS, GSM radio Module, Internet, telemetry


Introduction
For centuries Sri Lanka was a very flourishing Agricultural Economy.In the recent past, this economy has faced severe drawbacks due to poor use of technology.
The automated rainfall monitoring system addresses the need for obtaining timely, accurate information which is critical for the agricultural sector, using a widely available communication technology, the cellular network.The system is illustrated in Figure 1.
Rainfall is monitored via raingauges (remote stations) interfaced to a GSM radio module which can send the rainfall information embedded in an SMS (Short message Service) to the central station.The data transfer is initiated either by the remote station or by a request from the central station.There can be a large number of remote stations communicating with the central station.
The data received is extracted, sorted and saved in the central database.The data can be accessed via a web interface, and analyzed time-wise or location-wise.The data may thus be made readily available to any interested party via the Internet.
By using the existing cellular infrastructure, the rainfall data communication inherits its reliability and coverage, which greatly simplifies the design.

System design and implementation
The system design and implementation is described in three sections as illustrated in Figure 2.

•
The remote station

System Location
The Remote Station The remote stations are manned with rain gauges interfaced to a GSM radio module.The rain gauge is based on a tipping bucket mechanism of 0.1mm accuracy.
The measurement unit or the rain gauge is shown in Figure 3.

Figure 3
The rain water will fall on the tilted tipping buckets through a Teflon-coated funnel.The water will fill the bucket facing the funnel opening.A bucket can hold up to 0.1 mm of rainwater and will tilt over as it reaches its limit.
The water will be tilted over, while the other bucket will be positioned facing the funnel opening.This will collect the new rain water.
Each time the bucket is tilted around the magnetic relay it will generate a pulse.These pulses are counted in a microcontroller-based circuit to measure the rainfall.
While one part of the microcontroller-based circuit is dedicated to the counting of these pulses, the other part is to interface the circuit of the rain gauge with the GSM radio module.
As pulses are generated from the rain gauge, the rising edge of the pulse is captured and is fed to the microcontroller based circuit.Each rising edge of the pulse generates an interrupt in the microcontroller and the number of interrupts generated is counted.
The microcontroller communicates with the GSM radio module using a USART (Uniform

Synchronous Asynchronous Receiver
Transmitter) port.The receive pin of the USART is enabled to generate interrupts.The data transmitted and received are buffered and is sent through a MAX 32 to the GSM radio module.This section of the microcontroller behaves like the interface circuit to the radio module.
The remote station is powered with the main power supply with a back up battery of 12 V while a mechanism for solar power provisioning is planned.
A lead-acid battery is used as this is rechargeable.The main power supply is given to a transformer.The output voltage is given to the battery.Then it is sent through a rectifier bridge and is then regulated to a voltage of 5 V so that it can be given to both the microcontroller circuit and the GSM Module.Thus the circuit will have uninterrupted power either from the mains supply or in case of a drop in mains voltage, the circuit will draw power from the battery.
Figure 4 shows the circuit diagram of the Remote station with the power Supply, The microcontroller Circuit and the GSM Radio Module.

Figure 4
The Fibre Enclosure of the Hardware with the Tipping bucket Rain gauge is shown in Figure 5.

Figure 5
The Once a message is transmitted it will wait for a delivery report, if the report says failure of delivery the message will be retransmitted.
The module can store only up to 20 SMS messages.If this storage limit is reached, the module will reject further SMS Thus the microcontroller will command the RF module to delete the message after it has been read.The software has two timers working at equal time intervals.One timer is dedicated for the transmission of messages while the other time is dedicated for the reception of messages.
These timers are initiated with a gap of half the interval so that the timers may not overlap.

The timer dedicated to the reception of massages
The timer is set with a predefined interval, i.e there is a predefined time lapse between two ticks.Each time a tick occurs the communication object will be accessed.It will check if a new message has arrived.If there is no new message, it will leave the communication object and wait for the new object.
The message can be of two types.It could either be a new message sent by the remote station or it could be a delivery report sent by the network to a message sent by the central station If a new message has arrived it will identify which type of a message it is.. Then the information along with the data contained in the message will be extracted.The extracted message will consist of the transmission time and date of message, the number or the address from which the SMS has been sent and the embedded message.
Then the next step is to verify that the message has been sent from a valid remote station.The extracted address or the number will be checked against the remote station addresses stored in the table Station Data.If the message is from a valid address, the extracted details (station name, date, time and rainfall will be placed in the Rainfall Data table.Otherwise, the message will be discarded. If it is a delivery report it will check what the delivery report is.If the report says that the message has been successfully delivered, it will mark the station as a working station (as the remote station GSM has responded) and clear the number of failures at the Station Data table.
If the delivery report says that the delivery has failed, the number of failures for that remote station will be incremented, and the message will be retransmitted to that remote station.This number of failures can be increased up to three, at which point the station will be marked as a failed station and no more messages will be sent.

The timer dedicated to the transmission of messages
This timer functions in the same way as the other timer.But when this timer ticks it will initiate a message transmission process.
Station Data has a field to keep track of the last time data which was downloaded and when the next download is scheduled to take place.
It will check the Station Data and check the remote station where a new data download is expected within the next 5 minutes.It will retrieve this address and transmit an SMS to the relevant remote station.
The gap between two downloads can be specified at the central station.Once a message has been sent to a remote station the next download scheduled time will be updated.

I
Once the message has been sent it will wait for the delivery report from the network. i The Analyzer Component The rainfall data collected will not be of any use unless it can be presented to the user in a customized manner.Thus it was decided to use a web-based data retrieval technique.The retrieved data could be either location-based or time-based.
The user is given several options to select data such as,

•
The rainfall report for a day

•
The rainfall report for a selected area

•
The rainfall report for a selected month

•
The rainfall report for a selected duration The sorted data will be displayed in a tabular form.
Figure 7 shows the Selection page of the data analyzer.
The figure is attached at the end of the paper for more clearance

Summary
The paper describes the design and implementation of an automatic rainfall measurement system.The system comprises remote units which measure rainfall and reports the measurements to a central station.The central station saves measurements received in a database.The database is accessible by a web interface, which allows the viewer to select and analyze data in a flexible manner.
The communication between the remote and the central station is based on the available cellular infrastructure, and hence is reliable, and simple to use.

Conclusions
An Automated rainfall monitoring System is a more reliable and accurate way of monitoring the rainfall at any area compared to existing manual systems.This is particularly useful in remote areas that lack easy road access and manual measurement of rainfall is inconvenient.In areas where mains power supply is not available, provision of solar power is planned to power the remote station.
The main draw back of the system is its high dependability on the cellular infrastructure.But this has a significant advantage in that, by using the existing cellular infrastructure, the rainfall data communication inherits its reliability and coverage, which greatly simplifies the design.
As cellular network coverage is rapidly expanding in the country, and it is expected that island-wide coverage will be available within two years, this is not seen as a serious impediment for the widespread use of this system.
As most of the items needed to build the circuitry of the remote station can be purchased, or manufactured locally, the cost of a remote unit can be estimated around Rs.15,000 /-.
Remote units can be modified to operate in areas with weak coverage by the use of appropriately designed high-gain antennas.
The remote station, built around the GSM radio module and peripheral interface circuitry, can be easily extended for evolution into a fullyfledged weather station, monitoring not only rainfall, but other environmental parameters such as humidity, temperature, etc. by incorporating appropriate sensors.
Further, the data collected can be used for further benefits, not only to the agricultural sector, but also to society at large.Prediction and warning of natural disasters such as floods and • ^

V V
57 ENGINEER landslides can be facilitated through the analysis of data collected in a timely manner from a number of sensing stations.