A Monitoring System for Intensive Agriculture Based on Mesh Networks and the Android System ⇑ Francisco G
Total Page:16
File Type:pdf, Size:1020Kb
Computers and Electronics in Agriculture 99 (2013) 14–20 Contents lists available at ScienceDirect Computers and Electronics in Agriculture journal homepage: www.elsevier.com/locate/compag A monitoring system for intensive agriculture based on mesh networks and the android system ⇑ Francisco G. Montoya a, , Julio Gómez a, Alejandro Cama a, Antonio Zapata-Sierra a, Felipe Martínez a, José Luis De La Cruz b, Francisco Manzano-Agugliaro a a Department of Engineering, Universidad de Almería, 04120 Almería, Spain b Department of Applied Physics, Universidad de Córdoba, Córdoba, Spain article info abstract Article history: One of the most important changes in the southeast Spanish lands is the switch from traditional agricul- Received 12 April 2013 ture to agriculture based on the exploitation of intensive farmlands. For this type of farming, it is impor- Received in revised form 12 July 2013 tant to use techniques that improve plantation performance. Web applications, databases and advanced Accepted 31 August 2013 mobile systems facilitate real-time data acquisition for effective monitoring. Moreover, open-source sys- tems save money and facilitate a greater degree of integration and better application development based on the system’s robustness and widespread utility for several engineering fields. This paper presents an Keywords: application for Android tablets that interacts with an advanced control system based on Linux, Apache, Wireless sensor network MySQL, PHP, Perl or Python (LAMP) to collect and monitor variables applied in precision agriculture. TinyOS 6LoWPAN Ó 2013 Elsevier B.V. All rights reserved. TinyRPL Android 1. Introduction real-time applications that operate using large datasets processed by the device or a cloud server. This mode of operation is a key as- Wireless Sensor Networks (WSNs) represent an emerging tech- pect of decision support (Antonopoulou et al., 2010; Zheng et al., nology for intensive farming. Wireless technology yields flexibility 2011) or tracing systems (Sallabi et al., 2011). Therefore, many sec- in sensor installation and network robustness, while reducing both tors may benefit from the information generated by mobile devices maintenance complexity and the associated costs (Li et al., 2011). to optimise systems and procedures. Previous work (Gómez et al., 2012) has contributed to precision The primary objective for this work is to develop and integrate a farming through the implementation of a technological platform multiplatform application for advanced precision agriculture con- based on free software for monitoring cultivation zones, such as trol and monitoring. a greenhouse or farmlands. However, current trends are converg- This paper is organised as follows: Section 2 describes the mate- ing on mobile technologies. Smartphones are a common and rials and methods used, Section 3 shows the results and Section 4 important part of our daily life primarily because they are portable, includes the concluding remarks. ubiquitous, small and light. From a social perspective, it is clear that the mobile communications are extremely relevant. The scien- 2. Materials and methods tific community is aware of such relevance, and many applications are under development in several science and engineering fields 2.1. System architecture (Dala-Ali et al., 2011; Chen et al., 2011; Monares et al., 2011). Sim- ilarly, agriculture is adopting such changes, and several agricul- Fig. 1 shows the system architecture organisation. There are tural applications have been generated (Rafoss et al., 2010) three elements: (a) sensors that measure the environmental infor- describe real-time mobile phone applications. mation; (b) wireless sensor networks that transport the data; and Furthermore, the new generation of advanced operating sys- (c) the server, which receives, stores and displays the data. tems, such as iOS or Android, have facilitated the development of (a) Sensors: The sensors measure environmental variables from ⇑ Corresponding author. Tel.: +34 950214501. the farmland air and soil. Two types of sensors are utilised: E-mail addresses: [email protected] (F.G. Montoya), [email protected] (J. Gómez), sensors integrated in the wireless devices and other external [email protected] (A. Cama), [email protected] (A. Zapata-Sierra), felipe@ sensors attached to the devices. m2mobi.com (F. Martínez), [email protected] (J.L. De La Cruz), [email protected] (F. Manzano-Agugliaro). 0168-1699/$ - see front matter Ó 2013 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.compag.2013.08.028 F.G. Montoya et al. / Computers and Electronics in Agriculture 99 (2013) 14–20 15 Fig. 1. System architecture. (b) Sensor network: The WSN network is composed by all the 2005). The value was corrected taking into account the bulk sensor nodes that acquire and transmit information to a spe- density since the probe is designed to provide volumetric cial node, the coordinator node (multipoint-to-point com- moisture values (Cobos and Chambers, 2010). The typical munication paradigm), which acts as the edge-routing thickness of greenhouse soils and sports fields is usually node. The coordinator node receives data from neighbouring 20 cm, so that the probe was installed to that depth. For nodes and sends it to the server through a different interface. probe installation, a greater volume of soil than the size of The sensor nodes are separated by no more than 300 m from the probe was extracted; probe was placed slightly tilted the coordinator node (Afanasyev et al., 2010) to avoid sev- to ensure ground contact, and flat side perpendicular to eral hops. Thus, we utilise the routing protocol for low the ground surface, in order to facilitate the vertical flow power and lossy networks (RPL) (RPL, 2013). The WSN uses of water. The soil was run through a 5 mm sieve before pro- 6LoWPAN tehcnology comprising low power wireless ceeding; thereby the gravel is eliminated around the probe, networks (LoWPANs) and IPv6 local area networks. The and ensures a good transmission of moisture from the 6LoWPAN is comprised of LoWPAN nodes that share the ground to the sensor (Cobos and Chambers, 2010). This sen- same prefix in the IPv6 address (the first 64 bits within an sor communicates with and is powered directly through the IPv6 address). Among the three types of LoWPANs, our study TelosB module. Thus, the module has a greater lifespan is focused on the ’’Simple LoWPAN’’ (Shelby and Bormann, when less power is consumed. The EC-20 sensor measures 2010). the volumetric water content (VWC) through the 10-pin (c) Server: The server system corresponds to the Linux, Apache, expansion connector in the TelosB module. The ground con- MySQL, PHP, Perl or Python (LAMP) paradigm. The server ductor connects with the TelosB ground pin, the excitation stores the data in a MySQL database and can simply and eas- connector with the Vcc pin and its analogue output with ily display the data to several clients through the Web or a the ADC pin. We used an audio jack as the interconnection mobile application. interface between the ground sensor and TelosB module (see Fig. 2). 2.2. System hardware (c) The server: Although any type of equipment can be used for a server, we utilised embedded architecture for portability, The following points describe the hardware used to implement better integration in a greenhouse and higher energy saving. the system. We used the Sheevaplug platform (Sheevaplug, 2013) that (a) TelosB sensor nodes: Electronic devices supported by free software based on the ’’TelosB’’ platform have been used to deploy the WSN (CM5000, 2013) with 5 dBi-gain antennas. These devices are responsible for acquiring the data and transporting soil data (through an external sensor) as well as humidity, temperature and light (active photosynthetic radiation and overall solar radiation). The sampling time is 1 min. (b) Soil sensor: We used the humidity sensor EC-20 developed by the Decagon (EC-20, 2013) company. It is the largest sensor (20 cm) and offers higher depth and less power con- sumption (in the range of 2 mA and 2.5 V). Power consump- tion is relevant when working with WSNs. The sensor was calibrated experimentally in the laboratory as others authors did (Czarnomski et al., 2005). The moisture gravimetric was measured on soil samples, then, was compared to sensor readings, as gravimetric soil water content determination Fig. 2. The ground sensor connected to a TelosB node within the WSN. Shot at is the most accurate method (Kocˇárek and Kodešová, soccer field test 16 F.G. Montoya et al. / Computers and Electronics in Agriculture 99 (2013) 14–20 operates using an ARM processor with 1.2 GHz, 512 MB of through the USB connection (see Fig. 3). Because the net- RAM and an embedded general purpose GNU/Linux OS work supports multi-hop links, the RPL routing protocol (Debian 6.0). The Sheevaplug equipment includes 512 MB (RPL, 2013) (IPv6 RPL) is used through TinyRPL (Tinyrpl, of memory, but for the database storage, an SD card of 8 2013). Although TinyRPL was recently implemented, GB, was included. several tests confirm that it performs similar to the Col- lection Tree Protocol (CTP), which is the default routing The sensor nodes have been tested inside a greenhouse of protocol in TinyOS (Ko et al., 2011). BLIP interacts with 115000 m2 surface, with metallic structure, of multi-tunnel type TinyRPL and initiates TinyRPL operations after a node with a ridge height of 5 m, and 4 m of lateral height, and the cover acquires a global address. Subsequently, TinyRPL defines was threelayered heat-polyethylene (800 lm thick) with thermal a route using ICMPv6 messages related to RPL (e.g., when insulating properties (Manzano-Agugliaro et al., 2009). In our TinyRPL detects the next hop for any supported target). greenhouse conditions, the study is not affected of external natural The route is added into the BLIP routing table. Thus, variables as wind, rain, dust, etc.