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

aiease_1750260681337.jpg

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

  1. ESP32 WROOM Development Board - Main microcontroller
  2. Source: AliExpress, Amazon, or local electronics store (~$8-12)
  3. MPU6050 6-Axis IMU Module - Accelerometer + Gyroscope
  4. Source: Any electronics supplier (~$3-5)
  5. WS M181 GPS Module - GPS with built-in QMC5883L compass
  6. Source: AliExpress, specific module needed for compass functionality (~$15-25)
  7. L298N Motor Driver Module - Dual H-bridge for motor control
  8. Source: Arduino suppliers, robotics shops (~$5-8)
  9. Water Level Sensors (3x) - Analog resistance-based sensors
  10. Source: Arduino sensor kits or individual purchase (~$2-3 each)
  11. 7.4V 2S LiPo Battery - 2200mAh or higher recommended
  12. Source: RC hobby shops, battery specialists (~$20-30)
  13. Jumper Wires (M-M, M-F, F-F) - Various lengths
  14. Breadboard or Perfboard - For prototyping connections
  15. Heat Shrink Tubing - For wire protection
  16. Marine-grade Wire - 22-24 AWG for connections

Electronics - Base Station

  1. Raspberry Pi 5 (or Pi 4) - Base station computer
  2. Source: Official Pi distributors (~$60-80)
  3. MicroSD Card 32GB+ - Class 10 or better
  4. Source: Any electronics retailer (~$10-15)
  5. Raspberry Pi Power Supply - Official USB-C adapter
  6. Ethernet Cable (optional) - For initial setup

Boat Hardware

  1. RC Boat Hull - Any size suitable for payload
  2. Source: RC hobby shops, Amazon (~$30-100+)
  3. DC Motors (2x) - 6-12V brushed motors
  4. Source: RC suppliers or salvaged from old toys (~$10-20 each)
  5. Waterproof Project Enclosure - IP65/IP67 rated
  6. Source: Electronics suppliers (~$15-25)
  7. Propellers - Matched to motors
  8. Rudder/Servo (optional) - Alternative steering method
  9. Marine Sealant - Silicone or polyurethane
  10. Mounting Hardware - Screws, standoffs, brackets

Tools Required

  1. Soldering Iron (40-60W) + Solder
  2. Wire Strippers/Cutters
  3. Multimeter - For testing connections
  4. Screwdriver Set - Phillips and flathead
  5. Computer - For programming and setup

Optional Enhancements

  1. Waterproof Connectors - Better than wire splices
  2. LED Indicators - Status lights
  3. Buzzer - Audio alerts
  4. Camera Module - For FPV capability

Software/Services

  1. Arduino IDE - Free download
  2. Raspberry Pi OS - Free download
  3. GitHub Account - For accessing project files
  4. Bluetooth Terminal App - For testing (optional)

Estimated Total Cost: $250-400

Varies significantly based on boat choice and component quality

Supporting Files to Attach:

  1. Bill of Materials (BOM.xlsx) - Detailed parts list with supplier links
  2. Fritzing Wiring Diagram (aquatrack.fzz) - Complete schematic

Download Project Files

IMG_5124.JPG
IMG_5154.JPG
IMG_5292.JPG

https://github.com/howest-mct/2024-2025-projectone-mct-KermanshahiHirad

Download and Extract

  1. Go to the GitHub repository
  2. Click "Code""Download ZIP"
  3. Extract to your working directory
  4. Open the README.md for quick setup instructions

Hardware Assembly

IMG_5325.JPG

Wiring Overview

Fritzing file in GitHub

Key Connections Summary:

  1. MPU6050: I2C on GPIO 4 (SDA) & GPIO 5 (SCL)
  2. GPS Module: Serial2 on GPIO 16 (RX) & GPIO 17 (TX) + I2C for compass
  3. L298N Motors: PWM control on GPIO 13, 14, 25, 26, 27, 33
  4. Water Sensors: ADC inputs on GPIO 32, 34, 35
  5. Power: 7.4V LiPo → L298N → 5V to ESP32 VIN


ESP32 Programming

IMG_5382.JPG

Arduino IDE Setup

  1. Install ESP32 board package in Arduino IDE
  2. Install required libraries:
  3. BluetoothSerial (built-in with ESP32)
  4. Wire (built-in)
  5. No external libraries needed!

Flash the Firmware

  1. Open /esp32_firmware/aquatrack.ino from GitHub
  2. Select Board: "ESP32 Dev Module"
  3. Select Port: Your ESP32 port
  4. Click Upload

Verify Installation

Open Serial Monitor (115200 baud) - you should see:


=== AquaTrack ESP32 Controller ===
Hardware: NEO-M6 GPS + WS M181 Compass + MPU6050
✅ Bluetooth gestart als 'AquaTrack_Boat'
✅ MPU6050 geïnitialiseerd
✅ QMC5883L compass initialized
🚁 RETURN TO HOME ACTIVATED!

Raspberry Pi Setup

IMG_5383.JPG

Quick Setup with Auto-Script

The GitHub repository includes an automatic setup script!


bash
# On your Raspberry Pi:
cd ~/
git clone [YOUR_GITHUB_REPO_URL]
cd AquaTrack/raspberry_pi/
python3 setup_aquatrack.py

This script automatically:

  1. Installs all required packages
  2. Sets up Python virtual environment
  3. Configures Bluetooth
  4. Creates systemd service for auto-start
  5. 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


bash
cd ~/AquaTrack/raspberry_pi/
./start_aquatrack.sh

Navigate to: http://[PI_IP_ADDRESS]:8000

Bluetooth Pairing

IMG_5386.JPG
IMG_5387.JPG

Pair ESP32 with Raspberry Pi


bash
sudo bluetoothctl
scan on
# Look for "AquaTrack_Boat"
pair [ESP32_MAC_ADDRESS]
trust [ESP32_MAC_ADDRESS]
exit

# Bind to serial port
sudo rfcomm bind 0 [ESP32_MAC_ADDRESS] 1

Test Connection


bash
# Check if connection works
python3 /path/to/bluetooth_debug.py

You should see telemetry data flowing from the boat.

Boat Assembly & Waterproofing

IMG_5546.JPG

Electronics Integration

  1. Mount GPS on top - needs clear sky view for satellite reception
  2. IMU in center - mount level for accurate orientation readings
  3. Cable management - seal all entry points with marine sealant

Motor Configuration

  1. Motor A (GPIO 27/26): Forward/Backward propulsion
  2. Motor B (GPIO 25/33): Left/Right steering (rudder or secondary prop)

Weight & Balance

  1. Electronics weight: ~200-300g total
  2. Battery placement: Low and centered for stability
  3. Waterproofing: Test enclosure in shallow water first

Testing & Calibration

IMG_5565.JPG

System Test Checklist


□ ESP32 powers on and shows Bluetooth name
□ Raspberry Pi connects to ESP32 via Bluetooth
□ GPS gets satellite fix (4+ satellites)
□ IMU shows correct orientation when tilted
□ Compass heading updates when rotated
□ Motors respond to web dashboard commands
□ Water sensors trigger alarms when wet
□ Dashboard shows live updating data

Calibration Procedures

  1. Gyroscope: Keep boat still during startup (auto-calibrates)
  2. Compass: Rotate boat 360° in horizontal plane for calibration
  3. GPS: Wait 1-2 minutes for initial satellite lock
  4. Motors: Test direction and adjust code if needed

Water Testing Protocol

  1. Shallow water test: 1-2 feet deep, stay close
  2. Range test: Check Bluetooth range (expect ~30 meters)
  3. GPS accuracy: Compare with phone GPS
  4. Return-to-home: Test from short distance first

Dashboard Features

IMG_5569.JPG

Real-time Monitoring

The web dashboard displays:

  1. 3D boat orientation with live roll/pitch/yaw
  2. GPS coordinates and speed
  3. Compass heading with visual compass
  4. Water level alerts from 3 sensors
  5. Connection status (Bluetooth, GPS, boat)
  6. System statistics (uptime, data rate)

Remote Control

Control the boat via:

  1. Web interface buttons
  2. Keyboard shortcuts (Z/S/Q/D for movement)
  3. Mobile-friendly responsive design

Return-to-Home Features

  1. Set home position with GPS coordinates
  2. One-click return autonomous navigation
  3. Progress tracking with distance and bearing
  4. Safety timeout if navigation takes too long

Operation Guide

IMG_5570.JPG

Startup Sequence

  1. Power on boat → ESP32 starts, Bluetooth advertises
  2. Start Pi dashboard → ./start_aquatrack.sh
  3. Open web browser → Navigate to Pi IP address
  4. Wait for GPS lock → Green status indicators
  5. Set home position → Press 'H' or click button
  6. Ready to operate! → Manual control or autonomous mode

Control Commands

CommandFunctionKeyButton
Forward
Propulsion motor forward
Z
⬆️
Backward
Propulsion motor reverse
S
⬇️
Left
Steering motor left
Q
⬅️
Right
Steering motor right
D
➡️
Stop All
Emergency stop
X
🛑
Set Home
Mark current position
H
🏠
Return Home
Start autonomous return
R
🎯
Stop RTH
Cancel auto-navigation
T

Safety Features

  1. Signal loss RTH: Auto-return if communication lost (10s timeout)
  2. Water detection: Automatic alerts if sensors detect intrusion
  3. Motor timeout: Auto-stop if no commands received (3s)
  4. GPS validation: RTH only works with good satellite fix
  5. Manual override: Always possible to stop autonomous mode

Troubleshooting Guide

Common Issues & Solutions

"Bluetooth not connecting"


bash
# Reset Bluetooth service
sudo systemctl restart bluetooth
sudo rfcomm release 0
# Re-pair ESP32 following Step 5

"GPS not getting fix"

  1. Ensure antenna has clear sky view (no roof/trees)
  2. Wait 2-3 minutes for cold start
  3. Check GPS module power (3.3V or 5V depending on module)
  4. Verify TX/RX connections (GPIO 16/17)

"Dashboard shows no data"

  1. Check Bluetooth pairing status
  2. Verify /dev/rfcomm0 exists
  3. Test with bluetooth_debug.py script
  4. Check Raspberry Pi firewall (port 8000)

"Motors not responding"

  1. Verify L298N power connections (7.4V battery)
  2. Check motor direction (swap wires if reversed)
  3. Test PWM signals with multimeter
  4. Confirm GPIO pin assignments match code

"Compass heading incorrect"

  1. Calibrate by rotating boat 360° slowly
  2. Check for magnetic interference (metal objects)
  3. Verify I2C connections (SDA/SCL shared with IMU)
  4. Mount compass away from motors/battery

Debug Tools

The GitHub repository includes debug scripts:

  1. bluetooth_debug.py - Test Bluetooth communication
  2. sensor_test.py - Verify individual sensors
  3. motor_test.py - Check motor responses

Performance Specifications

Measured Performance

  1. Telemetry Rate: 2 Hz (500ms updates)
  2. GPS Accuracy: ±3 meters typical
  3. Compass Accuracy: ±5 degrees
  4. Bluetooth Range: 30+ meters line-of-sight
  5. Battery Life: 2-4 hours (depends on motors and battery size)
  6. Response Time: <200ms command to motor action

System Requirements

  1. Raspberry Pi: Pi 4 or 5 recommended (Pi 3 may work but slower)
  2. SD Card: 32GB minimum, Class 10 or better
  3. Network: WiFi or Ethernet for dashboard access
  4. Browser: Modern browser with JavaScript enabled

Advanced Features & Modifications

Possible Enhancements

Hardware Additions:

  1. Camera module for FPV or recording
  2. LoRa radio for extended range (1km+)
  3. Depth sounder for underwater mapping
  4. Solar panel for extended operation

Software Features:

  1. Waypoint navigation with pre-planned routes
  2. Geofencing with virtual boundaries
  3. Data logging to SD card or cloud
  4. Weather integration (wind/current compensation)

Community Contributions

  1. Share your modifications on GitHub Issues
  2. Post photos/videos of your build
  3. Submit pull requests for improvements
  4. Help others in the Discussions section