Go Down

Topic: Arduino, Victor 883 controller, and a 24V motor (Read 82 times) previous topic - next topic

lunescence

Hello all!

I am building a very simple mini autonomous cart using Max Sonar Ultrasonic sensors, a SparkFun RedBoard (same as Uno), two Victor 883 ESCs, and two 24V 500W brush motors. For proof-of-concept, I am working with just a RedBoard, one Victor and one motor.

I am using the Servo library. I have calibrated the Victor for 0=full reverse, 90=neutral (actually 91-97), and 180+=full forward via myservo.write(). I have tried myservo.writeMicroseconds(), as well, finding 1000=full reverse, 1500=neutral, 2000+=full forward. Both work the same, I go with just myservo.write().

My issue is that I cannot get my motor to go slowly enough. At myservo.write(98) (slowest foward speed), the rpm is still too high. It is the same for myservo.writeMicroseconds(1545), the slowest for that function. Would like to pulse my servo like tapping an accelerator.... but delay() isn't helping me out.

Here is my code and attached is my diagram.

#include <Servo.h>

Servo VictorLeft;

void setup() {

 Serial.begin(9600);
 VictorLeft.attach(3);
 
/*For Victor calibration only. Hold CAL button on Victor. Upload code. Continue to hold CAL until LED flashes red-green. Release CAL.
  Serial.println("Maximum position..."); 
  VictorLeft.write(180); // maximum position
  delay(2000);    // wait 2 seconds

  Serial.println("Minimum position..."); 
  VictorLeft.write(0); // minimum position
  delay(2000);    // wait 2 seconds

  Serial.println("Neutral position..."); 
  VictorLeft.write(90);  // "neutral"/"middle" position
*/
}


void loop() { // MAIN CODE START
   
      VictorLeft.write(90);
           
//CCW = 0-90, neutral = 91-97, slow CW = 98-180+
 
} // MAIN CODE END

lunescence

My Victor ESC: http://www.robotmarketplace.com/products/IFI-V883.html

lunescence

I figured it out!

I pulse between slow and neutral, using different delay intervals and ratio between each interval! Example...

myservo.write(90); //slowest forward
delay(100);
myservo.write(95); //neutral
delay(300);

Happy!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy