First Project

What are you working on .... Show off your Rov's Projects here.
kennan345
Posts: 11
Joined: Mar 11th, 2021, 11:34 am

First Project

Post by kennan345 »

Starting my first ROV project on the fly and on the cheap. Dismantled a homebuilt Hexacopter (too many rules these days) and using as much as possible for the ROV. Also using some 2nd hand joysticks from a garbage truck control panel to control the thrusters.
I used Adobe Illustrator to design the brackets and motor mounts and then cut out cardboard prototypes on my Cricut to check the look and fit. Once I was happy with the design i would transfer the profile to acrylic and cut it out. Below are some of the parts. The motor mounts are actually discarded aluminum serial plates that I repurposed into mounts. They slide into the PVC pipe and hold the motors in the center. I have a automotive back-up camera as my main camera and a GoPro mounted for better quality footage. The front dome is a piece of acrylic heated up in the oven and then put in a home made fixture to allow it to bow out when compressed air was applied. It took a couple of times to get the temperature right and it worked but I could have used one more shot at it.

It's been a fun project and I'm looking forward to warmer weather to test the seals all around and then do some actually under power tests. I've been posting some photos and code in another section and it was suggested to start a new thread with my photos & code in an effort to get some further help.

I started with a PWM code using the repurposed joysticks and attempted to at least get the front thrusters working and under control before moving onto the the others. It was coming along fine but I started to get worried that I would run out of wires in my CAT 6 cable for thrusters, camera and other sensor communications and then I read about RS-485. I ordered the 485 boards for the Arudino Uno's and found an example to control a servo using a potentiometer then modified it for the joysticks but can't seemed to understand how to send multiple commands for multiple ESC's???

Below is the PWM code I started to play with. I welcome anyone's suggestions/help on this subject. If anyone has questions about the design and the use of the Cricut, please let me know. I'm better at that then I am with coding!

Code: Select all

/*
        Arduino Brushless Motor Control
     by Dejan, https://howtomechatronics.com
     with any modifications
*/

#include <Servo.h>

Servo FrontPS;     // create servo object to control the Front Port Side ESC/motor
Servo FrontSS;     // create servo object to control the Front Starboard Side ESC/motor
Servo RearPS;      // create servo object to control the Rear Port Side ESC/motor
Servo RearSS;      // create servo object to control the Rear Starboard Side ESC/motor
Servo UpPS;       // create servo object to control the Port Side Up ESC/motor
Servo UpSS;       // create servo object to control the Starboard Side Up ESC/motor


int ForRevValue;  // value from the analog pin
int SidSidValue;  // value from the analog pin

int ForPower;      // this indicates joystick in forward direction
int FrontPSPower; // This will be the total for the forward stick PLUS side stick going to port side motor
int FrontSSPower; // This will be the total for the forward stick PLUS side stick going to starboard side motor

int RevPower;     // this indicates joystick in reverse direction
int RearPSPower; // This will be the total for the reverse stick PLUS side stick going to port side motor
int RearSSPower; // This will be the total for the reverse stick PLUS side stick going to starboard side motor

int SidPower;
int SSPower;      // this indicates joystick in starboard direction
int PSPower;      // this indicates joystick in port direction

String (WhichWay);             // string to store direction text
String (OtherWay) ;           // string to store turning direction text

void setup() {
  // Attach the ESC to their respective pins
  FrontPS.attach(8,1000,2000); // (pin, min pulse width, max pulse width in microseconds)  controls front port side motor
  FrontSS.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds)  controls front starboard side motor
  RearPS.attach(10,1000,2000); // (pin, min pulse width, max pulse width in microseconds)  controls rear port side motor
  RearSS.attach(11,1000,2000); // (pin, min pulse width, max pulse width in microseconds)  controls rear starboard side motor 
 

  // Setup Serial Monitor
   Serial.begin (9600);
}

void loop() {
// not sure if delays are required. will test to make sure
 
   ForRevValue = analogRead(A0);       // reads the value of the forward/reverse joystick position to use in calculations
 delay(10);
   SidSidValue = analogRead(A3);       // reads the value of the forward/reverse joystick position to use in calculations
 delay(10);
 


// test stuff below
 ForRevValue = map(ForRevValue, 540, 919, 0, 125);   // scale it to use it with the servo library
  delay(10);
  SidSidValue = map(SidSidValue, 510, 919, 0, 125);   // scale it to use it with the servo library
  delay(10);
  FrontPSPower = ForRevValue + SidSidValue;           // applies more power to the port side motor to make the turn
  FrontSSPower = ForRevValue - SidSidValue;           // applies less power to the starboard side motor to make the turn
  FrontPS.write(FrontPSPower);    // Send the signal to the ESC
    FrontSS.write(FrontSSPower);    // Send the signal to the ESC 
 

// Next part sends info to serial monitor
  Serial.print("ForRevValue: ");
  Serial.println(ForRevValue);   

  Serial.print("SidSidValue: ");
  Serial.println(SidSidValue);   

  Serial.print("SidPower: ");
  Serial.println(SidPower);   

  Serial.print("FrontPSPower: ");
  Serial.println(FrontPSPower);   
 Serial.print("FrontSSPower: ");
  Serial.println(FrontSSPower); 
    Serial.println(); 

}
Attachments
Thruster Assy.JPG
Thruster Assy.JPG (230.66 KiB) Viewed 10220 times
Thruster Assy Front.JPG
Thruster Assy Front.JPG (332.64 KiB) Viewed 10220 times
Thruster Brackets.JPG
Thruster Brackets.JPG (266.71 KiB) Viewed 10220 times
Motor Mounts.JPG
Motor Mounts.JPG (352.02 KiB) Viewed 10220 times
Rear View.JPG
Rear View.JPG (403.89 KiB) Viewed 10220 times
Front view.JPG
Front view.JPG (484.98 KiB) Viewed 10220 times
fryslan76
Posts: 290
Joined: Dec 18th, 2012, 4:52 pm
Location: Netherlands

Re: First Project

Post by fryslan76 »

Looks nice, nice way of mounting the motors in a shroud.
kennan345
Posts: 11
Joined: Mar 11th, 2021, 11:34 am

Re: First Project

Post by kennan345 »

fryslan76 wrote:Looks nice, nice way of mounting the motors in a shroud.
Thanks fryslan76

I had a couple of other designs in the works, one of them was an "adjustable" mount to allow centering of the motor but in the end I didn't think it would hold properly.

Designing and then cutting out on the Cricut :idea: really allowed for rapid prototyping and costing only a small piece of cardboard.
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: First Project

Post by asesorplaza1 »

Good night from Spain.
I'm glad you cheered up to make an ROV.
Your design looks nice, but I think I should make you several recommendations.
Brushless motors have nothing wrong if they work submerged in water, but we're always talking about "clean water," such as in a pool, or a bathtub, but if we talk about open water, a swamp, a reservoir or at sea, we're no longer talking about "clean water," there are always suspended particles, ready to enter through the most unsuspected corners for the sole purpose of ruining your project , so you have to be careful with that. If you're going to use your ROV in a pool, don't do anything, if you're going to use your ROV in other types of water, you should think about how to better protect your engines from contact with water and its suspended particles.
As for the connections, in the photo I've copied from the ones you've posted, I see that you're using connections from those used in automotive, I have nothing against such connections, but you have to find a way to protect those connections from water, so that you don't get water into the dry chamber of the ROV , and wet and ruin your electronics. For example, by putting fast superglue glue, or covering them with exposi resin, in the part where the wires are, you can't imagine what they're capable of destroying a few drops of water in contact with electricity and electronics.

A greeting
Attachments
Rear View.JPG
Rear View.JPG (403.89 KiB) Viewed 10187 times
kennan345
Posts: 11
Joined: Mar 11th, 2021, 11:34 am

Re: First Project

Post by kennan345 »

Hola asesorplaza1

Thank you for your ideas regarding the build. I’ve seen builds with brushed and brushless motors and like I’d said in the original post, I’m using parts from my hexacopter on my first one. Based on what happens with this real life experience on this side one ROV #2 maybe a different configuration?

I’ve attached some photos of the connectors and I too were concerned about the sealing of the unit. You can see although they look like standard automotive connectors, I’ve filled them with epoxy. I kept the rubber seal at the edge because I was afraid the sharp edge of the epoxy might affect the cable over time if it were flexed too much. I filled the pin side with putty to stop the epoxy from filling in that side and then filled the other side with epoxy and let it flow in to all voids.

Please keep any and all suggestions coming so I can learn more!
Attachments
6B050497-8B9E-45DF-97D8-E672A1D05812.jpeg
6B050497-8B9E-45DF-97D8-E672A1D05812.jpeg (74.78 KiB) Viewed 10165 times
C0752CAB-EBE8-473B-AE7D-4D403A8F8463.jpeg
C0752CAB-EBE8-473B-AE7D-4D403A8F8463.jpeg (213.09 KiB) Viewed 10165 times
14F1A875-2C83-4346-8320-4940590BAF97.jpeg
14F1A875-2C83-4346-8320-4940590BAF97.jpeg (179.11 KiB) Viewed 10165 times
3F7FB4D6-66C5-4AE1-B044-7DE8341D717F.jpeg
3F7FB4D6-66C5-4AE1-B044-7DE8341D717F.jpeg (194.92 KiB) Viewed 10165 times
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: First Project

Post by asesorplaza1 »

I like that already, in these photos it looks better that you have been careful to protect the connections, however, I would cover with the same the red part of the connector, where the cables are hooked, to improve the sealing.

As for the RS485, I attach some links that can help you understand how to use them

https://arduinoinfo.mywikis.net/wiki/So ... 485Example

The second link is to a page written in Spanish, sorry, if you open it with the Google Chrome browser you can translate it into English.

https://proyectoarduino.com/comunicaciones-con-rs485/

Greetings.
Attachments
In this part of the connector
In this part of the connector
C0752CAB-EBE8-473B-AE7D-4D403A8F8463.jpeg (213.09 KiB) Viewed 10159 times
kennan345
Posts: 11
Joined: Mar 11th, 2021, 11:34 am

Re: First Project

Post by kennan345 »

Muchas gracias asesorplaza1

Below is what I’ve done to one of the other connectors. Maybe I will do the same to all.
My plan is to submerge it in a pool with no electronics in it to test for leaks before installing everything inside. I also have to work out the buoyancy because I will need to add some to get to neutral.
Attachments
78B8A1B1-1E73-44E3-A84E-89F8614F2A0D.jpeg
78B8A1B1-1E73-44E3-A84E-89F8614F2A0D.jpeg (74.08 KiB) Viewed 10154 times
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: First Project

Post by asesorplaza1 »

That is, it's about preventing water from entering the dry box of electronics so that it doesn't spoil any components
Oddmar
Posts: 98
Joined: Jan 26th, 2019, 8:57 pm

Re: First Project

Post by Oddmar »

You don't want it neutral, most like to make the ROV slightly positively buoyant, so that it takes a tiny bit of constant downward thrust to maintain position. Thrusting upwards near the bottom shoves water down and stirs up fine silt, but thrusting down doesn't.

You'd be surprised, but if there's a tiny break anywhere in the wire's insulation, water, under pressure, will flow along the copper wire(s) under the insulation, and eventually get inside the WTC. Strip the insulation off for a 1/4 inch right where the wires enter the WTC, and pot in Epoxy resin. That will prevent water ingress.

LED's with driver boards exposed to water can be coated with epoxy resin thinned with a bit of denatured alcohol.

Brushless motors should have the stator windings potted in thinned epoxy resin, and the bearings replaced with ceramic ones. And hose the motors off after every dive.

You could get a Taranis RC controller and use DSC (Direct Servo Control) over two wires to control up to 24 servos in the ROV.
kennan345
Posts: 11
Joined: Mar 11th, 2021, 11:34 am

Re: First Project

Post by kennan345 »

Oddmar, Thanks for pointing some things out to me.

You're quite right, it should have read slightly positive.

I have read about the water intrusion down the inside of wiring if it gets a nick or cut in it. I don't have a direct connection between the external and internal wiring, I'm using the Deutsch connectors in the photo and the internal ones I've potted with epoxy to seal them. I was thinking that even if the external connectors were not installed, there's no way for water to enter. Am I kidding myself?

I have worked out the programming and for now this version of it will run like that to see how the season goes. I have the front thrusters independently driven using two CAT wires, the reverse thrusters combined running on one CAT wire and the up/down thrusters the same using one CAT wire. Power and ground to the joysticks uses 2 wires and the camera feed uses the last 2. The motors function fine except the bidirectional ESC's for up/down. I'm working on the programming to try and fix them. They work and run the motors forward and reverse as they should but the throttle curve is off and I can't seem to be able to calibrate them. Certainly not like a standard ESC.
Attachments
IMG_1928.jpg
IMG_1928.jpg (55.68 KiB) Viewed 9884 times
Post Reply