KR2 ROV

What are you working on .... Show off your Rov's Projects here.
Post Reply
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

KR2 ROV

Post 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"
Attachments
hello world ROV.jpg
hello world ROV.jpg (297.12 KiB) Viewed 32431 times
Deakel
Posts: 30
Joined: Jun 30th, 2011, 2:12 pm

Re: KR2 ROV

Post 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.
gumma
Posts: 49
Joined: Jun 1st, 2011, 4:05 am

Re: KR2 ROV

Post by gumma »

Oh the young days!
Good work! There's a good Arduino library for controling ESCs, if you need help just ask!
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post 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"
derelicte
Posts: 292
Joined: Aug 1st, 2011, 3:08 pm

Re: KR2 ROV

Post by derelicte »

there already is an esc library - it is called servo.

http://arduino.cc/en/Reference/Servo
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post 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?
Attachments
First Draft of ROV hull design.
First Draft of ROV hull design.
rov sketch.jpg (127.63 KiB) Viewed 32212 times
User avatar
bikerbones1968
Posts: 374
Joined: May 10th, 2012, 5:21 pm
Location: Annapolis Valley Nova Scotia
Contact:

Re: KR2 ROV

Post by bikerbones1968 »

Sounds like you sure have a great plan there. I really like the brushless motors you went with. your drawing looks great!!!
User avatar
thegadgetguy
Posts: 238
Joined: Feb 13th, 2011, 8:27 pm
Location: Pennsylvania

Re: KR2 ROV

Post 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.
Deakel
Posts: 30
Joined: Jun 30th, 2011, 2:12 pm

Re: KR2 ROV

Post 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);

}
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post 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! :)
Attachments
How many bread boards to you see in the pic! :D
How many bread boards to you see in the pic! :D
rov2.jpg (320.31 KiB) Viewed 32179 times
Post Reply