Smart Water Level Monitoring System using ESP32 & Android
AquaLevel is an IoT-based water level monitoring system that measures tank water level in real time and displays it in an Android app. It combines Embedded Systems, Cloud Sync, and Mobile App Development into one complete working system.
This project is designed to be:
- Low-cost
- Practical for real-world use
- Easy to extend with new features
- Realistic Water Physics Engine: Custom column-based simulation with free flow, sloshing, and splash effects.
- Gyroscope Integration: Water surface reacts dynamically to device tilt (toggleable in Settings).
- Real-time water level display: Fluid animations with particle effects.
- Automatic hourly uploads from ESP32 to Firebase.
- Offline Support: Local data persistence using Room Database.
- Interactive Charts: "Draw path" animations for hourly, daily, and weekly usage.
- Smart Insights: Trend indicators and average usage calculations.
- History Tracking: Comprehensive logs of water consumption.
- Unit Conversion: Toggle between Liters and Gallons instantly.
- Smart Alerts: Customizable low-level thresholds with notification support.
- Tank Calibration: Configure custom "Full" and "Empty" sensor distances.
- Haptic Feedback: Tactile enhancements for interactive elements.
- Duolingo-Inspired Aesthetic: Vibrant cards, bold typography, and rounded geometry.
- Dark Mode: High-contrast, battery-friendly dark theme (default).
- Smooth Animations: Entry transitions and fluid interface updates.
- ESP32
- Ultrasonic Sensor (HC-SR04 or equivalent)
- Breadboard
- Jumper wires
- Resistors (voltage divider)
- External power source
- Android Studio (Koala Feature Drop)
- Kotlin (Coroutines, Flow)
- Android Jetpack (ViewModel, LiveData, Room)
- Firebase Realtime Database
- Arduino IDE (for ESP32)
- Ultrasonic sensor measures water level.
- ESP32 reads sensor data.
- ESP32 uploads readings to Firebase every 1 hour.
- Android app fetches cloud data.
- Data is stored locally using Room Database.
- App shows hourly, daily, and weekly analytics with charts.
| Component | ESP32 |
|---|---|
| VCC | External Power |
| GND | GND |
| TRIG | GPIO Pin |
| ECHO | GPIO Pin (via voltage divider) |
ESP32 GPIO pins are 3.3V tolerant. Use a voltage divider on ECHO pin.
- Connect components as per wiring.
- Upload ESP32 firmware.
- Configure WiFi and Firebase credentials.
- Create Firebase project.
- Enable Realtime Database.
- Add Android app to Firebase.
- Place
google-services.jsonin the app module.
- Open project in Android Studio.
- Sync Gradle.
- Run on emulator or physical device.
- Automatic upload every 1 hour
- Manual check supported from Android app
- WiFi reconnect logic
- Safe handling for network drops
- Single tank support only
- Multi-tank support





