Need more current


I'm new to arduino and i'm currently making a robot which can drive around all by itself.
So i bought 4 of these engines:

and they are all controlled by the arduino. Now my problem is that the current comes from the digital output pins, which can't deliver enough current or voltage to make the engines run. (At least that's why I think it doesn't work.)
I use an arduino UNO

When I add an LED before the engine, it flashes a bit when I get my hand out of the sight of the proximity sensor.

For those who want to see the code:

// declaring the pins
int left_front = 13;
int right_front = 12;
int left_back = 11;
int right_back = 10;

int sensor_left = 6;
int sensor_middle = 5;
int sensor_right = 3;
int last_dir = 0;

void setup ()
  // setting up the pinmode
  pinMode(left_front, OUTPUT);
  pinMode(right_front, OUTPUT);
  pinMode(left_back, OUTPUT);
  pinMode(right_back, OUTPUT);
  pinMode(sensor_left, INPUT);
  pinMode(sensor_middle, INPUT);
  pinMode(sensor_right, INPUT);

void loop ()
  int obs = check_obstacles();
  if(obs == 0 && last_dir != 1)
    last_dir = 1;
  else if(obs == 1 && last_dir != 2)
    last_dir = 2;
  else if(last_dir != 3)
    last_dir = 3;

// check for obstacles
int check_obstacles()
  // reading the pins
  int left = digitalRead(sensor_left);
  int middle = digitalRead(sensor_middle);
  int right = digitalRead(sensor_right);
  // posting the values in the serial monitors
  Serial.print(" 1: ");
  Serial.print(" 2: ");
  Serial.print(" 3: ");
  // check if left
  if(left == LOW )
    return 0;
  }else if(right == LOW || middle == LOW)
    return 1;
    return 2;

//directions to go
int go_to_left()
{ Serial.println("LEFT");
    digitalWrite(left_front, LOW);
    digitalWrite(left_back, LOW); 

int go_to_right()
    digitalWrite(right_front, LOW);
    digitalWrite(right_back, LOW);

int go_forward()
    digitalWrite(right_front, HIGH);
    digitalWrite(right_back, HIGH);
    digitalWrite(left_front, HIGH);
    digitalWrite(left_back, HIGH); 

So how can I solve this?

Thanks in advance,

please don't try to supply the power to motors directly from the arduino.
use the outputs from arduino to send control signals to external driver.
somthing like this:


thanks for the advice. :slight_smile:
Could I use this as well?

Or do I really have to use a robot shield?
And if I really have to; Can I put two robot shields (2 x 2 motors) onto eachother?

Kind regards,

yes you can use this driver too ,its even better.

Hoi Willem, en welkom.

I don't agree with ksty, when he tells you that power shield is better.
The power shield is a power supply, not a motor control board.
You can control it with your Arduino, but only to switch it on or off.
You can also read the output voltage, but you can't control that voltage by your Arduino.
Also, you can't control polarity.

You can do all of the mentioned things with a motor shield, except direct reading an output voltage from the shield (you'd need to add something yourself for that).
Then again, you'll learn soon that voltage isn't that interesting (but current is).

It is very unlikely you can stack motor shields (their cooling profiles will not allow that).
And the boards ksty linked to aren't shields, and therefore aren't built to be stacked anyway.
You could use two of them, though.
Just need to have enough pins available.

Veel succes verder.

For the brushed DC motors like you describe, a DC motor driver would be the best choice (not a stepping motor controller like the L298D). Here are some choices: Pololu - Brushed DC Motor Drivers For the motors linked in your first post, this very inexpensive dual motor driver will probably be adequate: Pololu - DRV8833 Dual Motor Driver Carrier