This is how my project got started. I had seen a demonstration that a brush-less motor can just run underwater with (hopefully) no problems. I had to test this out.

I did some searching, I wanted to have a fairly small outrunner motor, so the outside spins and the inside stays fixed. Second I wanted a motor that does not spin too fast, and third the motor would ideally have m5 tread on it, as my propellers already had this.

I ended up with a hexTronik DT700 brushless outrunner 700kv ($21.90) and using  Car ESC with reverse so I can easily turn the motor in either direction. Bought I bought via hobby king, below the links.

Here is the initial test. The ESC is connected to an arduino that is controlled by my pc. Sorry for the crappy video work, will make better movies in the future :-)

Here the code I used in the arduino to control the ESC using PWM:

#include <Servo.h> 

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

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin 
const int buttonPin1 = 2;
const int buttonPin2 = 3;
int buttonState1 = 0;
int buttonState2 = 0;
int speed = 5;
void setup() 

{ 
    Serial.begin(9600);
   pinMode(buttonPin1, INPUT);
   pinMode(buttonPin2, INPUT);
  myservo.attach(11);  // attaches the servo on pin 9 to the servo object void loop()
{ 

  if (Serial.available() > 0) {
    int inByte = Serial.read();

    switch (inByte) {
    case 's':
      val = 90;
      break;
    case 'f':
      val = 90 + speed;
      break;
    case 'r':
      val = 90 - speed;
      break;
    case '1':
      speed = 5;
      Serial.print(speed);
      break;
    case '2':
      speed = 10;
      Serial.print(speed);
      break;
    case '3':
      speed = 15;
      Serial.print(speed);
      break;
       case '4':
      speed = 20;
      Serial.print(speed);
      break;
        case '5':
      speed = 25;
      Serial.print(speed);
      break;
       case '6':
      speed = 30;
      Serial.print(speed);
      break;
        case '7':
      speed = 35;
      Serial.print(speed);
      break;

    } 
  }

  myservo.write(val);                  // sets the servo position according to the scaled value 
  delay(15);                           // waits for the servo to get there 
}

The ESC is in ‘rest’ at a PWM of 90, any value above it goes forward, anything below it goes reverse. By typing 1..6 + you can set the speed. By pressing the ‘f’ + the motor will move forward. By pressing ‘s’ + the motor stops. By pressing “r” + the motor goes in reverse. You can only change the speed when the motor is standing still.

Components used:

Motor: http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=6246
ESC: http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=11742

8 Comments

  1. Jim Born says:

    have been looking for a small under-surface motor that can achieve 10 -15 mph. Any ideas? Please Email same. Thanks

  2. oamar says:

    hello!
    i really think what you are doing is absolutely brilliant!

    i am also trying to make a ROV for a school project and control the motors from my computer, i have an arduino but do not have a ESC device and can not acquire one as i am currently living in kenya. but i do have an h-bridge device. do you know if i would be able to use/modify your code to control motors how with some other parts other than an ESC?

    thank you so much!

  3. Jimmy says:

    Hi can you send a wiring diagram of arduino-ESC

  4. Jonsson says:

    Hi!

    Looked at your page and your ROV project is really nice.

    I’m now working on my ROV #2 and I’ll use Arduino to control the ROV.

    How does your camera work, do you get good pictures?

    My ROV #1:
    http://www.youtube.com/watch?v=nqZAa40HAfk

    http://www.youtube.com/watch?v=PaFNw9BCfLo

    Please mail me.

    BR
    Jonsson

  5. Andrew says:

    @oamar: I think yes, you would be able to do that.

    I notice you have code regarding a potentiometer & two buttons, is that vestigial code or have you left part of the program out? Also, the code is …attach(11) but the comment says “pin 9″… is one of those wrong (i.e., the code 11 or the comment 9)? Or does Servo.attach() require +2 or something?

    Really cool project, thanks for posting it!

  6. Kevin says:

    Hi, we’re working on an AUV for a project at school, and I’m in charge of adding sensors to it. Could you maybe shed some light on how you hooked up the pressure sensor? It seems as if the sensor has to be connected to some sort of input tubing (like a tire pressure measure) in order for it to sense any data. But, from looking at your images, it looks like the sensor input is just exposed to the water as is.

  7. anykey says:

    Hi,

    The sensor I am using can directly be exposed to the water. It outputs a voltage between 1 and 5v depending how much pressure it is sensing. There are various versions of the sensor, mine can deal with up to 100PSI, so can go fairly deep. Not sure if it can deal with salt water as I only used it in lakes.

  8. mhcurlee says:

    I am also working on a Arduino-based ROV project. I am using the Ethernet shield so I can issue commands via telnet session (will be wrote into a front-end python or java interface to listen for key press events). For example, when a particular key is pressed the telnet client will send the byte char and the enter key (i.e. to signal a relay to start a motor). When the key is released it will send the off sequence. I am using IP because I am also going to use a H.264 IP camera and monitor it with VLC. The ROV will have a on-board 10/100 switch so that one connection/cable can handle multiple modules (i.e. motor control, camera, and eventually a robotic gripper.

Leave a Reply