Case Study: Water Leakage Detection IoT Mesh Using Silicon Labs EFR32BG22 & Flutter Water leak detection IoT development using Silicon Labs EFR32BG22. HexaGuard wireless sensor network with BLE mesh, humidity anomaly tracking, Flutter mobile app, and automated valve control for property protection.

Water Leak Detection IoT Development Using Silicon Labs EFR32BG22

Our expertise in the IoT product development field includes embedded systems, wireless sensor networks, PCB design and engineering mobile applications. To show our capability and experience in building monitoring, leak detection, networking and building management systems, we created an IoT device called "Hexaguard" that uses the new Silicon Labs EFR32BG22 chip, custom hardware, and mesh networking to build a reliable, production-ready IoT device for detecting water leaks.

As an example of our IoT device development capabilities, this case study will show how we designed "Hexaguard" using the EFR32BG22 chip from Silicon Labs and built on the experience gained by designing IoT devices using custom hardware, mesh networking, and using Flutter to develop mobile app solutions for property owners, facility managers, and PropTech companies to detect issues before they become significant problems and cause property loss or extensive repairs.

Executive Summary

Water damage, often caused by unnoticed micro-leaks or burst pipes, is one of the leading causes of property loss. Traditional "spot" detectors (single pucks under a sink, for example) leave large areas vulnerable such as behind walls or under floors. This case study describes the development of "HexaGuard", a next-generation prototype that reimagines "whole home protection."

HexaGuard utilizes a distributed wireless sensor network based on Silicon Labs EFR32BG22 (Series 2) SoCs. Unlike single-point solutions, this system creates an invisible "safety mesh" covering every wet zone.

"HexaGuard" uses humidity anomaly tracking united with direct liquid detection to create predictive property protection through a Flutter app instead of using traditional reactive alarm systems. The technical architecture, hardware design, BOM, PCB strategy, and firmware logic (does not include code implementation).

Water leak detection workflow

The Problem & Unique Value Proposition

The Gap in the Market:

Current smart water leak detectors operate as "islands." A sensor behind a washing machine will not catch a pipe burst in the ceiling of the garage. Furthermore, most systems lack the ability to detect the conditions for a leak (humidity creep) before the leak occurs.

The HexaGuard Angle:

HexaGuard works as a Mesh Network. Each sensor node communicates with its neighbor. The network heals itself by routing through adjacent nodes if a node goes down or runs out of battery. Also, by integrating humidity sensors (SI7021), HexaGuard detects the dew point and the rising humidity levels, warning users of condensation risks inside walls before the formation of mold or drips.

Water leak detection app

Hardware Architecture (Silicon Labs Core)

The hardware has been built for a long life (battery more than 5 years) and a robust reaction to humid environments. The main processing component is the Silicon Labs EFR32BG22C112F352GM32.

Why is the EFR32BG22 from Silicon Labs so special?

Ultra-low Power

The ARM Cortex-M33 can operate at 27 µA/MHz in active mode and 1.40 µA in sleep mode. Therefore, nodes will run on a coin cell battery.

Built-in Security

Silicon Labs' Secure Vault will prevent malicious firmware from being updated. This feature is of utmost importance to safety systems.

Wireless Mesh Ready

With native support for Bluetooth 5.2 Mesh, you will have the capability of relaying received messages without adding to the hardware used in your design.

Component Selection & Sensor Logic

Primary MCU & Radio:

EFR32BG22 (QFN32 package). Handles ADC for water sensing, I²C for humidity, and mesh networking stack.

Humidity & Temperature Sensor:

SI7021 (Silicon Labs). Chosen for its ±3% RH accuracy and factory-calibrated CMOSens® technology. It calculates dew point trends to predict condensation.

Water Detection Probes:

Custom FR-4 PCB "comb" traces (gold-plated). Two interdigitated copper traces measure resistance change (0 = dry, >500kΩ = wet).

Power Management:

TPS62743 (TI) step-down converter to ensure stable 1.8V supply for the sensor, maximizing battery life.

Energy Source:

CR2450 (3V, 620mAh) coin cell for nodes; USB-C (5V) for the Border Router.

The Mesh Network Topology

Unlike in other types of networks (such as Wi-Fi), if one device fails, all devices connected through that device will no longer function. However, HexaGuard does not operate like this. Instead, HexaGuard decodes BLE advertisements to determine if they need to send messages to each other.

Self-Healing:

As each device works as a repeater, if device A cannot communicate with the gateway (also known as the hub) directly, it will send a message to device B, who will then forward it to the gateway.

Low Latency:

HexaGuard provides an alerting system that allows urgent (high priority) messages (e.g., leak alerts) to bypass the normal message routing queues.

Range:

HexaGuard provides long range capabilities using silicon chips that are able to receive signals from very low power sources (-106.7dB). In fact, devices can transmit signals between 50 meters apart (through two dry wall partitions).

Strategies for PCB Design and Enclosure for Prototypes

Prototype PCB Description: The first prototype is a dual (2) layer, 40mm x 40mm PCB layout specifically designed to either place under appliances, or install inside cabinets.

PCB Layers

Digital Circuits and RF Components will be on the Topsheet and the Bottomsheet will act as a Ground Plane. The location of the meandered inverted-F antenna (MIFA) will be tuned to 2.4 GHz and a keep-out area will exist around the ceramic component of the PCB.

Corrosion Resistance

To protect exposed copper on sensing pads from oxidation in the presence of moisture, we will use ENIG (Electroless Nickel Immersion Gold) plated surface finish for all exposed copper on the PCB.

Enclosure Type

The enclosure is IP54 rated ABS plastic with a silicone O-ring. There are vent holes on the bottom of the enclosure, allowing enough water ingress to reach the sensor comb.

Bill of Materials (BOM)

Estimated cost for a single sensor node (Quantity: 100 units).

ComponentPart NumberSupplier
MCU + Radio EFR32BG22C112F352GM32 Silicon Labs
Humidity Sensor SI7021-A10-GM Silicon Labs
Power Regulator TPS62743YFPR Texas Instruments
Battery Holder Keystone 1066 Keystone
PCB 2-layer ENIG (Sensing Pads) Generic
Capacitors/Resistors 0402 Package Assortment Generic
Antenna Circuit 2.4GHz Matching Network Murata
CR2450 Battery CR2450 Renata

The Gateway/Border Router includes an EFR32MG21 (for higher throughput) and a UART bridge to Wi-Fi (ESP8285).

Firmware & Data Processing Logic

The embedded software system uses an Event-Driven Real-time Operating System (RTOS) architecture that is designed to increase battery life. The state machine logic within the firmware has three primary states:

  • Deep Sleep State - operate in EM2 mode - all function of processor OFF - supply current ~1.4µA.
  • Wake Period - every 6 seconds (or whenever there is an interrupt) include the following operations:
    • Read RH from SI7021 - if > 75% & rate of change >5% then report Humidity Anomaly.
    • Read GPIO comb - if there is continuity then report Flood Alert.
  • Packet Transmission – using BLE Mesh Publish Model, a packet will be sent. If an ACK is not received from the Next Hop Neighbor the node will increase Tx Power by +6 dB & resend the packet.

Dew Point Prevention Algorithm:

Using the Magnus Equation for dry and wet bulb temperatures obtained from the SI7021, will yield a calculation for the Dew Point Temperature (Td). If Td compared to the ambient Room Air Temperature (T) is less than or equal to +2°C. The system will send an Alert: Pre-Leak Alert via the App and prompt the user to improve ventilation.

Development of the Mobile App (Using Flutter)

The User Interface was implemented using Flutter, allowing for a single code base and build process for both iOS and Android operating systems.

For real-time monitoring and the provision of historical data storage, the app is integrated with Firebase Firestore.

Key features include the ability to map sensors based on their physical location (i.e., floor plan) visual heatmaps of sensor data (i.e., humidity), real-time notifications of leaking sensors using Firebase Cloud Messaging, and Bluetooth Low Energy (BLE) Mesh provisioning capabilities for the devices.

In addition, the architecture of the app was designed in a manner that would allow future integrations such as automated water shutoff systems and smart home connectivity.

Integration & Automation (The Valve Control)

Detection is useless without mitigation.

The HexaGuard system includes a Master Valve Controller (another Silicon Labs device, e.g., EFR32FG25 for Sub-GHz range) attached to the main water line.

Logic Flow:

  • Sensor Node (Bathroom) detects 100% humidity spike + water.
  • Mesh packet relayed to Gateway < 0.5 seconds.
  • Gateway sends emergency_stop command to Valve Controller.
  • Valve servo engages, shutting off main water supply.
  • Simultaneously: Flutter app triggers a full-screen red alert: "MAIN VALVE CLOSED - Leak Detected in Master Bathroom."

Conclusion

In our work developing the "HexaGuard" prototype, we have shown how distributed IoT mesh networks can enable comprehensive water leak detection and proactive property protection.

HexaGuard was developed using the EFR32BG22 from Silicon Labs and Flutter for the development of an end-to-end solution providing real-time water leak detection, trend analysis of humidity data, and simple to use mobile monitoring services.

Our work developing the HexaGuard prototype demonstrates expertise in the development of IoT devices and embedded systems, wireless mesh networking, mobile applications, and smart building monitoring solutions.

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Leadership That Leads Worldwide

With a physical presence in over 15 countries and a global footprint spanning 25+ countries, we are ready to serve you anywhere. Location, language, or culture is never a barrier, because our global team can work with you in your language. Our strong international team ensures seamless collaboration across borders We have a strong tech team, highly recognized in their domains, with extensive technical expertise.