The Intelligent Irrigation System

An Internet of Things Solution for the Developing World

Our project delivers modern information technology to an ancient profession: small-scale farming. The Intelligent Irrigation System (IIS) combines remote sensing systems, a mesh radio network powered by XBEE, advanced analytics made possible by Amazon Web Services, and a user-friendly app for monitoring and control of various sectors of a farm. Through IIS, farmers can have a more holistic understanding of the health of their farms and, by extension, realize higher productivity. By providing these capabilities at a fraction of the price of other commercial irrigation products, the IIS offers an affordable solution to farmers facing volatile weather patterns in regions of the world that are most threatened by climate change.

Motivation

As consumer-orientated IoT devices become increasingly widespread in the United States, significant portions of the world continue to lag in the adoption and implementation of these technologies. While one can hardly fault companies for designing products for an existing market of customers with high levels of disposable income, our group wanted to reverse this focus. Instead, our mission lies in providing the convenience and capacity of IoT advancements to users who could benefit immensely -- farmers in the developing world. We believe that an affordable, no-frills product will garner immediate appeal among this consumer group by delivering three key system capabilities:

  • First, the means to most efficiently distribute limited water to an area of cultivated land.

  • Second, the potential to plan for periods of harsh weather conditions as these events become more frequent.

  • Third, the ability to remotely monitor real-time soil moisture and allocate water accordingly.
The IIS system offers a low-cost solution to water resource management in developing countries, which will improve food security for some of the world's poorest populations.

System

IIS Architecture

Architecture

An overview of the system architecture is displayed above. In the boxed region to the left of the diagram, is the sensor-XBEE subsystem. Here, every sensor is attached to an Arduino Uno, which is in turn connected to a 9V battery and a XBEE S1. Each one of the remote Arduinos reads the analog soil moisture data and packages to be sent across the Zigbee mesh network to the coordinator Arduino, which is in turn connected to the main ESP controller (positioned in the center of the figure). The main controller then sends the relevant soil moisture information to the AWS server, where it is combined with localized weather data, processed and stored. On the server, a regression is applied to each sector's sensor information to determine when, in the absence of rainfall, soil moisture will drop below a certain threshold. The results of this analysis, along with the raw sensor data, is passed along to a mobile application. Through the mobile application, users have access to various soil moisture and weather trendlines. Furthermore, based on the soil evapotranspiration patterns, the user is given a recommendation on when next to irrigate their farm parcel.

The remote irrigation system is controlled through the mobile application developed for Android. The user sends a valve open command from the app interface and this command passes through the AWS server to the main controller, where it is parsed and sent over the Zigbee mesh network to the Arduino in the corresponding sector. This command then opens the valve connected to the water line for a user-determined period of time.

Technical Components

Zigbee Mesh Network


Data communication between the remote Arduinos and the main ESP controller occurs on a Low-Rate Wireless Personal Area Network utilizing 802.15.4 IEEE protocol (Zigbee), the standard for communication between XBEE radio devices. Our system uses three XBEE S1 modules to create this network for passing bidirectional sensor information and valve commands. The network was initialized through XCTU, a configuration platform supplied by Digi, the maker of XBEE devices. The remote XBEE's were set up as end devices; the XBEE connected to the controller ESP was set up as a coordinator.

The flow of information across the Zigbee network is controlled in a number of ways. Open-source XBEE-Arduino code was utilized to parse sensor data and valve commands into packets that can be sent when the XBEEs operate in API mode. API mode (cf. AT mode) is a necessary parameter choice for enabling multi-directional flow, for controlling the end-points of certain packets, for maintaining timing across the network, and thus for our application. With the help of an online library, the Arduinos specified the above parameters for each type of information to be transmitted.

It is also worth noting how the XBEE radios can operate as relays. Each packet that is sent across the network has a 16-bit destination address. However in our application, when an XBEE sends an individual packet, it broadcasts the packet to the entire network, not only to the XBEE with the corresponding address. Therefore, if the desired XBEE receiver is not in immediate range of the transmitting XBEE (~10 to 100m), the packet will be relayed through the XBEE radio modules which are in direct radio contact to the sender. This unique functionality allows for the connection of widely distributed sensors, as well as the ability to easily scale the existing system.

Cloud and Analytics


Using Amazon Web Services (AWS), an Ubuntu 14.04 EC2 Virtual Server instance was created as the primary medium for Cloud Computing for the IIS. This virtual server houses the database (MySQL) and web development platform (FLASK). MySQL was chosen as the database for this project because of the nature of the incoming data. Each soil moisture value is timestamped and the corresponding weather data (retrieved from openweathermap.org) is append and stored in the database. A relational database such as MySQL supports this data structure and allows for fast, simple, and easy queries. A RESTful implementation of Flask (Python) was used to facilitate communication between the main micro controller, the database and the mobile application. Data requests to and from the database by the main micro-controller are all handled in the flask application. In addition, all commands to the main controller from the mobile application are processed through the flask application and sent accordingly to the controller.

Soil moisture data for each sector is used to schedule irrigation. A regression model is applied to soil moisture data to determine when the soil moisture drops below a predefined wilting moisture level. A five-day weather forecast is retrieved (from openweathermap.org) and analyzed. The server then sends the next irrigation date and predicted rainfall to the user.

Below is the overall AWS Ubuntu Server Architecture.

Android Application


The Intelligent Irrigation System application developed for Android was designed to offer the IIS user complete control over the installed irrigation system. On the main page of the app, the user can display the last 50 soil moisture data points from the remote sensors by pressing the button in the top left corner of the screen. Below this graph, maximum temperature, minimum temperature, barometric pressure, and remaining tank water for the day are displayed. Further down, the app presents the watering information for each sensor-controlled sector of the field. The next watering event, as predicted by openweathermaps.org, is contrasted with the recommended watering dates for the sectors. An AWS-powered regression model determines the time at which the moisture for a certain sector drops below a 30% threshold, and returns this time in the interface.

On the bottom of the page, two buttons offer control over the watering tank valves. When the user presses the empty text box, a numeric keypad appears which allows for input of an integer. This integer corresponds to the length of time for which the valve will open (seconds in our presentation, minutes for the in-field application). Once the user confirms the number input and selects one of the two buttons, the corresponding valve will open for that allotment of time.

The second page displays additional information about the temperature and humidity of the field location. The two graphs also retrieve the relevant data from the AWS server and present the last 50 readings for each quantity separately. The application returns to the main page with a press of the Prev. button in the top right corner of the screen.

Prototype


The IIS prototype uses a Huzzah Feather board running MicroPython with a built-in ESP8266 WiFi module. The Huzzah drives an Arduino Mega that communicates with two remote Aduino Unos using an XBEE mesh network. The Huzzah periodically checks the Amazon AWS Server for directions from the farmer and passes them to a set of remote watering valves. The remote valve controllers then pass soil moisture data back to the server, where it can be used to inform how a farmer rations his or her water supply.

Results

Our first prototype of the Intelligent Irrigation System accomplished all but one objective we set out to achieve in our project proposal. All bronze-level goals — collection and transmission of soil data from XBEE mesh, data processing and visualization on Android, and binary solenoid operation based on sensor information and user commands — were satisfied. Both silver-level goals — integration of real time weather data in AWS and the Android application, and operation of the remote sensors and Arduinos off of a 9V battery — were satisfied. Our first gold-level goal — developing a regression analysis of soil desiccation for predictive watering recommendations — was similarly met. The only gold-level benchmark we were not able to realize was the development of data transfer abilities over a 3G or GSM network. This capability is included in our discussion of future work on the IIS prototype.

The chart below displays the array of data that is stored in the MySQL database. This database stores the soil moisture, temperature, pressure, minimum temperature, maximum temperature, windspeed, cloud coverage, and remaining tank volume. This is the same data that is sent to the Android application when requested by the user. A figure of the sensor data presented on the application can also be seen below.

Field Data Stored in MySQL Database.

Soil Moisture Data Display on Android Application

The same soil moisture data is exhibited below, except here one can see a greater quantity of readings displayed. These readings are used for the soil desiccation regression analysis, which predicts when each sector of farmland will drop below 30% moisture, the average value at which wilting starts to occur. The date and time at which each sector crosses this 30% threshhold is sent to the Android application, where it is presented next to a line with the next predicted watering event for easy comparison.

Sample Soil Moisture Over Time.

The embedded video at the top of the page provides further discussion of our results and objectives met in an easily digestable format. Please give it a watch!

Future Work

As the product is developed further, our chief goal will be to reduce the system cost to the user. By employing the full capabilities of the XBEE's API mode, it may be possible to read the soil moisture sensors and control the water valves without the help of microcontrollers in the field. We would also like to explore the possiblity of contacting the AWS Server over cellular communication so that the system can be deployed where WiFi isn't available. For added functionality and better soil monitoring, additional sensors such as a pressure sensor to moritor the water tank volume, and soil temperature sensors will be included.

In future versions of the IIS, we would also like to implement user sign-in functionality. By setting up each user with a unique account and password, this improvement would add a level of security to the application. Combined with a web application, each consumer could then monitor soil moisture and control water usage from a internet browser. Other improvements include designing a sleeker application interface, enabling encryption for packets on the Zigbee network, and testing the system on a more robust network with a greater number of receiving XBEE/sensor devices.

References

Hardware

  • Adafruit : https://www.adafruit.com

Software

  • MicroPython: http://micropython.org
  • XBEE: https://github.com/andrewrapp/XBEE-arduino
  • Android Chart: https://github.com/PhilJay/MPAndroidChart
  • Android Application : https://developer.android.com/studio/index.html
  • Flask (Python): http://flask.pocoo.org
  • Amazon Web Services: https://aws.amazon.com

Our Team

Terry Conlon

Terry is a Mechanical Engineer in the first year of his PhD program at Columbia. He intends to focus his future work on rural electrification and microgrid planning, while also studying the development patterns of areas which acquire energy infrastructure. Prior to Columbia, Terry received a BSE in Mechanical Engineering from Duke University, where he was an Angier B. Duke Scholar and a Pratt Research Fellow.

Simone Fobi

Simone Fobi is a PhD student in Mechanical Engineering. Her research interests lay at the intersection of developing low cost energy monitoring devices and data mining to improve electricity provision services in Africa. After her BS in environmental engineering, she obtained her MS from Stanford; which laid the foundations for her interests in energy systems and IT. Prior to joining the PhD program, she worked on Energy and Healthcare projects at IBM Research Africa, Nairobi Kenya.

Noah Rauschkolb

Noah Rauschkolb is an MS/PhD student in the Mechanical Engineering Department researching techniques for making buildings more responsive to variations in wind and solar production. Before joining the Sustainable Engineering Lab, Noah worked as a building systems engineer at Arup. He holds a B.A. in Mathematics from Wesleyan University and a B.Sc. in Mechanical Engineering from Columbia, from which he graduated Magna Cum Laude.

Contact

Terry Conlon: tmc2180@columbia.edu
Simone Fobi: sf2786@columbia.edu
Noah Rauschkolb: nbr2107@columbia.edu

Columbia University Department of Electrical Engineering
Class Website: Columbia University EECS E4764 Fall '16 IoT
Instructor: Professsor Xiaofan (Fred) Jiang

All code can be found at: https://github.com/IrrigationOfThings/IntelligentIrrigationSystem