Abstract
The project presents an alternative for acquisition and management of remote weather station metrics for applications in the agricultural and energy areas, among others, through stack protocol based on ATMEGA328P controllers associated with Wireless ISP 802.11 b/g for wireless connectivity to the server. The parameters acquired from the stations are stored in a database for offline analysis and on the online web.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
49.1 Introduction
Meteorological data acquisition equipment must be installed outdoors and in remote locations; that is why, wireless networks (WSN) are used for data transmission [1, 2]. The WSN provide great applicability at low cost with advantages such as flexibility and scalability [3, 4]. Once the communication is established, the microcontrollers must build the data frame for transmission of information by means of internal conditioning of a UART (Universal Asynchronous Receiver Transmitter) [4, 5].
The efficiency in the network depends largely on the topology [6, 7], the nodes must be easy to install; that is, once installed, the only information that must be configured is the address of device being a strategy for optimal performance of WSN [8, 9].
A complete system should provide ease of mobility of equipment through the nodes, that is, allow an exchange of communication node in case of a malfunction [10].
In case the device is close to an Internet access point, IoT cloud server could be used, which can be integrated into the microcontroller and thus manages the station's metrics [11].
To guarantee flexibility, a solar kit for electricity generation can be installed in each of the network nodes so that if the public energy supply network fails, it can be put into operation [12].
49.2 Data Logger System Architecture
The system has three interconnected ATMEGA328 microcontrollers distributed in:
-
Acquisition-Storage
-
Viewing
-
Communication.
The communication between the microcontrollers is through the UART protocol which consists of sending information and receiving data, for which it sends two or more information through the same communication port can be used the separators of chain sections (Fig. 49.1).
Transmissions consist of STAR-STOP for ASCII codes through serial, as established in teletype operation. The sending of data in a chain allows one or more data to be sent at the same time, each data being separated as a character (“,”), which will be used by the receiving microcontroller to identify and process it.
Each attribute is assigned to a storage box so a variable is created to store the data and also a method to count the stretches entering by serial port.
In this case, we store in a decimal-type variable because some data enter in decimal type or we can convert to integers to store integer.
float datos [] = {0,0,0,0,0,0,0,0,0,0,0}
By specifying the address of record boxes, we can store data in the same variable, and then to call the data when required would be as follows:
Year = data [0] Month = data [1] Day = data [2] Temperature = data [3] Humidity = data [4] Pressure Atm = data [5] Wind speed = data [6] Wind direction = data [7] UV = data [8] Rain gauge = data [9] Electrical Voltage = data [10] Electric current = data [11]
49.3 Network Design
The Open Systems Interconnection (OSI) model is a 7-layer data model designed to organize the various software and hardware protocols involved in the communication network, at the top part of stack.
As a simplified version of OSI model, the TCP/IP model is useful in the layout of today’s end-to-end networks. The TCP/IP stack groups the protocols into four layers: application, transport, Internet, and link. As with the OSI model, the application layer initiates loading and the transport layer assigns ports. The Internet layer handles the routing of Internet (IP) packets while the link layer handles the local area communication (MAC) and physical transmission media (Fig. 49.2).
Data loggers convert physical parameters into electrical signals that are converted into binary values by analog to digital converters in the microcontroller, converting the ADC values into data frames by the application layer.
The gateway is used to interconnect two different physical layers to collect the information in the database and support them through MySQL (Fig. 49.3).
The structure of each weather station incorporates an anemometer, rain gauge, temperature, humidity, barometric pressure, and solar radiation with optional soil moisture sensor for comprehensive monitoring of agriculture and the environment in a single package for simple configuration.
The system’s design provides that stations that do not have a direct line of sight to the transmission connection node can use the other stations as a link point.
The intervals of transmission and storage of information are 10 min, for security has a feedback so that in case of loss of connection to the network of any station this can retry to transmit when you have restored your connection taking data from its backup of a micro SD that is implemented in each station.
The structure of the prototype algorithm is shown in Fig. 49.4. This algorithm controls the properties of the weather station over the TCP/IP network.
49.4 Results
Once the data logger and the communication network have been designed, the next step is the evaluation of software which aims to measure the level of reliability and performance of system.
The weather data of stations are displayed in the web application on a wireless sensor network (WSN) base. All weather parameters collected from the local WSN base stations will be replicated in a centralized database in the cloud, allowing users to access the data in real time from a distributed weather station (Figs. 49.5 and 49.6).
Figure 49.4 shows the dynamic PHP web page that automatically updates after 10 s and shows the last 100 results of database; in case you want more data, you must choose the dates to access the database.
The analysis of root mean square error (RMSE) and the mean bias error (MBE) of results obtained is defined as:
Being:
- Xestimated:
-
weather station Kestrel 5500
- Xmeasured:
-
prototype [13].
We can analyze the statistical results of 1000 measurements of different measured variables, being the deviation practically zero as shown in the scatter plot of Fig. 49.7 demonstrating that most of experimental points are located over the line of fit (Fig. 49.8).
49.5 Conclusion
This project has the advantage of being scalable since if the device is not in the wireless coverage area or a wireless network cannot be expanded due to various factors, a GSM/GPRS shield can be incorporated to transmit the data directly to the database in the cloud.
The design of a network of integrated wireless weather stations based on the ATMEGA328 microcontroller and wireless communication for communication and transmission of data on temperature, relative humidity, wind speed, and direction and in special cases soil moisture, pH, and resistivity is considered important for the development of future projects in the area of renewable energies as well as in the agricultural area as it has free access to the database stored and managed by MySQL.
The integration of ATMEGA328 microcontrollers with Raspberry is essential for management through a wireless network with TCP/IP communication protocol showing a solution that reduces costs because it is a simple, flexible, and scalable design at the same time can be autonomous in its operation.
References
I.F. Akyildiz, W. Su, Y. Sankarasubramaniam, E. Cayirci, Wireless sensor networks: a survey. Comput. Netw. 38, 393–422 (2002)
A. Ruano, S. Silva, H. Duarte, P.M. Ferreira, Wireless sensors and IoT platform for intelligent HVAC control. Appl. Sci. 8, 370 (2018)
D. Chen, Z. Liu, L. Wang, M. Dou, J. Chen, H. Li, Natural disaster monitoring with wireless sensor networks: a case study of data-intensive applications upon low-cost scalable systems. Mob. Netw. Appl. 18, 651–663 (2013)
A. Romero, A. Marín, J. Jiménez, Wireless sensor network for early warning monitoring in underground mines: a solution to the problem of explosive atmospheres in Colombian coal mining. Ingeniería y Desarrollo, pp. 227–250 (2013)
I. Harish, S. Ilango, A protocol stack design and implementation of wireless sensor network for emerging application, in International Conference on Emerging Trends in Computing, Communication and Nanotechnology (ICECCN 2013), pp. 523–527
S.S. Anjum, R.M. Noor, M.H. Anisi, Review on MANET based communication for search and rescue operations. Wirel. Pers. Commun. 94, 31–52 (2017)
J. Vales-Alonso, F.J. Parrado-García, P. López-Matencio, J.J. Alcaraz, F.J. González-Castaño, On the optimal random deployment of wireless sensor networks in non-homogeneous scenarios. Ad Hoc Netw. 11, 846–860 (2013)
X. Yu, W. Huang, J. Lan, X. Qian, A novel virtual force approach for node deployment in wireless sensor network, in Proceedings of 2012 IEEE 8th International Conference on Distributed Computing in Sensor Systems, Hangzhou, China, 16–18 May 2012; pp. 359–363
F.M. Al-Turjman, H.S. Hassanein, M.A. Ibnkahla, Efficient deployment of wireless sensor networks targeting environment monitoring applications. Comput. Commun. 36, 135–148 (2013)
Y. Mei, C. Xian, S. Das, Y.C. Hu, Y.H. Lu, Sensor replacement using mobile robots. Comput. Commun. 30, 2615–2626 (2007)
M. Pravin Kumar, R. Velmurugan, P. Balakrishnan, Detection and control of water leakage in pipelines and taps using Arduino nano microcontroller, in Proceedings of ICIMES 2019 Intelligent Manufacturing and Energy Sustainability, Maisammaguda, Hyderabad, India, from 21 to 22 June 2019
J. Gomez, C. Socarrás, J. Fernández, A. García, Integration of a mobile node into a hybrid wireless sensor network for urban environments, in Proceedings of ROBOT 2017: Third Iberian Robotics Conference, Sevilla, Spain, 22–24 Nov 2017
S. Rosiek, F.J. Batlles, A microcontroller-based data-acquisition system for meteorological. Energy Convers. Manage. (2008)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Vacacela, S.G., Freire, L.O. (2021). Implementation of a Network of Wireless Weather Stations Using a Protocol Stack. In: Reddy, A., Marla, D., Favorskaya, M.N., Satapathy, S.C. (eds) Intelligent Manufacturing and Energy Sustainability. Smart Innovation, Systems and Technologies, vol 213. Springer, Singapore. https://doi.org/10.1007/978-981-33-4443-3_49
Download citation
DOI: https://doi.org/10.1007/978-981-33-4443-3_49
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-33-4442-6
Online ISBN: 978-981-33-4443-3
eBook Packages: EngineeringEngineering (R0)