Barracuda

An advanced, autonomous submarine built by high schoolers in their spare time

This is a technical article about Barracuda 12, the final iteration I worked on. I’m working on a blog post about the story behind it.

A submarine consisting of a clear tube with electronics and side panels for mounting four motors.

Barracuda is an autonomous submarine can control its heading and depth, hit buoys based on their color, and follow orange paths on the bottoms of pools.

Control

The control system runs on the mbed LPC1768, a development platform for microcontrollers. It takes in sensor input and commands from the main computer, and outputs lists of speeds to the motor controller.

The sub determines heading by fusing data from the three-axis accelerometers and gyroscopes with a Kalman filter. We decided not to use the magnetometers because magnetic interference is very likely — fire up your iPhone’s compass app if you have any doubts. As a result, there was no way to determine absolute heading, so we just called the initial heading 0 degrees. The heading is sent into a PID loop.

Barracuda also has a pressure transducer, which it uses to determine the depth. We calibrated the sensor with a linear regression — pressure increases linearly with depth — and fed the result through a moving average before throwing the data into a PID controller.

Computer Vision

Barracuda has two 1080p cameras: one facing forward, and one looking down. The cameras are fed into an ODROID-X development board with Ubuntu installed, powered by a custom switch-mode power supply. Images are captured with Video 4 Linux 2, handled with OpenCV, and mostly processed using custom filters.

For more information, take a look at our project reports.