AgConnect
Starting in 2014, I was tasked with creating a remote control and monitoring system for Wallal Downs in the West Australian Kimberley. The center pivots themselves were too old to support the remote control products offered from their manufacturer, Valley, so I had to build my own electronics. Weather, Soil and other modbus sensors were also integrated into the software suite that would eventually be called AgConnect.
I was invited by our pivot manufacturer, Valley, to write a little about AgConnect on their blog Growing The Conversation.


Skills
- Electrical Design / Installation
- Mechanical Design / Installation
- Server Design / Installation
- Programmable Logic Controllers (PLC)
- Long-range Wireless Networking
- Soil Sensor Integration
- Analog Sensor Integration
- Centre Pivot Reverse Engineering
- RouterOS Admin
- VMware ESXi
- Remote Server Management (VPN)
- M2M Management
- Data Centre Admin
- Linux Scripting
- PHP for Web and Hardware
- HTML5/SASS
- Swift for iOS (basics)
- UX/Interface Design
- Graphic Design
Software

The HTML5 AgConnect app was built with a responsive layout and scaleable vector graphics so that it would work on almost any device, using a mouse or a finger. Build once, run everywhere. I built a basic Swift wrapper iOS app for access to native functionality such as the keychain and push notifications. Aggressive use of AppCache allows the app to stay in very fast and updated state.

Use of Flexbox allows a fluid layout of sensor display panels to suit the display the app is being used on. Built on top of a custom version of KnockoutJS, the app makes asynchronous API calls to a PHP-driven backend with a fully redundant PostgreSQL database.

Each company account on the system can have multiple locations/properties to help organise sites. Each user can set the default selected property so their location of interest is always loaded first.

The Davis Vantage Pro weather station is connected to a Modbus TCP data-logger, which is queried every 15 minutes to track the latest climate changes. The data is then passed onto the agronomists to aid with fertiliser requirement calculations. A majority of the icons are tweaked and coloured versions of the GlyphLibrary set produced by Lloyd Humphreys.

The base network and management server are powered by an APC uninterruptible power supply, which is constantly state monitored via SNMP. The easiest way to catch a renewable power issue is to watch for the AC-in state of the UPS and send a notification when the unit loses it’s input power. Battery state and temperature are also monitored to catch potential issues before they become problems.

SNMP is used extensively to constantly monitor the state of all network devices, including radios, switches, routers, server and UPS. When connectivity is lost with a device, the network map is updated instantly and a push notification is dispatched to let the user know of the issue. The network map allows the user to track down the potential cause of the specific device outage without even being on site.

Ultrasonic sonar rangefinders are a cost effective and durable option for measuring tank levels. The MaxBotix sensors can be read using TTL serial directly or analog voltage output connected to a PLC.

The Sentek soil probes report the volumetric water and ion levels for the soil, which can be used to calculate moisture and salinity percentages. This component is still in full development and future versions will correlate the soil data with the pivot position and climate readings at those specific data points. In time, this data will be invaluable in predicting the water requirements and fertiliser costs for the crop during different times of the year.

For the Wallal project, I build PLC-based remote controllers (more below) for the existing Valley pivot control panels, triggering the high voltage contractors already installed. These remote controls communicate with the AgConnect web app over a socket connection for constant monitoring and control. All commands are checked for validity before being sent to the machine to prevent any potential physical damage.


Hardware



Each pivot has a Sentek probe that measures the water percentage and salinity of the soil the crop is growing in, allowing the agronomists to specifically define the fertiliser recipes to suit the conditions. The ToughSwitch provides 24VDC output over POE so I tapped it into a DC regulator to provide 12VDC for the Modbus TCP gateway and soil probe. The benefit of this method is that the POE for each socket can be power cycled from the management console.
The gateway allows the sever to send Modbus TCP command to the probes which understand the Modbus RTU format. The sever will trigger a probe sensor update and then read each of the sensor values before relaying them back to the AgConnect cloud app.



While the Outback is not the friendliest place for electronics, Ubiquity have proven themselves time and time again with rock solid network radios and a fantastic support community to back them up. Each pivot has a 5GHz radio with a directional antenna pointing back at the shed, powered via POE from a ToughSwitch installed at the base of the tower. Due to the relation of the base shed to the centre of each pivot, I selected the newly released omni directional antenna for the Rocket radio, allowing the pivot radios to connect from any angle. Even with the pivot boom blocking line-of-sight to the shed, the radios have been performing flawlessly.

The centre of the whole system is a Dell server running VMware ESX to virtualise multiple operating systems. The core system is Linux based with Windows 8 used for additional third party software. The server is fully hardware redundant, able to handle multiple hard disk, network, and power supply failures simultaneously to guarantee a very high level of system uptime.

The Siemens S7-1200 series programmable logic controllers stood out against the likes of Allen-Bradley and Panasonic with great value for money and impressive development software. With no prior PLC experience I was able to get 90% of the planned functionality working in just 2 days. The controllers integrate with the management software using Modbus over Profinet.












