Inspiration
Water pollution in lakes and ponds is a serious and growing problem across India. Chemical runoff and waste raise pH levels and contaminate freshwater bodies, threatening aquatic life and the communities who depend on them. Traditional testing is slow, expensive and requires a trained person to visit the site — by the time pollution is detected, damage is often already done. We chose this problem because a lake near our school shows visible signs of this exact issue. What if a small robot could do the monitoring continuously and automatically? That question led us to AquaBot.
What it does
AquaBot is an autonomous, solar-upgradable boat that patrols lakes and ponds, continuously measuring pH, TDS, turbidity, temperature, rainfall and (in a future revision) dissolved oxygen. When water quality drifts outside a safe range, it automatically doses a corrective chemical, detects floating garbage using onboard AI, and streams live data — via a GSM/GPRS cellular link — to a free cloud dashboard accessible from any phone or laptop, even where there is no WiFi at the water body. AquaBot is also equipped with a solar panel that helps recharge its onboard battery, extending operating time and reducing dependence on external charging.
How I built it
AquaBot is built on a small waterproof boat hull made of Sunboard, which is lightweight yet strong. Two DC motors drive rubber wheels/tyres for differential steering, controlled by an ESP32 through a motor driver. The ESP32 also reads the GPS NEO-6M module and navigates through the defined patrol area using a lawnmower-pattern route.
Inside the boat, two small chemical tanks store acid-correction and alkaline-correction solutions, connected to relay-controlled pumps that spray corrective solution when the Raspberry Pi detects a pH imbalance. High-level tasks run on a Raspberry Pi Zero 2W (multi-sensor reading via ADS1115 ADC, camera capture, AI vision processing, TFT display output, and GSM/GPRS cloud upload). The Pi and ESP32 exchange short JSON messages over Bluetooth Classic (SPP). Periodic POST requests send sensor, GPS, and alert data over GPRS via a SIM800L module to a Cloudflare Worker, which stores readings in Workers KV and serves the live dashboard.
Challenges I ran into
Lag / dropped Bluetooth messages between Pi and ESP32: Solved by using a JSON protocol with checksum + heartbeat; ESP32 stops motors safely if no heartbeat within 5s.
GSM module failed on weak signal: Solved by retrying with exponential backoff; unsent readings buffered on SD card until GPRS returns.
GPIO busy error (two scripts, same pins): Switched to the lgpio library so libraries could coexist.
pH sensor gave unrealistic values (20+): Calibrated with two known pH-paper readings; linear slope/intercept formula.
SPI display showing only 1/3 of the screen: Increased SPI buffer to 131072 bytes; sent frames in 32KB chunks.
Persisting the live GPS trail without a database: Used Cloudflare Workers KV to store latest readings and patrol trail.
Multiple Pi scripts conflicting: Master startup script (start.py) launches all scripts with staggered delays and auto-restarts crashes.
AI garbage detection too slow on Pi Zero 2W: Offloaded inference to a Coral Edge TPU — latency dropped from ~2s to ~200ms per frame.
Accomplishments that I'm proud of
Successfully designed a split system across two controllers (ESP32 for real-time motor/GPS timing and Raspberry Pi for high-level AI, display, and cellular data) connected via Bluetooth SPP.
Built an active-response robotic solution that does not just report pollution, but actively remediates pH imbalances using automated chemical dosing.
Integrated an AI vision module (Edge TPU) with a Pi Camera to capture GPS-tagged images of floating garbage and stream instant alerts over cellular networks.
Kept the estimated prototype cost under Rs 20,000, making continuous water quality monitoring highly accessible.
What I learned
Split Architecture Optimization: Learned that GPS-based motor control needs fast, uninterrupted timing that AI inference and network activity disrupt, requiring dual-controller separation.
Sensor Calibration Math: Learned how to calibrate analog sensors like pH modules using reference readings to establish linear formulas for accurate digital values.
Multi-Process Code Coordination: Gained experience writing and orchestrating multiple concurrent Python scripts, managing GPIO pin access through lgpio, and implementing heartbeat/checksum mechanisms for reliable inter-device Bluetooth communication.
What's next for AQUABOT
Dissolved Oxygen (DO) Sensor Integration: Add a dissolved oxygen sensor, which was planned but constrained by funding in the current prototype.
Advanced AI Detection: Expand object-detection models for broader floating debris classification and dynamic obstacle avoidance.
Scaling & Production: Target a small production run at Rs 2-2.5 lakhs per unit for deployment by gram panchayats and small municipal authorities across unmonitored ponds and lakes.
Log in or sign up for Devpost to join the conversation.