40KG RC Digital Servo Coreless Servo vs Micro Servo 9g (SG90)

I've got some code running where I move a servo one way when it gets a signal and another way when it gets a different signal. It works great with the little 9G servo my arduino came with, but when I plug in this bigger 40KG Digital servo (Amazon.com: WOAEIUOS 40KG RC Digital Servo Coreless Servo, High Torque Waterproof Metal Gear Servo with 25T Servo Horn 1/10 1/8 RC Car RC Crawler Robot Boat : Toys & Games) it just clicks and doesn't move. I gave it a push and it would spin a bit, but then stop.

I thought it was a power issue, so I hooked it up to a 7.5 V 3A converter (12v to 7.5v). I hooked the positive and negative right to it, then the control line into my arduino. Still no luck. I wired the little servo up the same way and it spun just fine.

I looked to see if there was some coding difference that I'm missing between the two servos, but can't seem to find anything.

Here is the code I'm using:

#include <Servo.h>

Servo myservo1;  // create servo object to control a servo
const byte goodPin = 7;
const byte badPin = 2;
const int servoPin = 3;
const byte outPin = 13;

void setup() {
pinMode(13, OUTPUT);
pinMode(7, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
myservo1.attach(servoPin);

}

void loop() {
   if(digitalRead(goodPin) == LOW){
    digitalWrite(outPin, HIGH);
    delay(100);
    digitalWrite(outPin, LOW);
   
    myservo1.write(40); //setting servo1 accept tilt (set to -40)
    delay(700); //wait
    myservo1.write(90); //setting servo1
     
   }

   if(digitalRead(badPin) == LOW){
    digitalWrite(outPin, HIGH);
    delay(100);
    digitalWrite(outPin, LOW);

    myservo1.write(140); //setting servo1 accept tilt (set to 140)
    delay(700); //wait
    myservo1.write(90); //setting servo1    

  }
  

  
}

Thanks

Did you connect servo ground to Arduino ground? You need both battery and Arduino ground connected. Also, you aren't ever using the Arduino to power any servos, I hope. Even with small servos, it's not recommended.
Lastly, the page for that larger servo states that it has 270 degrees of rotation. There is another way to control them with Arduino but see where you are after the first recommendations.
ser

that seems to help, but now the servo moves erratically. It will move then stop, then move again, then not move for a bit, then do what it is supposed to do for a cycle or two, then stop. When it is not moving it is making a clicking sound. So strange.

Thanks for the help

Try this: I added some simple button debouncing with reading the buttons a second time after a 20ms delay

#include <Servo.h>

Servo myservo1;  // create servo object to control a servo
const byte goodPin = 7;
const byte badPin = 2;
const int servoPin = 3;
const byte outPin = 13;
bool goodBtnState;
bool badBtnState;

void setup() {
  pinMode(13, OUTPUT);
  pinMode(7, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  myservo1.attach(servoPin);
  goodBtnState = HIGH;
  badBtnState = HIGH;
}

void loop() {
  goodBtnState = digitalRead(goodPin);
  if (goodBtnState == LOW) {
    delay(20);
    goodBtnState = digitalRead(goodPin);// read it again, simple button debouncing
    if (goodBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.write(40); //setting servo1 accept tilt (set to -40)
      delay(700); //wait
      myservo1.write(90); //setting servo1
    }
  }
  badBtnState = digitalRead(badPin);
  if (badBtnState == LOW) {
    delay(20);
    badBtnState = digitalRead(badPin);// read it again, simple button debouncing
    if (badBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.write(140); //setting servo1 accept tilt (set to 140)
      delay(700); //wait
      myservo1.write(90); //setting servo1
    }
  }
}

works great on the little servo, not so much on the big one. Just get a constant clicking and no movement. It doesn't even stop clicking. I get the led light up that it got the signal from the button I'm using, but just keeps on clicking.

Do you think it has something to do with the 270 degree of motion, or my movement positions (40, 90, 140)?

Could be. Hang on a sec

Let's see if these typical writeMicroseconds values for most servos work for yours.
Also, the external battery is charged, right?

#include <Servo.h>

Servo myservo1;  // create servo object to control a servo
const byte goodPin = 7;
const byte badPin = 2;
const int servoPin = 3;
const byte outPin = 13;
bool goodBtnState;
bool badBtnState;

void setup() {
  pinMode(13, OUTPUT);
  pinMode(7, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  myservo1.attach(servoPin);
  goodBtnState = HIGH;
  badBtnState = HIGH;
  myservo1.writeMicroseconds(1500);//should be about 90 deg
  delay(500);
}

void loop() {
  goodBtnState = digitalRead(goodPin);
  if (goodBtnState == LOW) {
    delay(20);
    goodBtnState = digitalRead(goodPin);// read it again, simple button debouncing
    if (goodBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.writeMicroseconds(1900); //should be about 170-180deg
      delay(700); //wait
      myservo1.writeMicroseconds(1500);//should be about 90 deg
    }
  }
  badBtnState = digitalRead(badPin);
  if (badBtnState == LOW) {
    delay(20);
    badBtnState = digitalRead(badPin);// read it again, simple button debouncing
    if (badBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.writeMicroseconds(1100); //should be about 0-10 deg
      delay(700); //wait
      myservo1.writeMicroseconds(1500);// should be about 90 deg
    }
  }
}

Found a line that says your pulse range is something like 640-2400uS. Let's widen the values but not all the way to prevent overdriving it. Neutral should be 1500uS. Don't use on normal range servo, you'll overdrive it.

#include <Servo.h>

Servo myservo1;  // create servo object to control a servo
const byte goodPin = 7;
const byte badPin = 2;
const int servoPin = 3;
const byte outPin = 13;
bool goodBtnState;
bool badBtnState;

void setup() {
  pinMode(13, OUTPUT);
  pinMode(7, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  myservo1.attach(servoPin);
  goodBtnState = HIGH;
  badBtnState = HIGH;
  myservo1.writeMicroseconds(1500);//should be about 90 deg
  delay(500);
}

void loop() {
  goodBtnState = digitalRead(goodPin);
  if (goodBtnState == LOW) {
    delay(20);
    goodBtnState = digitalRead(goodPin);// read it again, simple button debouncing
    if (goodBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.writeMicroseconds(2200); //should be about 235 deg
      delay(700); //wait
      myservo1.writeMicroseconds(1500);//should be about 90 deg
    }
  }
  badBtnState = digitalRead(badPin);
  if (badBtnState == LOW) {
    delay(20);
    badBtnState = digitalRead(badPin);// read it again, simple button debouncing
    if (badBtnState == LOW) {
      digitalWrite(outPin, HIGH);
      delay(100);
      digitalWrite(outPin, LOW);
      myservo1.writeMicroseconds(700); //should be about 0-10 deg
      delay(700); //wait
      myservo1.writeMicroseconds(1500);// should be about 90 deg
    }
  }
}

Wow, that seems to work.

Where did you get those values from? I want to know incase I need to adjust the stop and start points.

Thanks again

1 Like

All servos work in microsecond (uS) pulses. They typically operate in the 1000-2000uS range but there are unique ones out there, such as yours.
Those pulse ranges work with RC ESCs, too, such as drone ESCs. I googled your servo and stumbled across the extended pulse range of yours. It's my preference to code myServo.writeMicroseconds(n);vs myServo.write(angle); since I have had the same issue you had in the past.
I think HiTec servos are a bit tricky, too.
Glad it worked out for you :saluting_face:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.