Power issues for servos

hello i am trying to controls 12 servos (tower pro 9g micro servo) with 2 9 volt batteries. when i comment out the commands for some of the servos it works but when i 5 or more servos are not commented out it does not work any more. the code is below.

#include <Servo.h>

int pos1;
int pos2;
float bigdelayer = 15;

Servo l1top;
Servo l1bot;
Servo l2top;
Servo l2bot;
Servo l3top;
Servo l3bot;
Servo r1top;
Servo r1bot;
Servo r2top;
Servo r2bot;
Servo r3top;
Servo r3bot;

void setup() {
  l1top.attach(52,500,2500);//
  l1bot.attach(29,500,2500);
  l2top.attach(38,500,2500);
  l2bot.attach(53,500,2500);//
  l3top.attach(35,500,2500);
  l3bot.attach(41,500,2500);
  r1top.attach(30,500,2500);
  r1bot.attach(42,500,2500);
  r2top.attach(51,500,2500);//
  r2bot.attach(46,500,2500);
  r3top.attach(49,500,2500);
  r3bot.attach(23,500,2500);

  Serial.begin(9600);

  //top
  l1top.write(90);
  l2top.write(90);
  l3top.write(90);
  l1bot.write(90);
  l2bot.write(90);
  l3bot.write(90);
  //bottom
  l1bot.write(90);
  l2bot.write(90);
  l3bot.write(90);
  r1top.write(90);
  r2top.write(90);
  r3top.write(90);
}

void loop() {
for (pos1 = 70; pos1 <= 110; pos1 += 1){
      //left
      l1top.write(pos1-10);
      l2top.write(pos1-10);
      l3top.write(pos1-10);
      delay(bigdelayer);
      l1bot.write(pos1);
      l2bot.write(pos1);
      l3bot.write(pos1);
      delay(bigdelayer);
      //right
      r1top.write(pos1);
      r2top.write(pos1);
      r3top.write(pos1);
      delay(bigdelayer);
      r1bot.write(pos1);
      r2bot.write(pos1);
      r3bot.write(pos1);
      delay(bigdelayer);
    }  
    for (pos2 = 90; pos2 <= 120; pos2 += 1){ 

      delay(bigdelayer); 
    }
    for (pos1 = 110; pos1 >= 70; pos1 -= 1){
      //left
      l1top.write(pos1-10);
      l2top.write(pos1-10);
      l3top.write(pos1-10);
      delay(bigdelayer);
      l1bot.write(pos1);
      l2bot.write(pos1);
      l3bot.write(pos1);
      delay(bigdelayer);
      //right
      r1top.write(pos1);
      r2top.write(pos1);
      r3top.write(pos1);
      delay(bigdelayer);
      r1bot.write(pos1);
      r2bot.write(pos1);
      r3bot.write(pos1);
      delay(bigdelayer); 
    }  
    for (pos2 = 120; pos2 >= 90; pos2 -= 1){

      delay(bigdelayer); 
    }
}

One of the worst possible choices, and you may even have damaged the servo electronics. Almost all servos are rated for operation at 4.8 to 6V.

Use a 4xAA battery pack for 1 or 2 small servos, and plan on current draw of 1 Ampere per servo.

For larger servos like the MG996R, the servo power supply must be able to provide 2.5 Amperes per servo.

PP3 NO2

1 Like

As I'm beginning to learn about electric circuits and I find it difficult to find answers to my specific questions online, do you mind telling me if my thought process is right or wrong?

  1. Do you want to only (parallel) connect 1 or 2 servo's on 1 battery pack, because the power source would otherwise deliver too much current and get damaged?

  2. A motor I bought (JGY-370 30RPM) uses 24V for 3W -> 0.125A. The data sheet sais it's rated current is <0.5A, how could you possibly surpass that? (other then using <6V)

You don't need to give me a whole explanation, I'll google myself if i'm wrong.
(Also my multimeter will get delivered soon :P)

  • Trying to take too much current from a battery may reduce the terminal voltage and/or over heat the battery.

  • Your supply voltage must match the load’s requirements.

  • The supply must be able to safely supply the load current.

  • Before trying to use your DMM, watch a few YouTube videos on how to use a DMM.

Thank you sincerely!
I'll follow your advice and watch some DMM video's.
While testing the motors i'm probably going to use fuses as well, just in case.

No need, as long as you obey the motor manufacturer's voltage recommendations.

You MUST understand that motors and servos briefly draw the "start/stall" current every time they start moving, as well as when very heavily loaded, and that is typically 5 to 10 times the free running current. Responsible manufacturers and sellers state the stall current in the motor specifications.

The motor power supply must be able to supply that start/stall current, or the motor will cause a "brown-out". Never use an Arduino to power motors or servos, as that can damage the Arduino.

Thanks a lot for the given information!
I’ll also make shure to not start every motor at the same time.
Even though in my project that's probably not even be necessary, i guess it can only be a good thing to do.

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