Let's Make Robots!

I need some motor driver advice

Ok all im trying to use L298N Motor Driver board  ............  But im finding it to be pretty inefficent ... as in its really heavy on batterys .... Trying to run a pair of motors whch were in a robot that used 6v .... and to get them to work with this motor driver board Im having to put in 9v (not a 9v battery .... 6 * 1.5v so close to 10v) and even at this is sucking the life out of them extremly quickly eg put six fresh batterys in this morning ran a few tests on robot to day .. and down to 6.7v .... and motors wont run on motor board grrrrrrrrrrrrr. (would only run one motor from motor board from around 7.8v to 8v)

Disconnect motor board and motors running fine on same batterys. 

 

So what would you recomend is a good motor board ..... or simple one i could make myself .... ill be using it with this project .. http://letsmakerobots.com/node/30975 ...

Thanks all.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

You can use the old motor driver, I have done it myself, Here is a pic of the connenctions.

Sorry about the bad artwork.

 

You could use a differnt voltage, I am using 4 AAA's and the original motors and it works fine, but discharges quick.

Example code;

 

 

void setup() {               

  pinMode(5, OUTPUT);  // left motor fwd

  pinMode(6, OUTPUT); // left motor rev

  pinMode(10, OUTPUT); // right motor fwd

  pinMode(11, OUTPUT); // right motor rev

}

 

void loop() {

   delay(1000);

   Forward(255);

   delay(1000); 

   Reverse(255);

   delay(1000); 

   Left(255);

   delay(1000);

   Right(255);

   delay(1000);

   Stop();  

}

 

void Forward(int Speed){

  analogWrite(5, Speed);

  analogWrite(10, Speed);

  analogWrite(6, LOW);

  analogWrite(11, LOW);

  return;

}

 

void Reverse(int Speed){

  analogWrite(6, Speed);

  analogWrite(11, Speed);

  analogWrite(5, LOW);

  analogWrite(10, LOW);

  return;

}

 

void Right(int Speed){

  analogWrite(6, Speed);

  analogWrite(10, Speed);

  analogWrite(5, LOW);

  analogWrite(11, LOW);

  return;

}

 

void Left(int Speed){

  analogWrite(5, Speed);

  analogWrite(11, Speed);

  analogWrite(6, LOW);

  analogWrite(10, LOW);

  return;

}

 

void Stop(){

  analogWrite(5, LOW);

  analogWrite(10, LOW);

  analogWrite(6, LOW);

  analogWrite(11, LOW);

  return;

}

 

Wow ..... nice 1 This works ....  and used batterys that stopped working on other motor board and work fine on this. Plus this is a smaller more compact board and takes up less room and can be screwed into robot base as I still have the screws .... so thanks a lot guys for the help.

your code works fine ... did a test run and changed it to go forward for 3 sec stop for 1 reverse for 3 stop for 1 then loop .... did the job ... so thanks for adding the code.

will hopefully get a chance later to see if i can combine this code with code for sensor and servo and get all parts working together .... And will be close then to having a basic robot ready to test run. 

First off, it is your motors that pull most of the current. What motors are you using? You can switch to a racing pack battery that is NiMH or LiPo, which will have higher capacity for the weight than alkaline batteries.

Changing driver boards won't necessarily help at all. However, I will point out that the L298N (as well as the L293D and SN74410) is based on Bi-polar Junction Transistors (BJTs). BJT based H-bride motor drivers have a sigificant voltage drop (about 1.5V). If you want to avoid this, search for a FET based motor driver. Or, if switching speed is not critical, go for a pair of relays to control your motors. No voltage drop at all.

Thanks again ignoblegnome for replying ....

Have no info on the motors .... nothing written on them when i check the current draw when there running i get a reading of 3.43

i understand its the motor that pulls the current but on original set up with other motor board there was not problem and the 4 batterys to make up the 6v lasted far far longer . with this motor board though 6v isnt enough and even with close to 10v it works but not for long (same batterys different set up ... and huge difference in how long batterys last ... to me means driver is the problem ) .... probably wondering why not use old motor board . Well this is the old set up as you can see 4 boards all linked together so not too sure how i would use it just for the motor board .... 

being new to everything using this board with my arduino would be beyond me.  where as with the L298n board i know how to connect that to the motors and connect it to the arduino ... also how to program it to operate (basic program) and probably program the servo and sensor in as well (have programed all to work to gether briefly  ... but by time i sorted out program to get every thing work right batterys died. .... well unless i disconnect driver .... motors run fine on the batterys still.)

Oh ye i did readings with my multimeter and roughly 9.8 v were going in to the board ... and i checked at the onboard motor connections and roughly 6.7v were going to the motors.

Heres a pic of boards i pulled out ... or better view here http://2.bp.blogspot.com/-xhT9-Du9riM/TzQ49xjaTZI/AAAAAAAAAgI/bkuZsZDopwM/s1600/old+setup.JPG   motors connected to the two connections at back on right hand board ... light sensors and line followers connected to second board from right.

old set up

that you say your motors are drawing almost 4A before they stall. I don't imagine that the 298 can handle much more than where you are right now. I will go way out on a limb and say you need to switch motor drivers completely.

I say that only because from what little I have seen, stall current is usually about twice the freewheelling current.

not Knowing much yet about things  .... would 3.8 be a lot of amps for a motor to be drawing to run on ...