IOT PROJECT

Remote Water Level Sensor

Built a wireless ESP32 sensor using dual MPU6050 accelerometers and OLED feedback, integrated with Home Assistant for real-time water level monitoring and smart home automation.

Remote Water Level Sensor
ESP32 Water Level Sensor with OLED Display

Project Overview

This project solves the problem of monitoring water levels in remote locations like sump pumps, rain barrels, or wells. Using dual MPU6050 accelerometers to measure tilt and calculate water depth, the sensor provides accurate readings that are wirelessly transmitted to Home Assistant.

Key Features

  • Dual MPU6050 accelerometers for precise tilt measurement
  • OLED display for local feedback and diagnostics
  • WiFi connectivity for remote monitoring
  • Home Assistant integration for automation triggers
  • Low power design for battery operation
  • Waterproof housing for outdoor installation

Technical Details

The sensor uses trigonometry to calculate water depth based on the angle measured by the accelerometers. When mounted on a float, changes in water level cause the sensor to tilt, which is converted to depth measurements. The ESP32 publishes data via MQTT to Home Assistant every 30 seconds.

Technologies Used
ESP32 MPU6050 OLED Home Assistant ESPHome MQTT 3D Printing
Downloads
Arduino Code (.ino) ESPHome Config (.yaml) 3D Print Files (.stl)
Circuit diagram
Circuit Diagram and Wiring
Home Assistant dashboard
Home Assistant Dashboard Integration
Installed sensor
Sensor Installed in Waterproof Housing

Build Process & Lessons Learned

This project took about 3 weeks from concept to deployment. The biggest challenge was calibrating the accelerometers to account for mounting variations and temperature drift. I ended up implementing an auto-calibration routine that runs every 24 hours.

Future improvements include adding a temperature sensor for better compensation and implementing OTA updates for easier maintenance once deployed in the field.

Read Full Build Log