KR2 ROV

What are you working on .... Show off your Rov's Projects here.
Bindo
Posts: 112
Joined: Apr 7th, 2015, 4:42 pm

Re: KR2 ROV

Post by Bindo »

Loving your LED control in the previous post!

What method are you using to increase the value in arduino?? it's a nice smooth count up and down!

Also what batteries are you using? 3s or 4s?
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 »

Hey Bindo,
Thanks for the comments!
Bindo wrote:What method are you using to increase the value in arduino??
I have two key variables that affect the performance of the External Lighting LEDs; "iluminateState" and "brightness".
I send both of these values via the EasyTransfer Library from the Topside to the Bottom side Arduinos. The LED Drivers that I have allow for a PWM signal to control brightness.

Here is the Driver details:
Meanwell DC-DC Constant Current Step Down LED Drive part number: LDD-500L

Here are the LED Details:
Bridgelux BXRA-56C1100-B-00


Here is the code from that section of my program:
TOP SIDE:

Code: Select all

// Set brightness of ROV External lighting and state of lights
//Start Button = On/Off
 if(ps2x.ButtonReleased(PSB_START)) {
     if(IlluminateStatus == true){
       IlluminateStatus = false;
       drawDots = false;
       txdata.ET_iluminateState = 0;
       analogWrite(light[0], 0);
       analogWrite(light[1], 0);
       analogWrite(light[2], 0);
     }
     else {
       IlluminateStatus = true;
       drawDots = true;
       txdata.ET_iluminateState = 1;
       analogWrite(light[0], brightness);
       analogWrite(light[1], brightness);
       analogWrite(light[2], brightness);
     }
 }

// PAD UP = Brightness UP and PAD DOWN = Brightness Down 
if(ps2x.Button(PSB_PAD_UP) && (brightness < 255)) {
  brightness = brightness + 2;                                        //Change this value (2) to chance the speed of the increase/decrease
  if (brightness > 255) {brightness = 255;}
}
if(ps2x.Button(PSB_PAD_DOWN) && (brightness > 0)) {
  brightness = brightness - 2;
}
txdata.ET_brightness = brightness;
BOTTOM SIDE:

Code: Select all

 // Set brightness of ROV External lighting and state of lights
 if(rxdata.ET_iluminateState == 1) {
     drawDots = true;                               //Turn on dots to show lights are ON
     analogWrite(light[0], rxdata.ET_brightness);   //Set Brightness of each light
     analogWrite(light[1], rxdata.ET_brightness);
     analogWrite(light[2], rxdata.ET_brightness);
   }
   else {
     drawDots = false;
     analogWrite(light[0], 0);
     analogWrite(light[1], 0);
     analogWrite(light[2], 0);
   }
Bindo wrote:Also what batteries are you using? 3s or 4s?
At the moment, I am planning on using three 3s 5500mAh batteries. 2 will be for the motors, I am thinking of running them in parallel, and 1 will be for the controls/sensors/lighting.
Bindo
Posts: 112
Joined: Apr 7th, 2015, 4:42 pm

Re: KR2 ROV

Post by Bindo »

loving it 8-)

you must have a small-ish set of delays in your code? (approx 100ms?) looking at the way it counts?

10 updates per second is more than enough though! i found through experimentation that anything near 200ms was far too much and prop speed changes became less fluid and more robotic.
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 »

So I am back at it again... the future Ms. is out shopping for wedding dresses... so I figured it was as good a day as any to blow the dust off this never ending project and see if I can make some progress! There has been some other day projects here and there since my last post. So i will first start with a quick update.

1. I've designed a skeleton base for my ROV. I will be mounting my 4" WTC and 6 BR thrusters to this.
ROV Frame
ROV Frame
20160220_173901-1 (Custom).jpg (60.93 KiB) Viewed 14514 times
2. I've designed a basic chassis to mount electronics to inside my 4" WTC and started populating it with components. This really helped clean up the work space and condense the Subside electronics.
wtc electronics chassis
wtc electronics chassis
20160220_174213 (Custom).jpg (170.04 KiB) Viewed 14514 times
3. I've mocked up a TopSide control station, containing the topside Arduino and Qty 8 7-seg displays for monitoring things while diving. Currently, displays Thruster values, raw data from PS2 controller and LED brightness and state. Also cleaned up work space a bit more!
TopSide Control Box
TopSide Control Box
topside.jpg (672.69 KiB) Viewed 14514 times
4. I put together some distribution PCBs for the Thruster Power and coms... not sure I will go with this design in the final ROV, but i think it will work... hoping to test soon!
PCBs
PCBs
20160220_175647 (Custom).jpg (127.18 KiB) Viewed 14514 times
I have run into what may be a bigger problem later on as I add in my Subside sensor packages. It seems between the EasyTransfer library and OSD refresh/print lag, it loose about 50ms per scan on the arduino... not sure this is an issue yet... but I am afraid it might be... even Bindo noticed this.
Bindo wrote:you must have a small-ish set of delays in your code? (approx 100ms?) looking at the way it counts?
To overcome this for the moment, I have added a toggle that turns the OSD on and OFF... but I am hoping to find a more efficient fix without loosing functionality.

Anyone who has played with the EasyTransfer Library... have you found a good and STABLE way to eliminate the 10ms delay in the loop on the data receive function?

Code: Select all

//--------------------------------------------------------------------------------------------
//                               Receive Data via EasyTransfer
//--------------------------------------------------------------------------------------------
  //there's a loop here so that we run the receive function more often then the 
  //transmit function. This is important due to the slight differences in 
  //the clock speed of different Arduinos. If we didn't do this, messages 
  //would build up in the buffer and appear to cause a delay.
  
  for(ETloop = 0; ETloop < 5; ETloop++){
    //remember, you could use an if() here to check for new data, this time it's not needed.
    ETin.receiveData();
    delay(10);
  }

if(ETin.receiveData()){
  lastMessage = millis();
  goodComs();
}
else{
  if(millis() - lastMessage >= timeout) {
    badComs();
  }
}
Alternatively, anyone have any suggestions on how to speed up the OCD refreshing?

Code: Select all

// OSD Display Update


if(currentTime >= (cloopTime + 1000))
{
  cloopTime = currentTime;  // Updates cloopTime
  hours = Tcounter / 3600;
  mins = (Tcounter % 3600) / 60;
  secs = Tcounter % 60;
  char diveTime[8];
  sprintf(diveTime,"%2d:%02d:%02d",hours,mins,secs);
  if(rxdata.ET_osdState == true){
    OSD.setCursor(17,0); OSD.print("       "); OSD.setCursor(17,0); OSD.print(diveTime);
  }
  Tcounter++;
}
//OSD.setCursor(17,1); OSD.print("      "); OSD.setCursor(17,1); OSD.print(currentTime);   
//OSD.setCursor(0,8); OSD.print("012345678901234567890123456789");

if((currentTime >= (ocdLoopTime + ocdRefresh)) && (rxdata.ET_osdState == true)){
  ocdLoopTime = currentTime;      //update ocdLoopTime
  OSD.setCursor(0,9);   OSD.print("   "); OSD.setCursor(0,9);   OSD.print(rxdata.ET_FORPORT);
  OSD.setCursor(23,9);  OSD.print("   "); OSD.setCursor(23,9);  OSD.print(rxdata.ET_FORSTBD); 
  OSD.setCursor(4,10);  OSD.print("   "); OSD.setCursor(4,10);  OSD.print(rxdata.ET_VERT_LF);
  OSD.setCursor(19,10); OSD.print("   "); OSD.setCursor(19,10); OSD.print(rxdata.ET_VERT_RT);
  OSD.setCursor(0,11);  OSD.print("   "); OSD.setCursor(0,11);  OSD.print(rxdata.ET_AFTPORT);
  OSD.setCursor(23,11); OSD.print("   "); OSD.setCursor(23,11); OSD.print(rxdata.ET_AFTSTBD);

}
Here is what the display looks like IRL at the moment.
OSD In Real Life
OSD In Real Life
20160220_174617-1 (Custom).jpg (108.07 KiB) Viewed 14514 times
Anyway... thats the progress I've made here over the last few months...

Happy Diving!
Ryan
"KR2_DIVING"
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 »

Ok... Bit more progress! I was getting antsy and wanted to mock out the frame to see how how the thrusters and WTC come together!

All in all... I can say am quite happy with how it is coming together! 8-) :D
ROV from front
ROV from front
20160220_203813 (Custom).jpg (245.25 KiB) Viewed 14512 times
ROV from rear
ROV from rear
20160220_203826 (Custom).jpg (229.43 KiB) Viewed 14512 times
I still need to figure out where I am going to house the batteries. Likely will be 2 x 2" WTC from BR with my batteries and power distribution mounted in side. Might just go with the end caps and use WHITE PVC... still deciding... like the idea of Acrylic for visual inspection... and it just looks cooler! 8-) BUT... it is $65 buck more than I really need to spend...

Will keep you posted!

Happy Diving!
User avatar
olegodo
Posts: 222
Joined: Aug 30th, 2013, 9:47 am
Location: Bergen, Norway

Re: KR2 ROV

Post by olegodo »

Don't you need to turn the horisontal thrusters 90 degrees?
The way they are now your rov will not be able to turn arround its own axis. :)
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 »

olegodo wrote:Don't you need to turn the horisontal thrusters 90 degrees?
You are SO right! :oops: I knew something was looking off last night when I threw that all together!
User avatar
olegodo
Posts: 222
Joined: Aug 30th, 2013, 9:47 am
Location: Bergen, Norway

Re: KR2 ROV

Post by olegodo »

Only reason I noticed is that I have done the same mistake myself :P
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 »

Worked on the TimeSucker (name pending! :lol: ) a bit more over the weekend, and mounted the final 2 thrusters, and mocked up the battery compartments...
Mock Up
Mock Up
TimeSucker Mockup.jpg (148.38 KiB) Viewed 14484 times
AND... I've spun the thrusters right way around! :oops:
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 »

Hello All,
Been making some GIANT leaps in the progress of my yet to be named ROV.
Moved the build up to my parents place. They just completed an extension to their workshop, so i promptly moved in and claimed a corner as my own!
Just a bit more space and tools for the build here than my Chicagoland Apartment!
New Work Space
New Work Space
2016-03-12 17.13.58 (Medium).jpg (193.36 KiB) Viewed 14391 times
Over the weekend, I worked on the LED housings. I was worried about heat, so I managed to find a way to mount the LEDs on an aluminum plate, inside an aluminum pipe.
I have a few more details to sort out. Once I have completed the LED build, I will post some updates. IN summary, I found some Aluminum Pipe that i could use with the Blue Robotics 2" Flanges.
LED housings
LED housings
2016-03-12 17.52.49 (Medium).jpg (303.88 KiB) Viewed 14391 times
LED Housing
LED Housing
LED (Medium).jpg (326.45 KiB) Viewed 14391 times

I still have what is proving to be a serious problem with power. The SUBSIDE controller (Arduino MEGA) seems to run fine when I power the set up from the USB port on my MAC, however, if I try to power from the SUBSIDE LiPo batteries, the system locks up and stops funcitoning... Still trying to figure that out... any ideas? :shock:

I'm running the LiPo (3 Cell) into the Vin Port on the Mega, which is suppose to allow 6 to 20VDC... The on-board Voltage Regulator gets VERY HOT... and I am wondering if this is what is causing things to lock up? Any thoughts?


Anyway, making lots of progress!
Post Reply