Why this DC motor won´t power up with these AA batteries?

Hi there,
I´m working on my first arduino project. It´s a bluetooth controlled toy car. The car isn´t a toy, I´ve bought the parts and ensembled them. I´m using arduino Mega 2560, and an Adafruit Motor shield.

The problem is that after a lot of reading, watching tutorials, and asking here in the forum, I´ve managed to get a working car. Just that: When I connect the car to the (motorshield ensembled) arduino, and the arduino to the computer using the usb port, I get wheels moving. But as it needs some extra power, I´ve attached to them the three AA batteries that came with the car that I´ve ensembled.

My problem is that when I use the batteries, the car won´t move. The arduino and motor shield leds will light up, but the wheels won´t move at all.
Why could that be?

Any help will be very much appreciated!

I´m attaching an image with the schematics, and the code that I´m using.

#include <AFMotor.h>
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
int SwichState=0; //estado inicial del swich

void setup() {
  pinMode(31,INPUT); //tomamos data del botón
  pinMode(51,OUTPUT); //preparamos la luz para encenderla al activar el motor
void loop() {
if(SwichState== HIGH){

}else {

Put a voltmeter on the motor pins. Is any voltage reaching them? Are you sure your switch 31 is working as you expect?

I would put a Serial print after "if(SwichState== HIGH){" to verify that this code is actually reached.

But as it needs some extra power

3 AA batteries = less that 4.5v minus the voltage drop in the motor controller. You've got less power not more.

I suggest you either get a decent mosfet based motor controller with a low voltage drop (unlike the one you have at the moment), or try powering it from four 1.2V NiMH AA cells to increase both the voltage and the current capacity.

Four 1.2V NiMH AA cells equals 4.8v. 5-6 cells will probably be needed. A low voltage drop mosfet controller is of course a good choice.

Thanks for your replies!!!
I think I´ll have to buy a decent mosfat after all :slight_smile:

But what intrigues me here is that if I eliminate the arduino from the picture, and connect both DC motors directely and only to those 3 AA batteries, the car runs perfectly well, I mean with enough power to get it moving.

Why it loses power with the arduino?

Why it loses power with the arduino?

Because the Adafruit motor shield is based the L293D, on an old bipolar motor control chip that has a high voltage drop (typically 2.6V @ 1A load). A mosfet-based controller like this Motor Driver 2.5A MC33926 - ROB-11080 - SparkFun Electronics or this Pololu - TB6612FNG Dual Motor Driver Carrier will work much better for driving low-voltage motors. Note that the minimum supply voltage for these motor drivers is 5V and 4.5V respectively.

Thanks for your reply!
(I´ll have to go and have one of these. I´m on holiday now, out of my country, and I´ve bought these stuff to get acquainted with the arduino while on it).