AVBotz

Marlin V1

🐟 AVBotz Marlin V1

In 2016, we retired the fourteen year-old submarine Barracuda and began developing Marlin V1. Though Barracuda had shown fantastic reliability within its last few years, signs of fatigue and material failure led the team's decision to retire the sub. This page overviews Marlin V1’s existing specifications and recent changes contributed by each of the our subteams. Special thanks to all of our sponsors who contributed hardware and monetary value to help bring Marlin V1 to life.

32 meters

Maximum Depth

3,500+

Lines of Mission Code

4 m/s

Top Speed

5 years

In Development

Subdivision Overview

AVBotz's technical subteams include the electrical, mechanical, and software systems of Marlin V1. Each team's role is described in detail below.

Mechanical

Mechanical's responsibilities are to design, build, and maintain the vehicle. With the help of SolidWorks and Datron, we are able to model and fabricate much of our vehicle's parts, while teaching our members many engineering skills and processes along the way. Every year, the mechanical team focuses on the designs for yearly task changes and the construction of competition props.

Electrical

Electrical is responsible for the design and application of equipment and implementation of the electrical circuits that bring the vehicle to life. Electrical primarily works within the hull, piecing together the circuit boards and managing power delivery make sure that the subsystems can communicate with each other safely and reliably.

Software

Responsible for the design and implementation of the software and mission code that allows Marlin V1 to operate with autonomy. The major software components include: Mission Planning, Control Systems, Computer Vision Machine Learning, and Navigation.

Mechanical Team

Mechanical is responsible for the parts outside of the main body (the tube), as well as the support inside. Its goal is to improve the capabilities of the sub’s hardware and to help maintain the sub in its working capacity. Using the CAD software, we are able to design, create, and test new components such as the rack and the grabber easily, as well as save our designs for future club members to reference.

Marlin V1’s hull is a 9.5-inch diameter acrylic tube, 25.875 inches long, and sealed by two anodized 6061-T6 aluminum endcaps.

The front endcap is sealed to the end of the tube with 3M DP420 epoxy, and the front camera dome is sealed using a face o-ring. An aluminum collar was added to the back of the tube, so that the back endcap seals to aluminum instead of casted acrylic, ensuring seal integrity.

The back end cap uses o-rings 3% smaller than normal specification and was given a 10-degree chamfer to ease insertion and extraction of the electronics rack. Four spring-draw latches on the rear of the hull help keep the back endcap seal watertight by preventing the endcap from sliding out of the tube. Thirteen waterproof SubConn connectors interface between Marlin V1’s internal and external electronics, and can be quickly detached and reattached without disrupting the watertight seal. Two aluminum mounts attach the hull to the horizontal plane of the submarine.

Marlin V1 maneuvers using eight VideoRay M5 thrusters, chosen for their high thrust and efficiency. Four are arranged horizontally at 45-degree angles and control strafe, yaw, forward, and reverse movements, while the other four are oriented vertically and control depth, pitch, and roll. The thrusters use up to 750W and generate up to 23 lbs of thrust.

The frame is built from 6061-T6 aluminum components for high strength and relatively low weight. Sheets and L-pieces are machined using CNC machines and standard industrial tooling machines, and then anodized with a type II coating. A horizontal plane provides secure mounting points for the hull mounts, surge thrusters, dropper, torpedoes, and many other components, while four vertical side panels support the weight of the plane and provide mounting points for the vertical thrusters, grabbers, and hydrophones. Additional panels were added in the front and back of Marlin V1 to avoid warping the horizontal plane under load.

Hydrophone Enclosure (left) and Battery Box (right)

Hydrophone Enclosure (left) and Battery Box (right)

Electrical Team

This year, electrical improved Marlin V1’s electrical internal infrastructure. This system is intended to be more powerful and capable than any previous system to accommodate for this year’s mechanical and software changes. To accomplish this, Marlin V1 has a more powerful main computer and a revamped acoustic system.

Marlin V1’s main computer is built on a Jetway NF9J-Q87 Mini-ITX motherboard. It contains a 2.7 GHz quad core Intel i7-4790T Haswell processor, 16GB of RAM, and a 1TB mSATA SSD. The main computer handles high-level functions such as image processing. The NF9J-Q87 was chosen for its large number of USB ports and dual ethernet ports. The i7-4790T was chosen for its combination of high processing power and low power consumption. An additional Nvidia Geforce RTX 3050 was added to the system as it provides us with enhanced computing power for machine learning models.

Specifications

Jetway NF9J-Q87 Mini-ITX CPU: Intel i7-4790T (2.7 GHz) 16GB DDR3 RAM 1Tb mSATA SSD

The main computer on Marlin V1

The main computer on Marlin V1

Marlin V1 uses a PNI TRAX attitude and heading reference system (AHRS). The TRAX AHRS has a 3-axis magnetometer, 3-axis accelerometer, and a 3-axis gyroscope. The TRAX has an onboard Kalman filtering algorithm that provides accurate heading under a wide variety of conditions, including the ability to overcome errors normally caused by erratic motion and/or changes in the local magnetic field. The TRAX communicates with the ATmega 2560 over RS-232.

The AHRS used on Marlin V1

The AHRS used on Marlin V1

The systems diagram for Marlin V1

Marlin V1 is powered by two ZEEE 6S 6000mAh Lithium Polymer Batteries connected in series. These batteries were chosen for their high energy density and ability to supply large amounts of instantaneous current. The batteries provide a nominal 44.4V and have an energy capacity of about 260Wh, which allows Marlin V1 to run for 1⁠—1.5hours of continuous water testing with machine learning running.

The tether allows us to upload/debug code on the main computer during testing, allowing us to save time by debugging software while the vehicle is still in the water. Marlin V1’s WiFi tether consists of a Netgear router and a rechargeable battery pack. The access point is wired to the main computer via a 2nd Gen Blue Robotics Fantom Tether custom terminated into a MacArtney Subconn 13 pin Ethernet connector.

The ATmega2560 controls Marlin V1’s VideoRay M5 thrusters over a bussed RS-485 interface. The bussed interface allows for a simplistic software setup and saves pins on the rear bulkhead. The motor’s electronic speed controller is housed internally, which prevents heat buildup inside of the main hull.

Marlin V1’s pressure sensor is the Ashcroft Model K1 Pressure Transducer/Transmitter. It converts pressure readings from the water into voltage. These voltage readings are linearly converted to depth on the ATmega 2560. Many thanks to Ashcroft for their sponsorship in providing the K1.

The control board is based on the ATmega2560. The ATmega2560 is a 16MHz 8-bit AVR RISC microcontroller with 256KB of flash memory. It was chosen for its simple programming environment and wide variety of I/O. The Mega handles all of Marlin V1’s low-level tasks, such as navigation and motor control. Custom serial converters and kill state sensor circuit allow the ATmega to interface with all of Marlin V1’s sensors.

Marlin V1's control board, based on the ATmega2560

Marlin V1's control board, based on the ATmega2560

Marlin V1 uses a Carling Technologies sealed switch to kill power to the thrusters while it is underwater. The wiring is placed inside a potting box and is sealed with translucent epoxy for waterproofing. For ease of use, the switch can be operated with one hand and is attached at the back of the sub.

Our system for signal processing utilizes a custom programmed FPGA for calculations which communicates with two pmod ad1’s running at 300ks sampling rate. The amplification boards consists of a 4 stage circuit which isolates the hydrophones from the amplification board using a preamp then conditions the signal utilizing a second order low pass filter targeted at 70 khz with signal becoming undetectable above 100 khz. The third stage applies amplification of 20db and then forwards the signal to a final high pass filter with a 1.6v offset from ground. The new amplification and signal conditioning board is custom designed and manufactured using AD8676 dual channel op amps making them very cost effective and with relatively low signal noise. The circuits where simulated in LTSpice XVII before manufacturing significantly reducing cost of R&D while also making the resulting data usable for the first time in 20 years.

Marlin V1's custom programmed FPGA

Marlin V1's custom programmed FPGA

Software Team

The software subdivision designs, implements, and maintains all programmable elements of the AUV. It strives to create a robust system that is capable of adapting to different conditions and performing complex actions. In order to complete this, the subdivision designs and improves algorithms to manage various aspects of the AUV’s operation, including mission planning, navigation, localization, machine vision, and signal processing.

To manage the complex software system with multiple collaborators, the team uses Git version control. Git allows the software team to work on the same files independently while keeping backups of previous versions of the code. Marlin V1’s software stack runs on the Debian OS (GNU/Linux). Dubbed Aquastorm, it consists of multiple processes that communicate over a shared mutex and named pipes. Each process works independently of the others, while the mutex ensures thread safety. Most software is written in C/C++ and Python.

Interface is the master program that starts each process on the software stack. Each process is run in a separate thread toOur low-level controller runs on the ATMega2560 microcontroller. It connects to Aquastorm, the AHRS, and the thruster controllers via serial UART pins. It uses six PID filters, one for each bearing of the submarine. The resulting PID vector is multiplied by the thruster matrix, mapping the effect of each thruster on each element of the state, to produce the desired thruster power. The state consists of the (X, Y) position, computed by integrating the thrust vectors, the depth, determined from the analog pressure sensor, and the roll, pitch, and yaw from AHRS. Control sends the current state to the control process in Aquastorm, and receives the desired setpoint. It also activates the relays on command. Because of the simple serial protocol, Marlin V1 can be controlled manually through a terminal for testing and debugging use. Furthermore, all configuration variables (e.g., PID gains and the thruster matrix) can be adjusted over serial communication to empirically tune the optimal values on the fly.

In order to robustly navigate obstacles and account for imprecise positioning and observations, Modeling localizes the sub to its environment. Our modeling algorithm uses Monte Carlo Localization, which initially constructs a uniform particle filter. Each particle represents a possible state of the sub. As the particle filter is first set to be mostly uniform, the sub has little knowledge about its surroundings. However, as the submarine moves around its environment, it is able to resample its particles with motor and sensor updates. Eventually, the particles converge upon the actual location of the submarine, leading to successful localization.

Each competition task is associated with a vision function within Aquastorm, that returns an observation based on what objects it detects. Most vision processes initially run preprocessing to generate more contrast in the image. Afterwards, they use a variation of machine learning, color mapping, edge, contour, and blob detection with the aid of the OpenCV library. Our machine learning algorithms utilize the Tensorflow Object Detection API to detect objects within an image.

Marlin V1's vision system in action

Marlin V1's vision system in action

Mission generates a list of goals to complete throughout the competition run. Each goal contains a set of instructions, location, and point value. Based on the location of both the sub and the goal, we can compute an estimated time to completion for each goal, and visit the goals in an optimal fashion, maximizing our point value. Once we select a goal to complete, mission tells the corresponding vision function to start returning observations.

Otolith, written using LabVIEW, runs on the FPGA and reads from the four hydrophones located outside the main hull. The analog-to-digital converter (ADC) receives amplified signals from the hydrophones at 500 thousand samples per second. Using each analog signal, Otolith applies a Butterworth low pass filter to remove extraneous noise, then looks for a ping of the designated frequency. The time at which the ping is detected is recorded for each hydrophone, then the time difference of arrival (TDOA) is computed and sent to the main computer for localization. On the main computer, a small C program receives the TDOAs and computes the location of the pinger using trigonometric ratios between the TDOAs; this method, while introducing a slight built-in error (which decreases as the sub points towards the pinger), is less susceptible to slight errors in physical measurements and ping detection when compared to multilateration (solving the system of hyperboloids), making it much more robust. It sends to Interface the corresponding Gaussian distribution.

Marlin V1's Main Specifications

Weight (in air)

36 kg (80 lbs)

Hull

24 cm (9.5 in) diameter acrylic tube

Dimensions

Length: 0.95 m Width: 0.86 m Height 0.56 m

Propulsion

8x VideoRay M5 Brushless Thrusters

Power

2x 22.2V 16,000 mAh LiPo Batteries (in series)

Underwater Connections

SubConn Power, Circular, Micro Circular, Ethernet, and Coax series

Cameras

1x 1.3 MP Point Grey Blackfly machine vision cameras w/ Theia Technologies SY125M lens

1x 20MP Point Grey Blackfly machine vision camera w/ Computar V0828-MPY lens

Navigation Sensors

Pressure Sensor (Ashcroft Model K1) AHRS (PNI TRAX AHRS Module) Hydrophones (4x Teledyne Reson TC4013)

Main Computer

Intel i7-4790T on Jetway NG9J-Q87 Mini ITX 16GB DDR3 RAM 1TB mSATA SSD

Embedded Computer (Control)

ATmega 2560

Data Acquisition and Signal Processing

Teensy 3.6

AVBotz Logo

© 1999-2025 AVBotz, Amador Valley High School

All materials presented on this site are intended for educational purposes.