Page 1 of 13

KR2 ROV

Posted: Sep 1st, 2012, 5:28 pm
by KR2_Diving
Every programmer who has ever tackled a new programming language knows that felling of triumph that a flashing LED, the proverbial "Hello World" of a hardware programming, is the first giant step towards success!

If that is the case, a few beeps of an ESC and the whir of a motor must be the equivalent for an ROV builder!

It is not much to look at yet, but here is the first shot of my Arduino powered ROV, yet to be named...

Ryan "KR2_Diving"

Re: KR2 ROV

Posted: Sep 4th, 2012, 8:48 pm
by Deakel
Nice work man I have the same triumphant feeling as you have. I got a playstation 2 controller running and esc and controlling a motor with variable speed through an Arduino Mega.
Its a great feeling Im with ya man.

Re: KR2 ROV

Posted: Sep 5th, 2012, 6:43 am
by gumma
Oh the young days!
Good work! There's a good Arduino library for controling ESCs, if you need help just ask!

Re: KR2 ROV

Posted: Sep 5th, 2012, 6:45 am
by KR2_Diving
Deakel wrote:I got a playstation 2 controller running and esc and controlling a motor with variable speed through an Arduino Mega.
Hey Deakel,

Thanks for the comment!
Follow up question for you, did you find that you had to preset your PWM output to 145 (ish) in order for the ESC to initiate properly?

Probably a better discussion for a new thread, but it has to start somewhere!

Gumma,
I would be very interested in the Arduino ESC library! :)

Cheers!

Ryan "KR2_Diving"

Re: KR2 ROV

Posted: Sep 5th, 2012, 11:27 am
by derelicte
there already is an esc library - it is called servo.

http://arduino.cc/en/Reference/Servo

Re: KR2 ROV

Posted: Sep 22nd, 2012, 7:08 pm
by KR2_Diving
Things are coming along with my yet to be named project! I have been doing some calculations on my hull design, and I think I have a general design concept picked. I will have to wait until December when I am back in the States to get the supplies to build the hull as PVC is not so readily available here in the UK, and half of what I need is out in my parents barn! :)

(see sketch below!)

With this design, if I were to just cap of the ends of all the pipes, I would still be 6kg positively bouyant. (Pipes only, not batteries, motors, or anything else for that matter.)

I am sure my gear will be less then 6kg, so it will be interesting to see how it pans out.

I finally got my test ESC in the mail. It is a reversible Turnigy ESC.
http://www.hobbyking.com/hobbyking/stor ... oduct=7189

This replaced the 30A RC Plane ESC that didn't have reverse.
http://www.dumfries-model-flying.com/es ... ss-esc-30a

At the moment, I have it connected to a 690kv Brushless motor.
http://www.modelmotors.cz/index.php?pag ... ine=SILVER

Today I was able to complete my Playstation 2 controller Hack. I plan on using this together with my Arduino to control the ROV.
I found a library that works perfectly with PS2 controllers.
http://www.billporter.info/playstation- ... rary-v1-0/

My next step is to strip the sample program from the PS2 example, and try to get it to control my ESC. I do have a question though:
gumma wrote:Oh the young days!
Good work! There's a good Arduino library for controling ESCs, if you need help just ask!
derelicte wrote:there already is an esc library - it is called servo.
http://arduino.cc/en/Reference/Servo
I am assuming you are both talking about the same thing, and this is the best way (least amount of coding) to control an ESC with Arduino?

Re: KR2 ROV

Posted: Sep 22nd, 2012, 7:22 pm
by bikerbones1968
Sounds like you sure have a great plan there. I really like the brushless motors you went with. your drawing looks great!!!

Re: KR2 ROV

Posted: Sep 23rd, 2012, 10:58 am
by thegadgetguy
Yeah, the Arduino servo library just sets the Arduino up to send PWM signals of varying width, which will control a servo or ESC. It's already built in to the Arduino IDE, so it's the easiest way to go.

Re: KR2 ROV

Posted: Sep 23rd, 2012, 1:14 pm
by Deakel
KR2_Diving wrote:
Deakel wrote:I got a playstation 2 controller running and esc and controlling a motor with variable speed through an Arduino Mega.
Hey Deakel,

Thanks for the comment!
Follow up question for you, did you find that you had to preset your PWM output to 145 (ish) in order for the ESC to initiate properly?

Probably a better discussion for a new thread, but it has to start somewhere!

Gumma,
I would be very interested in the Arduino ESC library! :)

Cheers!

Ryan "KR2_Diving"





My ESC is for brushed motors and the servo library is what Im using along with the PS2X library and mapping from the analogue sticks to the ESC im gonna switch to brushless motors and ESC. The cost of 2 more brushed ESC's is more than i want to spend. The one ESC I have working is spotty and needs limits adjusted every time I power it up and calibrate it. Lower quality electronics I think. I can post what code I have if you like. Its stuff i have found here and there on the net.


#include <PS2X_lib.h> //for v1.6
#include <Servo.h>

PS2X ps2x; // create PS2 Controller Class

Servo LYservo;
int error = 0;
byte type = 0;

void setup(){
LYservo.attach(2);
error = ps2x.config_gamepad(13,11,10,12, true, false); //setup pins and settings: GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error
type = ps2x.readType();
}

void loop(){

if(error == 1) //skip loop if no controller found
return;

ps2x.read_gamepad(); //read controller
LYservo.write(map(ps2x.Analog(PSS_LY), 0, 320, 190, 0)); //map values and write to ESC
delay(15);

}

Re: KR2 ROV

Posted: Sep 23rd, 2012, 4:22 pm
by KR2_Diving
Great news!! Spent my Sunday trying and succeeding in using a Playstation2 controller to control a Brushless motor with reversible ESC!

Once I get a chance to clean up the code a little, and add some comments, I will be happy to share with anyone interested.

Even managed to hack the bread board from the kitchen in the process! :lol:

Thanks to Deakel for pointing me in the right direction! :)