Problem with 12 servos hexapod

Hello, im a begginer in arduino and this is the first time i post a question here, im doing and hexapod with 12 microservos using a servoshield like this one: Adafruit 16-Channel 12-bit PWM/Servo Shield - I2C interface : ID 1411 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits and its respective library, problem is i cant find how much current i need to run all the servos at once, im using 4 NiMH AA 3000mAh 1.2v rechargeable batteries (giving a total of 4.8v at 3000mah) and , my microservos are TowerPro Sg90, in the specifications they say they run at min 4.8v so i should be fine, but i cant run more than 6 at the same time, sometimes even less.

I dont know if batteries are draining too fast or the 3000mA they provide are not enough. I saw a vid of someone runing 16 servos at once with the same servodhield also using 4AA batteries so i dont know what the problem is, and i want to make sure its not the current because if i needed more batteries i would need to do a weird setup in my hexapod.

Im trying to test it with the example code that the servoshield provides:

/***************************************************
This is an example for our Adafruit 16-channel PWM & Servo driver
Servo test - this will drive 16 servos, one after the other

Pick one up today in the adafruit shop!
------> Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface [PCA9685] : ID 815 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits

These displays use I2C to communicate, 2 pins are required to
interface. For Arduino UNOs, thats SCL -> Analog 5, SDA -> Analog 4

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

// called this way, it uses the default address 0x40
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
// you can also call it with a different address you want
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x41);

// Depending on your servo make, the pulse width min and max may vary, you
// want these to be as small/large as possible without hitting the hard stop
// for max range. You'll have to tweak them as necessary to match the servos you
// have!
#define SERVOMIN 150 // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX 600 // this is the 'maximum' pulse length count (out of 4096)

// our servo # counter
uint8_t servonum = 0;

void setup() {
Serial.begin(9600);
Serial.println("16 channel Servo test!");

pwm.begin();

pwm.setPWMFreq(60); // Analog servos run at ~60 Hz updates

yield();
}

// you can use this function if you'd like to set the pulse length in seconds
// e.g. setServoPulse(0, 0.001) is a ~1 millisecond pulse width. its not precise!
void setServoPulse(uint8_t n, double pulse) {
double pulselength;

pulselength = 1000000; // 1,000,000 us per second
pulselength /= 60; // 60 Hz
Serial.print(pulselength); Serial.println(" us per period");
pulselength /= 4096; // 12 bits of resolution
Serial.print(pulselength); Serial.println(" us per bit");
pulse *= 1000;
pulse /= pulselength;
Serial.println(pulse);
pwm.setPWM(n, 0, pulse);
}

void loop() {
// Drive each servo one at a time
Serial.println(servonum);
for (uint16_t pulselen = SERVOMIN; pulselen < SERVOMAX; pulselen++) {
pwm.setPWM(servonum, 0, pulselen);
}

delay(500);
for (uint16_t pulselen = SERVOMAX; pulselen > SERVOMIN; pulselen--) {
pwm.setPWM(servonum, 0, pulselen);
}

delay(500);

servonum ++;
if (servonum > 7) servonum = 0;
}

This will run only the first 8 servos.

  servonum ++;
  if (servonum > 7) servonum = 0;

This code runs only one servo at a time, so there should be no problem with your batteries.

Mine shows this. It runs them all.

  servonum ++;
  if (servonum > 15) servonum = 0;

edit: You would be better off with a LiPo battery and maybe a BEC if more power is required. LiPo batteries are capable of at least 20C discharge, and the BECs are pretty efficient regulators. Get a BEC rated at 8-10A.
Here is one at HobbyKing

Also note that a having "3000mAh" battery does not mean that it is able to deliver 3000mA. These are 2 different values, connected by the discharging C-rate.

Please educate yourself about the characteristics of batteries, there are so many people out there that confuse mA and mAh all the time. Even people that try to explain how to treat batteries. It's a nightmare.

lg, couka

Capacity is nothing to do with current-sourcing ability. LiPo or SLA are the only battery chemistries able to
push out dozens of amps from a small size, you need the right battery type.

For instance a CR2032 coin cell can source only about 2mA happily, despite being 150mAh or somthing like that,
whereas a 1.2Ah LiPo might be able to push out 30--40A. That's a thousand-fold difference in the current/charge
ratio. Put another way the calculator battery isn't able to discharge in less than a few days, LiPo can give
everything in a few minutes.

With 3Ah capacity and perhaps 10 to 20A discharge rate (12 servos), you need batteries able to discharge
at the 15 minute rate, and in practice that means you need LiPo.

Thanks, I will try with a LiPo battery then