1

I purchased a 20KG Digital Servo, DS3218MG with a Control Angle of 270° .

I am trying to get it to rotate with the following code:

#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
 myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
int restingVal = 0;
int keyDown = 80;
void loop() {
 int minutesDelay = 1;
 Serial.print("Value");
 Serial.println(restingVal);
 delay(10000/2); 
 myservo.write(keyDown);
 delay(500);
 myservo.write(restingVal);
}

It makes a small "clicking" noise, but it never moves. I have tried:

  • powering it from the arduino using a USB cable
  • powering it using a power cord plugged into an electrical outlet
  • powering it with 4 AA batteries in a battery pack (power from the battery pack to the servo with it's ground to the Arduino's ground and the arduino plugged into an outlet)
  • using a 470uF capacitor and then tried a 680uF capacitor.

What am I doing wrong? Is there something else I could look at?

update: changed code to:

#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
 myservo.attach(9); // attaches the servo on pin 9 to the servo object
 myservo.write(60);
 delay(2000);
 myservo.write(120);
}
int restingVal = 0;
int keyDown = 80;
void loop() {
}

I get the same problem.

The power cord I'm using to connect the arduino is 12V DC 1A.

Here is a photo of the wiring in one configuration (with the battery pack and the wall outlet): enter image description here

Orange wire goes to GND on arduino, the long green goes to ~9, yellow goes to VCC on battery pack.

VE7JRO
2,51519 gold badges27 silver badges29 bronze badges
asked Nov 27, 2018 at 2:37
6
  • 3
    It can require a peak of 1.8 A. Can the batteries do that? Try a small common servo motor. Commented Nov 27, 2018 at 6:41
  • When I replace it with a tiny servo, it works fine. Commented Nov 28, 2018 at 2:31
  • You should proivde schematic. It's unclear from given image Commented Nov 28, 2018 at 4:32
  • 1
    The batteries are perhaps too weak, the wires too thin and the breadboard can not handle those currents. Perhaps with a 5v 2a power supply, with good wires, and good connections it will work. Keep the grounds connected. @SilvioCro, I was able to follow the wires from the photo, the wiring is okay. Commented Nov 28, 2018 at 11:16
  • @Jot Look at orange wire. Looks like it's plug into GTND rail. Commented Nov 28, 2018 at 12:27

2 Answers 2

3

The DS3218MG servo motor is a strong servo motor and it requires more current than normal servo motors.

With a normal servo motor the peak current can be 500 mA or even 1 A. This DS3218MG is specified somewhere at 1.8 A stall current (only 80 to 100 mA during normal operation). However this YouTube video measures a stall current of 2.3 A.

During normal operation, the average current will not even be near the stall current. The peak current on the other hand can be close to the stall current. The peak current occurs at the moment that the servo motors starts to move.

You need a 5 V 2.5 A power supply for that servo motor, together with wires and connectors that are suitable for that current.
You could cheat a little by adding a capacitor. I suggest 2200 μF or 4700 μF.

It is a common mistake to underestimate the current of a servo motor. A power supply is often more expensive than the servo motor.
If a lot of torque is required, perhaps a geared motor is easier to use.

answered Nov 28, 2018 at 16:50
2

My guess is that the servo is drawing too much current from the Arduino 5v pin which can provide up to ~450mA when powered from USB and ~650mA from power jack.

Try providing 5v from an other source to the servo while keeping the GND of that power source and the Arduino common.

answered Nov 28, 2018 at 3:23
2
  • I guess he uses power from two differend sources Commented Nov 28, 2018 at 4:33
  • This may be a really simple question, but what kinds of other sources are available? I added the 4xAA battery pack to provide dedicated power to the servo, hoping it would help. I thought about using a 9v battery, but the servo says "DC 4.8-6.8v" Commented Nov 28, 2018 at 15:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.