The problem
A water tank that nobody watches runs dry at the worst moment — for a farm, a hostel block or a remote installation, the level is discovered by walking to the tank. Automatic float valves help, but when they stick or the supply fails, nobody knows until the next visit. This project adds remote visibility: a solar-powered ESP32 node sits at the tank, measures the water level continuously, and raises local alerts plus a WiFi status flag when the level falls below threshold. Ultrasonic sensing gives a continuous percentage; a float switch gives a hard low-level backup that works even if the ultrasonic reading is confused. Between readings the ESP32 sleeps to conserve the solar-charged battery, waking on schedule — a genuine low-power design point for the viva. The report documents the field compromises openly: ripples need median filtering, solar yield depends on the site, and level is not water quality.
How it works
- The ESP32 wakes from deep sleep on its timer (design target ~15 min) and powers the sensor rail.
- The HC-SR04 takes a burst of rapid distance samples; the firmware takes the median to reject ripple noise.
- The median distance is mapped to a level percentage using the calibrated empty and full reference distances for the tank.
- The float switch is read as an independent digital check; either sensor can assert the low-level condition.
- If the level is below the alert threshold (or the float asserts), the buzzer sounds in a repeating pattern and the status page flags LOW WATER.
- Readings, battery voltage and alert events are logged to flash and served on the WiFi page.
- The ESP32 returns to deep sleep until the next cycle; the status page shows the last reading with its timestamp.
Tech stack:
- ESP32 (WiFi-enabled microcontroller)
- HC-SR04 ultrasonic distance sensor
- Float switch (digital backup)
- Solar panel + charge module
- Battery pack
- Status display
- Piezo buzzer
- Arduino IDE · ESP32 core
| Parameter | Value |
|---|---|
| Controller | ESP32 (dual-core 240 MHz, datasheet) |
| Level sensor | HC-SR04, 2–400 cm range (datasheet) |
| Backup | Float switch, digital low-level |
| Power | Solar panel + battery pack (sizing note included) |
| Duty cycle | Deep sleep between cycles, approximately 15 min interval (design target) |
| Filtering | Median over sample burst (design target ~7 samples) |
| Alert | Buzzer + WiFi status flag, configurable threshold |
| Calibration | Empty/full reference per tank (buyer-run) |
Project features
- [Ultrasonic level sensing] HC-SR04 measures the water surface distance from a PVC bracket; firmware converts it to a level percentage using calibrated empty/full points.
- [Float-switch backup] An independent float switch asserts a hard LOW LEVEL signal even if the ultrasonic path is obstructed or misreading.
- [Solar power] A solar panel with charge management tops up the battery pack; the sizing note helps the buyer match panel to their sun hours.
- [Sleep-cycled operation] The ESP32 sleeps between measurement cycles (design target ~15 min) to stretch battery life — a documented low-power strategy.
- [Low-level alert] Threshold crossing sounds the buzzer and flags LOW WATER on the status page until the level recovers.
- [WiFi status page] Level percentage, battery state, last-reading time and alert history on a page hosted by the ESP32.
- [Median filtering] A rolling median over rapid samples rejects ripple and splash noise before any decision is made.
- [Buyer-run calibration] Empty/full reference procedure for the buyer's own tank geometry, since every tank differs.
What is included
- Fully wired prototype: ESP32 in enclosure box, ultrasonic sensor on PVC bracket, float switch, solar panel, battery pack, buzzer
- ESP32 firmware source code with sleep cycling and filtering
- Tank calibration procedure and solar-sizing note
- Wiring diagram and connection table
- Project report PDF (background, level-sensing theory, low-power design, methodology, results, limitations)
- PPT presentation for final review
- Viva Q&A preparation document (ultrasonic time-of-flight, median filtering, deep sleep, solar budgeting)
Limitations & prerequisites
- Level only: it says nothing about water quality, contamination or flow — the listing claims no water-quality sensing.
- Ultrasonic readings need the documented mounting geometry; wind-blown debris or a tilted bracket degrades accuracy, and the report says so.
- Solar yield depends on site sun hours; the sizing note is guidance, not a guarantee of year-round autonomy in poor sun.
- The WiFi status page needs the node within network range; there is no LoRa, GSM or satellite link in this build (long-range radio is listed as future scope).
- The demo uses a representative tank; the buyer's installation needs the calibration procedure run on site.
Frequently Asked Questions
Why two level sensors?
The ultrasonic sensor gives a continuous percentage for the dashboard; the float switch gives a hard digital backup that still works if the ultrasonic path is blocked or confused. Redundancy in sensing is a strong viva point, and both are demonstrated.
How does it handle ripples and splashing?
Each wake cycle takes a burst of rapid ultrasonic samples and uses the median, which rejects splash spikes that would fool a single reading. Wind-ripple behaviour is discussed in the report's limitations.
How long does the battery last?
That depends on sun hours and wake interval, so the listing gives a sizing method rather than a fixed number: the ESP32 sleeps between cycles and the note shows how to match panel and battery to the site.
Does it alert remotely?
The status page and buzzer are local to the node's WiFi network. There is no SMS or cloud push — the build contains no GSM module, and the listing does not claim remote alerting.
What does the demo use as a tank?
A representative water tank with the sensor bracket, float, solar panel and controller box — the same arrangement a field installation would use, at demo scale.
Is this project suitable for a final-year project?
Yes — for Electronics, Electrical and IoT programs. It combines time-of-flight sensing, signal filtering, deep-sleep low-power design and solar budgeting in a field-relevant build. Suitable for B.E./B.Tech final-year projects in Electronics, Electrical and IoT.
Components & software requirements
- ESP32 (WiFi-enabled microcontroller)
- HC-SR04 ultrasonic distance sensor
- Float switch (digital backup)
- Solar panel + charge module
- Battery pack
- Status display
- Piezo buzzer
- Arduino IDE · ESP32 core
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.