AWS for Industries

Smart Metering for Water Utilities

– Using LoRaWAN to build up a smart water metering infrastructure –

For water utilities around the world, aging infrastructure and technology have become an increasing problem. To actively manage the water system, getting information like consumption, pressure, and flow data in real time is essential. Of all the different components in the water system, water meters especially still rely on manual reads, which makes the data collection slow and prone to errors.

To improve leak and fraud detection, the data collection accuracy and frequency have to be increased, and that’s where smart water meters can help. Rolling out smart water meters comes with its own challenges: besides the high deployment and maintenance costs, water meters are most of the time deployed at locations where no power cable is available and where communication signals are weak. Water meters can often be found in metering boxes outside the house or in basements where sufficient infrastructure for smart metering is a problem.

To solve these challenges, Subeca, founded in 2008 and based in San Diego, started with the vision to provide utilities an out-of-the-box and scalable solution to understand and manage their water systems, while simultaneously delivering a smart water home experience to water agency customers.

“AWS provides everything we need to deliver our Engage Water Sustainability Platform to water utilities and their customers. The ability to channel either Sidewalk or LoRaWAN delivered data through a common core service at low cost is huge. We see network flexibility as the future of Advanced Metering Infrastructure as it expands into the opportunities provided by IoT. AWS facilitates that in a big way” – Hank McCarrick (CSO Subeca)

To quickly upgrade an existing water meter to Subeca’s advanced technology only the meter register needs to be replaced. This is done with the Subeca Pin. If desired, water shutoff capability can be included with the installation of Subeca’s Act Valve. In the meter box lid the Subeca Link is installed, which serves as an Edge-to-Cloud hub for multiple Pins and Acts as well as BLE enabler for third-party devices such as pressure sensors. Links transmit Edge Device data to AWS periodically via LoRaWAN or Amazon Sidewalk as the local application requires.

subecca blinc

Hardware

The heart of all devices is the Subeca Blinc, which is a custom-built module that provides a core design for sensors measuring pressure, moisture, tank levels, flow, vibration, humidity and water leaks and can communicate via Bluetooth, LoRaWAN and Amazon Sidewalk. During the manufacturing process, each Blinc gets a unique identifier, printed as a QR Code. Once this QR code is scanned, the provisioning process knows what the Blinc should become (a Pin, a Link or a Valve), and which parts of the software should be deployed to the device. The software is built on FreeRTOS. Blinc devices are battery-powered and provide both Edge and Edge-to-Cloud networks. Bluetooth Low Energy (BLE) is used for the Edge Network. Over BLE, device readings are transmitted every 900 milliseconds. For long range Edge-to-Cloud data transmission Blinc will select between LoRaWAN and Amazon Sidewalk dependent on the network bridge availability and specific use case.

subecca blinc

Architecture

The following architecture diagram shows how Subeca built their platform to collect water meter reads, and provide information to their customers.

collecting meter needs

Collecting meter reads

(1) The Blinc devices in the metering box (Pin, Valve, Link) are battery-powered, with a meter read every 15 minutes, batteries will last up to 17 years until it needs to be exchanged. Internally they are communicating via BLE. (2) The Link transmits the meter reads over LoRaWAN to the LoRaWAN Gateway. The LoRaWAN network is deployed in a star-of-stars topology, where gateways relaying data between the devices and the LoRaWAN network server (LNS).

(3) AWS IoT Core for LoRaWAN provides the LNS service. It is a fully managed service which alleviates the need for customers to build and operate their own LNS. Gateways are required to run LoRa Basics station as a package forwarder in version 2.0.4 or later. Pre-qualified gateways and devices can be found in the AWS Device Catalogue. AWS IoT Core for LoRaWAN is inherently integrated with other AWS IoT services to speed up the development process of IoT application. A complete introduction into AWS IoT Core for LoRaWAN can be found here.

LoRaWAN devices encrypt data before transmitting them to the gateways, the symmetric session keys are derived from pre-shared root keys. (4) Once the AWS IoT Core for LoRaWAN receives the message from the gateway it will decrypt the payload. To decode the binary payload to JSON before forwarding it to the downstream services the IoT Rule has the possibility to invoke a Lambda function directly from the SQL-like syntax which is used to select certain message from a topic. As shown in the following code snippet, the Lambda function is used to decode the message on the fly.

SELECT aws_lambda("<LambdaARN>",
              {"PayloadData":PayloadData, 
               "WirelessDeviceId": WirelessDeviceId, 
               "WirelessMetadata": WirelessMetadata}) as transformed_payload, 
                    WirelessDeviceId as transformed_payload.WirelessDeviceId,                                   
                    WirelessMetadata.LoRaWAN.DevEui as transformed_payload.DevEui,
                    WirelessDeviceId as lns_payload.WirelessDeviceId, 
                    WirelessMetadata as lns_payload.WirelessMetadata,
                    PayloadData as lns_payload.PayloadData,
                    timestamp() as timestamp

Afterwards an IoT Rule can be used to dispatch the message to its destination. In this case, once the meter read is decoded, it will be forwarded to the backend system (5) where data gets processed and stored. (6) An Amazon API Gateway provides the processed information to end users via the Engaged Home (consumers) and Engaged Utilities (utilities) dashboards.

Monitoring

Working with a device fleet of 1000s or hundreds of thousand devices is a challenge when it comes to maintenance and monitoring.

(7) Amazon CloudWatch is used to collect and track metrics from the devices i.e. (re)join requests and uplink, downlink data. (8) To check if a device or gateway is online and sending meter reads as expected, the wireless API is queried to read the gateway and device statics. An AWS Lambda function is invoked by an Amazon EventBridge rule periodically, reads the statistics of all devices and gateways and feeds the data into AWS IoT Events where a model is defined that decides if a device or gateway is offline. If an offline device is detected, an alert will be generated and written on an IoT topic where the management service consumes the alarms and notifies the LoRaWAN network operator.

Update process

With the large number of devices and gateways in the field, the question arises how to update them with new firmeware and bugfixes.

(9) The Basics Station on the gateways supports the CUPS (Configuration and Update Server) protocol. With that, the Basics Station periodically queries the CUPS endpoint which will be provided by the AWS IoT Core for LoRaWAN service for updates via HTTPS/REST. With each request, the gateway provides information about its current state and receives LNS and CUPS credential updates as well as information about a potential firmware update. The gateway can then download the signed firmware file from S3, validate the signature and install the update.

(10) To update the devices in the metering box, a mobile app or the in-home display, which is used to provide the consumer with information about their water consumption, is able to connect to the devices via Bluetooth, download a new firmware version from Amazon S3 and update all devices accordantly.

metering box

Downlink Messages

Downlink messages are sent by the LoRaWAN Network Server (LNS) to the device (in contrast to uplink messages which are flowing from the device to the LNS). Downlink messages can be used to trigger an actor, i.e. the valve, in the metering box.

To receive messages from the application a LoRaWAN device needs to be available for the transmission. To save battery life devices support different modes in which they are ready to receive a message or asleep. How frequently a device can receive a message depends on the mode the device is running in. If a device runs in class A mode, then it can receive messages just after it sends one to the gateway. Devices in class B mode on the other hand can receive downlink messages more frequently, they have configurable receiving windows. Devices in class C mode are constantly available to receive messages. That means, the best battery life time can be achieved for devices in class A mode, while devices in class C mode have the best reaction time.

In this case the devices are running in Class A mode to optimize for battery lifetime. That enables the Link to receive downlink messages after the uplink transmission has been completed.

Amazon Sidewalk

(11) Besides LoRaWAN the Blinc module has the ability to communicate via Amazon Sidewalk. Amazon Sidewalk uses Bluetooth, the 900 MHz spectrum and other frequencies to provide a shared low-bandwidth network. Blinc constantly checks the signal strength, in case the LoRaWAN signal is too weak, the meter reads can be transmitted via Amazon Sidewalk. That ensures that even remote locations with no gateway in reach can send their meter reads reliably to the cloud.

Customer success

Subeca is conducting several pilot trials with water utilities, both large and small. A pilot trial at the Kinneloa Water District led to a full-scale deployment of Subeca’s technology at 700 metered points. The move to AWS Core for LoRaWAN reduced LoRaWAN network costs by a factor of 10 over Subeca’s original LoRaWAN service provider. This order of magnitude in cost reduction is enticing for smaller water utilities, such as the Kinneloa Water District, as they can now affordably leverage smart water meter networks. Subeca’s Engage Platform designed around AWS services has created a path for any water utility to achieve holistic water operations management that includes the creation of smart water homes for water utility customers.

Conclusion

This article describes how Subeca uses a combination of custom-built hardware and AWS services to easily retrofit existing, analog water meters and connect them via LoRaWAN to the cloud. Low powered sensors in the LoRaWAN network support battery life times of multiple years which reduces maintenances, it allows long range communication on a free spectrum (no upfront licenses costs), and with AWS IoT Core for LoRaWAN utilities can rely on a scalable LoRaWAN service with no management needed. This gives water utilities an easy way to use smart metering to understand their water systems better while simultaneous providing a smart home platform upon which their consumers can build. This umbrella smart water utility to smart water home platform enabled by AWS allows water supply sustainability to be more readily achieved.

Smart Metering for Water Utilities reference architecture: https://d1.awsstatic.com/architecture-diagrams/ArchitectureDiagrams/smart-water-meter-lorawan-ra.pdf 

Sascha Janssen

Sascha Janssen

Sascha Janssen is a Senior Solutions Architect at AWS, helping Power & Utility customers to become a digital utility. He enjoys connecting 'things', build serverless solutions, and use data to deliver deeper insights.

Hank McCarrick

Hank McCarrick

Hank McCarrick has 35 years of experience in new product development. He led multi-discipline teams of hardware and software engineers for two startup companies. From 2003-2008, he served as the Chief Technical Officer of the 3S Corporation, where he was responsible for managing all new product design and development. In 2009, Hank founded and served as CEO of SecoSys, a Palm Springs, CA, company focused on the development of a paradigm-shifting water management platform that integrates open wireless standards and software. Ten years later, SecoSys evolved into Subeca Inc., and Hank now serves as its Chief Strategy Officer, and holds 12 patents for electronic products and sensor technologies. Hank earned a Bachelor of Science degree in Engineering Technology, Electronics from Arizona State University.