# Underwater Drone: Microcontroller Dilemma

**URL:** <https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840>\
**Category:** Product Design\
**Created:** [September 21, 2024, 6:55pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840 "2024-09-21T18:55:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 6:55pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/1 "2024-09-21T18:55:53Z")

</div>

Hi,

I’ve just started working on a larger project involving the development of an underwater towed drone/ROV. I haven’t begun building yet, but I’ve been working on the design. What I’ve come up with is essentially an underwater glider without a tail rudder, designed to be towed behind a ship. The drone will be controlled from the ship via a tether, as I’m not planning on using any wireless communication underwater. It will continuously transmit images to the surface using something like a Raspberry Pi.

The goal is for the drone to dive to a user-defined distance from the seafloor and maintain that depth until instructed otherwise. I plan to use two servos to control the drone’s roll (via two ailerons) and either servos or a linear actuator to control elevation/depth, which will be managed by a PID controller. The drone will be equipped with several sensors, including two sonars: one for measuring the distance to the seafloor and another for detecting obstacles. It has already been predetermined to use the Ping2 sonar from BlueRobotics. To measure pitch, roll, and other movements, I’ll be using an IMU. Additionally, there will be leak sensors for safety.

Here’s my main question: I need to decide on the best microcontroller for the project. A pre-made flight controller would be the obvious choice, but I’ve been tasked with building everything from the ground up. My biggest concern is the potential delays caused by multiple serial communications, as all the sonars use serial interfaces. While they have Arduino libraries that can utilize either software or hardware serial, I worry that this might affect the PID controller's performance.

I have a few options in mind:

1. Use an Arduino Mega as a sensor hub (as it has several hardware serial ports) and two Arduino Nanos as control units. The Mega would supply the Nanos with sensor data using serial, CAN BUS, SPI, or I2C (although SPI or I2C might not be ideal due to potential wire length issues).

2. Use an ESP32, which is significantly faster and has three hardware serial ports.

3. Use the Raspberry Pi as the main controller, with two Arduinos acting as sonar data collectors. Though I’m concerned the Raspberry Pi might not have enough pins.

4. Use LabVIEW MyRio, which we have available. It has plenty of outputs and is quite fast, but I dislike working with it because it's hard to make it communicate with other hardware and its outdated and proprietary.

I would appreciate any advice or feedback. Thank you for reading!

**TL;DR:** I’m designing a towed underwater drone that transmits data to a ship. It will use several sensors, including sonars, to maintain a set distance from the seafloor. I’m trying to decide on a microcontroller, with concerns about serial communication delays affecting the PID controller. I was thinking of using either Arduino, ESP32, Raspberry Pi, or LabVIEW MyRio. Any suggestions?

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [September 21, 2024, 6:59pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/2 "2024-09-21T18:59:33Z")

</div>

How will the cost of your completed project compare with current commercial devices? Including the shipboard control station?

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 7:22pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/3 "2024-09-21T19:22:36Z")

</div>

Luckily it will be a one off. I have most of the parts at hand already, so it will be cheaper than buing a commercial model - but problebly not better!

---

<div class="post-metadata">

**Author:** ![zwieblum](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zwieblum/32/427702_2.png) [@zwieblum](https://forum.arduino.cc/u/zwieblum)\
**Post date:** [September 21, 2024, 7:23pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/4 "2024-09-21T19:23:48Z")

</div>

How are you going to communicate under water?

---

<div class="post-metadata">

**Author:** ![JohnSan](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsan/32/1101958_2.png) [@JohnSan](https://forum.arduino.cc/u/JohnSan)\
**Post date:** [September 21, 2024, 7:35pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/5 "2024-09-21T19:35:35Z")

</div>

Reading the post should make that clear.....

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [September 21, 2024, 7:41pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/6 "2024-09-21T19:41:21Z")

</div>

Then you must have the test vehicle parked close by so you can build the central control station in conjunction with the drone. Can't test one without the other. Lucky you!

---

<div class="post-metadata">

**Author:** ![JohnSan](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsan/32/1101958_2.png) [@JohnSan](https://forum.arduino.cc/u/JohnSan)\
**Post date:** [September 21, 2024, 7:49pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/7 "2024-09-21T19:49:36Z")

</div>

Maybe make a list of all the on-board modules, what data needs to be transferred to and from them.  
Some modules (PID) depth controller will only have a setpoint value sent occasionally, so very little comms time required.  
Presumably, there could be more than one comms link?  
Eg. One for control and others for data?

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 7:49pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/8 "2024-09-21T19:49:51Z")

</div>

Thats true, lukily though a control unit is already in the making.

---

<div class="post-metadata">

**Author:** ![zwieblum](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zwieblum/32/427702_2.png) [@zwieblum](https://forum.arduino.cc/u/zwieblum)\
**Post date:** [September 21, 2024, 7:50pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/9 "2024-09-21T19:50:26Z")

</div>

Nop, does not.

---

<div class="post-metadata">

**Author:** ![JohnSan](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsan/32/1101958_2.png) [@JohnSan](https://forum.arduino.cc/u/JohnSan)\
**Post date:** [September 21, 2024, 7:53pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/10 "2024-09-21T19:53:07Z")

</div>

"Controlled by the ship via tether "gave me clue... ?

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 7:57pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/11 "2024-09-21T19:57:44Z")

</div>

Hi, yeah that might have been smart to include one in the post. The list is essentially in the making as most of the exact sensors havent been chosen yet. I havent set for any PID controller yet, but I was thinking of just making my own, as I have done that in the past. Although it will be a bit more tricky with servos due to the nature of how they are controlled.  
The setpoint will only be set on startup, so it shouldt have to be updated often. Although calibrating the PID will require a lot of trafic.

But yes. There will be two coms links as of now and one powerlink.

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 8:01pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/12 "2024-09-21T20:01:25Z")

</div>

The tether will most likeliy be something like this: [https://bluerov-solutions.com/produkt/fathom-rov-tether-rov-ready/](https://bluerov-solutions.com/produkt/fathom-rov-tether-rov-ready/)

---

<div class="post-metadata">

**Author:** ![paulpaulson](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulpaulson/32/363643_2.png) [@paulpaulson](https://forum.arduino.cc/u/paulpaulson)\
**Post date:** [September 21, 2024, 8:02pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/13 "2024-09-21T20:02:32Z")

</div>

> [@soer8995](#):
>
> Any suggestions?

Hello [soer8995](https://forum.arduino.cc/u/soer8995)

Start with a top-level block diagram of the project to identify all hardware components, interfaces and their dependencies.  
On this basis, a hardware and software design can be started.

hth

---

<div class="post-metadata">

**Author:** ![zwieblum](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zwieblum/32/427702_2.png) [@zwieblum](https://forum.arduino.cc/u/zwieblum)\
**Post date:** [September 21, 2024, 8:10pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/14 "2024-09-21T20:10:32Z")

</div>

Please post a link to the datasheet of the tether, otherwise it's a guessing game.

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 8:14pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/15 "2024-09-21T20:14:27Z")

</div>

Hi, I really appreciate your feedback : ) Thats something I am currently working on at the moment, but seeing its my first time doing it at this scale, it is a bit overwhelming. I've come to the part where I have to select the exact hardware. Unfortunatly some components, like the sonar, is predefined. The issue im mostly having is my inexperience with the limitations of some microcontrollers, as some of my hardware choices depends on what the different controllers are actually capable of.

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 8:17pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/16 "2024-09-21T20:17:02Z")

</div>

I am quite certain that it is this model. [https://bluerov-solutions.com/produkt/fathom-rov-tether-rov-ready/](https://bluerov-solutions.com/produkt/fathom-rov-tether-rov-ready/)

they state: _The tether carries four unshielded twisted pairs (UTP) of 26AWG wire. These pairs are colored and arranged in the same fashion as a Cat5 networking cable including cross-talk resistance_

---

<div class="post-metadata">

**Author:** ![paulpaulson](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulpaulson/32/363643_2.png) [@paulpaulson](https://forum.arduino.cc/u/paulpaulson)\
**Post date:** [September 21, 2024, 8:20pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/17 "2024-09-21T20:20:56Z")

</div>

Understood

Then simply start with the I/O flagship Arduino Mega in prototype design.

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 8:34pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/18 "2024-09-21T20:34:28Z")

</div>

Thank you. I will give that a try. Hopefully its fast enough for the task : )

---

<div class="post-metadata">

**Author:** ![zwieblum](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zwieblum/32/427702_2.png) [@zwieblum](https://forum.arduino.cc/u/zwieblum)\
**Post date:** [September 21, 2024, 8:50pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/19 "2024-09-21T20:50:42Z")

</div>

Don't want to spoil the fun, but that's no datasheet, only marketing talk omitting the important parts in a most creative way. From the data given it most likely works for RS485 and CAN, but not for 1MBit (or more) with some ethernet protocol.

---

<div class="post-metadata">

**Author:** ![soer8995](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@soer8995](https://forum.arduino.cc/u/soer8995)\
**Post date:** [September 21, 2024, 9:05pm UTC](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840/20 "2024-09-21T21:05:17Z")

</div>

Unfortunatly their datasheets arent readily available on their website. From what I can gather, it will do around 10mbit with a 60m cable. If you use it as a Cat5 cable.

[Next page](https://forum.arduino.cc/t/underwater-drone-microcontroller-dilemma/1303840.md?page=2)
