19th Telecommunications forum TELFOR 2011 Serbia, Belgrade, November 22-24, 2011.
978-1-4577-1500-6/11/$26.00 2011 IEEE
Abstract Weather monitoring is of great importance in many domains such as: agriculture, military, entertainment etc. There are several solutions for monitoring the weather. The classical solution consists in static weather stations. Another solution is based on wireless sensor networks (WSNs). The third solution uses low dimensions weather stations. This paper presents a weather station made of temperature, humidity, pressure and luminosity sensors embedded in a microcontroller based board. The station is controlled through the SMS service of mobile phones. Keywords microcontroller, sensor, SMS, weather monitoring. I. INTRODUCTION HEATHER monitoring is of great importance in many domains. It offers information about temperature, pressure, humidity, luminosity, wind speed and direction which are useful in applications from different domains such as: agriculture, military, entertainment etc. There are several solutions for monitoring the weather. The classical solution consists in static weather stations. They collect data and send them by wires to a central station. The solution requires specific buildings for the weather stations and the resolution of the monitoring is low since the number of such stations is relatively low because of financial reasons. Another solution is based on wireless sensor networks. Wireless sensors are dropped or placed in the desired area and they collect and send wirelessly the weather information. Data can be sent by each sensor or can be collected locally and sent by a unique device. The solution offers high resolution (it depends on the density of the sensors) but has the classical disadvantages of wireless sensor networks: limited lifetime, lower accuracy, low robustness etc. The third uses low dimensions weather stations. They can be static or mobile. The sensors are implemented in boards of a few square inches. They have to be connected to a CPU and to a communication interface. They can be linked to a PC, to a laptop or can be embedded in a microcontroller based board. These small weather stations can be controlled locally, by a PC or a laptop, or remotely. Mircea Popa is with Politehnica University, Faculty of Automation and Computers, Department of Computers, No. 2, Blv. V. Parvan, 300223 Timisoara, Romania (phone: +40 256 403217, e-mail mircea.popa@ac.upt.ro). Catalin Iapa is with Politehnica University, Faculty of Automation and Computers, No. 2, Blv. V. Parvan, 300223 Timisoara, Romania (e- mail catalin@ligaac.ro). The remote control can be implemented through wires, on Internet, or wirelessly by using different communication technologies. This paper presents a weather station made of temperature, humidity, pressure and luminosity sensors embedded in a microcontroller based board. The station is controlled through the SMS service of mobile phones. The rest of the paper is organized as follows: the next section presents related work, the third section describes the proposed solution and the last section outlines the conclusions. II. RELATED WORK Weather monitoring was approached by many authors. The specific literature describes a consistent work. Reference [1] shows how data from static sensors can be collected by using mobile robots (data mules). The advantage is to save the energy of the sensors by avoiding wireless communications. Thus, the lifetime of the WSNs will be prolonged. Reference [2] proposes a wireless remote weather monitoring system based on Micro-Electro-Mechanical Systems (MEMS) and wireless sensor networks. The sensors for measuring temperature, humidity, pressure, wind speed and direction are integrated on a single chip. The sensed information is sent wirelessly to a central PC. Reference [3] describes another solution for environment monitoring by WSNs. In order to avoid long distance communications between the sensors and a central station, the paper proposes the use of mobile devices (PDAs, mobile phones, laptops), interconnected in a MANET, for collecting and centralizing the readings of the sensors. In reference [4] a new portable micro weather station is presented. It consists in a multi-sensor chip, anemometer, measurement system, display system and power management system. The multi-sensor chip senses temperature, relative humidity and pressure. Reference [5] introduces the idea of Weather Station on a Chip (WSOC) and describes an implementation of such a chip. WSOC is made by sensors, a microcontroller, interface circuits and ASIC for power management. In reference [6] it is shown how wireless sensor networks can be used in environmental, including weather, monitoring. A comprehensive review of the available solutions to support environmental monitoring applications is presented. Embedded Weather Station with Remote Wireless Control Mircea Popa, Member IEEE, and Catalin Iapa W 297 III. THE PROPOSED SOLUTION A. General Presentation The weather station consists in a weather board which contains temperature, humidity, pressure and luminosity sensors, embedded in a microcontroller based board. The station is remotely controlled by the user through SMS commands. The block diagram is presented in fig. 1. Fig. 1. The block diagram of the weather station B. The Hardware The system uses the SEN-08311 USB Weather Board, [7], which includes the SHT15 temperature and humidity sensor, the SCP1000 pressure sensor and the TEMT6000 luminosity sensor. The SHT15 sensor offers the value for the temperature with a precision of +/- 0.3 0 C, the SCP1000 offers the value for the pressure with a precision of +/- 150 Pascal and the TEMT6000 sensor offers values between 1 and 1023 the high values indicating dark levels. The board collects the data once/second and transmits it through USB or wirelessly as a string of characters made of the values for the humidity, the temperature, the pressure, the luminosity, the level of the battery (0 if the USB connection is used) and the registration number which is incremented at each transmission. The SEN-08311 USB Weather Board is presented in fig. 2. Fig. 2. The SEN-08311 USB Weather Board The user accesses the station through the SMS service. For that, the board has the GSM Telit GM862-GPS module. It is connected serially to the CPU. The CPU is based on the ATmega 328 microcontroller. It is an 8-bit AVR RISC-based microcontroller. Its internal memory is made of 32KB flash memory with read-while- write capabilities, 1KB EEPROM and 2KB SRAM. Other features are: 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare modes, interrupt system with internal and external interrupts, two serial interfaces: USART and SPI, 6-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, and five software selectable power saving modes. The power supply may have values between 1.8 and 5.5 volts. C. The Software The software is written in the Python language. It is divided in three parts: - the main program for initializations, establishing the connection to the GSM network, receiving the data from the WSB Weather Board and processing the sensed values so that the user commands can be achieved; - the SIM library: the functions set the PIN value, prepares the SIM card, verifies the strength of the signal for using the GSM network; - the SMS library: the functions are responsible with sending, receiving and erasing, after being processed, the messages; Fig. 3 presents the diagram of the software. At start, initializations are performed: the status led, the SIM card and the time is updated. Several variables are declared and initialized. They will memorize the current status of the weather, the minimum and maximum values, the time associated with the measurements and the average value of the weather parameters. 298 After the start, the program enters an infinite loop for the real-time operation. After entering the loop, the connection with the USB Weather Board is established and the string of characters, representing the sensed values, is read at the rate of one read/second. The string is separated in values for each parameter and is memorized in the corresponding variables. The code doing this operation is presented below: weatherboard = SER.receive(20) variable = weatherboard.split(,) humidity = int (variable[0]) temp = int (variable[2]) pressure = int ((int (variable[4]) * 760)/101325) luminosity = int(variable[5]) Fig. 2. The software diagram The current memorized values for temperature, humidity, pressure and luminosity are compared with the maximum and minimum values during the day. If the current values exceed a limit, this is updated and the time when it was read is also memorized. The average value is updated too. 299 Next, the occurrence of a special situation is checked. If this service is set the weather station sends automatically a message to the user in the following situations: the temperature exceeds 30 0 C, falls below 0 0 C or the 22 hour is reached when a report containing the weather values for the whole day is sent. Between two readings from the weather board, the program verifies if a command was launched by the user. The data received from the sensor board is structured in an ASCII string with the following format: #HH.HH,FFF.FF,CCC.CC,TTT.TT,PPPPPP,LLL,B,IIIIII$ and having the following signification: HH.HH Humidity from the SHT15 sensor FFF.FF Temperature, in Farenheit degrees, from the SHT15 sensor CCC.CC Temperature, in Celsius degrees, from the SCP1000 sensor TTT.TT Temperature, in Farenheit degrees, from the SCP1000 sensor PPPPPP Pressure from the SCP1000 sensor LLL Luminosity level from the TEMT6000 sensor B Battery level; if the power supply is given by the USB port, B=0 IIIIII Index value D. Users Commands The user can receive the following information: - current weather status; - weather status in the last 24 hours; - current temperature and its status in the last 24 hours; - current humidity and its status in the last 24 hours; - current pressure and its status in the last 24 hours; - current luminosity and its status in the last 24 hours; - list of commands; - description of commands. Fig. 4 shows the execution of a command. The command offers the maximum and minimum values for the temperature, pressure and humidity collected over the whole day. Fig. 4. The execution of the Weather 24h command IV. CONCLUSIONS The paper has presented a weather station consisting in temperature, humidity, pressure and luminosity sensors, a microcontroller and a GSM module. The station can be controlled through a mobile phone with SMS service. Future development directions are: - adding other sensors, such as sensors for wind direction and speed and sensors for precipitations; - adding a friendlier user interface; the present solution is based on text only; - connecting the weather station to Internet so that the information is present real-time and can be consulted through a PC or a mobile phone with the GPRS service. REFERENCES [1] O. Tekdas, J.H. Lim, A. Terzis, and V. Isler, Using Mobile Robots to Harvest Data from Sensor Fields, IEEE Wireless Communications, vol. 16, Issue 1, 2009, pp. 30-37 [2] R.H. Ma, Y.H. Wang, and C.Y. Lee, Wireless Remote Weather Monitoring System Based on MEMS Technologies, Sensors, 2011 [3] A. Vasiliou and A.A. Economides, MANETs for environmental monitoring, in Proc. of ITS2006 International Telecommunications Symposium, Fortaleza, Brasil, 3-6 September [4] Z. Fang et al., A new portable micro weather station, in Proc. of 5 th IEEE International Conference on Nano/Micro Engineered and Molecular Systems (NEMS), 20-23 January 2010, pp. 379 382 [5] Q.A. Huang, et al.., Weather Station on a Chip, in Proc. of IEEE Sensors, 22-24 Oct. 2003, Toronto, Canada [6] L. M. Oliveira, and J.J. Rodrigues, Wireless Sensor Networks: a Survey on Environmental Monitoring, Journal of Communications, vol. 6, no. 2, April 2011, pp. 143-151 [7] www.sparkfun.com 300