1 Introduction

Air humidity, air temperature, soil moisture, and soil nitrogen phosphorus potassium content are vital factors in corn growth. If can be monitored, will reduce the possibility of existence of low fertilizer utilization rate, low yield and not process disease prevention timely while prevent disease and save the cost of agricultural production.

ZigBee network as a wireless network sensor technology based on IEEE 802.15.4 with the characteristics of low power consumption, low cost and low rate, is drawing researchers and enterprise application researchers’ attention more and more. It makes network becoming be low complexity, fast, reliable and safe and also supports a large number of network nodes. In which network devices are generally divided into Coordinator node (Coordinator), aggregation node (Router) and sensor nodes (End Device). Each node can be used as the monitoring object, such as a sensor connected directly collect and monitor the original data, automatic transmit data from other nodes of the network [1, 2]. ZigBee network, GPRS wireless transmission and GIS platform, these three makes monitoring air humidity, air temperature, and soil moisture and nitrogen phosphorus potassium content through remote monitoring the target fields become possible.

In ZigBee network, sensor node for the collection of data that is first transmitted into coordinator and then into remote host. This completed via GPRS network so as to achieve remote real-time monitoring [35].

2 Overall Design of Monitoring System

Monitoring system is mainly composed of two parts, the front data collection sub-system and the terminal early-warning sub-system. The total network consists of several terminals and one monitor center which is composed of more than one computers and a number of coordinators. The overall structure is shown in Fig. 1 [6].

Fig. 1.
figure 1

Overall structure

Front data collection sub-system for the collection of moisture, humidity, temperature, light intensity and nitrogen phosphorus potassium. It includes ZigBee network and relevant application software, consists of coordinator, router and terminal equipments. From the viewpoint of structural network, is composed of coordinator nodes, router nodes and terminal nodes.

Star network is a structure to avoid adding any network nodes arbitrary and constructing poor consumption distribution. A variety of star networks construct ZigBee network in which coordinator is a FFD that achieve a group of services, for the control of sub node communication, data collection and distribution control. A ZigBee network includes at least a coordinator. The information router processed is uploaded by terminal equipment and sent to the coordinator. Terminal equipments, including soil moisture sensor, a soil temperature sensor, air temperature and humidity sensor, a carbon dioxide concentration sensor, light sensor and soil nitrogen phosphorus potassium monitoring sensors. Through which routing data on central nodes and placing on the monitoring points pre arranged. Furthermore, both RS-232C serial port connection and GPRS connection are feasible on coordinator and host. Which means the coordinator can transmit information into remote host by ways of wired or wireless. Therefore real-time data can be analyzed smoothly with GIS software, real data or diagram illustrations under the condition of current growth and early warning of the dangers be given as soon as quickly.

As to terminal early-warning sub-system, includes monitoring hosts and GIS software. The monitoring hosts with GSM module obtain environmental data from the coordinator on farmland via GPRS or RS-232C. Compare to RS-232C, the former indeed has brought convenience in connecting remote. However, when concerns cost down the latter is better.

GIS software installed on monitoring hosts, monitors the sensor data as well as sensor status. On which the sensor’s position is displayed, the growth trend of corn is predicted and the working state is adjusted. Meanwhile all sensors’ data is monitored, such as farmland local humidity condition, nitrogen phosphorus potassium content, location of high humidity problem determination, and is analyzed especially the original data similar as humidity and nitrogen phosphorus potassium content. In addition, abnormal point information will be displayed on the GIS map if spatial database established.

3 Hardware Components of Monitoring System

The modularization hardware includes microprocessor module, communication module, data collection module and power four modules [7].

3.1 Microprocessor Module

Microprocessor is a central processing unit, to control node operation, routing protocol, synchronous positioning, power management and task management. On which CC2530 has an IEEE 802.15.4 compatible wireless transceiver and RF kernel control and simulation wireless module.

Compare to the previous generation CC2430, CC2530 is often used in the solution system contains second generation chip 2.4 GHz IEEE 802.15.4/ZigBeeTM, can easily set up powerful network with the goal of extremely low cost. It integrates RF transceiver, MCU, programmable flash memory and 8-KB RAM, and provides an interface between MCU and wireless devices which can send commands, read status, automatic operation as well as determine the sequence of events to wireless devices. In addition, CC2530 has a series of unique running modes particularly suitable for ultra low power requirements of the system. Conversion time between operation modes short enough further ensure the low energy consumption.

3.2 Communication Module

This module is used in the communication between control centers, which passes sensor data to monitoring hosts by ways of wired or wireless.

Early warning and remote control are both achieved in wired communication (RS-232C) way or wireless communication (GPRS) way. Wireless communication core devices have SIM900A [5] GPRS module which is a new compact product of SIMCom company using industry standard interface. It belongs to the dual band GSM/GPRS module and packaged with SMT, has advantages of high integration and simple using, and also has stable performance, exquisite appearance and high cost performance. Besides, signal process circuit and receiver/transmitter circuit integrate on SIM900A wireless communication module reduces the difficulties of system development. To meet the requirement of wireless communication, add power supply, SIM and peripheral interface circuit of communication interface. SIM900A can transmit low power realization of voice, data, fax, and SMS. In addition, the size of SIM900A is 24 × 24 × 3 mm, all kinds of design requirements can be applied to M2M applications, particularly suitable for compact product design.

3.3 Data Collection Module

Collecting data in monitoring region and converting analog signals of various sensors (such as signal light, signal, chemical information) into digital signal will be transmitted to the micro processing module. Sensor nodes are powered by two small batteries, on which processor module and data collection module both working in small voltage so as to keep low power consumption and simple peripheral circuit.

Choose SHT11 as the data collection module, is a new intelligent temperature and humidity sensor based on CMOSens technology, has the characteristics of digital output, debugging free, calibration free, peripheral circuit free and whole exchange that are different with traditional temperature and humidity sensor [8, 9]. On CMOS chip integrates temperature and humidity sensors, signal amplifying and conditioning function, AD conversion and two-wire serial interface. This brings benefits of super fast response, strong anti-interference ability and high performance price ratio.

Here soil temperature and humidity, air temperature and humidity sensor, carbon dioxide concentration sensor, light sensor and soil nitrogen phosphorus potassium monitoring sensor have been used. Sensor data are transmitted from terminals to the router through ZigBee network at regular time, consequently are transmitted to the coordinator through the RS-232C or GPRS, these data at last reach at the monitoring center. Obviously, add GPRS wireless communication on serial port connection, which increases the mobility and flexibility.

3.4 Power Module

4.2 V, 5 V and 12 V three voltages will be used. Terminal sensor is powered by two small AA batteries while GPRS wireless communication module SIM900A is powered by 4.2 V. And 12 V is to provide power for other parts of the system. Dormancy mechanism as the main method of saving energy [10] means turning off the wireless communication module or data acquisition module timely when there is no task of data collection or no need to send data again. Test results indicate CC2530’s power consumption is less than 1 μA while in sleeping, and more than 99 % of running time of system is in dormant state, thus only 2 AA batteries can maintain communication from six months to two years.

4 Monitoring System Software Design

4.1 Front Data Collection System

Front data collection system software mainly includes three, coordinator node program, routing node program and terminal node program. These three programs working together and accomplish data collection, data transmission and network management [11].

Coordinator node program is composed of main program and subprogram of data collection and processing. Not only is responsible for the network configuration and program management, including the definition of communication channel, the network identifier Profile, and configure the network response node join network requests and binding request, for other node distribution network address, routing table maintenance, but also receives data sensor nodes send, the confluent consolidation back to the computer. Main program actively calls routing nodes and gets data periodically while routing nodes replying center nodes with interrupt way so as to transmit group data (different terminal node data collection to data transmission) smoothly. The main program flowchart shown in Fig. 2.

Fig. 2.
figure 2

Main program flowchart of the center node

Since asynchronous transfer mode of routing node and terminal node, a symbol is added before sending effective data in order to improve the reliability of wireless communication. Signals are transmitted to central node from terminal node and then to the next routing node, which to achieve the purpose of circuit detection of terminal node.

Similar to coordinator node, main program of routing nodes sets terminal nodes with different address using the method of calling and receiving field detection data from terminal nodes time-sharing, and transmits data to coordinator node while calling display subroutine. Considering the same basic structure, designs the main program flowchart of routing center code shown in Fig. 3.

Fig. 3.
figure 3

Main program flowchart of terminal node

Terminal node program is always used to collect and send data. For example, sensor nodes are generally placed in farmland sites. Main program of terminal node begins to initialize after starting, reads parameters of each sensor, and store and display that through compute operation. After collecting all sensor data, checking whether it is necessary send a call to routing node. If not, continue on checking the sensor state on turns. Or else, call the data transmitting subprogram to transmit all data and start to next round. If sensor data overflow or function key was pressed, execute corresponding interrupt service subroutine.

4.2 Terminal Early Warning and Positioning System

Focus on dangerous crossing alarm and issues location of corn farmland so as to achieve monitoring the coordinator node and the routing node, monitoring fixed-points, and monitoring line alarm and source issue localization.

This sub-system runs on the environment of Microsoft.Net4.0 platform combined with WebGIS platform which ArcGIS Server 10.1 undertakes. Farmland GIS maps are created with AcrMap software and deployed on ArcGIS 10.1 server. The current working state of each sensor and real-time state of farmland are listed and displayed on host monitor screen after statistical analyzing. Green, yellow, orange, red, four colors represent the state [12] farmland environment since human eye easily distinguish with and recognize. Among which, green means farmland normal, yellow means minor problems, the orange means affecting the harvest, and red indicates seriously affects the survival of corn crop. According to this, decide whether there is necessary deal with issues on-site. Certainly, warning information and position information are both appeared on screen.

5 Conclusions

The prototype of corn farmland monitoring system is designed in this paper, and simply discussed the characteristics of ZigBee, GPRS and GIS, which make full use of the advantages of these three technologies. If practical system developed, would bring low construction cost, convenient data access and strong data processing function such as data statistics and real-time analysis [13, 14]. Technicians and farmers can easily master the state of their farmland whenever and wherever, also can respond as soon as possible while face to issues early warning system warns. A number of advanced sensors have been used though, there are many issues such as exception handling still need to be solved in practice.