> ## Content Index
> Fetch the complete content index at: https://datadeep.tech/llms.txt
> Use this file to discover other available public pages before exploring further.

# Off-Grid ESP32 Flood-Stage Sensor: Cutting Standby From 20 mA to Under 100 µA on a $70 Solar Node
- URL: https://datadeep.tech/ultrasonic-water-level-sensor/
- Published: 2026-08-03T21:43:51.000Z
- Updated: 2026-08-03T21:43:50.000Z
- Description: Full open-hardware build: ultrasonic stage sensing, LiFePO4 pack, and the dev-board parasitic draw that wastes 89% of a node's daily energy.
- Author: John D
- Tags: DIY, Meshnetworking, Smart City, Sustainability, Solar, Science, Water, Offgrid, Engineering

### Open-Source Off-Grid Ultrasonic Flood-Stage Monitoring Node

---

**A solar-powered ESP32 sensor pole with sub-milliamp standby, LiFePO4 storage, and four costed low-quiescent-current power topologies.**

**License:** Hardware under CERN-OHL-S v2; documentation under CC BY-SA 4.0\. **Version:** 1.0, 3 August 2026.

### Epistemic legend

- **\[D\]** Datasheet or manufacturer-specified value.
- **\[M\]** Measured, from a named bench or independently published measurement.
- **\[E\]** Estimated or modeled; the reasoning is shown.
- **\[J\]** Asserted design judgment; justified in text.

---

## TL;DR

- **A reproducible off-grid ultrasonic flood-stage node can be built for about $70 to $95 (cheapest path) versus $960 to $1,200 for the nearest commercial telemetered unit, and the engineering problem is not the sensor but parasitic standby current: on a commodity ESP32 dev board, roughly 89% of the daily energy is wasted by the on-board USB-UART bridge and the AMS1117 regulator, not by useful work.**
- **Fix the standby term and everything else gets easier.** Killing the parasitic draw (bare module + low-Iq regulator (low quiescent current LDO), or a power-gated dev board, or a 1S single-cell direct-feed) drops daily energy from about 4.1 Wh/day to under 0.05 Wh/day, pushes no-sun autonomy from about 17 days to hundreds of days, and lets you shrink from a 50 W panel and 4S pack to a 10 to 20 W panel and a single cell. The recommended default is the 1S single-cell topology, which deletes the entire 12 V-to-3.3 V conversion stage.
- **Ultrasonic sensing is "good enough" (a few cm), not regulatory-grade, and it fails predictably.** Use a 3.3 V-native UART sensor (A02YYUW) to avoid level-shifting, add mandatory speed-of-sound temperature compensation, filter with N-ping medians, and flag data as low-confidence during rain/foam/multipath. In narrow canals or persistent foam, switch to a MaxBotix narrow-beam sensor or a 24/60 GHz radar.

---

## 1\. Summary 

A fully off-grid, pole-mounted water-level telemetry node that measures distance to the water surface with a downward-facing ultrasonic sensor, converts it to stage height, and posts JSON to an existing endpoint over WiFi, LoRa, or cellular, engineered so that parasitic standby, not useful work, is the design target.

---

## 2\. At-a-glance box

- **Total estimated cost (USD):** Cheapest viable path about **$70 to $95**. Upgrade path about **$180 to $260**. (Both exclude the commercial radar sensor upgrade; see BOM.) Prices are estimates and vary by region and date.
- **Estimated build time:** 8 to 16 hours for an intermediate maker, spread over two sessions (one for the pack and electronics, one for the pole and enclosure).
- **Difficulty:** Intermediate. Cheapest path needs only a soldering iron and a multimeter. Option A (bare module) needs fine-pitch SMD soldering.
- **Key tools:** soldering iron, multimeter, drill, hacksaw or pipe cutter, screwdrivers, wire strippers, heat-shrink/heat gun. A cheap DC current meter (INA219 or a multimeter in microamp range) is needed for commissioning.

---

## Mission and Objectives

---

## 3\. Abstract and purpose

This document specifies a reproducible, repairable water-level monitoring node for a flood-prone watercourse, drainage canal, or urban catchment. The node runs unattended 24/7 on solar power. It wakes on a timer, measures the air gap from a fixed datum to the water surface, converts that to stage, timestamps and buffers the reading, transmits it, and returns to deep sleep.

The web dashboard, database, and front end are out of scope. The network is treated only as a transport contract: an HTTP POST or MQTT publish of a JSON payload with an auth token, plus retry and offline-buffer semantics.

**Who it is for:** off-grid, FOSS-minded builders, community-science flood programs, small municipalities, and researchers who need many nodes at a fraction of commercial telemetered-gauge cost.

**Limits, stated up front \[J\]:** ultrasonic ranging is not a universal solution. It degrades in heavy rain, dense fog, foam, floating debris and vegetation, strong temperature stratification over water, and high wind. It is defeated by insects and spiders nesting in the transducer cup. Where these conditions dominate, the node must flag its data as low-confidence, and the builder should consider a 24/60 GHz radar sensor instead (see Sections 4 and 15). This node targets the practical accuracy of low-cost citizen-science gauges (a few centimeters), not the USGS regulatory standard, which per USGS Office of Surface Water Technical Memoranda requires stage equipment "capable of sensing and recording stage with an uncertainty of no more than 0.01 ft or 0.20 percent of indicated reading, whichever is larger" \[D, USGS OSW policy\] (about 3 mm below 5 ft of effective stage).

---

## 4\. Design rationale and theory of operation

### 4.1 Governing physics

Ultrasonic time-of-flight ranging measures the round-trip time t of a 40 kHz pulse and computes distance d = c·t/2, where c is the speed of sound in air. The critical dependency is that c varies strongly with temperature: c = 331.3 + 0.606·T m/s, where T is in degrees C \[D, standard acoustics\]. That is about 0.6 m/s per degree C. An uncompensated swing of 20 degrees C changes c by about 12 m/s out of about 343 m/s, roughly 3.5% range error \[E, from the equation\]. At a 3 m (9.8 ft) mounting height that is about 100 mm (3.9 in) of error, which is unacceptable for stage. **Temperature compensation is therefore mandatory, not optional \[J\].** Humidity changes c by only a few tenths of a percent across the full range and is second-order; we ignore it and note the residual \[J\].

Stage is derived by subtraction: `stage = datum_height - measured_air_gap`, where `datum_height` is the fixed vertical distance from the sensor face to the established zero datum, set once at calibration.

### 4.2 Why this architecture

The single most important finding of this project is that on a commodity ESP32 dev board, **the sleeping system is dominated by parasitic loads, not by the microcontroller.** The bare ESP32 SoC sleeps at about 10 uA in RTC-timer deep sleep \[D, Espressif ESP32 series datasheet\] but real dev boards measure 5 to 20 mA in deep sleep \[M, multiple independent measurements including grillbaer's ESP32 power-consumption test repository, which measured a NodeMCU ESP-32S at 4.7 mA deep sleep\] because the on-board USB-UART bridge and the AMS1117 linear regulator stay powered.

The AMS1117-3.3 alone has a quiescent (ground) current of 5 mA typical, 10 mA maximum \[D, Advanced Monolithic Systems AMS1117 datasheet, 6.5 V ≤ VIN ≤ 12 V\]. That is roughly 500 to 1,000 times the sleeping SoC. The USB-UART bridge adds to it and, critically, is not commanded into its low-power USB-suspend state during ESP32 deep sleep. Bridge draws in normal operation, from the manufacturer datasheets \[D\], are:

- **CP2102:** 20 mA typ, 26 mA max (normal); only 80 to 100 uA in USB suspend \[D, Silicon Labs CP2102/9 datasheet\].
- **CP2102N:** 9.5 mA typ (normal); 195 uA suspend \[D, Silicon Labs CP2102N datasheet\].
- **CH340C/CH340G:** 7 mA typ, 20 mA max at 5 V (4 mA typ at 3.3 V); 40 to 90 uA suspend \[D, WCH CH340 datasheet\].

So the widely quoted "25 to 30 mA of parasitic dev-board draw" is accurate specifically for CP2102-based boards (about 20 to 26 mA bridge + about 5 mA AMS1117). For CH340C/CH340G or CP2102N boards it is lower, roughly 12 to 15 mA, but still 1,000+ times the sleeping SoC \[E, from the datasheet figures above\]. Either way, the dev board's own housekeeping silicon, not the ESP32, sets the standby budget.

Everything in this design follows from attacking that parasitic term. The four power options in Section 4.4 are four ways to kill it. The measurement, radio, and firmware choices all aim to keep the active-energy term small enough that standby, once fixed, dominates the budget in a good way (that is, at microwatts).

### 4.3 Key parameters and how they were chosen

- **Wake interval:** default 10 min. Flood stage changes on the order of minutes to hours in most catchments; 10 min is a reasonable compromise between latency and energy. It is a firmware variable (see the parametric model in Section 5), and threshold-driven fast sampling is added for rising water.
- **Mounting height:** sensor face must sit above maximum expected flood stage plus the sensor dead zone plus margin. See Section 9.
- **Storage voltage architecture:** the baseline uses a 4S LiFePO4 pack (12.8 V nominal) feeding a buck to 3.3/5 V. We show this is usually the wrong choice for a microwatt load and present a 1S direct-feed alternative as the fourth power option, because eliminating the whole 12 V-to-3.3 V conversion stage is the single biggest efficiency and cost win available \[J\].

### 4.4 The four power topologies (summary; full detail in Sections 6 and 10)

- **Option A (best performance, hardest build):** bare ESP32-WROOM-32E module on protoboard/PCB with a low-Iq regulator (HT7833 or TPS62840). No USB bridge. Programmed via external FTDI + esptool, updated via OTA.
- **Option B (moderate, keeps dev board):** keep the dev board but hard-gate its power with a TPL5110 nano-timer (35 nA typical, 50 nA max \[D, TI TPL5110 datasheet / SparkFun\]) driving a P-channel MOSFET, so the board is fully off between samples and cold-boots each cycle.
- **Option C (easiest):** swap the AMS1117 for a pin-compatible low-Iq LDO, or buy a low-power board (FireBeetle ESP32) whose deep sleep is independently measured near 10 uA \[M, Lucidar\].
- **Option 1S (recommended default) \[J\]:** run the whole node from a single LiFePO4 cell (or 1S Li-ion) directly into a low-Iq 3.3 V regulator, deleting the 4S pack, BMS complexity, buck module, and PWM controller's 12 V penalties.

---

[GitHub - jktightwad/esp32-Parasitic-Drain-Monitor: Standalone battery monitor for parasitic drain detection and logging using an ESP32Standalone battery monitor for parasitic drain detection and logging using an ESP32 - jktightwad/esp32-Parasitic-Drain-Monitor![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/icon/favicon-bc0f391c-a33c-43f8-9042-69d91ba22ae1.svg)GitHubjktightwad![](https://opengraph.githubassets.com/f7cbadadca6393d4b643be5815c19e0c05bc34baa6ccfce241ba9c6176becb19/jktightwad/esp32-Parasitic-Drain-Monitor)](https://github.com/jktightwad/esp32-Parasitic-Drain-Monitor?ref=datadeep.tech)

---

## 5\. Specifications, performance targets, and the parametric power budget

### 5.1 Targets

- **Stage measurement range:** about 0.3 to 4.5 m (1 to 14.8 ft) air gap depending on sensor.
- **Practical field accuracy:** plus or minus 2 to 5 cm (0.8 to 2 in) with temperature compensation and N-ping filtering \[E, consistent with the UNC COAST Lab deployment which reported 5 cm accuracy and 1.5 cm RMSE against a commercial unit\].
- **Standby target:** under 100 uA system standby (optimized), versus 5 to 20 mA baseline.
- **Daily energy target:** under 0.5 Wh/day optimized, versus about 4.1 Wh/day baseline.
- **Autonomy target:** over 100 days of no-sun autonomy on a modest pack.
- **Service life:** 3 to 8 years, gated by LiFePO4 pack (2000+ cycles at 80% depth of discharge \[D\]) and UV degradation of enclosure/cabling.
- **Duty cycle:** active roughly 2 to 5 s per wake; sleeping the rest.
Parasitic standby current in a battery-powered ESP32 sensor node Comparison infographic showing daily energy dominated by parasitic standby in a commodity development board node, with a lower-power optimized node comparison, topology comparison table, and wake interval sweep chart. Parasitic standby current in a battery-powered ESP32 sensor node Comparison of daily energy budget, power topology tradeoffs, and wake-interval sensitivity Daily energy comparison Top bar uses a common 0 to 4.1 Wh/day scale. Second bar is drawn on the same scale. Commodity dev board node: 4.1 Wh/day E Parasitic standby 3.65 Wh/day E Useful measure and transmit work 0.451 Wh/day E Parasitic standby occupies about 89 percent of the baseline daily energy budget E Optimized node: 0.03 Wh/day E 0.03 Wh/day E Parasitic contributors AMS1117 LDO 5 mA typ, 10 mA max D CP2102 USB-UART bridge 20 mA typ D Buck module quiescent 1 to 3 mA D Sensor standby about 2 mA E Power topology comparison Option 1S single-cell direct feed is highlighted with a simple outline as the recommended default. Attribute Option A bare module Option B gated dev board with TPL5110 Option C low-Iq regulator swap or low-power board Option 1S single-cell direct feed Target standby current 10 to 30 µA D 20 to 80 µA E 50 to 500 µA E 5 to 20 µA E Added cost in USD 0 to 5 E 2 to 6 E 1 to 10 E 0 to 3 E Build difficulty moderate moderate to high moderate low to moderate Tooling required basic soldering soldering and timing setup rework tools or board swap basic assembly Field serviceability good moderate moderate good Wake interval sweep Daily energy versus wake interval. The baseline curve is nearly flat because standby dominates. 0 1 2 3 4 4.5 daily energy, Wh/day 1 5 10 15 30 60 wake interval, minutes baseline nearly flat because standby dominates E baseline dev board node E optimized node E Epistemic legend D = datasheet M = measured E = estimated All numeric claims are tagged inline. 

### 5.2 The parametric power budget (worked model)

Daily energy is:

```
E_day (Wh) = N_cycles * E_active + P_standby * 24
N_cycles   = 1440 / T_wake            (T_wake in minutes)
E_active   = E_boot + E_sensor + E_assoc + E_tx      (Wh per cycle)

```

Variables:

- `T_wake` \= wake interval (min).
- `E_boot` \= energy to wake/boot the compute (deep-sleep wake is cheap; cold boot is not).
- `E_sensor` \= sensor power-on settle + N-ping burst.
- `E_assoc` \= WiFi association energy (dominant active term; cold DHCP scan is several seconds, pinned BSSID/channel/static IP is about 1 s).
- `E_tx` \= transmit + ACK.
- `P_standby` \= continuous standby power (the parasitic term).

**Baseline (dev board, 4S, PWM, cheap buck, HC-SR04) \[E, built from measured/datasheet component draws\]:**

- Parasitic standby: dev-board bridge+LDO about 25 to 30 mA at 5 V, buck quiescent 1 to 3 mA at 12 V, HC-SR04 standby about 2 mA. Referred to 12 V this is about 283 mAh/day, roughly 3.4 Wh/day, or `P_standby` about 0.142 W.
- Active: about 0.0028 Wh/cycle (ESP32 TX peak about 240 mA at 3.3 V \[D\], association about 1 to 3 s).
- At `T_wake` \= 10 min: E\_day = 144 \* 0.0028 + 3.4 = 0.40 + 3.4 = about 3.8 Wh/day. About 4.1 Wh/day including BMS/controller overhead. **89% is parasitic standby.**

**Optimized (Option A or 1S, bare module + HT7833/TPS62840, power-gated A02YYUW) \[E\]:**

- `P_standby`: ESP32 10 uA \[D\] + regulator about 4 uA \[D, HT7833 low-Iq clone variant; note datasheet-vs-marketing conflict below\] + BMS/leakage, call it about 40 uA at 3.3 V, about 0.00013 W, about 0.0032 Wh/day.
- `E_active`: about 0.2 mWh/cycle with pinned WiFi (E\_sensor about 0.04, E\_assoc about 0.11, E\_tx about 0.04, E\_boot about 0.01 mWh).
- At `T_wake` \= 10 min: E\_day = 144 \* 0.0002 + 0.0032 = 0.029 + 0.003 = about 0.032 Wh/day.

**Datasheet-vs-marketing conflict to flag \[D/M\]:** the Holtek HT78xx series datasheet specifies quiescent current of 4 to 5 mA typical \[D, Holtek HT78xx datasheet\], but many LCSC/AliExpress "HT7833" clone listings claim 2 uA quiescent. These cannot both be the same part. The truly microamp-class low-Iq options with firm datasheet backing are the **TPS62840** (60 nA typ Iq, 750 mA, 80% efficiency at 1 uA load \[D, TI TPS62840 datasheet\]), **MCP1700** (about 2 uA \[D\]), **XC6206/XC6203** class, and **ME6211**. Verify the actual Iq of whatever "HT7833" you receive on the bench before trusting it; if it measures milliamps, treat it as a standard LDO and substitute a TPS62840 or MCP1700 for the optimized build \[J\].

### 5.3 Wake-interval sweep (Wh/day and autonomy)

Autonomy uses 66.6 Wh usable for the 4S pack and 15.4 Wh usable for a single-cell 1S pack (one 32650 at about 19.2 Wh gross, 80% depth of discharge). Values are modeled \[E\]; verify on the bench (Section 11).

| T\_wake (min) | Cycles/day | Baseline Wh/day | Baseline autonomy (4S) | Optimized Wh/day | Optimized autonomy (1S) |
| ------------- | ---------- | --------------- | ---------------------- | ---------------- | ----------------------- |
| 1             | 1440       | 7.4             | 9 d                    | 0.29             | 53 d                    |
| 5             | 288        | 4.2             | 16 d                   | 0.060            | 257 d                   |
| 10            | 144        | 3.8             | 17 d                   | 0.032            | 480 d                   |
| 15            | 96         | 3.7             | 18 d                   | 0.021            | 730 d                   |
| 30            | 48         | 3.5             | 19 d                   | 0.012            | 1280 d                  |
| 60            | 24         | 3.5             | 19 d                   | 0.007            | 2200 d                  |

Two lessons are visible \[J\]: (1) on the baseline, changing the wake interval barely moves the daily energy because standby dominates, so optimizing firmware timing on an un-fixed dev board is wasted effort; (2) once standby is fixed, autonomy far exceeds the self-discharge and calendar-life limits of the pack, so the pack can be shrunk drastically, which is the real cost win. (The multi-hundred-day "autonomy" figures are model ceilings; in practice self-discharge and BMS leakage cap useful autonomy at weeks to a few months, which is still far beyond any realistic monsoon overcast.)

---

Flood-stage monitoring node bill of materialsComponent specification, estimated cost, sourcing notes, and salvage alternatives. Semantic data is embedded in metadata.{"headers":\["#","Item","Spec / size","Qty","Generic name, model, or key parts","Est. unit (USD)","Line total (USD)","Source / notes","Salvage alt."\],"rows":\[\["1","Ultrasonic sensor","UART, 3.3 V, IP67","1","A02YYUW / SEN0311; natively 3.3 V-safe UART, no level shifter","16","16","DFRobot direct: $15.90 \[D\]; generic clones may be cheaper","HC-SR04 from junk drawer; requires a level shifter and is not waterproof"\],\["2","Temperature sensor","1-Wire","1","DS18B20 waterproof probe","2","2","Generic","Salvage from an old thermostat"\],\["3","Compute","ESP32 module or development board","1","Select one configuration from Section 6.3","3 to 12","3 to 12","Generic; final cost depends on selected compute option","Salvaged development board"\],\["4","Regulator","3.3 V, low quiescent current","1","TPS62840, 60 nA \[D\], or MCP1700, 2 µA \[D\]","0.30 to 3","0.30 to 3","LCSC or Mouser","None"\],\["5","RTC / timer for Option B","Nano-power timer","1","TPL5110 breakout; 35 nA typical \[D\]","5","5","SparkFun, Adafruit, or generic equivalent","None"\],\["6","Enclosure","IP65/66 polycarbonate, UV-stable, light color","1","150 × 100 × 70 mm cable-gland box","8","8","Hardware store","Food container plus sealant; lower ingress protection"\],\["7","Pressure vent","Breathable membrane vent, M12","1","Gore-type vent or generic equivalent","2","2","Generic","Gore-Tex patch plus epoxy"\],\["8","Cable glands","PG7 or PG9, selected for cable outside diameter","2 to 3","Nylon cable glands","0.50","1.50","Hardware store","Rubber grommet plus sealant"\],\["9","Desiccant","Indicating silica gel","1","10 to 20 g sachet","1","1","Generic","Rice; poor and temporary substitute"\],\["10","Surge / TVS protection","SMAJ-series TVS diodes plus MOV","3","TVS diodes for panel and sensor leads","0.30","1","LCSC","None"\],\["11","Inline fuse","1 to 3 A plus holder","1","Automotive blade fuse","1","1","Automotive-parts store","Salvaged fuse and holder"\],\["12","Wire, heat-shrink, and connectors","Assorted","1 set","Silicone hookup wire, JST connectors, and heat-shrink tubing","4","4","Generic","Salvaged wire and connectors"\],\["","","","","","","","",""\],\["13","Solar panel","10 to 20 W mono, optimized; or 50 W baseline","1","Monocrystalline solar panel","12 to 40","12 to 40","Generic","Salvaged garden-light or caravan panel"\],\["14a","Cells: 1S path","32650 or 32700 LiFePO4, 6 Ah","1","LiFePO4 cell","4","4","BatteryHookup double-tested 6000 mAh cell \[M\]","Salvaged LiFePO4 cell from solar lighting"\],\["14b","Cells: 4S path","32650 or 32700 LiFePO4, 6 Ah","4","LiFePO4 cells","4","16","Generic","Same as the 1S path, provided cells are tested and matched"\],\["15","Battery-management system","1S or 4S LiFePO4, with low-temperature cutoff","1","LiFePO4 protection board","2 to 8","2 to 8","Generic; confirm charging is inhibited below 0 °C","None; do not omit the BMS"\],\["16","Charge controller","MPPT upgrade or LiFePO4-compatible PWM","1","Solar charge controller","6 to 25","6 to 25","Generic","None"\],\["17","Cell holders / nickel strip","32650 holders or 0.15 × 8 mm nickel strip","1 set","No-weld cell holders or nickel interconnect strip","2","2","Generic","Salvaged nickel strip"\],\["18","Pole and mount","40 to 50 mm galvanized pipe, U-bolts, and bracket","1 set","Galvanized pipe and mounting fittings","15","15","Hardware store","Salvaged pipe or fence post"\],\["","","","","","","","",""\],\["19A","Compute configuration: Option A","Bare ESP32 module and low-Iq regulator;\\n standby target approximately 15 to 40 µA","1 set","ESP32-WROOM-32E module, approximately $3;\\n TPS62840 board, approximately $3, or MCP1700, approximately $0.30;\\n FTDI adapter for programming","6 to 10","6 to 10","Hard build difficulty; requires SMD assembly or adapter-board integration","Salvaged ESP32 module or FTDI adapter where suitable"\],\["19B","Compute configuration: Option B","Development board with timer-controlled power;\\n standby target approximately 20 to 60 µA","1 set","NodeMCU-32S development board, approximately $5;\\n TPL5110 timer, approximately $5;\\n P-channel MOSFET, approximately $0.30","10","10","Easy-to-moderate build; timer remains active while the development board is powered off","Salvaged ESP32 development board"\],\["19C","Compute configuration: Option C","Low-power development board or regulator modification;\\n standby target approximately 10 µA","1 set","FireBeetle ESP32 DFR0478, approximately $8;\\n alternatively, remove the AMS1117 regulator and install a low-Iq LDO","4 to 8","4 to 8","Moderate build difficulty; desoldering may be required \[M, Lucidar\]","Modified or salvaged ESP32 development board"\],\["19D","Compute configuration: 1S architecture","Single-cell architecture;\\n standby target approximately 30 to 50 µA","1 set","Bare ESP32 module;\\n TPS62840 or MCP1700 regulator;\\n single LiFePO4 cell;\\n 1S BMS;\\n small solar panel","6 to 9","6 to 9","Moderate build difficulty; reduces battery and solar-system complexity","Salvaged module, cell holder, or small solar panel where electrically suitable"\]\]}Flood-stage monitoring node bill of materialsComponent specification, estimated cost, sourcing notes, and salvage alternatives#ItemSpec / sizeQtyGeneric name, model, or keypartsEst. unit(USD)Line total(USD)Source / notesSalvage alt.1Ultrasonic sensorUART, 3.3 V, IP671A02YYUW / SEN0311; natively 3.3V-safe UART, no level shifter1616DFRobot direct: $15.90 \[D\];generic clones may becheaperHC-SR04 from junk drawer;requires a level shifter and isnot waterproof2Temperature sensor1-Wire1DS18B20 waterproof probe22GenericSalvage from an oldthermostat3ComputeESP32 module ordevelopment board1Select one configuration fromSection 6.33 to 123 to 12Generic; final cost depends onselected compute optionSalvaged development board4Regulator3.3 V, low quiescentcurrent1TPS62840, 60 nA \[D\], or MCP1700,2 µA \[D\]0.30 to 30.30 to 3LCSC or MouserNone5RTC / timer for OptionBNano-power timer1TPL5110 breakout; 35 nA typical \[D\]55SparkFun, Adafruit, or genericequivalentNone6EnclosureIP65/66 polycarbonate,UV-stable, light color1150 × 100 × 70 mm cable-gland box88Hardware storeFood container plus sealant;lower ingress protection7Pressure ventBreathable membranevent, M121Gore-type vent or generic equivalent22GenericGore-Tex patch plus epoxy8Cable glandsPG7 or PG9, selectedfor cable outsidediameter2 to 3Nylon cable glands0.501.50Hardware storeRubber grommet plus sealant9DesiccantIndicating silica gel110 to 20 g sachet11GenericRice; poor and temporarysubstitute10Surge / TVSprotectionSMAJ-series TVSdiodes plus MOV3TVS diodes for panel and sensorleads0.301LCSCNone11Inline fuse1 to 3 A plus holder1Automotive blade fuse11Automotive-parts storeSalvaged fuse and holder12Wire, heat-shrink, andconnectorsAssorted1 setSilicone hookup wire, JSTconnectors, and heat-shrink tubing44GenericSalvaged wire and connectors13Solar panel10 to 20 W mono,optimized; or 50 Wbaseline1Monocrystalline solar panel12 to 4012 to 40GenericSalvaged garden-light orcaravan panel14aCells: 1S path32650 or 32700LiFePO4, 6 Ah1LiFePO4 cell44BatteryHookup double-tested6000 mAh cell \[M\]Salvaged LiFePO4 cell fromsolar lighting14bCells: 4S path32650 or 32700LiFePO4, 6 Ah4LiFePO4 cells416GenericSame as the 1S path,provided cells are tested andmatched15Battery-managementsystem1S or 4S LiFePO4,with low-temperaturecutoff1LiFePO4 protection board2 to 82 to 8Generic; confirm charging isinhibited below 0 °CNone; do not omit the BMS16Charge controllerMPPT upgrade orLiFePO4-compatiblePWM1Solar charge controller6 to 256 to 25GenericNone17Cell holders / nickelstrip32650 holders or 0.15× 8 mm nickel strip1 setNo-weld cell holders or nickelinterconnect strip22GenericSalvaged nickel strip18Pole and mount40 to 50 mmgalvanized pipe,U-bolts, and bracket1 setGalvanized pipe and mountingfittings1515Hardware storeSalvaged pipe or fence post19AComputeconfiguration: OptionABare ESP32 moduleand low-Iq regulator;standby targetapproximately 15 to 40µA1 setESP32-WROOM-32E module,approximately $3; TPS62840 board,approximately $3, or MCP1700,approximately $0.30; FTDI adapterfor programming6 to 106 to 10Hard build difficulty; requiresSMD assembly oradapter-board integrationSalvaged ESP32 module orFTDI adapter where suitable19BComputeconfiguration: OptionBDevelopment boardwith timer-controlledpower; standby targetapproximately 20 to 60µA1 setNodeMCU-32S development board,approximately $5; TPL5110 timer,approximately $5; P-channelMOSFET, approximately $0.301010Easy-to-moderate build; timerremains active while thedevelopment board is poweredoffSalvaged ESP32 developmentboard19CComputeconfiguration: OptionCLow-powerdevelopment board orregulator modification;standby targetapproximately 10 µA1 setFireBeetle ESP32 DFR0478,approximately $8; alternatively,remove the AMS1117 regulator andinstall a low-Iq LDO4 to 84 to 8Moderate build difficulty;desoldering may be required\[M, Lucidar\]Modified or salvaged ESP32development board19DComputeconfiguration: 1SarchitectureSingle-cellarchitecture; standbytarget approximately30 to 50 µA1 setBare ESP32 module; TPS62840 orMCP1700 regulator; single LiFePO4cell; 1S BMS; small solar panel6 to 96 to 9Moderate build difficulty;reduces battery andsolar-system complexitySalvaged module, cell holder,or small solar panel whereelectrically suitableInline SVG text remains selectable. Structured data is embedded as JSON metadata and included in the HTML export. 

## 6\. Bill of Materials

Prices are indicative USD street prices from generic online marketplaces (AliExpress/Amazon/eBay class) or distributors (LCSC/Mouser/DigiKey) as noted; all are estimates and vary by region and date.

### 6.1 Core node (shared across options)

| #  | Item                          | Spec/size                                     | Qty    | Generic name (or model + why)                                  | Est. unit (USD) | Line total | Source / notes                                      | Salvage alt.                                                   |
| -- | ----------------------------- | --------------------------------------------- | ------ | -------------------------------------------------------------- | --------------- | ---------- | --------------------------------------------------- | -------------------------------------------------------------- |
| 1  | Ultrasonic sensor             | UART, 3.3 V, IP67                             | 1      | A02YYUW / SEN0311 (natively 3.3 V-safe UART, no level shifter) | 16              | 16         | DFRobot direct $15.90 \[D\]; generic clones cheaper | HC-SR04 from junk drawer (needs level shifter, not waterproof) |
| 2  | Temp sensor                   | 1-wire                                        | 1      | DS18B20 waterproof probe                                       | 2               | 2          | generic                                             | salvage from old thermostat                                    |
| 3  | Compute                       | ESP32 module/board                            | 1      | See per-option table 6.3                                       | 3 to 12         | 3 to 12    | generic                                             | salvage dev board                                              |
| 4  | Regulator                     | 3.3 V low-Iq                                  | 1      | TPS62840 (60 nA \[D\]) or MCP1700 (2 uA \[D\])                 | 0.30 to 3       | 0.30 to 3  | LCSC/Mouser                                         | none                                                           |
| 5  | RTC/timer (Option B)          | nano-timer                                    | 1      | TPL5110 breakout (35 nA typ \[D\])                             | 5               | 5          | SparkFun/Adafruit/generic                           | none                                                           |
| 6  | Enclosure                     | IP65/66 polycarbonate, UV-stable, light color | 1      | 150 x 100 x 70 mm gland box                                    | 8               | 8          | hardware store                                      | food container + sealant (lower IP)                            |
| 7  | Pressure vent                 | breathable membrane vent, M12                 | 1      | Gore-type vent or generic                                      | 2               | 2          | generic                                             | Gore-Tex patch + epoxy                                         |
| 8  | Cable glands                  | PG7/PG9 for cable OD                          | 2 to 3 | nylon glands                                                   | 0.50            | 1.50       | hardware store                                      | rubber grommet + sealant                                       |
| 9  | Desiccant                     | silica gel, indicating                        | 1      | 10 to 20 g sachet                                              | 1               | 1          | generic                                             | rice (poor, temporary)                                         |
| 10 | Surge/TVS                     | SMAJ series TVS + MOV                         | 3      | TVS diodes on panel + sensor leads                             | 0.30            | 1          | LCSC                                                | none                                                           |
| 11 | Inline fuse                   | 1 to 3 A + holder                             | 1      | automotive blade fuse                                          | 1               | 1          | auto store                                          | salvage                                                        |
| 12 | Wire, heat-shrink, connectors | assorted                                      | 1      | silicone hookup wire, JST                                      | 4               | 4          | generic                                             | salvage                                                        |

### 6.2 Power generation and storage

| #   | Item                        | Spec/size                                      | Qty | Generic name            | Est. unit | Line total | Source / notes                             | Salvage alt.                           |
| --- | --------------------------- | ---------------------------------------------- | --- | ----------------------- | --------- | ---------- | ------------------------------------------ | -------------------------------------- |
| 13  | Solar panel                 | 10 to 20 W mono (optimized) or 50 W (baseline) | 1   | monocrystalline panel   | 12 to 40  | 12 to 40   | generic                                    | salvaged garden-light or caravan panel |
| 14a | Cells (1S path)             | 32650/32700 LiFePO4, 6 Ah                      | 1   | LiFePO4 cell            | 4         | 4          | BatteryHookup double-tested 6000 mAh \[M\] | salvage LiFePO4 from solar lights      |
| 14b | Cells (4S path)             | 32650/32700 LiFePO4, 6 Ah                      | 4   | LiFePO4 cell            | 4         | 16         | generic                                    | as above                               |
| 15  | BMS                         | 1S or 4S LiFePO4, low-temp cutoff              | 1   | protection board        | 2 to 8    | 2 to 8     | generic; confirm <0 C charge inhibit       | none (do not omit)                     |
| 16  | Charge control              | MPPT (upgrade) or PWM LiFePO4-capable          | 1   | solar charge controller | 6 to 25   | 6 to 25    | generic                                    | none                                   |
| 17  | Cell holders / nickel strip | 32650 holders or 0.15 x 8 mm strip             | 1   | holders (no-weld)       | 2         | 2          | generic                                    | salvage strip                          |
| 18  | Pole + mount                | 40 to 50 mm galvanized pipe, U-bolts, bracket  | 1   | pipe + fittings         | 15        | 15         | hardware store                             | salvaged pipe/fence post               |

### 6.3 Per-option compute and regulation

| Option | Key parts                                                                                       | Added cost | Standby (target)                        | Build difficulty    |
| ------ | ----------------------------------------------------------------------------------------------- | ---------- | --------------------------------------- | ------------------- |
| A      | ESP32-WROOM-32E module (\~$3), TPS62840 board (\~$3) or MCP1700 (\~$0.30), FTDI for programming | 6 to 10    | about 15 to 40 uA                       | Hard (SMD)          |
| B      | NodeMCU-32S dev board (\~$5) + TPL5110 (\~$5) + P-MOSFET (\~$0.30)                              | 10         | about 20 to 60 uA (timer + off board)   | Easy to moderate    |
| C      | FireBeetle ESP32 DFR0478 (\~$8), or AMS1117 desolder + low-Iq LDO                               | 4 to 8     | about 10 uA (FireBeetle) \[M, Lucidar\] | Moderate (desolder) |
| 1S     | Any bare module + TPS62840/MCP1700, single cell, 1S BMS, small panel                            | 6 to 9     | about 30 to 50 uA                       | Moderate            |

### 6.4 Cost summary

- **Cheapest viable path (1S, salvaged pole, PWM, A02YYUW, generic box):** about $70 to $95.
- **Upgrade path (Option A bare module, MPPT, larger enclosure with quality vent, surge suite, LoRa or cellular radio):** about $180 to $260.
- **Commercial radar sensor upgrade (if ultrasonic is inadequate):** add $300 to $900 for the sensor alone.

---

## 7\. Tools and equipment

| Tool                               | Category     | Est. cost if bought         | Manual fallback                    |
| ---------------------------------- | ------------ | --------------------------- | ---------------------------------- |
| Soldering iron                     | Likely owned | 15 to 40                    | none; borrow from makerspace       |
| Multimeter (with uA range)         | Likely owned | 15 to 40                    | borrow; needed for commissioning   |
| Drill + bits                       | Likely owned | 30                          | hand brace and bit                 |
| Hacksaw / pipe cutter              | Likely owned | 15                          | hand hacksaw                       |
| Wire strippers, screwdrivers       | Likely owned | 10                          | knife (careful)                    |
| Heat gun                           | Likely owned | 15                          | lighter (careful with shrink)      |
| INA219 module or uCurrent          | Borrow/buy   | 3 (INA219) to 60 (uCurrent) | shunt resistor + DMM               |
| Nordic PPK2 or Otii Arc            | Borrow/rent  | 100 to 500                  | supercap discharge method          |
| Hot-air rework (Option A/C SMD)    | Borrow/rent  | 40                          | fine iron + drag soldering         |
| Spot welder (only if welding pack) | Borrow/rent  | 50+                         | use cell holders instead (no weld) |

---

## 8\. Skills and safety

**Required competencies:** basic soldering (fine-pitch for Option A/C), safe use of a drill and saw, multimeter use including current measurement, and following a wiring diagram.

**Hazards specific to this build:**

- **Stored energy / lithium cells:** LiFePO4 is the safest common lithium chemistry but a shorted 6 Ah cell delivers tens of amps (max continuous discharge is typically 3C, about 18 A \[D, BatteryHookup 32650 spec\]) and can burn or start a fire. Never short terminals, always fuse the pack, and never solder directly to cell cans (heat damages the cell and can vent it). Use spot welding or cell holders.
- **Cold-charging damage:** charging LiFePO4 below 0 degrees C causes lithium plating, permanent capacity loss, and a latent short risk. The BMS must inhibit charge below 0 degrees C (set a 5 degrees C buffer) \[D; REDARC tech note states charging below 0 degrees C "must be avoided" and gives an optimum charge window of 5 to 45 degrees C\].
- **Working at height / over water:** deploying on a bank or bridge over moving water is a drowning and fall hazard. Use a harness/tether and a second person. Do not deploy in active flood.
- **Electrical:** this is a low-voltage DC system, but the solar panel is a live source in daylight; cover it during wiring.
- **Sharp edges:** cut pipe and drilled enclosures have burrs.

**PPE:** eye protection (drilling, cutting, soldering), gloves for pipe work, fume extraction or ventilation for soldering.

**Lockout / safe handling:** before working on wiring, disconnect the panel first, then the battery; reconnect battery first, panel last. No bulk capacitors need discharging, but treat the pack as always live.

**Codes and standards to check locally \[J, builder must verify\]:** any permit to install structures in or over a watercourse; electrical/grounding codes for outdoor DC and pole earthing; radio spectrum rules if using LoRa (ISM band and duty-cycle limits differ by region) or cellular (approved modem/SIM). Battery shipping/transport is regulated (UN38.3, Class 9).

---

## 9\. Build instructions

### Phase 1: Verify and match cells (BOM 14)

1. Charge each 32650 cell individually to 3.65 V and rest. Discharge-test capacity with a cheap capacity tester (for example a generic USB/DC electronic load). **Do not trust the printed capacity; "6000 mAh" 32650/32700 cells are commonly overstated, and many cells sold as "32650" are physically the taller 32700 \[M, multiple vendor listings note "the actual cell size is 32700, not 32650"\].** Reject any cell more than 5% below the group.
2. Go/no-go: all cells within 5% capacity and matched resting voltage before assembly.

### Phase 2: Build the pack (BOM 14 to 17)

1. For 1S (recommended): one matched cell into a holder, BMS soldered to holder tabs (not the cell), then to the load. For 4S: four cells in series in holders; size nickel strip or wire for the peak load (a few amps is plenty here; 0.15 x 8 mm nickel handles about 5 A). Add compression/restraint so cells cannot move.
2. Install the inline fuse (BOM 11) on the pack positive lead, close to the cell.
3. Go/no-go: pack voltage correct (about 3.3 V for 1S, about 13.2 V for 4S at full charge), BMS cutoffs verified by gently loading/charging.

### Phase 3: Build the compute and power board (per chosen option)

1. **Option A:** solder the ESP32-WROOM-32E to protoboard/PCB, add the low-Iq regulator with 1 to 10 uF ceramics on VIN and VOUT close to the pins, bring out an FTDI header (TX, RX, EN, GPIO0, GND, 3V3).  
**Option B:** wire the TPL5110 DRV to the gate of a P-MOSFET high-side switch feeding the dev board 5 V input; wire DONE to a spare GPIO; set the delay resistor for the wake interval (REXT between 500 ohm and 170 kohm sets 100 ms to 7200 s \[D, TI TPL5110 datasheet\]).  
**Option C:** desolder AMS1117 with hot air, fit a pin-compatible low-Iq LDO, or just use a FireBeetle.
2. Wire the A02YYUW: VCC to 3.3 V, GND, TX to an ESP32 UART RX. Because the A02YYUW is spec'd for 3.3 to 5 V operation with matching logic tolerance \[D, DFRobot SEN0311 datasheet\], powering it at 3.3 V makes its UART TX swing 0 to 3.3 V, so **no level shifter is required.** If instead you use an HC-SR04 or JSN-SR04T, the 5 V ECHO pin must be dropped to 3.3 V with a divider (for example 1 kohm series and 2 kohm to ground) or a level-shifter IC before the GPIO.
3. Wire the DS18B20 (BOM 2) with a 4.7 kohm pull-up on the data line.
4. Add TVS diodes (BOM 10) across the panel input and across the sensor supply/signal lines.
5. Go/no-go: flash firmware, confirm a clean sensor reading and a WiFi/LoRa transmit on the bench.

### Phase 4: Measure standby (critical acceptance gate)

1. With firmware in deep sleep, measure standby current (Section 11). **Do not proceed until you have hit your target (well under 1 mA, ideally under 100 uA). This is the make-or-break step \[J\].**

[![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/Canal_Ultrasonic_Installation.png)](https://datadeep.tech/content/files/2026/08/canal%5Fultrasonic%5Finstallation2.svg)

Click for Machine-Readable SVG Download

[canal\_ultrasonic\_installation2canal\_ultrasonic\_installation2.svg13 KBdownload-circle](https://datadeep.tech/content/files/2026/08/canal%5Fultrasonic%5Finstallation2.svg "Download")

### Phase 5: Mount sensor, enclosure, panel, pole

1. Mount the A02YYUW pointing straight down through a gland or a short length of PVC pipe as a baffle. Keep the transducer face clear; add a coarse insect screen that does not block the beam.
2. Fit the enclosure with the breathable vent at the bottom or side (see Section 12 for the IP tradeoff), cable glands sized to the actual cable OD, and drip loops on every cable entering the box.
3. Mount the panel tilted (latitude plus about 10 to 15 degrees for winter/monsoon bias) and steeply enough to self-shed dust and debris; face equator-ward. Use tamper-resistant fasteners for anti-theft.
4. Set mounting height: sensor face above maximum expected stage + sensor dead zone (A02YYUW 3 cm \[D\]) + at least 20 to 30 cm margin.
5. Earth/ground the metal pole per local practice; keep the electronics ground referenced sensibly and use the TVS suite for surge.
6. Go/no-go: full end-to-end reading transmitted, datum calibrated (Section 11), enclosure sealed with desiccant inside.

**Figure captions:**

- *Figure 9.1:* Elevation of pole, panel (with tilt angle), enclosure, and downward sensor, showing sensor height above max stage.
Pole-mounted flood sensor installation on a canal bank Revised technical fabrication drawing with separated annotation zones, clear dimension chains, parts key, and legend. Not to scale. Pole-mounted flood sensor installation on a canal bank Technical fabrication drawing, side elevation. Metric primary, imperial secondary. NOT TO SCALE surveyed zero datum max expected stage water surface galvanized pipe pole 40 to 50 mm OD (1.57 to 1.97 in) tilt: latitude plus 10 to 15 degrees equator-facing IP65 enclosure light color, sun-shielded hand-cut sensor bracket, horizontal arm ultrasonic sensor, face-down sensor face is the vertical reference point beam footprint width measured air gap Governing relation stage = datum height minus measured air gap Beam clearance rule footprint must fit within channel width beam cone: 60 degrees total included angle channel width sensor projection reach pole OD 40 to 50 mm (1.57 to 1.97 in) Vertical stack-up sensor face above datum max stage height dead zone: 30 mm safety margin 200 to 300 mm min minimum mounting 230 to 330 mm Installation checks GO: sensor face clears max stage by dead zone plus safety margin NO-GO: beam footprint exceeds usable channel width 1 2 3 4 5 6 7 Parts key 1 monocrystalline solar panel nominal 10 to 20 W 2 tilt bracket latitude plus 10 to 15 degrees 3 U-bolt clamp set panel bracket and enclosure attachment 4 IP65 enclosure light color, sun-shielded 5 sensor bracket hand-cut horizontal arm 6 ultrasonic sensor face-down orientation 7 galvanized pipe pole 40 to 50 mm OD Legend heavy outline medium internal edge thin extension or leader line dashed hidden or out-of-scope chain-dash centerline or datum dimension line accent color = water surface accent color = sensor beam cone 1 balloon callout references parts key leader to surface with dot terminator leader to edge with arrow terminator Dimensionally proportionate, not to scale. All labels remain horizontal. Accent color is reserved for water and beam cone. 
- *Figure 9.2:* Close-up of enclosure entries showing drip loops, glands, and vent placement.
Correct versus incorrect enclosure cable entry practice Two-panel technical fabrication figure comparing correct and incorrect cable entry practice for a lower portion of an IP65 enclosure. Not to scale. Cable entry practice for an IP65 enclosure Two-panel fabrication figure. Close-up side view of the lower portion of the enclosure and cable entry geometry. NOT TO SCALE correct incorrect indicating silica gel 50 mm min (1.97 in) drip loop lowest point below gland gland bore must match cable outside diameter GO: compression seal closes on cable jacket breathable vent prevents condensation deliberately trades IP67 down to IP65 air exchange through vent liquid water does not pass 1 1 2 3 4 water tracks along jacket top entry exposes penetration to runoff no loop, water follows cable in gland oversized for cable OD annular gap remains around jacket gap present, no-go no vent provided moisture cannot purge water ingress path to interior Incorrect features highlighted in accent color. Each accent arrow traces a permitted water path. 1 1 4 Parts key 1 cable gland compression gland or cable gland sized to cable OD 2 breathable pressure-equalization vent permits vapor exchange while preserving IP65 weather sealing 3 indicating silica gel sachet mounted inside enclosure near the base for inspection 4 IP65 enclosure light-colored weather enclosure, shown in close-up Legend heavy outline medium internal edge thin leader or extension line dashed hidden or out-of-scope item chain-dash centerline or datum dimension line with value in line break 1 balloon callout references parts key leader to a surface with dot terminator leader to an edge with arrow terminator accent color = water ingress path Correct panel uses only monochrome linework. Accent is reserved for incorrect features and water ingress paths. 
- *Figure 9.3:* Pack assembly showing holders, fuse position, BMS, and restraint.
LiFePO4 pack assembly using cell holders and a 4S BMS Technical fabrication drawing showing a plan view and an exploded side view for a four-cell LiFePO4 pack assembled without spot welding, using plastic cell holders. Not to scale. LiFePO4 pack assembly using cell holders and a 4S BMS Plan view with adjacent exploded side view. Four cylindrical cells assembled without spot welding. Not to scale. NOT TO SCALE Plan view + \- \- + + \- \- + Bus link rule solder to holder tabs only never directly to cell cans 4S BMS B- B1 B2 B3 B+ P- P+ balance leads tapped at each cell junction ≤ 50 mm (1.97 in) must include sub-0 degree C charge inhibit balancing, and overdischarge cutoff fuse on pack positive as close to the cell as practical 14 15 16 17 Exploded side view base plate lower cell holder half 32650 or 32700 cells upper cell holder half restraint strap or end plates with tie rods across pack restraint prevents cell movement do not overcompress 4S BMS 5 mm min (0.20 in) keep BMS out of direct contact with cell bodies 14 15 17 Hard rules 1\. No direct soldering to cell cans 2\. Fuse the pack positive 3\. Match cell capacity within 5 percent before assembly Check open-circuit voltage and capacity spread before final build. Reject any cell with abnormal self-discharge or swelling. Parts key 14 plastic cell holder halves upper and lower halves for 32650 or 32700 cells 15 4S LiFePO4 BMS with charge inhibit below 0 degrees C, balancing, and cutoff functions 16 inline blade fuse and holder installed on pack positive close to the cell output 17 restraint strap or end plates with tie rods prevents movement while avoiding excessive compression Legend heavy outline medium internal edge thin leader or extension line dashed hidden or out-of-scope chain-dash centerline or assembly axis dimension line with value break 14 balloon callout references parts key accent color = safety-critical fuse and BMS notes 

---

## 10\. Drawings and schematics

Recommended free tools: FreeCAD (mechanical, exploded view), KiCad (Option A PCB and schematics), LibreCAD (2D fab drawings), Inkscape (signage, wiring diagrams).

### 10.1 System block diagram (ASCII)

Solar-powered off-grid ultrasonic flood-stage monitoring node Technical block diagram showing power, compute, sensing, radio alternatives, and an external endpoint. Solar-powered off-grid ultrasonic flood-stage monitoring node Power, sensing, compute, radio, and external data boundary Power chain Solar panel 10 to 20 W monocrystalline PV source Charge controller PWM or MPPT panel and battery matched LiFePO4 pack and BMS sub-0 C charge inhibit storage bus, pack-dependent 3.3 V regulator TPS62840 60 nA Iq low-quiescent-current rail PV: 18 V nominal battery bus: pack voltage regulator VIN: verify range Design check TPS62840 is buck-only. Confirm that the selected pack holds adequate VIN margin. REGULATED DOMAIN: --- 3.3 V Compute and .... sensing ESP32-WROOM-32E deep sleep: 10 µA wake, sample, compensate, transmit UART, 1-Wire, GPIO, radio control A02YYUW ultrasonic UART at 3.3 V natively 3.3 V no level shifter required DS18B20 probe speed-of-sound compensation 0.6 m/s per °C GPIO-gated sensor supply P-channel MOSFET 3.3 V switched 3.3 V UART 1-Wire 3.3 V regulated Radio block Select one transport WiFi with pinned BSSID ESP-NOW LoRa or LoRaWAN LTE-M or NB-IoT Orange bars: relative energy per transmit control and payload data existing endpoint, out of scope HTTP POST or MQTT JSON Power budget target Total system standby: under 100 µA Daily energy: about 0.03 Wh at a 10 minute wake interval Legend solid blue: power dashed gray: signal and data 

```
 [Solar panel 10-20W] --+--> [Charge controller: MPPT or PWM]
                        |            |
                     [TVS]        [LiFePO4 pack + BMS w/ <0C charge inhibit]
                                     |
                              [Low-Iq 3.3V regulator]  (1S: direct; 4S: buck first)
                                     |
        +----------------------------+----------------------------+
        |                            |                            |
   [ESP32 module]             [A02YYUW UART 3.3V]           [DS18B20 temp]
   deep-sleep timer          (power-gated GPIO)             (speed-of-sound comp)
        |
   [Radio: WiFi / LoRa / LTE-M] --> existing endpoint (HTTP POST / MQTT)

```

### 10.2 Power topology A (bare module + low-Iq regulator)

```
 Vbat(3.3-4.2 1S / 12.8 4S) -> [TPS62840 / MCP1700] -> 3V3 -> ESP32-WROOM-32E
                                              |-> gated 3V3 -> A02YYUW (via GPIO+P-FET)
 Programming: FTDI header (TX/RX/EN/IO0/GND) ; Updates: ArduinoOTA + rollback
 Standby: ESP32 ~10uA [D] + reg 60nA-2uA [D]  => target 15-40uA [E]

```

### 10.3 Power topology B (gated dev board + TPL5110)

```
 Vbat -> [TPL5110 Vdd]            (timer Iq 35nA typ / 50nA max [D])
 TPL5110 DRV -> gate of P-MOSFET high-side switch
 P-MOSFET -> dev board 5V input (whole board incl. AMS1117+bridge powered ONLY when on)
 dev board GPIO -> TPL5110 DONE (signals "task complete, cut power")
 Cold boot each cycle: adds E_boot; justified only because off-state ~ tens of uA [E]

```

### 10.4 Power topology C (low-Iq swap / low-power board)

```
 Vbat -> FireBeetle ESP32 (measured ~10uA deep sleep [M, Lucidar]) -> 3V3 rail
 OR: desolder AMS1117, fit pin-compatible low-Iq LDO
 Watch: some boards keep RGB LED / fuel gauge / bridge alive; verify by measurement
 (Lucidar measured FireBeetle DFR0654 at 520uA and a Firebeetle 2 ESP32-E user saw 468uA
  until the low-power pad was cut and BT/ADC disabled - always verify the specific board)

```

### 10.5 Mounting geometry (ASCII)

```
   sensor face  ___[A02YYUW]___     <- fixed to bracket on pole
        |  \        |        /  |     dead zone (3 cm A02YYUW [D]) : NO valid reads
        |   \       |       /   |
        |    \  beam cone 60 deg /   <- footprint must fit inside channel width,
        |     \     |     /     |       avoid canal walls (multipath)
   air_gap (measured)  |
        |              v
  ======================================  <- water surface (moving target)
        |  stage = datum_height - air_gap
   -----+------------------------------  <- zero datum (surveyed once)

```

Beam-cone note \[J\]: the A02YYUW's 60 degree reference cone \[D\] at 3 m gives a footprint about 3.5 m wide, which will hit the walls of a narrow canal and cause spurious near returns. In narrow channels prefer a narrow-beam sensor (MaxBotix MB7389, factory-calibrated narrow beam) or add a baffle tube.

---

## 11\. Testing, calibration, and validation

### 11.1 Pre-first-use safety checks

- Confirm fuse present and correct rating.
- Confirm BMS cutoffs (over-charge, over-discharge, and low-temp charge inhibit) by test.
- Confirm no reverse polarity from panel; TVS installed.

### 11.2 Standby current validation (the key acceptance test)

Named instruments and what each can and cannot resolve:

- **INA219 (about $3):** convenient I2C, but its resolution floor (about 100 uA with the common 0.1 ohm shunt) is too coarse to trust microamp sleep readings. Good for active current, poor for standby.
- **uCurrent Gold (about $60):** analog current adapter, resolves down to nanoamps into a DMM; excellent for sleep current. (An ESP32.com user used a uCurrent Gold to measure 31 uA on a stripped-down custom ESP32 board \[M\].)
- **Nordic PPK2 (about $100):** measures nA to A and logs waveforms; ideal for capturing the whole wake/TX/sleep cycle and integrating energy per cycle.
- **Otii Arc (several hundred USD):** power supply plus high-resolution analyzer; best-in-class but expensive.
- **Cheap fallback #1:** DMM in microamp range in series with the load (only valid at true steady sleep; the burden voltage disturbs active peaks).
- **Cheap fallback #2 (supercapacitor method):** power the sleeping node from a known supercap, measure the voltage droop over time, compute I = C·dV/dt. Slow but requires no special gear.

Acceptance: measured sleep current within a factor of about 2 of the modeled value. If it is milliamps, something (bridge, LED, LDO, ungated sensor) is still powered; fix before deploying.

### 11.3 Functional acceptance

- Sensor reads a known distance within a few cm after temperature compensation.
- N-ping median rejects a hand waved through the beam (debris simulation).
- Transmit succeeds; on forced network loss, records buffer and backfill on reconnect.

### 11.4 Datum calibration

1. With the node mounted, physically measure the true water surface (staff gauge or tape) and the node's reported air gap simultaneously.
2. Compute and store `datum_height` so reported stage matches the reference.
3. Repeat at two or three water levels if possible to check linearity.
4. Store calibration in RTC memory/flash so it survives sleep and reboot.

---

## 12\. Operation

- **Correct use:** downward-facing over reasonably open water within the sensor range; temperature probe shaded and ventilated, not in direct sun.
- **Do:** keep the transducer face clean; keep the panel unshaded; check the desiccant indicator periodically.
- **Do not:** point across a narrow canal (multipath); mount where foam or vegetation collects; rely on a single ping.
- **Operating envelope:** sensor operating temperature roughly -15 to +60 degrees C for the A02YYUW \[D\]; LiFePO4 charge only above 0 degrees C \[D\]; discharge is fine well below freezing (down to about -20 degrees C with reduced capacity \[D\]).
- **Thermal caution for a sun-exposed box \[E/M\]:** solar gain can add 11 to 28 degrees C (20 to 50 degrees F) to a sealed enclosure's interior, and a dark box in sun can run 15 to 20 degrees C above a light one; measured side-by-side tests show up to an 18 degrees C difference between dark and light enclosures \[M, nVent/Hoffman and industry data\]. Since LiFePO4 life degrades at sustained high temperature and charging must stop above the pack's high limit, **use a light-colored enclosure and, if possible, a sun shield; a top shield alone cut interior rise by about 25 to 46% in Hoffman's tests \[M\].**
- **IP-vs-vent tradeoff \[J\]:** an IP67 box with a breathable vent is no longer IP67; it is deliberately traded down to prevent the daily pressure/temperature cycling that pumps humid air in and condenses water on the electronics. A vented IP65-class box with desiccant and drip loops is more reliable in the field than a "sealed" box that breathes through its weakest gasket.

---

## 13 and 14\. Maintenance and Troubleshooting

| Interval / Symptom                                     | Task / Likely cause                                                                                     | Consumable, wear part, or fix                                                                          | Est. cost (USD) |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | --------------- |
| **Maintenance**                                        |                                                                                                         |                                                                                                        |                 |
| Monthly (remote check)                                 | Confirm data are arriving and check the battery-voltage trend                                           | None                                                                                                   | 0               |
| Quarterly (site visit)                                 | Clean the transducer face and solar panel; check the insect screen; inspect cable glands and drip loops | None                                                                                                   | 0               |
| Quarterly                                              | Check and replace the desiccant as required                                                             | Silica gel                                                                                             | 1               |
| Annually                                               | Verify the datum against the staff gauge; re-torque mounts; inspect cabling for UV cracking             | Zip ties and wire                                                                                      | 2               |
| Every 2 to 4 years                                     | Assess battery-pack capacity and replace cells if capacity fade limits system autonomy                  | LiFePO4 cells                                                                                          | 4 to 16         |
| As needed                                              | Replace the fuse after a fault                                                                          | Automotive blade fuse                                                                                  | 1               |
| **Troubleshooting**                                    |                                                                                                         |                                                                                                        |                 |
| Sleep current is in mA rather than uA                  | USB bridge, AMS1117 regulator, status LED, or ungated sensor remains powered                            | Apply the Option A, B, or C correction; power-gate the sensor; verify current using a uCurrent or PPK2 | —               |
| Readings jump or appear noisy                          | Multipath reflections from canal walls, foam, or floating debris                                        | Add a baffle tube; use a narrow-beam sensor; strengthen the median or trimmed-mean filter              | —               |
| Transmission is slow and energy-intensive              | Cold Wi-Fi association, including scanning and DHCP                                                     | Pin the BSSID and channel; assign a static IP address; reduce transmission power                       | —               |
| Reported stage drifts between day and night            | Missing or incorrect speed-of-sound temperature compensation                                            | Verify the DS18B20 reading and the temperature-compensation term                                       | —               |
| Battery never fully charges during the wet season      | Solar panel or battery pack was sized for the annual average rather than the worst-performing month     | Resize the power system according to Section 15; increase the interval between wake cycles             | —               |
| Battery pack is dead after a cold snap                 | The pack was charged below 0 C, or the BMS lacks a low-temperature cutoff                               | Install a BMS with low-temperature charge inhibition and insulate the enclosure                        | —               |
| Condensation appears inside the enclosure              | The sealed enclosure is breathing through its gasket                                                    | Install a breathable pressure-equalization vent and desiccant; add or correct drip loops               | —               |
| No data are received, but the node remains operational | Endpoint, authentication-token, or retry-handling problem                                               | Check the authentication token, retry backoff, and buffered-data backfill logs                         | —               |
| Intermittent dropouts occur near dawn                  | Low battery voltage causes a brownout during the transmission-current peak                              | Add bulk capacitance near the regulator and raise the low-voltage cutoff                               | —               |

---

## 15\. Variations, scaling, and customization

- **Cheaper:** 1S single-cell path, salvaged pole and panel, HC-SR04 with a level shifter (accept non-waterproof, short life). Sub-$60 is achievable.
- **Larger / higher stage / narrow canals:** MaxBotix MB7389 HRXL-MaxSonar-WR (30 to 500 cm, 1 mm resolution, 42 kHz, IP67, 2.7 to 5.5 V, 3.1 mA average / 98 mA peak at 5 V, -40 to +65 degrees C, internal speed-of-sound temperature compensation, narrow factory-calibrated beam \[D\]) for tall mounts and narrow canals; it is the sensor FloodNet uses.
- **Motorized / electrified:** not applicable; this is a static sensor. The equivalent "scaling" is a multi-node network (below).
- **Multi-pole network:** use ESP-NOW between poles to a single uplink node, or LoRa/LoRaWAN to a gateway (the FloodNet approach), to avoid per-node WiFi/cellular.
- **Regionally adapted (tropical monsoon):** flood events coincide with multi-day overcast, so size the array to the worst-month, not annual-average, irradiance and assume overcast output is only about 10 to 25% of rated \[E, consistent with off-grid practice\]. Longer autonomy (5+ cloudy days) is essential.
- **Regionally adapted (temperate, about 45 N):** winter is the binding constraint (December peak-sun-hours can fall to about 1 to 1.5 h/day at northern latitudes \[M, PVGIS/off-grid practice\]); tilt steeply for snow shedding and to catch low sun, insulate the pack, and rely on the low-temp charge inhibit.
- **When to abandon ultrasonic and use radar \[J\]:** if the site has persistent foam, heavy spray, dense fog, or narrow walls causing multipath, a 24/60 GHz radar level sensor is worth the extra cost. Radar is unaffected by air temperature and rain to first order and is what USGS uses for non-contact stage; USGS lab-tested radar stage sensors met the plus or minus 0.01 ft OSW standard \[M, USGS OFR 2017-1085\].

### 15.1 Radio link comparison (energy and decision rule)

| Link                                 | Energy per TX (relative)                                                   | Range                  | Recurring cost            | Best when                               |
| ------------------------------------ | -------------------------------------------------------------------------- | ---------------------- | ------------------------- | --------------------------------------- |
| WiFi, cold association               | High (association dominates; about 3 s scan+DHCP \[M\])                    | AP-local (tens of m)   | none                      | AP already on site                      |
| WiFi, pinned BSSID/channel/static IP | Medium (about 1 s connect)                                                 | AP-local               | none                      | AP on site, want low energy             |
| ESP-NOW                              | Low (no association)                                                       | tens to \~200 m        | none                      | multi-pole mesh to one uplink           |
| LoRa (SX1276/SX1262, RFM95W)         | Low per byte, longer airtime at high SF (latency about 3 s observed \[M\]) | km-class               | none (own gateway) or TTN | remote site, no AP, own/ TTN gateway    |
| LoRaWAN via TTN                      | Low                                                                        | km-class               | free/community            | community networks (FloodNet uses this) |
| LTE-M / NB-IoT (SIM7080G, BG95-M3)   | Highest (modem attach energy)                                              | anywhere with coverage | SIM/data plan             | no local infra, can pay recurring       |

Radio Link and Energy per TXDataDeep Flood-Stage Sensor CERN-OHL-S v2\. Semantic data is embedded in metadata.{"headers":\["Link","Energy per TX (relative)","Range","Recurring cost","Best when"\],"rows":\[\["WiFi, cold association","High (association dominates; about 3 s scan+DHCP \[M\])","AP-local (tens of m)","none","AP already on site"\],\["WiFi, pinned BSSID/channel/static IP","Medium (about 1 s connect)","AP-local","none","AP on site, want low energy"\],\["ESP-NOW","Low (no association)","tens to \~200 m","none","multi-pole mesh to one uplink"\],\["LoRa (SX1276/SX1262, RFM95W)","Low per byte, longer airtime at high SF (latency about 3 s observed \[M\])","km-class","none (own gateway) or TTN","remote site, no AP, own/ TTN gateway"\],\["LoRaWAN via TTN","Low","km-class","free/community","community networks (FloodNet uses this)"\],\["LTE-M / NB-IoT (SIM7080G, BG95-M3)","Highest (modem attach energy)","anywhere with coverage","SIM/data plan","no local infra, can pay recurring"\]\]}Radio Link and Energy per TXDataDeep Flood-Stage Sensor CERN-OHL-S v2LinkEnergy per TX (relative)RangeRecurring costBest whenWiFi, cold associationHigh (association dominates; about 3 sscan+DHCP \[M\])AP-local (tens of m)noneAP already on siteWiFi, pinned BSSID/channel/static IPMedium (about 1 s connect)AP-localnoneAP on site, want low energyESP-NOWLow (no association)tens to \~200 mnonemulti-pole mesh to one uplinkLoRa (SX1276/SX1262, RFM95W)Low per byte, longer airtime at high SF(latency about 3 s observed \[M\])km-classnone (own gateway) or TTNremote site, no AP, own/ TTN gatewayLoRaWAN via TTNLowkm-classfree/communitycommunity networks (FloodNet uses this)LTE-M / NB-IoT (SIM7080G, BG95-M3)Highest (modem attach energy)anywhere with coverageSIM/data planno local infra, can pay recurring 

Decision rule \[J\]: if an AP is within range, use pinned WiFi. If not and you control multiple poles, use ESP-NOW to a single WiFi/cellular uplink. If the site is isolated, use LoRa/LoRaWAN to a gateway. Use cellular only when nothing else reaches and you accept a recurring bill and the modem's attach-energy penalty.

### 15.2 Sensor comparison

| Sensor            | Beam / dead zone       | Max range    | IP               | Supply             | Current                         | Temp comp          | Output                | 3.3 V-safe?           | Price (USD) |
| ----------------- | ---------------------- | ------------ | ---------------- | ------------------ | ------------------------------- | ------------------ | --------------------- | --------------------- | ----------- |
| HC-SR04           | \~15 deg / \~2 cm      | \~4 m        | none             | 5 V                | \~2 mA standby \[D\]            | none               | trig/echo (5 V)       | No (level shift)      | 1 to 2      |
| JSN-SR04T v3.0    | \~50 to 70 deg / 25 cm | \~4.5 to 6 m | probe waterproof | 5 V                | 5 mA static, 30 mA active \[D\] | none               | trig/echo, UART modes | No (5 V echo)         | 3 to 6      |
| A02YYUW / SEN0311 | 60 deg / 3 cm \[D\]    | 4.5 m \[D\]  | IP67 \[D\]       | 3.3 to 5 V \[D\]   | <8 mA avg, \~5 mA standby \[D\] | none               | UART 9600, mm \[D\]   | **Yes (native)**      | \~16        |
| MaxBotix MB7389   | narrow / 30 cm         | 5 m \[D\]    | IP67 \[D\]       | 2.7 to 5.5 V \[D\] | 3.1 mA avg, 98 mA peak \[D\]    | **internal** \[D\] | PWM/analog/TTL        | Yes (at 3.3 V supply) | \~100       |
| 24/60 GHz radar   | narrow                 | 10+ m        | IP66/67          | varies             | varies                          | n/a (unaffected)   | analog/SDI-12/serial  | varies                | 300 to 900+ |

Sensor ComparisonSpecifications. Semantic data is embedded in metadata.{"headers":\["Sensor","Beam / dead zone","Max range","IP","Supply","Current","Temp comp","Output","3.3 V-safe?","Price (USD)"\],"rows":\[\["HC-SR04","\~15 deg / \~2 cm","\~4 m","none","5 V","\~2 mA standby \[D\]","none","trig/echo (5 V)","No (level shift)","1 to 2"\],\["JSN-SR04T v3.0","\~50 to 70 deg / 25 cm","\~4.5 to 6 m","probe waterproof","5 V","5 mA static, 30 mA active \[D\]","none","trig/echo, UART modes","No (5 V echo)","3 to 6"\],\["A02YYUW / SEN0311","60 deg / 3 cm \[D\]","4.5 m \[D\]","IP67 \[D\]","3.3 to 5 V \[D\]","<8 mA avg, \~5 mA standby \[D\]","none","UART 9600, mm \[D\]","Yes (native)","\~16"\],\["MaxBotix MB7389","narrow / 30 cm","5 m \[D\]","IP67 \[D\]","2.7 to 5.5 V \[D\]","3.1 mA avg, 98 mA peak \[D\]","internal \[D\]","PWM/analog/TTL","Yes (at 3.3 V supply)","\~100"\],\["24/60 GHz radar","narrow","10+ m","IP66/67","varies","varies","n/a (unaffected)","analog/SDI-12/serial","varies","300 to 900+"\]\]}Sensor ComparisonSpecificationsSensorBeam / deadzoneMax rangeIPSupplyCurrentTemp compOutput3.3 V-safe?Price(USD)HC-SR04\~15 deg / \~2 cm\~4 mnone5 V\~2 mA standby \[D\]nonetrig/echo (5 V)No (level shift)1 to 2JSN-SR04T v3.0\~50 to 70 deg / 25cm\~4.5 to 6 mprobe waterproof5 V5 mA static, 30mA active \[D\]nonetrig/echo, UARTmodesNo (5 V echo)3 to 6A02YYUW /SEN031160 deg / 3 cm \[D\]4.5 m \[D\]IP67 \[D\]3.3 to 5 V \[D\]<8 mA avg, \~5 mAstandby \[D\]noneUART 9600, mm\[D\]Yes (native)\~16MaxBotix MB7389narrow / 30 cm5 m \[D\]IP67 \[D\]2.7 to 5.5 V \[D\]3.1 mA avg, 98mA peak \[D\]internal \[D\]PWM/analog/TTLYes (at 3.3 Vsupply)\~10024/60 GHz radarnarrow10+ mIP66/67variesvariesn/a (unaffected)analog/SDI-12/serialvaries300 to 900+Inline SVG text remains selectable. Structured data is embedded as JSON metadata and included in the HTML export. 

### 15.3 PWM vs MPPT and the 1S insight \[J\]

An 18 V Vmp panel on a PWM controller charging a 12.8 V LiFePO4 bank is clamped to about 14.4 V, wasting roughly 20 to 30% of available power (the widely cited PWM-vs-MPPT loss for a mismatched panel \[M, off-grid practice\]).   

MPPT recovers it but costs more and has its own quiescent draw. For a microwatt load, however, the cleanest answer is often neither: run 1S and delete the 12 V stage entirely. 

A single LiFePO4 cell charged by a tiny 1S solar charge board feeding a low-Iq 3.3 V regulator removes the buck's multi-milliamp quiescent penalty (measured examples: MP1584 about 493 uA, LM2596 about 4.9 mA, versus TPS62840 at 60 nA \[M, Pallav Aggarwal bench measurements; D, TI\]), the PWM clamp loss, and most of the BMS complexity at once. This is the recommended default for a single node. LiFePO4 charge parameters remain: 14.4 to 14.6 V absorption for 4S (3.6 to 3.65 V per cell), 13.6 to 13.8 V float or no float, and never lead-acid equalization \[D, standard LiFePO4 charging\].

### 15.4 Firmware pseudocode (sleep/wake/measure/transmit, ring buffer, retry/backoff)

```
on_wake():
    load calibration + seq_counter from RTC_memory
    T = read_DS18B20()
    c = 331.3 + 0.606*T
    samples = []
    power_on(sensor_gpio); settle(60 ms)
    for i in 1..N_PINGS:                 # N_PINGS e.g. 7
        d = read_A02YYUW_UART()          # already mm, temp not compensated internally
        d = d * (c / c_ref)              # apply speed-of-sound correction
        samples.append(d)
    power_off(sensor_gpio)
    air_gap = trimmed_mean(reject_outliers(samples))
    valid = within_range(air_gap) and dispersion(samples) < LIMIT
    stage = datum_height - air_gap
    record = {seq, ts, stage, air_gap, T, valid, vbatt}
    push_ring_buffer(record)             # RTC RAM or flash

    if wifi_connect_pinned(bssid, chan, static_ip, timeout=5s):
        while ring_buffer not empty:
            r = peek()
            if POST(endpoint, token, json(r)) == 2xx: pop()
            else: break                  # keep for next time
        reset_backoff()
    else:
        n = increment_backoff()
        sleep_extra = min(BASE << n, BACKOFF_MAX)   # exponential backoff

    seq_counter += 1
    save(calibration, seq_counter) to RTC_memory
    if stage > THRESHOLD_HI + HYST: T_wake = FAST_INTERVAL   # rising-water fast mode
    elif stage < THRESHOLD_HI - HYST: T_wake = NORMAL_INTERVAL
    feed_watchdog()
    deep_sleep(T_wake + sleep_extra)

```

JSON payload schema:

```
{ "id":"node-07", "seq":1234, "ts":"2026-08-02T14:30:00Z",
  "stage_m":1.83, "air_gap_m":1.17, "temp_c":27.4,
  "vbatt_v":3.31, "valid":true, "rssi":-71, "fw":"1.0" }

```

Transport contract: **HTTP** POST JSON with `Authorization: Bearer <token>`, expect 2xx to dequeue, else retain and back off. **MQTT** publish to `flood/<id>/stage` with token as username/password or TLS client cert, QoS 1, retain off; buffered records replayed oldest-first on reconnect. Watchdog (hardware + software), brownout detection, and OTA-with-rollback are enabled; if OTA fails, the bootloader reverts to the last good partition and a physical FTDI header is the field recovery path.

---

## 16\. Cost analysis

- **This build:** cheapest path about $70 to $95; upgrade path about $180 to $260.
- **Nearest commercial equivalents:** turnkey telemetered ultrasonic/hydrostatic water-level units are commonly $960 to $1,200 per node (for example EnviroNode/INCYT ultrasonic and hydrostatic beacons list at $960 to $1,200 \[D, agtech.dpi.nsw.gov.au catalog\]), and research-grade radar stage sensors plus a Campbell Scientific-class datalogger run well into the thousands. Community-science DIY designs land near $100 to $210 per unit (UNC/COAST Lab about $100 \[M, Bresnahan et al. 2023\]; FloodNet under $200 for the sensor, about $210 with mounting hardware \[D, FloodNet BOM\]).
- **Payback / cost-per-use:** against a $1,000 commercial node, the cheapest build recovers its cost immediately and roughly 10x on unit count; a 10-node community network costs about $700 to $2,600 in parts versus roughly $10,000 commercial. Cost-per-reading is dominated by the one-time build; energy is effectively free (solar).
- **Total build time:** 8 to 16 hours.

---

## 17\. References, prior art, and attribution

- **FloodNet NYC** (Mydlarz et al., 2024, Water Resources Research 60, e2023WR036806): low-cost MB7389 ultrasonic + LoRaWAN street-flood sensors; open BOM and GitHub repository; under $200/unit (about $210 with mounting); 87 sensors installed across the five boroughs, recording 360 flood events Oct 2020 to May 2023, transmitting every 60 s; MB7389 datasheet accuracy "within 1% of the measured distance, which equates to a range of 30 mm (i.e., ±15 mm) with a typical mounting height of 3 m" \[D, quoted\].
- **Sunny Day Flooding Project / UNC COAST Lab "Open Water Level"** (Bresnahan et al., 2023, Oceanography 36(1):51-58): about $100 DIY ultrasonic logger; 5 cm accuracy over 15 to 645 cm; 76 days on a 10 Ah battery; "field tested alongside two commercial sensors for 18 days in Wilmington, North Carolina, including during Tropical Storm Colin... root mean squared error of 1.5 cm between the DIY sensor and a proven commercial unit" \[M, quoted\]; GitHub COAST-Lab/Open-Water-Level.

---

[COAST-Lab/Open-Water-Level: An open-source, low-cost, DIY ultrasonic water level sensor](https://github.com/COAST-Lab/Open-Water-Level?ref=datadeep.tech)

[![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/image-9.png)](https://tos.org/oceanography/assets/docs/36-1-bresnahan.pdf?ref=datadeep.tech)

---

- [**Open Storm**](https://arxiv.org/pdf/1708.05172?ref=datadeep.tech) **(**[**University of Michigan**](https://artsengine.engin.umich.edu/feast/open-storm-ux/?ref=datadeep.tech)**)** and community water-level dashboards (e.g. martinius96 hladinomer, which supports HC-SR04/JSN-SR04T and averages 10 readings every 5 minutes) for firmware/telemetry patterns.

[Build — Digital Water Lab @ U-M![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/icon/favicon-6999e5bc-93b9-4570-a9e4-f97951e869bd.ico)Digital Water Lab @ U-M0![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/thumbnail/WaterDrop-7999f4b4-8741-46d4-a7a3-2710f935af0e.png)](https://www.digitalwaterlab.org/build?ref=datadeep.tech)

- **USGS:** Office of Surface Water stage-accuracy policy (Technical Memo 93.07: plus or minus 0.01 ft or 0.2% of effective stage, whichever is larger); "Stage measurement at gaging stations" (TM 3-A7); non-contact radar sensor evaluation (OFR 2017-1085, FTS radar plus or minus 0.007 ft, meeting the OSW standard); Costa et al. 2006, "Use of radars to monitor stream discharge by noncontact methods," WRR, doi:10.1029/2005WR004430.
- **Component measurement/datasheet sources:** Espressif ESP32 series datasheet (deep sleep 10 uA, TX peak about 240 mA); Advanced Monolithic AMS1117 datasheet (Iq 5 mA typ / 10 mA max); Holtek HT78xx datasheet (4 to 5 mA typ Iq); TI TPS62840 datasheet (60 nA Iq); TI TPL5110 datasheet (35 nA typ / 50 nA max); Silicon Labs CP2102 and CP2102N datasheets; WCH CH340 datasheet; DFRobot SEN0311/A02YYUW datasheet and Wiki; MaxBotix HRXL-MaxSonar-WR (MB7389) datasheet; independent bench measurements (Lucidar FireBeetle deep-sleep, grillbaer ESP32 power-consumption-test repository, Pallav Aggarwal buck-converter Iq measurements, ESP32.com forum, EEVblog/uCurrent methodology).
- **Movements/ethos:** Open Source Ecology, Farm Hack, Appropedia, RepRap, Precious Plastic, Low-Tech Magazine.
- **Further reading:** WMO Guide to Hydrological Practices (WMO-No. 168); NASA POWER, PVGIS, NREL PVWatts for worst-month irradiance sizing.

---

## 18\. License and contribution

Hardware is licensed under **CERN-OHL-S v2**; documentation under **CC BY-SA 4.0**. You may fork, build, sell, and modify this design provided you keep the same licenses and share improvements back. To contribute: publish your BOM deltas, your measured standby current (with instrument named), your firmware fork, and your field failure modes, so the community can converge on what actually survives in a flood. Please report the sensor accuracy you achieved in deployment.

---

## Recommendations (staged, with thresholds)

1. **Start with the 1S single-cell topology \[J\].** For a single node, build the bare-module (Option A) or low-power-board (Option C) node on one LiFePO4 cell with a TPS62840 or MCP1700 and a 10 to 20 W panel. This is the cheapest, most efficient, and most repairable path. Threshold to switch to 4S: only if you must co-power a higher-voltage peripheral (for example a cellular modem needing a bigger buffer) or run a heavy radio continuously.
2. **Gate the standby before anything else.** If you are reusing a dev board (Option B), fit a TPL5110 and a P-MOSFET and verify off-state current under 100 uA before deploying. If your measured deep sleep is in milliamps, you have not solved the problem regardless of firmware polish.
3. **Use the A02YYUW as the default sensor** to avoid level-shifting and get IP67 out of the box. Move to the MaxBotix MB7389 if the channel is narrow (multipath) or if you want internal temperature compensation and a narrow beam. Move to radar if foam, spray, or fog is chronic.
4. **Size solar to the worst month, not the annual average,** and assume overcast yields only 10 to 25% of rated output. In the tropics, size for 5+ consecutive overcast days; at 45 N, size for December and snow.
5. **Insist on a BMS with sub-0-degrees-C charge inhibit** and a light-colored, sun-shielded, vented-with-desiccant enclosure. These two choices dominate multi-year reliability.
6. **Commission with a real current measurement** (uCurrent, PPK2, or the supercap fallback), calibrate the datum against a physical staff gauge, and confirm offline buffering and backfill by pulling the network before you leave the site.

**Benchmarks that would change the recommendation:** if bench standby exceeds about 1 mA, re-open the power topology (something is still powered). If field accuracy is worse than about 5 cm or the valid-flag rate drops below about 90% in normal weather, switch sensor modality (narrow-beam or radar). If wet-season battery state-of-charge trends downward across a week, increase panel/pack size or lengthen the wake interval.

---

## Caveats

- **Numbers are a mix of datasheet \[D\], measured \[M\], and modeled \[E\] values; the autonomy figures in Section 5 are model ceilings.** Real autonomy is capped by cell self-discharge, BMS leakage, and calendar aging, which the model does not fully capture; treat "hundreds of days" as "comfortably beyond any realistic overcast," not a literal runtime.
- **The "HT7833 = microamp Iq" claim is unreliable.** The Holtek datasheet says 4 to 5 mA; only clone listings claim 2 uA. Bench-verify your specific part, and prefer the TPS62840 or MCP1700 where firm datasheet Iq matters.
- **Ultrasonic sensing fails in identifiable conditions** (rain, foam, fog, debris, vegetation, temperature stratification, wind, insect nests). The node must publish a validity flag and be treated as unreliable when the flag is false; do not use a single unflagged reading for life-safety decisions. Cross-check against a nearby staff gauge periodically.
- **Prices, parts availability, radio-spectrum rules, structural/permitting requirements, and electrical codes vary by region and date and must be verified locally.** Solar sensor placement over moving water is a fall/drowning hazard; lithium cells are a fire hazard if shorted or cold-charged.
- The A02YYUW datasheet publishes resolution (1 mm) but no formal plus/minus accuracy figure, and does not spec cable length; verify both physically.

---

*This is community documentation provided as-is; prices are estimates; the builder is responsible for local code compliance and safe practice.*

---

[![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/BillOfMaterials_Ultrasonic-1.png)](https://datadeep.tech/content/files/2026/08/BillOfMaterials%5FUltrasonicFloodSensor.svg)

Click for Machine-Readable SVG Download

![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/image-5.png)

![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/image-6.png)

![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/image-7.png)

![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/image-8.png)

Maintenance and TroubleshootingDataDeep Flood-Stage Sensor CERN-OHL-S v2.{"headers":\["Interval","Task","Consumable/wear part","Est. cost"\],"rows":\[\["Monthly (remote check)","Confirm data arriving; check battery voltage trend","none","0"\],\["Quarterly (site visit)","Clean transducer face and panel; check insect screen; inspect glands/drip loops","none","0"\],\["Quarterly","Check/replace desiccant","silica gel","1"\],\["Annually","Verify datum against staff gauge; re-torque mounts; inspect cabling for UV cracking","zip ties, wire","2"\],\["2 to 4 years","Assess pack capacity; replace cells if capacity fade limits autonomy","LiFePO4 cells","4 to 16"\],\["As needed","Replace fuse after any fault","blade fuse","1"\]\]}Maintenance and TroubleshootingDataDeep Flood-Stage Sensor CERN-OHL-S v2IntervalTaskConsumable/wear partEst. costMonthly (remote check)Confirm data arriving; check battery voltage trendnone0Quarterly (site visit)Clean transducer face and panel; check insectscreen; inspect glands/drip loopsnone0QuarterlyCheck/replace desiccantsilica gel1AnnuallyVerify datum against staff gauge; re-torque mounts;inspect cabling for UV crackingzip ties, wire22 to 4 yearsAssess pack capacity; replace cells if capacity fadelimits autonomyLiFePO4 cells4 to 16As neededReplace fuse after any faultblade fuse1 Maintenance and TroubleshootingDataDeep Flood-Stage Sensor CERN-OHL-S v2\. Semantic data is embedded in metadata.{"headers":\["Symptom","Likely cause","Fix"\],"rows":\[\["Sleep current in mA, not uA","USB bridge / AMS1117 / LED / ungated sensor still powered","Apply Option A/B/C fix; power-gate the sensor; verify with uCurrent/PPK2"\],\["Readings jump / noisy","Multipath from canal walls; foam; debris","Add baffle tube; narrow-beam sensor; strengthen median/trimmed-mean filter"\],\["Slow, energy-hungry TX","Cold WiFi association (scan + DHCP), often about 3 s \[M, ESP32 forum\]","Pin BSSID, channel, and static IP; reduce TX power"\],\["Stage drifts with day/night temperature","No or wrong speed-of-sound compensation","Verify DS18B20 reading and compensation term"\],\["Battery never fully charges in wet season","Panel/pack sized to annual average, not worst-month","Resize per Section 15; lengthen wake interval"\],\["Pack dead after cold snap","Charged below 0 C, or BMS lacks low-temp cutoff","Fit BMS with low-temp charge inhibit; insulate box"\],\["Condensation inside box","Sealed box breathing through gasket","Fit breathable vent + desiccant; add drip loops"\],\["No data, node alive","Endpoint/token/retry issue","Check auth token, backoff, and buffer backfill logs"\],\["Intermittent dropouts near dawn","Brownout at low battery under TX peak","Add bulk capacitance at regulator; raise low-voltage cutoff"\]\]}Maintenance and TroubleshootingDataDeep Flood-Stage Sensor CERN-OHL-S v2SymptomLikely causeFixSleep current in mA, not uAUSB bridge / AMS1117 / LED / ungated sensor still poweredApply Option A/B/C fix; power-gate the sensor; verify withuCurrent/PPK2Readings jump / noisyMultipath from canal walls; foam; debrisAdd baffle tube; narrow-beam sensor; strengthenmedian/trimmed-mean filterSlow, energy-hungry TXCold WiFi association (scan + DHCP), often about 3 s \[M, ESP32forum\]Pin BSSID, channel, and static IP; reduce TX powerStage drifts with day/night temperatureNo or wrong speed-of-sound compensationVerify DS18B20 reading and compensation termBattery never fully charges in wet seasonPanel/pack sized to annual average, not worst-monthResize per Section 15; lengthen wake intervalPack dead after cold snapCharged below 0 C, or BMS lacks low-temp cutoffFit BMS with low-temp charge inhibit; insulate boxCondensation inside boxSealed box breathing through gasketFit breathable vent + desiccant; add drip loopsNo data, node aliveEndpoint/token/retry issueCheck auth token, backoff, and buffer backfill logsIntermittent dropouts near dawnBrownout at low battery under TX peakAdd bulk capacitance at regulator; raise low-voltage cutoff 

[Canal\_Ultrasonic\_InstallationCanal\_Ultrasonic\_Installation.png158 KBdownload-circle](https://datadeep.tech/content/files/2026/08/Canal%5FUltrasonic%5FInstallation.png "Download")

[BillOfMaterials\_UltrasonicFloodSensorFull Bill of Materials SVG - CERN-OHL-S v2BillOfMaterials\_UltrasonicFloodSensor.svg60 KBdownload-circle](https://datadeep.tech/content/files/2026/08/BillOfMaterials%5FUltrasonicFloodSensor.svg "Download")

[esp32\_parasitic\_standby\_comparisonParasitic standby current in a battery-powered ESP32 sensor nodeesp32\_parasitic\_standby\_comparison.svg11 KBdownload-circle](https://datadeep.tech/content/files/2026/08/esp32%5Fparasitic%5Fstandby%5Fcomparison.svg "Download")

[GitHub - jktightwad/esp32-Parasitic-Drain-Monitor: Standalone battery monitor for parasitic drain detection and logging using an ESP32Standalone battery monitor for parasitic drain detection and logging using an ESP32 - jktightwad/esp32-Parasitic-Drain-Monitor![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/icon/favicon-8e23483a-2581-4b22-a3cb-7b8aea420fe4.svg)GitHubjktightwad![](https://opengraph.githubassets.com/f7cbadadca6393d4b643be5815c19e0c05bc34baa6ccfce241ba9c6176becb19/jktightwad/esp32-Parasitic-Drain-Monitor)](https://github.com/jktightwad/esp32-Parasitic-Drain-Monitor?ref=datadeep.tech)

[esp32-Parasitic-Drain-Monitor-mainCreated by jktightwadesp32-Parasitic-Drain-Monitor-main.zip2 MBdownload-circle](https://datadeep.tech/content/files/2026/08/esp32-Parasitic-Drain-Monitor-main.zip "Download")

[OpenStorm a complete framework for sensing and control of urban watershedsMatthew Bartos, Brandon Wong, and Branko KerkezOpenStorm a complete framework for sensing and control of urban watersheds.pdf6 MBdownload-circle](https://datadeep.tech/content/files/2026/08/OpenStorm-a-complete-framework-for-sensing-and-control-of-urban-watersheds.pdf "Download")

[A LOW-COST, DIY ULTRASONIC WATER LEVEL SENSOR for Education, Science, and ResearchBy Philip Bresnahan, Ellen Briggs, et al.A LOW-COST, DIY ULTRASONIC WATER LEVEL SENSOR for Education, Science, and Research.pdf768 KBdownload-circle](https://datadeep.tech/content/files/2026/08/A-LOW-COST--DIY-ULTRASONIC-WATER-LEVEL-SENSOR-for-Education--Science--and-Research.pdf "Download")

![](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/08/DataDeepTechx2.png)

![The Means Initiative Logo](https://storage.ghost.io/c/1d/fa/1dfa0703-59cd-42c7-a4f8-b16e218c2d7c/content/images/2026/04/MeansPNG-7.png)

Content Provided by The Means Initiative