Page 11 of 13

Re: KR2 ROV

Posted: Jul 15th, 2015, 3:31 am
by Bindo
Hi Ryan,

Hopefully you can access this, it's a spreadsheet utilizing my calcs, if you change the numbers in the bottom section you should see the results at the thrusters

https://drive.google.com/file/d/0Bw71Vt ... sp=sharing

Re: KR2 ROV

Posted: Jul 21st, 2015, 11:44 am
by KR2_Diving
Got the spreadsheet! Thanks!

Just to verify... Surge and Sway are X and Y axis respectively?

Surge = Up / Down Axis
Sway = Left / Right axis
Heading = ? what am I missing...

Correct?

(Side Note: I've only managed to get one cup of coffee in me at the moment... and I am at work... )

Edit 2: Oh Duh! Now i get it! Read all the post Ryan... read ALL the post... then open mouth... off to the coffee machine now...

Re: KR2 ROV

Posted: Jul 21st, 2015, 12:32 pm
by KR2_Diving
Coffee has kicked in! Thought of a way to clean up this code even more! Have you considered the constrain function

Current Code:

Code: Select all

    //Take joystick values and mix to give vectored output.....

    STBDFOR   = (rxdata.surg - rxdata.sway - rxdata.head + 180);      //  See spreadsheet for calcs and results
    STBDAFT   = (rxdata.surg - rxdata.sway + rxdata.head);            //
    PORTAFT   = (rxdata.surg + rxdata.sway - rxdata.head);            //
    PORTFOR   = (rxdata.surg + rxdata.sway + rxdata.head - 180);      //


    // Thruster calcs would result in out of range results, restrict calcs to servo range
    if (STBDFOR > 179)   {
      (STBDFOR = 178);
    }
    if (STBDFOR < 1)     {
      (STBDFOR = 2);
    }

    if (STBDAFT > 179)   {
      (STBDAFT = 178);
    }
    if (STBDAFT < 1)     {
      (STBDAFT = 2);
    }

    if (PORTAFT > 179) {
      (PORTAFT = 178);
    }
    if (PORTAFT < 1)    {
      (PORTAFT = 2);
    }

    if (PORTFOR > 179) {
      (PORTFOR = 178);
    }
    if (PORTFOR < 1)   {
      (PORTFOR = 2);
    }


    // Write commands to ESC's after mix calcs

    stbda.write   (STBDAFT);
    stbdf.write   (STBDFOR);
    porta.write   (PORTAFT);
    portf.write   (PORTFOR);
    verta.write   (rxdata.dept);
    vertf.write   (rxdata.dept);
//  manip.write   (rxdata.jaw);

New Code:

Code: Select all

//Take joystick values and mix to give vectored output.....
 STBDFOR   = (rxdata.surg - rxdata.sway - rxdata.head + 180);      //  See spreadsheet for calcs and results
 STBDAFT   = (rxdata.surg - rxdata.sway + rxdata.head);            //
 PORTAFT   = (rxdata.surg + rxdata.sway - rxdata.head);            //
 PORTFOR   = (rxdata.surg + rxdata.sway + rxdata.head - 180);      //


//Thruster calcs would result in out of range results, restrict calcs to servo range
 STBDFOR = constrain(STBDFOR, 2, 178);
 STBDAFT = constrain(STBDAFT, 2, 178);
 PORTFOR = constrain(PORTFOR, 2, 178);
 PORTAFT = constrain(PORTAFT, 2, 178);
 
//Write commands to ESC's after mix calcs
 stbda.write   (STBDAFT);
 stbdf.write   (STBDFOR);
 porta.write   (PORTAFT);
 portf.write   (PORTFOR);
 verta.write   (rxdata.dept);
 vertf.write   (rxdata.dept);

Re: KR2 ROV

Posted: Jul 22nd, 2015, 5:26 am
by Bindo
Hi Ryan.

Yeah I'd only stumbled across constrain after I'd written the code (hence never bothered to implement it yet :lol: ). That looks a lot cleaner though! I'll be implementing that in the next version of my code.

Thanks!

Bindo

Re: KR2 ROV

Posted: Aug 22nd, 2015, 9:16 am
by HwT
I want to use this with ethernet, how do i go forward?

Re: KR2 ROV

Posted: Aug 24th, 2015, 10:40 pm
by KR2_Diving
HwT wrote:I want to use this with Ethernet, how do i go forward?
I have not played with Ethernet much... in which way do you mean that you want to use this with Ethernet? If you are talking for the tether.. i would think you would just have to look at the code regarding the RS485 coms... and replace this with the data handling code for the Ethernet coms... see the EASY TRANSFER section of my code...

Re: KR2 ROV

Posted: Aug 24th, 2015, 10:46 pm
by KR2_Diving
Oh YEA!
T100 + Blue ESC
T100 + Blue ESC
2015-08-24 21.26.25 (Medium).jpg (221.12 KiB) Viewed 14932 times
My shipment from BlueRobotics arrived today!

First impressions:
These thrusters are pretty solid! Feel a lot heavier and solid in the hand then I was expecting! Cables all appear very sound, and the build quality is GREAT! It is a shame it is going to be such a crazy week, or I would have these guys up and running already!

Rest assured, any free time I have will be spend getting these up and running! Watch this post for updates!

Best regards,
KR2_Diving

Re: KR2 ROV

Posted: Aug 27th, 2015, 2:05 am
by Bindo
Can't wait to see these puppies in action 8-)

Re: KR2 ROV

Posted: Sep 15th, 2015, 7:11 pm
by KR2_Diving
Status Update!

So... I have been so excited to get my BlueRobotics T100's up and running... that I haven't even touched them yet... sad... I know...

But I have had some time to tinker with some other stuff.

Today I got my Easytransfer Library back up and running, and tested. I wanted to make sure I understood the i2c Bus and EasyTransfer before I tackled the challenge of flashing all the firmware on the T100s to change addresses...

Anyway, you can see below the current layout of the system.
Layout
Layout
ROV system Layout Sept 2015 labled.jpg (77.09 KiB) Viewed 14827 times
All of the 7-seg displays are are the same i2c bus. I am using the LCD Backpacks from Adafruit.

Here is a link to the video of it all in action! Warning: the LED's get BRIGHT!


The Left and Right Sticks control the thrusters, the Left Pad UP/DOWN control the brightness of the LEDs, Start Turns them on, Select turns them off. The colon on the BLUE display will turn on when the LEDs are on.

All seems in order, so now I think I can tackle the T100's!

Re: KR2 ROV

Posted: Oct 6th, 2015, 12:11 am
by KR2_Diving
Had a few minutes this evening to finally unpack my T100's and 4"hull to see how things laid out.
Starting to get the picture!
Starting to get the picture!
ROV Layout.jpg (632.84 KiB) Viewed 14721 times
The creative juices are flowing... Hoping to gain some momentum on the build and move Version 1 from the drawing board to the diving board!