This repository contains software implementations for water level monitoring using microcontrollers such as Arduino (ATmega328P/ATmega2560), ESP8266, and ESP32. It supports a variety of ultrasonic, ToF laser sensors to measure water levels in wells, tanks, and other water sources. The project includes data transmission via Ethernet, WiFi, and IoT technologies such as Sigfox and LoRa / LoRaWAN.
The firmware is designed to be highly flexible, supporting different microcontroller functions, including Ultra-Low-Power (ULP) modes, Remote Over-The-Air (OTA) updates, and real-time operating systems like FreeRTOS for ESP32. This makes it suitable for both small-scale DIY projects and industrial IoT water monitoring solutions.
- π§ Real-Time Monitoring: Ultrasonic sensors measure water levels continuously.
- π₯ Web Interface: Real-time graphs, history, and alerts.
- π Multiple Connectivity: Ethernet, WiFi, Sigfox, LoRa.
- π Ultra-Low Power: Deep sleep for ESP32/ESP8266.
- π OTA Updates: Easy remote firmware upgrade.
- πΉ FreeRTOS Support: Advanced ESP32 projects.
- Ultrasonic Sensors: e.g., HC-SR04, JSN-SR04T, IOE-SR0X, and others.
- Laser: e.g., VL53L1X (TOF400C), VL53L0X (TOF200C).
- Other: Required to do your own firmware, or set callback in case of industrial sensors
- Ethernet, WiFi, Sigfox, LoRa.
- HTTP and HTTPS support for secure web connections.
- Integration with MySQL databases for storing water level data.
- Real-Time Data Visualization: View water levels, trends, and volume calculations in an easy-to-understand format.
- Historical Data: Access past records, minimum/maximum values, and trends over time.
- Graphical Data Representation: Visualize water levels over the past 24 hours, 7 days, and 30 days.
- Multilingual Support: Available in English, German, Russian, and Slovak.
Important Note:
The test web interface currently supports HTTP protocol only. HTTPS configurations are available in example code but will not work with the current web interface.
To start using the Water Level Monitor project, follow these steps:
- Clone this repository or download the code.
- Install required libraries in Arduino IDE (
/src/
folder). - Upload the sketch to your microcontroller (choose between Offline Tester or Online Sketch).
- If using a web interface:
- Import the
.sql
table into your MySQL database. - Update
connect.php
with your MySQL access credentials and API key for authentication.
- Import the
- Set the depth and diameter of your well in the web interface settings.
- Upload the generated sketch to your microcontroller, ensuring the API key is included.
For OTA updates, ensure your microcontroller is configured with WiFi or Ethernet connectivity.
Microcontroller | Offline Tester | StandBy | Deep Sleep | StandBy + OTA | FreeRTOS |
---|---|---|---|---|---|
Arduino + Ethernet | β | β | β | β | β |
ESP8266 | β | β | β | β | β |
ESP32 | β | β | β | β | β |
ESP32 + PHY | β | β | β | β | β |
- openssl s_client -showcerts -verify 5 -connect example.com:443 < /dev/null
The Water Level Monitor project is compatible with a wide range of hardware setups, including popular microcontrollers and sensors for measuring water levels in wells, tanks, and other water bodies. Below are the supported hardware configurations and wiring diagrams to help you get started.


Check out the key features of the Water Level Monitor web app that allows you to visualize and analyze the water level data in real time.
Monitor water levels and volume in real time with easy-to-read visualizations.
View the difference in water levels over time with a comprehensive table of recorded data and minimal / maximal values recorded
Advanced graph visualisations with possiblity to export graph in .csv, .svg, .png
In-built source code generator for ESP32 (automatically calculated traces based on dir depth)
QR scanner that can visualise the latest data by scanning QR code
AR visualisation of the latest data as dashboard when QR code scanned