Back to Projects

Low-Cost Groundwater Quality Monitoring System

Solar-powered ESP32 sensing node for groundwater quality, field-deployed over LTE.

Summer 2026|
ESP32FirmwareI²CRS-485ModbusCellular TelemetryLow-Power
Low-Cost Groundwater Quality Monitoring System

Overview

A 10-week Stanford EE research project for which I was the sole engineer. I took a groundwater monitoring node from an initial project brief through requirements, architecture, component selection, circuit integration, ESP32 firmware, sensor calibration, power characterization, mechanical packaging, debugging, and field deployment in a monitoring well in Madera County, California.

What I Built

  • Adafruit Feather ESP32 V2 node coordinating four sensing domains and cellular telemetry
  • pH and conductivity acquisition through Atlas Scientific EZO circuits over I²C
  • Optical dissolved oxygen sensing over isolated Modbus/RS-485
  • DS18B20 temperature sensing
  • Blues Notecard LTE cellular telemetry for remote data delivery
  • Solar panel + LiFePO4 battery power system with power-gated sensor domains and deep-sleep scheduling
  • Weatherized mechanical packaging sized for a 4-inch monitoring well

Technical Details

The ESP32 firmware sequenced multiple sensor protocols on one node: I²C for the Atlas Scientific EZO pH and conductivity circuits, an isolated Modbus/RS-485 link for the optical dissolved oxygen probe, and a one-wire DS18B20 for temperature. Each sensor domain was power-gated so it only drew current during its measurement window, and the node spent the rest of each cycle in deep sleep. Measurement cycles were packaged and pushed over LTE through a Blues Notecard. Power was budgeted against a solar panel and LiFePO4 battery, and consumption was characterized on a Joulescope JS220 to validate the runtime budget.

My Role

Sole engineer across the full stack: requirements, architecture, component selection, circuit integration, ESP32 firmware, sensor calibration, power characterization, mechanical packaging, debugging, and the field deployment itself.

Challenges and Debugging

  • Sequencing three different sensor protocols (I²C, Modbus/RS-485, one-wire) reliably on a single ESP32
  • Isolating the RS-485 dissolved oxygen link to avoid ground and noise issues
  • Power-gating sensor domains and tuning deep-sleep scheduling to hit the energy budget
  • Calibrating pH and conductivity against reference measurements
  • Packaging the electronics for a 4-inch well and validating cellular delivery in the field

Build and Deployment

Bench calibration of the pH and conductivity channels against pH 4/7/10 reference buffers and a dissolved-oxygen standard before deployment.
Bench calibration of the pH and conductivity channels against pH 4/7/10 reference buffers and a dissolved-oxygen standard before deployment.
Bring-up of the optical dissolved oxygen probe on the isolated Modbus/RS-485 link, with the ESP32 node and driver board verified against a bench supply.
Bring-up of the optical dissolved oxygen probe on the isolated Modbus/RS-485 link, with the ESP32 node and driver board verified against a bench supply.
Sensor trunk cable and retrieval line staged at the wellhead riser before lowering the probe stack down the monitoring well.
Sensor trunk cable and retrieval line staged at the wellhead riser before lowering the probe stack down the monitoring well.
Cable and retrieval rope routed through the riser into the inner well casing, keeping the sealed sensor cable centered as the probes are lowered to depth.
Cable and retrieval rope routed through the riser into the inner well casing, keeping the sealed sensor cable centered as the probes are lowered to depth.

Results

  • Field-deployed in a 4-inch monitoring well in Madera County, California
  • 43/43 measurement cycles successfully delivered over LTE during deployment
  • 1.088 Wh/day measured power consumption
  • Projected 141-day battery-only runtime
  • pH agreement within 0.051 units in validation
  • Final node cost $1,179

Tools and Skills

ESP32FirmwareI²CRS-485ModbusAtlas Scientific EZOBlues Notecard LTEDS18B20LiFePO4SolarJoulescope JS220Power CharacterizationSensor Calibration