AquaTrack: Hack Your RC Boat With Live GPS, Telemetry & Auto-Return
by Hirad Kermanshahi in Workshop > Electric Vehicles
10 Views, 0 Favorites, 0 Comments
AquaTrack: Hack Your RC Boat With Live GPS, Telemetry & Auto-Return

A smart, remote-controlled boat equipped with live onboard sensors. The boat transmits real-time data to a Raspberry Pi 5, which displays the information on a browser-based dashboard. My goal is to create a professional-looking and technically solid system that can be useful for applications such as fishing or hobbyist exploration.
Supplies
Electronics - Boat Side
- ESP32 WROOM Development Board - Main microcontroller
- Source: AliExpress, Amazon, or local electronics store (~$8-12)
- MPU6050 6-Axis IMU Module - Accelerometer + Gyroscope
- Source: Any electronics supplier (~$3-5)
- WS M181 GPS Module - GPS with built-in QMC5883L compass
- Source: AliExpress, specific module needed for compass functionality (~$15-25)
- L298N Motor Driver Module - Dual H-bridge for motor control
- Source: Arduino suppliers, robotics shops (~$5-8)
- Water Level Sensors (3x) - Analog resistance-based sensors
- Source: Arduino sensor kits or individual purchase (~$2-3 each)
- 7.4V 2S LiPo Battery - 2200mAh or higher recommended
- Source: RC hobby shops, battery specialists (~$20-30)
- Jumper Wires (M-M, M-F, F-F) - Various lengths
- Breadboard or Perfboard - For prototyping connections
- Heat Shrink Tubing - For wire protection
- Marine-grade Wire - 22-24 AWG for connections
Electronics - Base Station
- Raspberry Pi 5 (or Pi 4) - Base station computer
- Source: Official Pi distributors (~$60-80)
- MicroSD Card 32GB+ - Class 10 or better
- Source: Any electronics retailer (~$10-15)
- Raspberry Pi Power Supply - Official USB-C adapter
- Ethernet Cable (optional) - For initial setup
Boat Hardware
- RC Boat Hull - Any size suitable for payload
- Source: RC hobby shops, Amazon (~$30-100+)
- DC Motors (2x) - 6-12V brushed motors
- Source: RC suppliers or salvaged from old toys (~$10-20 each)
- Waterproof Project Enclosure - IP65/IP67 rated
- Source: Electronics suppliers (~$15-25)
- Propellers - Matched to motors
- Rudder/Servo (optional) - Alternative steering method
- Marine Sealant - Silicone or polyurethane
- Mounting Hardware - Screws, standoffs, brackets
Tools Required
- Soldering Iron (40-60W) + Solder
- Wire Strippers/Cutters
- Multimeter - For testing connections
- Screwdriver Set - Phillips and flathead
- Computer - For programming and setup
Optional Enhancements
- Waterproof Connectors - Better than wire splices
- LED Indicators - Status lights
- Buzzer - Audio alerts
- Camera Module - For FPV capability
Software/Services
- Arduino IDE - Free download
- Raspberry Pi OS - Free download
- GitHub Account - For accessing project files
- Bluetooth Terminal App - For testing (optional)
Estimated Total Cost: $250-400
Varies significantly based on boat choice and component quality
Supporting Files to Attach:
- Bill of Materials (BOM.xlsx) - Detailed parts list with supplier links
- Fritzing Wiring Diagram (aquatrack.fzz) - Complete schematic
Download Project Files



https://github.com/howest-mct/2024-2025-projectone-mct-KermanshahiHirad
Download and Extract
- Go to the GitHub repository
- Click "Code" → "Download ZIP"
- Extract to your working directory
- Open the README.md for quick setup instructions
Hardware Assembly

Wiring Overview
Fritzing file in GitHub
Key Connections Summary:
- MPU6050: I2C on GPIO 4 (SDA) & GPIO 5 (SCL)
- GPS Module: Serial2 on GPIO 16 (RX) & GPIO 17 (TX) + I2C for compass
- L298N Motors: PWM control on GPIO 13, 14, 25, 26, 27, 33
- Water Sensors: ADC inputs on GPIO 32, 34, 35
- Power: 7.4V LiPo → L298N → 5V to ESP32 VIN
ESP32 Programming

Arduino IDE Setup
- Install ESP32 board package in Arduino IDE
- Install required libraries:
- BluetoothSerial (built-in with ESP32)
- Wire (built-in)
- No external libraries needed!
Flash the Firmware
- Open /esp32_firmware/aquatrack.ino from GitHub
- Select Board: "ESP32 Dev Module"
- Select Port: Your ESP32 port
- Click Upload
Verify Installation
Open Serial Monitor (115200 baud) - you should see:
Raspberry Pi Setup

Quick Setup with Auto-Script
The GitHub repository includes an automatic setup script!
This script automatically:
- Installs all required packages
- Sets up Python virtual environment
- Configures Bluetooth
- Creates systemd service for auto-start
- Sets up firewall rules
Manual Setup (Alternative)
If you prefer manual setup, follow the detailed instructions in the GitHub README.md file.
Start the Dashboard
Navigate to: http://[PI_IP_ADDRESS]:8000
Bluetooth Pairing


Pair ESP32 with Raspberry Pi
Test Connection
You should see telemetry data flowing from the boat.
Boat Assembly & Waterproofing

Electronics Integration
- Mount GPS on top - needs clear sky view for satellite reception
- IMU in center - mount level for accurate orientation readings
- Cable management - seal all entry points with marine sealant
Motor Configuration
- Motor A (GPIO 27/26): Forward/Backward propulsion
- Motor B (GPIO 25/33): Left/Right steering (rudder or secondary prop)
Weight & Balance
- Electronics weight: ~200-300g total
- Battery placement: Low and centered for stability
- Waterproofing: Test enclosure in shallow water first
Testing & Calibration

System Test Checklist
Calibration Procedures
- Gyroscope: Keep boat still during startup (auto-calibrates)
- Compass: Rotate boat 360° in horizontal plane for calibration
- GPS: Wait 1-2 minutes for initial satellite lock
- Motors: Test direction and adjust code if needed
Water Testing Protocol
- Shallow water test: 1-2 feet deep, stay close
- Range test: Check Bluetooth range (expect ~30 meters)
- GPS accuracy: Compare with phone GPS
- Return-to-home: Test from short distance first
Dashboard Features

Real-time Monitoring
The web dashboard displays:
- 3D boat orientation with live roll/pitch/yaw
- GPS coordinates and speed
- Compass heading with visual compass
- Water level alerts from 3 sensors
- Connection status (Bluetooth, GPS, boat)
- System statistics (uptime, data rate)
Remote Control
Control the boat via:
- Web interface buttons
- Keyboard shortcuts (Z/S/Q/D for movement)
- Mobile-friendly responsive design
Return-to-Home Features
- Set home position with GPS coordinates
- One-click return autonomous navigation
- Progress tracking with distance and bearing
- Safety timeout if navigation takes too long
Operation Guide

Startup Sequence
- Power on boat → ESP32 starts, Bluetooth advertises
- Start Pi dashboard → ./start_aquatrack.sh
- Open web browser → Navigate to Pi IP address
- Wait for GPS lock → Green status indicators
- Set home position → Press 'H' or click button
- Ready to operate! → Manual control or autonomous mode
Control Commands
Safety Features
- Signal loss RTH: Auto-return if communication lost (10s timeout)
- Water detection: Automatic alerts if sensors detect intrusion
- Motor timeout: Auto-stop if no commands received (3s)
- GPS validation: RTH only works with good satellite fix
- Manual override: Always possible to stop autonomous mode
Troubleshooting Guide
Common Issues & Solutions
"Bluetooth not connecting"
"GPS not getting fix"
- Ensure antenna has clear sky view (no roof/trees)
- Wait 2-3 minutes for cold start
- Check GPS module power (3.3V or 5V depending on module)
- Verify TX/RX connections (GPIO 16/17)
"Dashboard shows no data"
- Check Bluetooth pairing status
- Verify /dev/rfcomm0 exists
- Test with bluetooth_debug.py script
- Check Raspberry Pi firewall (port 8000)
"Motors not responding"
- Verify L298N power connections (7.4V battery)
- Check motor direction (swap wires if reversed)
- Test PWM signals with multimeter
- Confirm GPIO pin assignments match code
"Compass heading incorrect"
- Calibrate by rotating boat 360° slowly
- Check for magnetic interference (metal objects)
- Verify I2C connections (SDA/SCL shared with IMU)
- Mount compass away from motors/battery
Debug Tools
The GitHub repository includes debug scripts:
- bluetooth_debug.py - Test Bluetooth communication
- sensor_test.py - Verify individual sensors
- motor_test.py - Check motor responses
Performance Specifications
Measured Performance
- Telemetry Rate: 2 Hz (500ms updates)
- GPS Accuracy: ±3 meters typical
- Compass Accuracy: ±5 degrees
- Bluetooth Range: 30+ meters line-of-sight
- Battery Life: 2-4 hours (depends on motors and battery size)
- Response Time: <200ms command to motor action
System Requirements
- Raspberry Pi: Pi 4 or 5 recommended (Pi 3 may work but slower)
- SD Card: 32GB minimum, Class 10 or better
- Network: WiFi or Ethernet for dashboard access
- Browser: Modern browser with JavaScript enabled
Advanced Features & Modifications
Possible Enhancements
Hardware Additions:
- Camera module for FPV or recording
- LoRa radio for extended range (1km+)
- Depth sounder for underwater mapping
- Solar panel for extended operation
Software Features:
- Waypoint navigation with pre-planned routes
- Geofencing with virtual boundaries
- Data logging to SD card or cloud
- Weather integration (wind/current compensation)
Community Contributions
- Share your modifications on GitHub Issues
- Post photos/videos of your build
- Submit pull requests for improvements
- Help others in the Discussions section