HNProjects

GNOR Autonomous Submarine

The Great Naval Orange Race submarine I programmed for my team to drive an orange around UCF's Reflecting Pond.

Firmware architecture of the GNOR submarine: an operator console over Bluetooth Classic SPP to an ESP32 running a polled command loop, driving the servo and the ESC, with settings persisted to NVS flash.
Firmware architecture.

The firmware

I was in charge of 3D printing an improved propeller, as well as programming the ESP32 to not only drive autonomously via readjustments but also connect via Bluetooth to my laptop to allow for remote speed and angle modifications.

Programmed ESP32 firmware in C++ for real-time propulsion control and Bluetooth command handling.

  • ESP32
  • C++
  • Bluetooth SPP
  • ESP32Servo
  • NVS

The propeller

CAD-modeled and 3D-printed a custom propeller blade deployed in UCF’s competitive submarine race.

  • CAD
  • 3D printing

What I found

I always look for my own failures before someone else can find them.

Caught in my own code

Bluetooth settings lost between sessions

I found numerous errors prior to testing that I fixed such as a Bluetooth error that would reset the updated values between sessions instead of just saving it to memory.

I took it upon myself to check for any errors that my code could've produced to ensure that nothing could go wrong.

  • ESP32
  • NVS
  • Bluetooth
// BluetoothSerial internally uses ESP32's LEDC timer 0.ESP32PWM::allocateTimer(0);   // reserved — BT may use thisESP32PWM::allocateTimer(1);   // servo1 will use thisESP32PWM::allocateTimer(2);   // servoEsc will use thisESP32PWM::allocateTimer(3);   // spare

GNOR_V4.ino: all four ESP32 PWM timers are reserved before Bluetooth starts.