Go Down

Topic: Driving a motor shield from external power (Read 1 time) previous topic - next topic


Mar 05, 2013, 06:33 pm Last Edit: Mar 05, 2013, 06:35 pm by bbence Reason: 1

Sorry for the newbie question (or this is how this might sound like) but I cannot seem to understand the following situation: I cannot power this motor shield from external power: http://www.ebay.com/itm/251080674810.

I have both motors hooked to the right place, also the 4 control pins (IN1-IN4) are connected to arduino where I instruct both of them to rotate:

This works fine as long as I power the motor shield from +5V and GND pins of the Arduino. BUT when I connect the +5V and GND (I also tried it first with the 12V input) directly to a 9V battery, the motors don't move at all, but the red light indicating power does light up, only the motors don't move. I tried removing the 5V, also didn't make any difference. And here comes the stranges part (at least to my basic knowledge): if I connect the +5V and GND of the motor shield to the SAME 9V battery that powers Arduino, the motors move! Why is connecting the motor shield to the same battery that Arduino is using different than connecting it to a separate 9V battery? Again, if I connect the shield directly to the +5V and GND pins of Arduino, the motors move (only not that fast) OR if I connect to the +/- terminals of the SAME battery that is connected to arduiono, it works, but using a separate battery it doesn't move, just the red light is lit up.

The motors that I use: www.ebay.com/itm/160964087637

I cannot seem to understand this, so some help would be really welcome. :)



Mar 05, 2013, 06:38 pm Last Edit: Mar 05, 2013, 06:51 pm by JimboZA Reason: 1
Sounds to me that what's missing is that when you power the board externally, you didn't connect the ground of the board to the ground of the Arduino?- Difficult to tell without you showing a circuit, but that might be the problem.

Without the grounds linked, the Arduino control signals to the board have no meaning, since they are 5v as far as the Arduino is concerned but not to the shield since it has no 0V to measure the supposed 5V against.

Edit: Pic added... something like this is needed, see the 0V between the Arduino and the motor board

Edit: The 298 chip in that board guzzled volts by the way... you need about 2-3 (iirc) more in than you need at the motor.


DOH! :)
How could I have missed this?
Indeed, the ground was not connected to Arduino. Somehow I forgot about this.
But now it works like a charm. Thanks!

One more question if you don't mind: for me it's not that clear from the description what are the PWM pin for the motors? Is it IN1 and IN3?


what are the PWM pin for the motors? Is it IN1 and IN3?

If I remember correctly, last time I used an L298 I PWM'd the ENable pins


Thanks, works like a charm (except this issue: http://arduino.cc/forum/index.php/topic,153427.0.html)

Thanks again!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131