Flexible, Low-Cost Water Monitoring with Edge I/O

Remote I/O over MQTT helps Rust Automation deploy affordable remote monitoring in a challenging environment

RDI Controls logo

Established in 1976, Rust Automation & Controls provides a wide range of process control and industrial solutions to customers throughout the Western United States. Their skilled application engineers and technicians provide a comprehensive range of services and support solutions, including needs assessment, training, implementation, installation, diagnostic analysis, and repair.

Jared Bates leads the Rust A&C projects team and recently worked with Opto 22 to carry out a critical water management project for the Pinebrook Water District in Boulder, Colorado. Using a combination of groov edge controller and I/O devices, Jared’s team developed an affordable wireless control solution that adapted to the challenges of the local terrain.

Starting From Square One

Pinebrook is an old rural water district, which, at the time it contacted Rust A&C, managed its natural water supply completely manually. The Pinebrook staff dutifully conducted rounds across the more than 500-acre area to monitor tank and stream levels and verify pump station operation.

However, in recent years, the district had experienced a couple of water tank overflows and finally decided to automate monitoring. Pinebrook needed to track where water was going so it could detect potential leaks, and since there is a risk of flooding in the area, it wanted to create a high stream level alerting system to protect the local residents.

As a small district, project cost was a constraint for Pinebrook, so Jared’s team would need to keep the final solution affordable. And although the district didn’t have a large number of assets to manage, they were widely distributed and lacked any existing power or communications infrastructure.

Rust’s initial site survey also identified three sites that would have limited connectivity. These sites were critical for flood water monitoring, but the local topology would block access to a radio network. The typical option of installing radio towers and other infrastructure to strengthen the network would be beyond the project’s budget.

The Pinebrook Water District reservoir lies in the hills northwest of Boulder, Colorado.

Designing the Control Network

Fortunately, Rust A&C has a long history working with industrial instrumentation and networking, and designing the control network was mostly straightforward. The Rust team installed solar-powered monitoring stations at key locations throughout the district. The majority were connected by an ELPRO 900 MHz wireless I/O mesh transceiver network. Stations included 4-20 mA radar level gauges and relays for controlling pumps and valves. 

At the three isolated sites, Jared’s team took a different approach. Instead of connecting to the mesh network, they opted to connect the sites to the internet. In two of the locations, they substituted Wi-Fi adapters for the transceivers and connected the sites to a wireless network from a nearby fire station. In the third location, they installed a 4G/LTE cell modem.

The only thing they needed was an easy way to transport sensor data over the internet, which led them to try edge I/O. Opto 22’s groov RIO MM1 (GRV-R7-MM1001-10) provides 8 channels of universal I/O plus two mechanical relays in a compact industrial housing paired with embedded Ethernet, storage, applications, and data services.

Jared’s team installed a groov RIO module at each of the isolated sites, connected it to Wi-Fi or cellular access, and configured I/O and Modbus/TCP connections to integrate data from local devices and transceiver network extensions. Each edge I/O module was secured with user authentication and SSL/TLS certificates, using the native certificate management built into the groov RIO management layer.

Rust Automation & Controls connected three isolated sites, using the native MQTT support in groov RIO to transport I/O data securely over the internet.

Using the CODESYS control engine on the network’s main controller, an Opto 22 groov EPIC, the team configured each station as a remote I/O point, wrote polling logic, and defined appropriate alarm limits. CODESYS is the team’s preferred control platform because it allows them to use all the IEC languages where they are most appropriate. Typically, they use Structured Text (ST) for math and time calculations, Function Block (FB) for the main program routine, and Ladder (LD) when they need to orchestrate a specific sequence of actions.

However, when they tried to connect to the groov RIO modules through CODESYS, they discovered the latency was too great for the connection to be maintained. Naturally, there were also some security concerns, since communication to two of the modules required opening up ports in the fire station’s firewall.

Jared’s team decided to flip their approach. Instead of scanning all the remote I/O at high resolution from the main controller, they connected these three sites to an MQTT broker using the modules’ native MQTT publishing capabilities. They chose to use HiveMQ’s cloud-native MQTT broker, which allows 100 MQTT clients to communicate for free, keeping maintenance costs down for the district.

MQTT clients publish data only on change, so Pinebrook wouldn’t need a high-speed, always-on connection in order to get accurate data. And because MQTT connections always originate from the edge device, Rust wouldn’t have to open firewall ports to allow inbound connection requests to the groov RIO modules.

Jared reports that integrating MQTT data into the main control program was simple using the MQTT Client Library for CODESYS. The MQTT functions allowed the groov EPIC controller to subscribe to all the data in the MQTT broker and integrate it directly into the control program like native tags.

The CODESYS MQTT Client library allowed Rust to subscribe to MQTT data from their HiveMQ broker and integrate it directly into their control program.

“Reliability was more important than performance,” says Jared. “Updates even every 10 minutes would have been acceptable in this case. It gave us some wiggle room to slow down scan rates, so we hit the broker probably only once a minute.”

To accommodate Pinebrook’s budget, Rust A&C had opted not to install a full SCADA system. Instead, Jared’s team built all the control, communication, and even visualization into the edge controller. Since the Pinebrook district was managed completely without automation prior to this project, Rust needed to design a visual interface for the new control network. To keep costs down and simplify long-term maintenance, they decided to use the EPIC’s embedded HMI server, groov View.

In groov View, designers use a browser-based editor with drag-and-drop components to build an HTML5-compliant display that runs on the EPIC’s touchscreen, on an external display, on connected mobile and desktop browsers, or on the groov View app. groov View is included with groov EPIC for free, so it didn’t add to the cost of Pinebrook’s project. Development with groov View was quick for Rust to complete and easy for Pinebrook to maintain.

groov EPIC also runs Node-RED, an IoT programming environment, which Rust used to format some of the data they pulled from CODESYS so that it displayed properly in the HMI.

Rust built a low-cost, easy-to-maintain operator interface for Pinebrook using the groov View HMI server embedded in EPIC.

“The groov View system… uses OPC UA, so we could connect CODESYS and groov View together pretty seamlessly and just drag and drop a lot of [the controls] on there,” says Jared Bates. 

The central edge controller was located within the Pinebrook water treatment plant, so Rust supplied it with additional I/O modules to connect to some of the local equipment as well. The main HMI page displays field measurements like storage tank levels alongside raw water measurements from the treatment plant inlet. The middle of the display reflects analytical measurements of trace compounds like chlorine and manganese, along with the levels of the rivers in the community.

These river gauges are one of the most important things they monitor. The change in the level of water in those rivers acts as their flood alert system. From day to day, the Pinebrook staff can monitor changes in the river’s level over the previous week using the trend controls built into groov View. When the system alarms, groov View even sends text message alerts to the Pinebrook staff.

Pinebrook Water District now monitors tank and river levels with real-time trending and alarming through the groov View operator interface.

The staff access the operator interface through web browsers on their personal workstations and through a 42” touchscreen in the main control room that is connected to the EPIC’s HDMI port. After Rust developed the initial pages, Pinebrook caught on and started making their own changes, which are automatically pushed out to users.

Jared says, “It was really cool to see how easy it was for them to jump on this and make the changes they needed. We want to be able to hand off the system to the customer when the project is over. To do that, you need a way that they can manage it themselves.”

Results

According to Jared, Pinebrook has been “extremely happy with the solution,” which incurs only minimal monthly cost to maintain a single cell modem and some management of the MQTT broker. They can monitor tanks and pumps across their territory to make sure they aren’t overflowing or to initiate control tasks, and staff have been able to make additional changes to the operator interface as needed.

With the exception of the HiveMQ broker, all of this functionality—control engine, HMI server, Node-RED, MQTT publish-subscribe communication, device security—runs on the groov devices and does not require a Windows PC or external server for data or communication.

“We’ve made it our best practice,” says Jared, “even if we’re using a different PLC, to try to put a groov EPIC as an edge device for connectivity. It solves a lot of issues because it has a lot of software solutions built into it.”

For more information on Rust Automation & Controls, you can visit them at www.rustco.com.

Download case study pdf

   
   
   

Featured Products:

groov RIOgroov RIO

groov EPIC

groov RIOQuestions? Contact an Opto 22 engineer.

 

Order now!

 

Have an application you'd like to share? 

Would you like to feature your own success in a case study? Share your story with us.