Miniature Submarine/ROV

by brittabenjamin in Circuits > Remote Control

39 Views, 1 Favorites, 0 Comments

Miniature Submarine/ROV

IMG_2194.jpg

In this tutorial, you will learn how to create your very own miniature ROV submarine using off-the-shelf components. This is a modification to a project by Ben Finio (linked here) who created an ROV submarine with horizontal movement capabilities only.

DISCLAIMER: This was a student project, and I was not able to get everything working perfectly. What is given here should be enough to create a working sub with complete horizontal movement (and vertical movement with a bit of trial-and-error).

Supplies

For this project, you will need all or some of the following items, or something equivalent for each:

  1. 1x Sharpie for drawing out drill holes.
  2. 1x Sparkfun Arduino Starter Kit (contains wires, breadboard and other important electronic components)
  3. 1x Tupperware Container (to make the submarine chassis). This is the one I used.
  4. 1x 7.4V Lithium Ion Battery
  5. 1x 7.4V Lithium Ion Battery Charger
  6. 1x JST Plug Connector (to connect the battery to the circuit)
  7. 1x 22-Gauge Five-Conductor Ribbon Cable (to communicate between the sub and the surface through a tether)
  8. Do 6- or more conductor cabling if you want to add more components.
  9. Can be substituted for four single-conductor cablings, as was done in this tutorial, but this is easier to prevent getting tangled.
  10. 1x GP2Y0A21YK0F IR Distance Sensor
  11. 1x Loctite Waterproof Silicone Sealant
  12. 1x Toilet Wax Ring Replacement Wax
  13. 1x Roll of Duct Tape (holds down some of the wiring)
  14. 2x L293D H-Bridges (Arduino kit should come with one, so one more is likely needed)
  15. 2x Two-Axis Analog Joysticks (at least)
  16. 4x Underwater thrusters (these are the ones I used)
  17. Optional: 1x waterproof rocker switch, to allow the sub to be turned off/on without removing the lid. This is very convenient to have if you can get one but is not required.

Required items with indeterminant numbers/quantities include:

  1. Zip-ties
  2. Fishing bobbers, to prevent the cable tether from scraping along the bottom of the pool/lake/etc.
  3. Fishing Weights or pool noodles to control buoyancy of the sub
  4. Mounting Hardware the thrusters (may come with the thrusters depending on what you choose)

Equipment that may be required includes:

  1. Drills and Drill Bits
  2. Wire Strippers
  3. Coarse-grit sandpaper, files, or deburring tools
  4. Bathtub, kiddie pool, etc. for testing waterproofness and buoyancy

Wiring

ME 608 Wiring Diagram.png
IMG_2169.jpg
Screenshot 2025-05-15 163426.png

Before building the sub, it is best to start with the wiring to verify that all of the components operate correctly. It is also critical to determine how much space is taken up by your electrical hardware so that you can determine an appropriately sized container for your chassis.

Above on the left I have included a wiring diagram, based on the Arduino Uno R3. The potentiometers represent joysticks in the physical model, with the third potentiometer on the right representing the x-axis of the left joystick (or a third joystick if you so choose for up-down movement). The gearmotors represent the thrusters, while the IR sensor represents the IR distance sensor used on our model. Finally, the 9V battery represents our 7.4V battery. A picture of the physical wiring is depicted in the top-right image.

Some things to note:

  1. Very important: when adding the JST cable, which connects the battery to the circuit, make sure it is NOT attached to the battery. Make sure to put its two wires as far apart from one another as possible, as this will mitigate accidental shorting, which could fry your components. Only connect the battery to the JST when you are sure that the wires will not disconnect from the breadboard, and ESPECIALLY that the wires will not accidentally touch each other.
  2. The joysticks will be connected to the sub through the Four-Conductor tether wire, so make sure to test your wiring with the conductor cabling instead of using jumper wires.
  3. If you omit the waterproof rocker switch, you will still need to place a switch on your breadboard inside the sub. You don't want the sub to always be on since this will drain power, and could be dangerous if the wires become undone inside the sub.
  4. My submarine's vertical thrusters can only go in the up direction with the current wiring scheme. The motors are supposed to be hooked up in parallel to control both motors at once, allowing us to use only 3 digital ports on the Arduino board instead of 6. I had accidentally got it working in both directions earlier but changed the wiring and was unable to remember what I had done. You will most likely need to play with the wiring yourself to get it to work correctly - just don't touch the power or ground wires, as the H-bridge will be fried if you're not careful.

A table is also provided on the bottom-right above for the complete pinout of the Arduino board and components.

Once you have everything wired up correctly, you can continue on to step 2!

Coding

// Modifications made to code by Ben Finio (see link below)
// Modifications made by Benjamin Britt

const int joyVpin = A2; // left joystick x direction
const int motorVup = 3; // vertical motors up pin
const int motorVdwn = 4; // vertical motors down pin
const int motorVen = 5; // vertical motors enable pin

int joyV; // vertical joystick reading (0-1023 from ADC)

int joyVneutral; // vertical joystick neutral

int motorVspeed; // vertical motors speed (0-255 for PWM)

void loop()
joyV = analogRead(joyVpin);
...
Serial.print(" Vertical: ");
Serial.print(joyV);

// set upwards motor direction and speed
if((joyV-joyVneutral) < -deadzone){ // joystick pushed left
digitalWrite(motorVup,HIGH);
digitalWrite(motorVdwn,LOW);
motorVspeed = map(joyV,joyVneutral,0,0,255);
Serial.print(" up ");
}
else if((joyV-joyVneutral) > deadzone){ // joystick pushed right
digitalWrite(motorVup,LOW);
digitalWrite(motorVdwn,HIGH);
motorVspeed = map(joyV,joyVneutral,1023,0,255);
Serial.print(" down ");
}
else{
digitalWrite(motorVup,LOW);
digitalWrite(motorVdwn,LOW);
Serial.print(" stop ");
motorVspeed = 0;
}
Serial.println(motorVspeed);

analogWrite(motorVen,motorVspeed);
}

The code used here is modified from code provided in Ben Finio's ROV guide. The modifications to the code I made, as well as the ones I wanted to, are listed below:

  1. A new set of code was created to control the dual up-down motors, which were not present in their initial design. The logic is mostly duplicated from the other motors, with no special
  2. For the distance sensor, you would add code to read sensor values from the IR distance sensor to feed data back to the Arduino. If the sensor could detect the seabed, the LED on the surface would turn on, warning the submarine operator. Since I was unable to get our sensor working, I did not end up creating my own code for it; we did find a resource for creating code for this particular sensor, which is linked here.

The completed code is attached below in a document below. When the code is uploaded to the Arduino board, open the serial monitor and turn on the circuit to make sure your electronic components function correctly. In my rendition of this project, I found out too late that the distance sensor I bought was non-functional, so I was unable to implement it in the final design. So, make sure to check the functionality of all of your components as soon as possible before continuing on to the next steps.

We will finally begin building the sub starting with our next step.

Picking a Chassis and Preparing Mounting

In this step, we will finally begin putting our pieces together! To begin, measure the size of your assembled wiring, and look for waterproofed Tupperware containers of an appropriate size. I chose this Rubbermaid container for its waterproof design and cheapness. Ideally, you should use a plastic food storage container instead of a glass one, which can shatter if drilled through. Once the proper chassis has been selected, proper assembly of the submarine can begin.

Start by drilling a hole for the tether wiring to go into. I recommend drilling a hole into the lid for this purpose, but you can place this hole somewhere that it won't interfere with the propellor blades. After creating a hole in the lid, mark out where you want to mount your motors using a Sharpie and drill their corresponding wiring holes. When all the locations have been marked, you can then use your drill to drill out the holes.

For the mounting hardware, pick the drill bit you use by finding the closest size to the screw diameter you need, so that the mounts will be tight with little room for water to get in. Ideally, you want the tolerance tight enough that inserting or removing the screw from the chassis requires a screwdriver. Be careful to check that all of your parts fit together in the completely assembled configuration (i.e. all motors and external hardware, with the lid on); otherwise, you may end up drilling extra holes that you don't need, making waterproofing harder. After drilling is completed, use sandpaper to remove any burrs or other imperfections from the surface of the part.

  1. NOTE: if you chose to use a waterproof rocker switch, you would also need to drill a hole for that. It can be placed anywhere, but I would not recommend placing it on the lid. Use a drill bit of an appropriate size and remember to sandpaper the hole to debur it!

For the motor wires, if your motor has a flange or wide portion, I strongly recommend cutting the motor wires so they can fit in a smaller wiring hole, as I did with mine. Remember that the bigger a hole is, the harder it is to waterproof!

Mounting and Waterproofing

IMG_2023.jpg
IMG_2462.PNG

For this step, you will need access to a small body of water to check for leaks. Make sure to have one before continuing!

With the holes drilled, you can begin mounting the motors. Depending on the motors you bought, you may or may not have to buy your own mounting brackets; the motors used in this project came with mounting brackets, screws and nuts. Screw on the motors and affix the nuts as needed and feed the motors' wires through their holes. Position the motor wires inside the chassis for their final configuration and use tape to hold the wires in place for while the glue cures. The tether must also be positioned for gluing; is placed anywhere other than the back of the sub, you MUST keep the wire flush to the sub to avoid the wiring getting tangled in the motors; in my design, I used duct tape to hold the tether to the lid. Once this is done, waterproofing can begin.

To prepare for waterproofing, remove the lid from the chassis (if you have not done so already). If some of your mounting holes are close to the bottom of the lid, use a sharpie to mark the bottom of the lid around the inside perimeter of the chassis. Do not apply sealant above this line, if possible, as this can interfere with the lid's own sealing capabilities.

Next, begin the waterproofing process by applying the Loctite silicone sealant for all holes (including the screw holes), both on the inside and outside surfaces. Double check that the Loctite is completely covering each opening, then let it cure. The Loctite sealant recommends 2 hours minimum cure time, but large globs will take longer to cure so be sure to account for how large of globs you apply. Apply any glue to the lid if you drilled your tether hole there.

  1. Note: for the rocker switch, apply sealant on the outside first, then place the switch after. Be sure to seal the inside once the switch is in place.

Once the glue has cured, put the lid and chassis together, without the electronics, and submerge it in your chosen water body; pay attention to where (if anywhere) the sub is leaking, and by how much. If there are any large leaks, apply more Loctite to all leaks (both big and small) and let the glue cure again. If the leaks are small, using Bol-Wax may be a good option, especially if the leaks are small. However, keep in mind that adding Bol-Wax can make future application of Loctite difficult if not impossible, so use the wax ONLY when you are sure that you won't need to apply more Loctite sealant later.

When you've confident you've waterproofed all of the holes in your sub, you can continue on to the final wiring.

Final Wiring

IMG_2221.jpg

With waterproofing complete, you can now be sure that your sub is waterproof! This means we can test the electronics underwater. Before we can begin that though, we should make sure our sub electronics work properly with our motors, switches, and tether cable in situ.


To do this, you should first place your wiring inside of the sub and wire the motors and tether cables into their proper slots. Add the JST cable to the circuit if you haven't already, and add the battery, in that order. I mention it in step 1, but remember that the battery is always live, so adding the battery first can be dangerous and lead to shorting and electric burns.


With everything wired up, double check the wiring to make sure it's correct. Once verified, turn the switch on (make the circuit live), place the lid on the sub if you haven't already, and try steering the motors with your joysticks. If you have any issues with getting the submarine to work, check the wiring again, or try recharging the battery. If it works, then congratulations! You can move on to the next step.

Waterproof Testing

Screenshot 2025-05-15 191313.png

For this step, you will need access to your chosen body of water again, so make sure it's available before continuing!

With your submarine now working, you should now be able to drive it around in the water! Connect the battery, turn the switch on, and place the submarine in your chosen body of water again. Make sure there is no leaking; if there is any leaking, immediately remove the sub and kill the power. Drain the sub of water, dry it out, and return to step 4 to fix the leaks. If it does not leak, then try steering the sub around. It should sit on top of the water and look like the picture above.

When you can make your sub's motors work from the surface, you can begin the final step: weight calibration!

Weight Calibration

IMG_2233.jpg

In order to properly take advantage of our vertical thrusters, we must make sure our submarine wants to neither rise nor fall in the water column - we want it to be neutrally buoyant. This will be achieved by adding fishing weights to the submarine.

You'll have to play around with the exact amount and distribution of weights necessary to get the sub to be neutrally buoyant, so this will take time. Make careful note of what kinds of weights you use, and how many, so that you can find the perfect total weight to add. Once you get a neutral weight calibration, it should look like the image above, like it's almost "hovering" in the water column on its own.


When the calibration is complete, test the electronics again, making sure to rewire, if necessary, until your submarine works with the new weight. If you've followed everything correctly, you should now have a working submarine!

Conclusion

With that, you should have your very own working miniature ROV! While this might be satisfying enough for you, there is absolutely room for additions and modifications you can make to improve or change the design! Some potential modifications one could make include:

  1. Adding a camera mount for a GoPro, with livestreaming functionality to get a visual link to the submarine below.
  2. Adding a robotic arm to grab or move objects on the lake/seabed - perhaps you can retrieve some list items, or clear debris to get to an area of interest.
  3. Replace the vertical motors with a ballast tank: a ballast would enable finer depth control than vertical motors, while being less noisy, which could make the sub better at following fish or other sea creatures.

Not all of the features I sought to implement were completely realized, so there are still challenges to solve. The omission of the depth sensor was the most glaring issue I had with this build, but there were many others too: drilling too many or too big of holes, accidentally applying sealant too high and breaking the chassis lid's seal, and finding out why you don't play with live voltage sources being among them. Part of me wishes I had more foresight, but as the saying goes, hindsight is 20/20. I want to provide a detailed enough guide for people of the future to not follow the same mistakes I did, and I hope what I've created here provides that.

With that, thank you for following this guide!