project
ESP32 Water Sensor
Hardware water flow monitoring with Rust on ESP32, integrated into OpenWRT for local-first analytics.
A hardware project monitoring household water consumption using a flow sensor attached to an ESP32 microcontroller, with firmware written in Rust.
Why Rust on embedded?
Memory safety without a runtime matters a lot when you’re running on 256 KB of RAM. The esp-hal crate gives full peripheral access with zero-cost abstractions.
Architecture
- ESP32 reads the flow sensor via interrupt-driven pulse counting
- Rust firmware aggregates readings and publishes over MQTT
- OpenWRT router runs a local broker and stores data in SQLite
- No cloud dependency — all analytics run locally