Problem with the motor shield R3

Hello, I have a Arduino Uno R3 and this motor shield http://arduino.cc/it/Main/ArduinoMotorShieldR3 and this is the motor I try to power up http://www.robotshop.com/ca/tamiya-twin-motor-gearbox.html.

I want to power my shield with external power, so I cut the Vin connect and now the motor turn. But it is very weak and reverse did not work (not enough power I suppose) in A. In B forward and backward work correctly. Here is my voltage

A
2.62
-2.76 (motor not turning)

B
2.79
-2.61 (less voltage and the motor turn ??)

Directly in the battery
3.05
-.3.03

The motor is way faster when I connect it directly on the battery (2xAA) why ?

Thank you !

p.s. The code i have uploaded in my arduino

int dirB = 13; // Direction pin for motor B is Digital 12
int speedB = 11; // Speed pin for motor B is Digital 9 (PWM)
int brakeB = 8;

int dirA = 12;   //Diretion pin for motor A is Digital 13
int speedA = 3; //Speed pin or motor A is Digital 10 (PWM)
int brakeA = 9;

void setup() {
  
  //Setup Channel A
  pinMode(dirA, OUTPUT); //Initiates Motor Channel A pin
  pinMode(brakeA, OUTPUT); //Initiates Brake Channel A pin
  pinMode(speedA, OUTPUT);
  
  pinMode(dirB, OUTPUT); //Initiates Motor Channel A pin
  pinMode(brakeB, OUTPUT); //Initiates Brake Channel A pin
  pinMode(speedB, OUTPUT);
}

void loop()
{
forward();

delay(4000);

//brake();

backward();

 delay(4000);
}

void forward() 
{
    digitalWrite(dirA, HIGH); //Establishes forward direction of Channel A
    digitalWrite(brakeA, LOW);   //Disengage the Brake for Channel A
    analogWrite(speedA, 255);   //Spins the motor on Channel A at full speed
    
    digitalWrite(dirB, HIGH); //Establishes forward direction of Channel B
    digitalWrite(brakeB, LOW);   //Disengage the Brake for Channel B
    analogWrite(speedB, 255);   //Spins the motor on Channel B at full speed
}

void backward()
{
    digitalWrite(dirA, LOW); //Establishes forward direction of Channel A
    digitalWrite(brakeA, LOW);   //Disengage the Brake for Channel A
    analogWrite(speedA, 255);   //Spins the motor on Channel A at full speed
    
    digitalWrite(dirB, LOW); //Establishes forward direction of Channel B
    digitalWrite(brakeB, LOW);   //Disengage the Brake for Channel B
    analogWrite(speedB, 255);   //Spins the motor on Channel B at full speed
}

One thing I directly noticed is that the motor shield is rated at 5V-12V and your motors run at 1.5V-3V

The L298P on your motor shield doesn’t like switching a motor voltage that’s lower than it’s logic voltage (5V?).

http://www.datasheetcatalog.org/datasheet/SGSThomsonMicroelectronics/mXxwur.pdf

On page 3 of the datasheet you see that VS has a minimum of VIH +2.5
VIH is the minimum voltage for the L298 to register a HIGH on it’s input pin. To understand what I’m saying you can turn the shield on and measure input 3 of the L298(pin 13 see datasheet pg 2) then add 2.5V to that.

The quickest way to get it to work is PWM (5V @ ~10-30% duty cycle) to “simulate” the lower voltage that your motors need. If you do this keep checking the motors and driver chip for heat. http://arduino.cc/it/Tutorial/PWM

analogWrite(speedA, 255);
analogWrite(speedB, 255);
are PWM functions connected to the Enable pins of the L298. 255 is 100% duty cycle so 10% of that would be 25. I wouldn’t go any higher than 127 with 5V

The L298 is a darlington driver intended for higher voltages than 3V. It loses some 2 to 3V across the output stages so cannot work from a 3V supply (and is pretty awful from 6V, 12V and above is intended really). For low voltage motor operation a MOSFET H-bridge is much better choice since it doesn't have these voltage losses at all. The L298 is designed for upto 46V BTW, but without a heatsink the motorshield is limited to 12V nominally to avoid overheating.

Personally I am not a fan of the L298, its an ancient and inefficient chip - it is available in through-hole package though, hence its continued popularity for breadboarding.

I have the same setup and I ran it with 4 AA (6Volts) feeding the motor shield without cutting the voltage jumper. I have the speed set to 255 and so far it is holding up. I was unable to turn the motor speed down and get the motor shield to work, guessing it has to do with the low voltage that I am running. If you are interested I have a sketch that will control the twin motors with a Sony remote, make a cool little tank.