Alex Mills

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.

Aerial view of Wallal pivot site under construction
Pivot site under construction - October 2014
Aerial view of Wallal pivot site running
Watering the first crop - October 2014

Skills

Software

Photo of AgConnect running on an iPhone, iPad, and Web browser

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.

AgConnect flexible layout running on an iPad

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.

Selecting multiple properties within the AgConnect app

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.

Viewing weather data within the AgConnect app

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.

Viewing UPS data within the AgConnect app

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.

Viewing network data within the AgConnect app

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.

Viewing tank level data within the AgConnect app

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.

Viewing soil sensor data within the AgConnect app

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.

Controlling Valley center pivots from within the AgConnect app

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.

Testing iOS native notifications for the first time
Early Push Notifications test - July 2014
Concept mockup of pivot control on Apple Watch
Apple Watch pivot control concept - May 2015

Hardware

Sentek soil probe installed in the Wallal crop
Sentek soil moisture probe installed - February 2015
Bench testing a Sentek soil probe before installation
Early probe bench test - November 2014
Closeup of ethernet switch cabling
Using POE to power modbus - November 2014

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.

WiFi radio mounted to pivot tower
Ubiquity radio mounted to pivot - November 2014
WiFi radio and 3G antennas mounted to shed roof
Base radio & 3G Antenna- November 2014
Bench testing WiFi radios
Testing radio configuration - October 2014

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.

Close up of Dell Server
Rack test with Dell Server - October 2014

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.

Closeup of Siemens PLC
PLC installed in remote backplane - April 2015

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.

Bench testing Siemens PLC
Writing PLC control program - March 2015
Remote controllers with base components installed
Remotes in early build state - March 2015
Wiring up the remote controllers
Remote backplane installed in cabinet
Remote assembled in cabinet - March 2015
Sodlering a mil-spec connector
Pivot angle sensor connector - March 2015
Remote control powered up for the first time
Remote powered up for the first time - March 2015
Remote control mounted on pivot tower
Pivot 3 remote set up - April 2015
Close up of remote control relays
Relays ready for pivot first movement - April 2015
Close up of wiring harness terminal blocks
Wiring harness complete and ready - April 2015
Close up of wiring harness terminal blocks
Remote installed beside comms cabinet - April 2015
Outdoor testing of Davis Weather station
First weather station test - April 2015
Close up of Davis weather station
Davis weather station installed at Wallal
Weather station installed - April 2015