user56864: I have connected my servomotor (MG996R) to my L293D motor shield, which is connected to an Arduino Uno R3 Board.
I use 4x AA 1.2V NiMH batteries to power the shield, and a regular 9V battery to power the Arduino separately. I've removed the jumper wire on the shield.
I've tried uploading all the example codes I could find, multiple times, yet none of them work. The servomotor simply doesn't move at all.
Is there anyway I could see if my servomotor is broken ?
Maybe the wiring is wrong, but I don't think so. Orange is for signal, Red is for + and Brown is for GND.
Could someone help troubleshoot the problem ? Thanks !
PS : here is the example code I use
#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}


user76704: You have two problems
Both of them is related to your power supply :

1st, max. Voltage requirement for your servomotor is 6 volts, not 9 volts

2nd، your batteries are weaker than servo's need.
Your servomotor need 2.5 Amps. In the max. Torque.


So, over-voltage and not enough current is your fault
(According to 996R servomotor datasheet).
Change your power supply by suitable one

56864: <p>I have connected my servomotor (<a href="https://i.imgur.com/gUPc9Vz.png" rel="nofollow noreferrer">MG996R</a>) to my L293D motor shield, which is connected to an Arduino Uno R3 Board.</p>

<p>I use 4x AA 1.2V NiMH batteries to power the shield, and a regular 9V battery to power the Arduino separately. I've removed the jumper wire on the shield.</p>

<p>I've tried uploading all the example codes I could find, multiple times, yet none of them work. The servomotor simply doesn't move at all.</p>

<p>Is there anyway I could see if my servomotor is broken ?
Maybe the wiring is wrong, but I don't think so. Orange is for signal, Red is for + and Brown is for GND.</p>

<p>Could someone help troubleshoot the problem ? Thanks !</p>

<p>PS : here is the example code I use</p>

<pre><code>#include &lt;Servo.h&gt;

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos = 0; pos &lt;= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos &gt;= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
</code></pre>
 76704: <p>You have two problems
Both of them is related to your power supply :</p>
<ul>
<li><p>1st, max. Voltage requirement for your servomotor is 6 volts, not 9 volts</p>
</li>
<li><p>2nd، your batteries are weaker than servo's need.
Your servomotor need 2.5 Amps. In the max. Torque.</p>
</li>
</ul>
<p>So, over-voltage and not enough current is your fault
(According to 996R servomotor datasheet).
Change your power supply by suitable one</p>
