Submarine With Continuem Robot Arm to Pick Up Trash From the Ocean Using Fusion 360 and Arduino

by kikoASN in Workshop > 3D Printing

418 Views, 2 Favorites, 0 Comments

Submarine With Continuem Robot Arm to Pick Up Trash From the Ocean Using Fusion 360 and Arduino

Screenshot 2023-06-22 162103.png

Hi everyone! My name is Ahmed Saied Nawar and I'm a grade 11 student at Sharjah American International School Dubai branch. My project was to combine a continuem arm with a submarine and have a bunch of other stuff on it.

The purpose of my project is to make a submarin that can pick up trash from the ocean and to preform tasks in enviroments where humans cant.

My model is fully functioning and shows an understanding of how continuem arms work. I realy liked making this project and thought it would be nice to make a instructables about it i hope you enjoy making it aswell.

I also had a quadruped that i built using this instructables: https://www.instructables.com/Arduino-Quadruped-Robot-Walks-Skims-Grips/

Supplies

ok there are 2 main parts for this project

the cost of this project will depend on what servo motors you get and the items you may or may not have around youre house like the hangers and the water bottle

thiere is the contenuem robot arm part

its supplies are

  • 3d printed parts
  • 1- screw and 3- springs on the grriper
  • 1- arduino
  • 2- powerfull servo motors ( for me mg 995 servos where ok as long as the arm was not too heavy but i would recomend getting servos a bit stronger that it)
  • 1- HW-504 JoyStick Breakout Module
  • rope

thiere is the submarine part

its supplies are

  • 2- metal sheets
  • 1- 5 gallon water bottle
  • 1- air pump
  • 2- waterproof servos ( or get normal servos and put a plastic bag around them to prevent water from going in)
  • 1- waterproof motor
  • 3- packs of zipties 50 in each ( but this was with me making many mistakes and loosing a lot of them so just get 1 pack and see if you need more)
  • 1- roll of tape
  • 1- arduino nano
  • 4- metal hangeres
  • 1- mini breadboard
  • 1- camera (optional)
  • 1- metal detector (optional)
  • 1- HW-504 JoyStick Breakout Module
  • 3d prined parts
  • 1- arduino uno r3
  • 1- water proof servo motors
  • 2- buttons
  • 1- mini breadbourd
  • 1- weights

Making the Arm

robot tentacle project
robot tentacle using 2 servos Arduino and joystick
robot tentacle controlled with 2 servos Arduino and joystick 🕹️
working on continuem arm connected to a submarine
Screenshot 2023-06-22 154817.png

For this step it is a bit tedious but you basiclly print the same 2 pieces again, and again, and again untill youve reached a desighered length which will be decided by you.

I am going to tell you also in this step how I desgined it in case you want to change the desghn or improve it later on.

Basiclly I got a hexagon ( but you can use any shape the has 4 sides or more or you can use a circle) and I put 4 holes on each side of it. Then I made a hinge and placed it on top of the hexagon. I made the hinge by putting a rod through a hole attaching both ends of the rode to a rectangle piece and the hole to a base at the bottom check the pictures of you dont understand.

So I got the pieces and I started glueing them perpenducal to each other this would allow the arm to move up down left and right.

Then I got the code that I will mention at the end and the cercuit diagram that I will also mention at the end and I attached servo motor 1 to a holder for servo motor 2 and i attached servo motor 2 to a x shape with 4 holes at the end of each line then I attached the rope through all the holes on the arm to the holes on the x shape and i tied them at each end. then I attached it to the bottom of the bottel by making holes on the bottom and ziptying servo motor 1 to the bottle end.

And that it for the arm part the reason I decided to use a continuem arm is because it is more flexible and all the electronics are at the begining of it except for a water proof motor at the end of it that moves the grriper which I will get to now

The Gripper

adding gripper to the end of the arm

This was a easy step all I had to do was get 3 claws and attach them to a mechanisim that made them close, but I over complicated the printing proces by making the 3 claws flexible and able to adapt to watever the hold or pick up.

So I got a triangle and I made some points thinner than otheres where I wanted it to bend. Then i made a base with 3 poles and a trianlge that can go thou these pole with a place where you can put a screw through, then i attached springs to it to make it so it wants to stay open and the screw when turned is making it close. check the pictures if you dont understand. and make the holder depending on what servo motor you use

The Sumbarine

added a steering system for the submarine
adding water pump inside it
Screenshot 2023-06-22 152238.png
Screenshot 2023-06-22 154835.png
Screenshot 2023-06-22 154848.png
Screenshot 2023-06-22 154857.png
Screenshot 2023-06-22 154906.png

(In the video it shows the servo connected directly to the motor but later on a attached fins on them insted of the motor and had the motor a but further away from them.)

We already mentioned how to attach the arm to the submarine so now i will tell you how to make the submarine

Ok what you have to do is get the bottle and cut a portion of of it to shorten it then make holes and ziptie the 2 ends together but before you do tha put the air pum inside leaving the intake part inside and have the part the makes the air go out outside the bottle. ( this part is the thing that makes it go down)

Then put the arduino nano iside it aswell and connect the 2 servos by glueng the 3d printed srevo horn ( which is meant for mg 995 servo but if you use a diffrent servo motor then just change it depending on what servo motor you are using) to the second servo and have 1 fin on top of the servo and 1 fin on the bottom of the servo as shown and the second servo horn to 2 fins and the joystick to it as shown in the picture shown above and connect the fins to the servos as shown in picture. Then get the metal rods and attach a water proof moter to the 2 rods by bending them and ziptying the motor to them. ( this part is the steering mechanisim)

And then put the arduino uno r3 inside aswell and connect it to the servo with the weight on it as shown in the cercuit diagram shown bellow and connect it to the button to controll it. ( this part is the weight dropping part that makes it go up)

Then get 5 metal hangeres unravel them and glue them to the arm at one end using the 3d printed parts and ziptie them to the neck of the bottle at ther end then get tape and wrap it around the hangers a bunch of times covering the whole submarine then get the metal sheets and cut them to the needed size to cover each section and ziptie them to the hangeres. Then wrap them with tape a couple of times aswell making sure that there is no chance for water to enter.

Now if you want attach a water proof camera to the top of it but make sure you can see it while its under water from the surface and if you want attach a metal detector that can tell you on the surface when it detects metal under water.

And thats it for the body.

Cercuit Diagram for the Arm and Its Code

Multiple Servo Motor Control with Joystick and Arduino

this video shows how to wire it (this is not me in the video I used his video to make my project)

here is the code for it


#include <Servo.h>

  

Servo servo1;

Servo servo2;

int joyX = 0;

int joyY = 1;

  

int servoVal;

  

void setup() 

{

 servo1.attach(3);

 servo2.attach(5);

}

  

void loop()

{

  

 servoVal = analogRead(joyX);

 servoVal = map(servoVal, 0, 1023, 0, 180);

 servo1.write(servoVal);


 servoVal = analogRead(joyY);

 servoVal = map(servoVal, 0, 1023, 70, 180);

 servo2.write(servoVal);

 delay(15);  

}

Cercuit Diagram for Steering and Its Code

Screenshot 2023-06-22 143926.png

and here is the code


#include <Servo.h>

  

Servo servo1;

Servo servo2;

int joyX = 0;

int joyY = 1;

  

int servoVal;

  

void setup() 

{

 servo1.attach(3);

 servo2.attach(5);

}

  

void loop()

{

  

 servoVal = analogRead(joyX);

 servoVal = map(servoVal, 0, 1023, 0, 180);

 servo1.write(servoVal);


 servoVal = analogRead(joyY);

 servoVal = map(servoVal, 0, 1023, 70, 180);

 servo2.write(servoVal);

 delay(15);  

}


  

Cercuit Diagram for Dropping the Weights and Its Code

Screenshot 2023-06-22 150004.png

for this just add a whight on the servo and make it when the servo moves it drops the weight.

here is the code and be sure to add the servo.h library it is requered for all of the codes


#include <Servo.h> // add servo library


#define sw1_pin 5


#define sw2_pin 6


Servo myservo; // create servo object to control a servo




volatile boolean sw1 = false;


volatile boolean sw2 = false;




uint8_t sw1ButtonState = 0;


uint8_t sw2ButtonState = 0;




uint8_t lastsw1ButtonState = 0;


uint8_t lastsw2ButtonState = 0;




void setup() {


 Serial.begin(9600);


 pinMode(sw1_pin, INPUT_PULLUP);


 pinMode(sw2_pin, INPUT_PULLUP);


 myservo.attach(9); // attaches the servo on pin 9 to the servo object


}




void loop() {


 


   checkIfSw1ButtonIsPressed();


   checkIfSw2ButtonIsPressed();




   if( sw1){


   Serial.println("sw1");


    sw1 = false;


    myservo.write(20);


    delay(15);


   }


   else if( sw2){


   Serial.println("sw2");


    sw2 = false;


    myservo.write(170);


    delay(15);


   }


  


              // waits for the servo to get there


}




void checkIfSw1ButtonIsPressed()


{


  sw1ButtonState  = digitalRead(sw1_pin);


 


  if (sw1ButtonState != lastsw1ButtonState)


 {


  if ( sw1ButtonState == 0)


  {


   sw1=true;


  }


  delay(50);


 }


  lastsw1ButtonState = sw1ButtonState;


 }




void checkIfSw2ButtonIsPressed()


{


  sw2ButtonState  = digitalRead(sw2_pin);


 


  if (sw2ButtonState != lastsw2ButtonState)


 {


  if ( sw2ButtonState == 0)


  {


   sw2=true;


  }


  delay(50);


 }


  lastsw2ButtonState = sw2ButtonState;


 }

and thats it comment on any questions you have and i will try to answer them soon.