Hi,
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: L298n Dual H Bridge DC Stepper Motor Drive Controller Board Module for Arduino for sale online | eBay.
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:
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,LOW);
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.
Thanks!
Bence