T100 Thrusters not turning

My team and I plan to compete in a regional MATE ROV competition, please help us solve this… We have four T100 thrusters on our ESC, all of which are connected to the control box (Arduino Uno and Joystick) via a 35ft tether. The thrusters make a grinding squealing sound but do not rotate. We are using 9-12 volts. The malfunctioning thruster has been an ongoing problem so we have tried many solutions but none have consistently worked. Sorry if I left anything out, I can answer any questions you may have about what they are doing, or our process. The code I am using is below:

#include <Servo.h>
Servo servo2; 
Servo servo1;
int joyX = 0;
int joyY = 1;
  
int servoVal;
  
void setup() 
{
  servo1.attach(10);
  servo2.attach(11);
}
  
void loop()
{
  
  servoVal = analogRead(joyY);
  servoVal = map(servoVal, 0, 1023, 1100, 1900); 
  servo1.write(servoVal);
  servo2.write(servoVal);

  delay(15);  

  servoVal = analogRead(joyX);
  servoVal = map(servoVal, 0, 1023, 1100, 1900); 
  servo1.write(servoVal);

   servoVal = analogRead(joyY);
  servoVal = map(servoVal, 0, 1023, 1900, 1100); 
  servo2.write(servoVal);
 
}

Hi Roberto,

Are you using 1 ESC to control 4 thrusters ?
The code in your post is a bit weird…

First:

  1. You are writing to servo1 and servo2 two times in the same loop, this looks very wrong.
  2. This codes will only control 2 ESCs. (or two thrusters)
  3. You have a 15 ms delay that will not work in the way that you are hoping I think, since this is a loop, you code is equal to:
  servoVal = analogRead(joyX);
  servoVal = map(servoVal, 0, 1023, 1100, 1900); 
  servo1.write(servoVal);

  servoVal = analogRead(joyY);
  servoVal = map(servoVal, 0, 1023, 1900, 1100); 
  servo2.write(servoVal);

  servoVal = analogRead(joyY);
  servoVal = map(servoVal, 0, 1023, 1100, 1900); 
  servo1.write(servoVal);
  servo2.write(servoVal);

  delay(15);  

In other words, you are writing to many times each servo with ~probably~ different values.

  1. Also, you need to make sure that this code will start with a 1500us PWM signal to avoid any initialization problem.

Take a look in our example here.

We have two Arduino Unos and we are using each one to control two separate ESCs. I will revise my code and try again.

#include <Servo.h>

byte servoPin = 9;
Servo servo;

void setup() {
servo.attach(servoPin);

servo.writeMicroseconds(1500); // send “stop” signal to ESC.
delay(1000); // delay to allow the ESC to recognize the stopped signal
}

void loop() {
int signal = 1700; // Set signal value, which should be between 1100 and 1900

servo.writeMicroseconds(1900); // Send signal to ESC.
}

This is the code I used. The thruster continues to stutter and fail at turning.

Hello Roberto,

Keep in mind that these thrusters are designed to be used underwater, and should not be run dry for long periods of time as they overheat and can get damaged. I also wouldn’t apply a 1900 us PWM in dry conditions.

Looking at the example code, it seems you may still have given the ESC not enough time to start (it waits 7s, while you wait 1s).

Please try to use our example code to troubleshoot hardware problems. Then when the hardware works, you can use your own code and know that any problems at that point are with your code, not the hardware.

Alright thanks for your help! I’ll be sure to start testing underwater immediately