Skip to main content

ESP32 Firmware & IoT for Water Utility Telemetry

GizanTech EngineeringIndustrial Firmware TeamUpdated June 15, 2026

Water utility RTUs sit in flooded pits, chambers with no mains power, and reservoir sites at the edge of cellular coverage. We build ESP32-based telemetry units that survive that environment, speak the analog and Modbus protocols your existing instruments already output, and buffer locally so a dropped link never becomes a lost flow total or a missed turbidity alarm.

Challenges specific to Water Utilities

  • Flow totalisers drift after comms gaps

    Pulse-output meters keep counting during an outage, but a naive uplink resends only the latest reading, so the billed/abstracted volume loses every litre that flowed while the modem was offline.

  • 4-20mA pressure loops read noise as alarms

    Pump-start surges and water hammer spike the loop current, and without per-channel debounce and slew limiting the RTU fires false low/high-pressure alarms that erode operator trust in the system.

  • Reservoir sites have no mains and weak signal

    Level sensors on remote reservoirs run off solar and a small battery at the fringe of cellular coverage, so an always-on TCP modem flattens the battery and the site goes dark for days at a time.

  • Turbidity events are missed between samples

    Slow polling intervals chosen to save power mean a short turbidity spike from a main break or backwash passes entirely between two samples, and the regulatory exceedance is never recorded.

  • Modbus instruments use clashing register maps

    Each magflow, analyser, and pressure transmitter exposes a different Modbus register layout, scaling, and byte order, so one firmware build rarely drops into a mixed brownfield site without rework.

How GizanTech solves them

  1. Pulse-accurate flow accounting. We count flow-meter pulses in a hardware ISR with a 64-bit non-volatile totaliser in NVS, so the cumulative volume is reconstructed exactly after any reboot or comms gap and reconciles with the meter register.
  2. Conditioned 4-20mA acquisition. Each loop is read through a precision sense resistor and oversampled, then median-filtered with configurable slew and debounce so pump surges and hammer transients no longer trip false pressure alarms.
  3. Solar-aware duty cycling. On reservoir sites the ESP32 deep-sleeps between samples and wakes the cellular/LoRaWAN radio only to drain the buffer, holding average draw low enough to run indefinitely on a small solar-plus-battery node.
  4. Event-triggered turbidity capture. Turbidity is sampled fast and compared against rate-of-change and absolute thresholds locally, so a spike forces an immediate uplink and a high-resolution burst instead of waiting for the next scheduled poll.
  5. Per-instrument Modbus profiles. A JSON-driven Modbus RTU master maps each device's registers, scaling, and word order at config time, so one firmware image serves mixed magflow, analyser, and transmitter fleets without a recompile.
Telemetry pointSensor protocolSample rateAlarm threshold behaviourComms link & failover
FlowPulse (open-collector, K-factor)ISR-counted, totalised every 5 sLow/zero-flow latched after 60 s, no-pulse watchdogCellular LTE-M primary, store-and-forward of full pulse count on reconnect
Pressure4-20mA loop (sensed across 150R)10 Hz oversample, 1 s medianHigh/low band with 5 s debounce and slew limitCellular LTE-M, MQTT QoS 1 buffered to NVS during dropout
Reservoir levelModbus RTU (RS-485) or 4-20mAEvery 60 s, deep-sleep between readsHi-hi/lo-lo level with rate-of-fall leak flagLoRaWAN primary on solar nodes, cellular fallback when SF maxes out
TurbidityModbus RTU analyser (NTU register)15 s poll, 1 s burst on eventRate-of-change + absolute NTU forces immediate uplinkCellular LTE-M, local SD ring-buffer if both links fail
Telemetry point map: per-parameter sensor protocol, sampling, alarm behaviour, and comms failover

ESP32 Firmware & IoT Development for other industries

Frequently asked questions

Can you read our existing 4-20mA and Modbus instruments without replacing them?

Yes. The ESP32 RTU senses 4-20mA loops directly and acts as a Modbus RTU master over RS-485, so existing magflows, pressure transmitters, and turbidity analysers stay in place and are mapped by config, not rewiring.

What happens to readings when the cellular link drops at a remote site?

Every sample, and the full flow pulse count, is written to non-volatile store-and-forward buffering. When the link returns the backlog uploads in order, so flow totals reconcile exactly and no alarm event is silently lost.

How do you choose between cellular and LoRaWAN for a reservoir or pit site?

We pick by power budget and coverage: solar/battery reservoir nodes default to low-duty LoRaWAN with a cellular fallback, while mains or surge-protected chamber sites use LTE-M for the bandwidth needed to push turbidity bursts.

Will the firmware integrate with our SCADA or historian?

The unit publishes MQTT with QoS 1 and timestamped payloads, and can also expose Modbus TCP slave registers, so data lands in your existing SCADA, historian, or cloud broker without a bespoke protocol gateway in between.

How do you stop pump surges from triggering false pressure alarms?

Pressure loops are oversampled at 10 Hz, median-filtered to 1 s, and gated with configurable slew limiting and debounce, so water hammer and pump-start transients are rejected before the high/low alarm logic ever sees them.