Diy Rc Submarine
by Printerforge in Circuits > Remote Control
24252 Views, 179 Favorites, 0 Comments
Diy Rc Submarine
In this instructable, I will show you how I made a cool submarine that you can control in water.
Dive into an underwater adventure as you build your very own RC submarine from scratch!
Hi, my name is Ben, and I’m 15 years old. This is my journey in building DIY RC vehicles. I started with building an RC car, which you can find here. I’ve always wanted to make an RC vehicle on the water, and I thought that this challenge would be great for me. In this instructable, I will show everything it took me to build this submarine from a scribble on a piece of paper to a masterpiece that can rise and sink in the water. I will show you how I faced each question and problem.
I have this instructable sorted out:
1-8: planning
9-11: modeling
12: 3d printing
13: code
14: problems
15: Finish
16-24: assembly
25: conclusion
Supplies
These are all the supplies I used to create this. If my parts don’t look the same, it’s because I used other parts that I had lying around, but I made sure to check the specs on all of the parts which means that even though they may look a little different, they work the same.
Most of this stuff has links although the generic things or the tools don’t.
- Materials
- Filament (I just used PLA)
- hot glue
- CA glue (optional)
- powder cast
- Parts used
- 2.5mm wire
- 1mm piano wire
- threaded inserts
- dry bag
- m3 screw kit
- Electronics
- Flysky controller/receiver
- MPU 6050 accelerometer
- waterproof Mg995 servos
- Arduino Nano (you can buy others that are a lot cheaper but make sure it is/based off of ATmega328 board)
- breadboard wires
- 18 AWG wire
- wire
- A2212 brushless motor kit
- LEDs (optional)
- resistors
- NPN transistors
- pumps
- prototype PCB board (optional)
- Lipo battery
- Tools
- 3d printer
- soldering iron
- threaded insert tips
- hot glue gun
- multimeter
- m3 allen key/wrench (if you buy from the link it should come with one)
Background
I’ve always wanted to make an RC vehicle that could work with water but never decided to make a project for it. I’m a huge fan of planes, so my first water-ish vehicle was a plane with pontoons to land on water. It ended up working very well, but I’ve always wanted to go one step further, so I decided to make something specifically for water. To start this project, I went to make an RC boat. Although as I was planning on starting this project, I wanted to make something more complicated to challenge myself. After all, I thought it was just a motor, ESC, and one servo for steering. As I was coming up with other ideas, I thought of making a submarine. This was much more complicated as I would need to have a way to propel it using motors, have two servos for controlling the rudder, a way to rise and sink, and with all those electronics handle water pressure and keep everything watertight. I decided that this would be a cool challenge, and I want to show my journey step by step of my problems and solutions. Finally, I also wanted to have the same rule which was that everything was created by me. That meant I could gain inspiration from others but couldn’t use their files or code.
When I started I thought this would be a simple 1 foot creation, but this turned out to be the largest and most complicated project I’ve ever attempted. This project grew to almost be 4 feet long!!
Sketch/questions
I first decided to sketch out my ideas. I want to start by saying that I don’t know much about submarines. Compared to cars and planes, I know barely anything about submarines. All I knew was how it turned using the four rudders. This led me to do lots of research. Before starting this project, there were many questions that I would need to answer.
1. What would my shape be?
2. How do I propel it while keeping everything watertight?
3. Should I have all the electronics waterproof or make a watertight container?
4. How would I have it rise and sink?
To research how to answer these questions, I went on many websites and watched many, many videos. Sadly, there’s a lot less information about this compared to any other RC vehicle. For example, if I research DIY RC cars, I would get hundreds of people who’ve made them on instructables or even YouTube. However if I research RC submarines on instructables, there are none, and on YouTube, there are only a few. This made it much harder to find answers to things.
Shape
To start, I needed a rough shape of what my submarine would look like. I could go for a more futuristic look or a military look. I decided to go with a military look because I thought it would be cooler. I chose to go with the Russian Akula submarine (looks like every other military submarine). I decided to go with that look in mind, but it’s not a 100% copy. Now I needed to figure out how to propel it.
Propelling It
Once I had the shape, I needed a way to propel it. I could either go the super simple route, which was using a large pump, or I could use a motor with a propeller. I went with the motor and propeller as I knew it would be stronger. I was planning to use a DC motor because it would be cheap. However, as I was figuring out how to propel it, I realized that it was better to go with a brushless motor. I chose this because a DC motor isn’t as strong and it’s not waterproof. That would lead me to have to waterproof the shaft, which would require a lot of aligning and could end up costing more time and money. The nice thing about a brushless motor is that it’s almost waterproof. All you need to worry about would be the bearings, but you just need to dry them after or lubricate them. Sadly, it doesn’t work well in saltwater, although there are many ways to fully waterproof it so it can also work in the water. You can also go the simpler but more expensive route of buying a waterproof brushless motor. Another great thing about brushless motors is that they are much stronger. With all this in mind, I decided to go with a brushless motor. It would be cost-effective, simpler, and stronger.
Waterproofing Everything
Next, I needed to figure out how to waterproof everything. There were two ways I could go.
1. Waterproof everything with sprays
2. Have a dry box where everything could fit.
There were pros and cons for all of these. I decided on a hybrid idea. I had the servos and motor be waterproof, and the rest of the electronics like the Arduino Nano, battery, and ESC inside a dry box. One of the main problems with a dry box is that since it has so much air, it’s hard to sink the submarine due to air being very buoyant. To fix this, I went with getting a zip-up waterproof bag. This allowed me to remove all the air that could happen while still having everything waterproof.
Rise and Sink
This was the hardest part. This would be how I would have it rise and sink. There were three ways people did this.
1. The snorkel method: A two-way pump that can pump water in or out of the tank giving more air or filling the air with water. The problem with this was that the submarine couldn’t fully sink due to the snorkel tube needing to allow air in or out. Also, that would add risk because if you go too deep, the snorkel tube gets covered up, which would make you sink, and you could lose your submarine.
2. A WTC (watertight cylinder) that works using syringes and pressure. That would be very cool but also very complicated. It would also be harder because you’re handling pressure.
3. Just using the rudders. If you use the rudders, it will allow you to move up and down, although the problem is that you need a lot of horizontal distance because you need to be moving forward.
In the end, I decided to do it my own way. I found out that I had some cheap water pumps, and I could use them to move the submarine up and down. The only downside of this would be that you would need four (two on top/bottom for stabilization) and you would need a transistor because an Arduino can’t provide enough power to run the motor on one GPIO pin.
Pumps (continued)
There were some pros and cons about making the pumps. One con was that if the pumps weren’t below the water level, they wouldn’t work. So for the top, if I wanted to go down, I couldn’t because the pumps weren’t below the water, and even if they got water, they would shoot like a fountain and not propel the submarine. To fix this, I decided to use the rudders to move the submarine until it submerged the pumps, and then I could activate the pumps. I also would have the submarine be perfectly buoyant. One pro was that I could have auto stabilization as I could rotate the submarine if I needed to. I decided to use an MPU6050 accelerometer because I’ve worked with them before, and they are really easy to code. This would also make me need to use an Arduino or microcontroller. I decided to use my Arduino Nano from my RC car. The Arduino Nano is nice because it has a relatively small footprint, which means that it wouldn’t take up much room and it also was very easy to code. If you want to use a different microcontroller, you can, but the code will need to be changed, and it needs to be able to read Ibus.
Shape Continued - PVC
At first, I was planning to use a PVC pipe for the inside. I thought of this because it was cheaper, stronger, and already waterproof. However, as I kept planning this, I decided to 3D print it. To start, I was planning to waterproof it, but then I realized that I would just use the bag. Another thing was that it would be hard to assemble. If I wanted to assemble it, I would have to cut the PVC into sections. Then I would need to add connecting rods to screw it in place, which would make it harder to waterproof it. In the end, I decided to go with 3d printing it all. If I used 3D printing, I could just screw it all together and If I ever needed to open it, I could. I also added a hatch so I could access the bag if I needed to.
Modeling Part Holders
Next, I needed to model where to put and hold the electronics. Instead of modeling all my electronics, I went to a website called GrabCad. I went with GrabCad because it offers perfect model replicas. (It is basically a professional Thingiverse or printables) I searched in the library for the servo which was an MG995 servo and found hundreds of results. Most people tend to upload a STEP file (editable model file) which you can directly import into Fusion 360. I then imported the motor I had, which was an A2212 motor. Before combining it into the model, I needed to add tolerance. Most makers on GrabCad measure in very high precision, which is great sometimes, but a 3D printer needs tolerance. To do this, I created my own body which was a little bigger (.25mm). That allowed enough space for the electronics to perfectly fit. Finally, I added some wire routing and combined it all with the cut tool.
Modeling Propeller
To model the propeller, I needed to research how to make propellers on YouTube. Luckily, there are many videos on how to do this. Although most videos were for boat propellers, they were mini 3-blade propellers which wouldn’t work for my submarine. As I was researching, I found out that some people used old CPU fans as propellers. I then researched how to design a CPU propeller and found this video here.
Modeling
To start, I used 3D sketching. I never worked with 3D sketching in Fusion 360, but as I watched the tutorial, 3D sketches made more sense. To model this, you first extrude the base cylinder. You then create a top sketch and give the angles you need. I had to experiment with that step. Once you do the top, you need to do the bottom sketch. It used the same method. Now, you need to use a 3D sketch to connect the top sketch to the bottom sketch. Next, you needed to use the patch tool in the surface tools. Once you do that, you thicken it to become an actual body because surface tools are like sketches and don’t have any 3D dimensions. Lastly, you need to add some finishing touches like smoothing it out and adding a hole for the motor shaft to fit in it. You can view my timeline at the bottom for even more detail.
I had to make a few prototypes due to being too big or too small.
Downloads
Modeling Finishing Touches and Finish
Now that the important parts were done (base and electronics), I could move on to the details. I didn’t add many details because I’m not great at that, although I did add some rods on the top, a control deck, lights, and finally a stand for display.
Here’s my finished model. I hope I gave enough detail. If you have any questions about the model, you can view my timeline video at the bottom or see my STEP file. If you still have a question, feel free to comment.
3D Printing
Now we need to 3D print it. Luckily, because we want it hollow, it won’t take much time or filament! However, one thing to keep in mind is the orientation. Due to the 3D printer printing layer by layer, when it gets to the top of a rounded object, it starts to look blocky due to the layer lines. So to avoid this, we orient it so that the roundness is on the X and Y axis. This allows the printer to print the round surface with one layer which will look better. However, if you’re planning to sand and spray paint this, you don’t need to worry about this.
Code
The last part before the assembly was coding. Coding for me is always the hardest because I’m not that good. To start, I needed to prepare what I would code. I needed to work with iBus (FlySky), MPU6050 (accelerometer), and servos. Luckily, I’ve worked with all of these before. I noticed that I didn’t explain much about the code in my RC car instructable. In this one, I will explain how I coded this. To start, I needed to code iBus. iBus is fairly easy to code as it starts with reading each channel. Then I created a spreadsheet of the FlySky’s lowest signals and highest signals. Finally, I coded it so if the channels hit a certain amount, then it activates the output to be on or off. To code the accelerometer, I needed to figure out which axis I would be using. I used some example code here. I then needed to code the accelerometer to calibrate. I had it take multiple samples, average them, and then make that zero. Now since I won't be able to listen through a speaker and the controller won't tell me I decided to use the Arduino's built-in LED. I had it powered on and off at certain times to explain what was happening. Then I made it so that if it's un-level, then it will re-level by powering certain GPIO pins. I was planning to have another axis for the rudders but I didn’t think it was necessary. So I didn’t need to work with the servo motors because they would be directly connected to the FlySky receiver.
Overall, this code wasn’t as hard because I’ve worked with all these components before and Arduino’s libraries make it very easy.
Problems
Sadly, when you make your own designs, you most likely encounter problems. Here were some of my problems:
- I didn’t add holes in the model for the LED wires, so I fixed it in Fusion, and I also was able to just drill a hole for them, meaning I didn’t need to reprint them.
- I accidentally mirrored the top and bottom pumps to the right, but they didn’t align correctly. I was supposed to make a copy and rotate them 180 degrees instead. Unfortunately, that left me to have to reprint them.
- Finally, the biggest problem was the servos, push rod, and rudder base. I first printed them in 6 parts, but that made it really fragile to glue as everything that wanted to move, and even when they glued, they were still very fragile, which wasn’t good with a part that important. Lastly, the model didn’t allow me to fix any problems, so it wasn’t controlled if I needed to fix something. This led me to have to disassemble and reassemble it 5 times. If you ever work on a project, I highly recommend that you allow parts that will probably need to be fixed to be easily disassembled and controlled. That could be by snap-fit parts or what I did which was screws.
Finished
I did it! I created my own functioning RC submarine. Overall I was incredibly proud of my achievement. I launched it on its maiden voyage in my pool!
Assembly (wire Extension)
I will warn that this is a very complex project and you will need to be skilled at electronics (soldering), and 3d printing/assembling.
To assemble this we will start with the hardest parts which is the back.
First, we need to extend the motor wires. You’ll need to cut at least 20cm of wire. Next, we need to solder the wires together. If you’re having trouble bonding them I recommend you watch this video. It basically uses a thin wire to wrap around the thick wire and bond it. Once you solder it you’ll need to heat shrink it to keep the wires waterproof. If there’s some gap between the heat shrink and wire then you may want to use hot glue to seal it.
Once you finished wiring all three wires screw the motor mount to the metal plate.
now we’ll extend the servo motor wires. This is much easier to solder. Cut about 19-20cm. That will be more than enough.
Back Cover (mount Motor)
Now screw the 1st screw into the 3d print. Then zip tie the wires through the holes. Make sure that they’re tight to prevent them from interfering with the rudders. Finally, trim the zip tie ends.
Rudder Part 1
Now we will be working on the hardest parts. We will need to make the rudders. To start we need to screw the servos into the mount. Then grab thin your thin rod. You will then Z bend it and then wire it through the servo rod. Next, we will set up the rudders.
Now the problem is because the rudders are perpendicular which results in it being really hard to assemble. We will start by assembling the first set. Make sure to double check which set you use as one has the holes closer to the back and one is closer to the front. First, cut 2 metal rods 18-19cm and glue ONE rudder to the first metal rod. For the second metal rod, we will be assembling the entire thing
Your setup may differ from mine so I recommend checking and measuring that everything will fit before you do this step. Now we will glue the 3d print horn for the metal rod. I needed to glue it about 2 cm in but yours may differ. Before gluing the horn make sure it's orientated the correct way you want it. It should be perpendicular to the front of the rudder. See my second picture where it's glued. Finally, once the metal rod's horn is glued then glue the rudder. That should be it for the second metal rod. Now set it into the print. Align the z bend rod to the metal rod and cut it. Then z bend the rod and fit the metal rod's horn into the servo. Now if you move the servo it should move the rudder the same way.
Rudder Part 2
Now we will work on the 1st metal rod. First wire the servo z bending the metal rod. Next, align the metal rod’s horn where you want it and draw a line where it will be. Then glue the horn in place. Now you need to glue the rudder to the metal rod without gluing it to the base.
Once you glue the 1st rudder add on the motor mount or cover. Glue it in place but don’t use too much glue. I just put 1 drop of hot glue on each of the 4 corners. Then glue the top rudder onto it. Finally, screw the last 3 screws for the motor. That should hold the back together and then the 2 large metal rods should hold the front together.
If you made it this far without any problems great job as this was the hardest part.
Preparation
Now we will prepare some of the main parts. This will be solder pressing threaded inserts and gluing all 4 motors. Also, cut 2 metal rods (length).
Now we will fill up the ballast tank which will keep it upright and keep it buoyant from the air in the bag.
Electronics
Now we will work on the electronics. There are a lot of things and it's very complex so I used a prototype PCB board. You can see the wiring diagram too. Before plugging in a battery if you have a multimeter I recommend you check for shorts. To do this enter it into resistance mode and when your 2 probes make a circuit it will show 0 or it will beep. Finally, upload the code to the Arduino nano. If you want to you can also wire lights.
Code:
when you plug it in the accelerometer will need to calibrate. Here’s how the arduino’s light will flash.
Calibration Waiting Period:
- The LED will flash on and off for 0.5 seconds for the duration of the waiting period, which is defined by calibrationTimeInSeconds.
Calibration Samples Collection:
- During this period, the LED does not flash. It remains off while the calibration samples are being collected.
Calibration Finish Period:
- After collecting the calibration samples, the LED will again flash on and off every 0.5 seconds for the duration of the finish period, which is defined by finishTimeInSeconds.
If you want less or more time you can change the number.
Downloads
Assemble Parts
Now we will slide the 3d prints in order. Make sure to include the wires. You can glue print to print, just the rod or glue everything. I can't really explain it through photos so look at the step file and see how it assembles. Don’t glue the top parts to the base.
Glue Top Parts/bag
Glue the top part together but DON’T glue it to the model. I have 4 screws to hold the top and base. This allows you to place a battery inside and fix electronics if needed.
Bag
I highly recommend going with a clear bag as if you chose a colored bag you won't see the electronics.
Now cut a tiny hole. (don’t do what I did and cut a big hole. A little hole is really big for the wiring) Then use connectors and connect them to the Arduino or how ever you want. Finally, super glue the gaps to fully seal it. The 2 servo connectors and motor wires should go all the way into the bag and then glue them. Make sure that you connect all of the connectors inside the bag.
Finishing Touches
Next, add the 4 details. These are all optional. There is a motor cover for the back, and 3 decorative pieces on the top. Simply insert 2 metal rods and glue them on.
Finally, you can create the stand. It has 5 parts and uses metal rods to glue the 2 halfs together.
Conclusion and Thanks
Although submarines can be boring to play with, the best part is making them. I really got to see myself grow compared to my RC car. I got to improve my skills in Fusion 360, coding, and problem-solving.
I want to thank you guys if you made it all the way through reading this and also Autodesk for providing Fusion 360 to students for free as I wouldn’t have been able to do most of my projects without it. I hope you enjoyed this instructable and learned at least one thing. If you do decide to make this yourself, I would love to see it. Also, if you guys have any questions, comments, or ideas for improvement, I would love to hear them.
Honestly, there’s not much to add on a submarine but I’m thinking about adding a camera and maybe creating some cool torpedos to play with. After realizing how much fun I had with this I may make a smaller version with torpedos that you can play with friends. Like I said I really hope you learned something whether that was in my research, problems, or my assembly.