Hi everybody! My first post here, i hope it will yield some good results :)

Im planning to begin work on my DIY ROV, something pretty similar to work mr. Thomas J Coyle II is doing over here

I havent started any "actual work" except "designing" my thruster control software/hardware, im beginner wit Arduinos and C++, but i have a decent background in PHP/ORACLE so i'm not stranger to programming languages...

If everything works out as i imagined i will be using two arduinos, UNO topside and MEGA underwater... UNO will receive joystick data, process it and sent it over ether-net to MEGA which will control ESC-s and gather sensory data that will be sent back to UNO or PC.

I started my work on collecting and processing joystick information, and im stuck on processing part :) i don't know which approach to take for thruster control... i couldn't find any code/algorithm for vectored configuration online, any advice will be much appreciated!

What i got so far, im getting joystick readings and trying to process what is happening, moving forward, backwards etc...

//generic deadband limits - not all joystics will center at 512, so these limits remove 'drift' from joysticks that are off-center.  
int DEADBANDLOW = 460;     //Decrease this value if drift occurs, increase it to increase sensitivity around the center position
int DEADBANDHIGH = 564;     //Increase this value if drift occurs, decrease it to increase sensitivity around the center position
 
int joyval_fb = evt->y; //forward and backward 0-1023

if (joyval_fb >= DEADBANDLOW && joyval_fb <= DEADBANDHIGH){
  //idle
}


//FORWARD
if (joyval_fb < DEADBANDLOW) {
  //code for moving forward
}

//BACKWARD
if (joyval_fb > DEADBANDHIGH) {
 //code for moving backwards
}

Am i on a right track, or did i miss it by a mile?

Thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

    • Once again thanks! I understand large part of it better now.

      I understand why would they be saturated if i have large input on two axes, but i don't have large input on two axes, only y-axe for forward and outputs are still saturated, or better said out of range...

      frontLeftThruster: 940 (- ~160)

      frontRightThruster: 931 (- ~160)

      backLeftThruster: 2068 (+ ~160)

      backRightThruster: 2059 (+ ~160)

    • Vedran,

      Okay. I chose +/- 400 because that fits naturally with 1100-1900 with center at 1500. The factors I gave, 1/sin(45 deg) = 1.41, don't work with that too well since 1.41*400 = 564. You can scale all factors by 1/1.41 so that you won't saturate for any full input on one axis.

      Note also that most ESCs, including the BlueRobotics ones, will accept outputs beyond their normal range but will constrain them internally (i.e. a 2100 µs input will be constrained to 1900 µs).

      -Rusty

    • Admin

      @Vedran,

      Yes, you would first map your joystick 0 to 1023 value to the +/- 400 scale suggested by Rusty.

      I would assume then that the +/-400 scale would be converted to equivalent PWM values, but you will need Rusty's input on that.

      Regards,

      Tom C AVD

    • Thats what I though, but values that i get are already pretty close to PWM range of BLUE ESC so im not sure if formula concept is already done around that values or they have to be remapped again.

      Will have to wait for Rusty ;)

    • @Rusty

      I don't know how to thank you enough so ill just say THANKS ALLOT!

      What do you think will be waiting time for 6xT200 with Blue ESC thrusters for Europe? Do you maybe have any dealership in EU who can have them on stock?

      @Thomas

      I presume front end of your ROV is marked with blue tape?

    • Vedran,

      You're welcome. You can check each thruster page on our website for current lead times. Shipping to Europe is usually 3-16 days. We have a few distributors arranged in Europe but none have stock yet. Hoping to resolve that in Feb.

      -Rusty

    • Can you please give a list of your EU distributors, it would probably be easier to order from one of them nevertheless, because of import taxes and customs...

    • Vedran, see here: http://www.bluerobotics.com/distributors

      -Rusty

    • Admin

      @Vedran,

      Yes, the front is marked with the piece of blue tape.

      Also, since that picture was taken, I have reversed the direction of the front Thrusters to be the same as the rear Thrusters with the BlueESC controller end of the Thruster facing towards the chassis side.

      Regards,

      Tom C AVD

  • @Thomas

    Thanks!

    What is your plan for controling your ROV?
This reply was deleted.