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

March 21, 2022
Remote I/O over MQTT helps Rust Automation deploy affordable remote monitoring in a challenging environment.

Established in 1976, Rust Automation & Controls provides a 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 Rust’s projects team and recently worked with Opto 22 to carry out a critical water management project for the Pinebrook Water District in Boulder, Co. Using a combination of groov edge controller and I/O devices, Bates’ team developed an affordable wireless control solution that adapted to the challenges of the local terrain.

ProblemPinebrook is an old, rural water district, which, at the time it contacted Rust A&C, managed its natural water supply manually. The Pinebrook staff 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 Bates’ team would need to keep the final solution affordable. And although the district didn’t have many assets to manage, they were widely distributed and lacked any existing power or communications infrastructure.

Rust’s initial site survey 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 were beyond the project’s budget.

Solution
Fortunately, Rust has a long history working with industrial instrumentation and networking, so 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 a 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, Bates’ 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 (remote I/O) MM1 (GRVR7-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.

Using the CoDeSys control engine on the network’s main controller—an Opto 22 groov EPIC (Edge Programmable Industrial Controller)—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 for math and time calculations, Function Block for the main program routine, and Ladder Diagram 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 ports in the fire station’s firewall.

In response, Bates’ 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 when they change, so Pinebrook wouldn’t need a high-speed, always-on connection 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.

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.

“Reliability was more important than performance,” says Bates. “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 opted not to install a full SCADA (supervisory control and data acquisition) system. Instead, Bates’ team built all the control, communication, and 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 (human-machine interface) server, groov View.

In groov View, designers use a browser based editor with drag-and-drop components to build an HTML5-compliant display that can run on the EPIC’s touchscreen, an external display, connected mobile and desktop browsers, or on the groov View app. The 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.

Rust used the Node-Red IoT (Internet of Things) programming environment (also preinstalled on groov EPIC) to format some of the data pulled from CoDeSys so that it displayed properly in the HMI. “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 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 that 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 sends text message alerts to the Pinebrook staff.

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

Bates 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 Bates, 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.

Except for the HiveMQ broker, all this functionality—control engine, HMI server, Node-Red, MQTT publish/subscribe communication, and 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, even if we’re using a different PLC, to try groov EPIC as an edge device for connectivity,” says Bates. “It solves a lot of issues because it has a lot of software solutions built into it.”

Companies in this Article

Sponsored Recommendations

Why Go Beyond Traditional HMI/SCADA

Traditional HMI/SCADAs are being reinvented with today's growing dependence on mobile technology. Discover how AVEVA is implementing this software into your everyday devices to...

4 Reasons to move to a subscription model for your HMI/SCADA

Software-as-a-service (SaaS) gives you the technical and financial ability to respond to the changing market and provides efficient control across your entire enterprise—not just...

Is your HMI stuck in the stone age?

What happens when you adopt modern HMI solutions? Learn more about the future of operations control with these six modern HMI must-haves to help you turbocharge operator efficiency...

AVEVA™ System Platform: Smarter, Faster Operations for Enhanced Industrial Performance

AVEVA System Platform (formerly Wonderware) delivers a responsive, modern operations visualization framework designed to enhance performance across all devices with context-aware...