L298N Motor driver

Just a quick question but will definitely help me alot. Will the L298N motor driver be able to carry 26V? 7x 3.7V Batteries? in its zpecifications it says it has a capacity of 35v. But I want assurance. Maybe that 35V is pointing something else. thanks a lot.

further details: i have my previous l298n driver that exploded without knowing the reason (maybe the power supply ground was touched to the aluminum sheet metal I purchased) is it possible to get it exploded? or is it because of the amount of voltage? i dont know.

7 x Lithium batteries fully charged will be 29.4V (4.2V per cell) but an L298N itself will handle that easily. But if you are using it on a Motor Driver board then it's worth checking that all the other components, capacitors etc can also handle the full voltage.

But it's far more likely that you damaged one by trying to draw far too much current from it because the L298N only does around 2A. What were you trying to drive when yours "exploded"?

Steve

slipstick:
7 x Lithium batteries fully charged will be 29.4V (4.2V per cell) but an L298N itself will handle that easily. But if you are using it on a Motor Driver board then it's worth checking that all the other components, capacitors etc can also handle the full voltage.

But it's far more likely that you damaged one by trying to draw far too much current from it because the L298N only does around 2A. What were you trying to drive when yours "exploded"?

Steve

What do you really mean by motor driver board? The things which are at use that time are 2 DC motors (12V) connected to the pins of motor 1 and 2 of the l298n motor driver. im doing wirings at that time and the battery component too. What I remembe r is that I'm reconnecting wires from the battery component when it explode. Could it be the positive terminal of battery component connected to 12+V pin of l298n and the negative terminal of the component is touched accidentally on the metal (body or case of my project)? Im not sure if thats what happened. All I know is that Im holding wires and the chip of l298n exploded.

So, is it possible to have the chip exploded if thats the case? (my theory on the incident)

Im using 2x 12v dc motors for wheels

12v dc motor (2pcs)

What sort of 12V motors? Please post a datasheet/specification or a link to the motors. And please post a schematic/circuit diagram showing how everything is wired.

It sounds like you are you driving 12V motors with a 26V battery. Why? You do know that each motor gets more or less the full voltage that you apply to the L298N? And running a high voltage will greatly increase the current the motor takes.

I'm not sure how you can literally explode an L298N IC because it's not something I've ever done.

Steve

I believe its not all about the wirings that matter here. Since I've successfully wired it before and its just the time where I reconnect the disconnected wires

Will it reallt get that 26v per motor? there's no configuration where the only one motor will be moving. both of the will move at the same (maybe with a different rotation)

ti9bet:
Will it reallt get that 26v per motor? there's no configuration where the only one motor will be moving. both of the will move at the same (maybe with a different rotation)

Yes of course. If you're expecting it to be less where do you think the rest of the voltage will be going? The motors are not connected in series.

Steve

But It's not the motor that crashed here. It is the chip of the l298n. I also believe that the PWM will control the volrage going to the motors. The capacitors will hold it.. I guess

You cannot use those motors safely with 26V, or the L298 driver.

The motor data sheet recommends 18V maximum, and states that the stall current is 1.2A at 12V.

At 26V, the stall current will be far above what the L298 can handle (the manufacturer's ratings are exaggerated). And the L298 is incredibly inefficient, wasting battery power as heat.

This motor driver from Pololu would be suitable, and if you use choose a more sensible operating voltage, this one will work too.

i ain't have time left if i'm going to replace the motor driver. How many battery should I eliminate here in order to run this efficient? With this kind of battery: https://www.makerlab-electronics.com/product/2200mah-lithium-ion-18650-battery-3-7v/ Will 4pcs be enough? I have 7 this time

You can safely use 18V. 4x18650 should be fine.

jremington:
You can safely use 18V. 4x18650 should be fine.

Thanks! But will this comprimise the speed of my motor? btw how did it became 18v if its 4x 3.7v?

4 is less than 18V. 5 is more than 18V. So 4 should be safe, 5 or more are not safe.

Personally I'd use 3S because that gives nearest to 12V, the intended voltage for the motors.

Steve

3 batteries are pretty slow for the motors after trying. But the 4x is absolutely perfect. Thank you Steve!

Some of you may know me already because of my previous post regarding my L298N motor driver. Now, I would like to ask for a help to determine what's the main problem. When I try to rotate the motors with through arduino before, it runs smoothly. (bluetooth controller). Til the time that the L298N motor driver exploded (in my theory, connection of battery wire causes it to explode). Now, I bought another L298N motor driver and the problem is that when I try to control it, the motor is not rotating. Here are some of my atttempts to figure out the problem but cant find it:

a) Connected the wirings of EN1 to IN1/IN2 and the motor rotates. Same goes to EN2 to IN3/IN4.. Works very fine (it rotates, PS: Not connected to arduino yet)
b) Uses Serial monitor to check if the text is being transmitted (works fine).

The problem is
a) After pinning the EN1/2,IN1/2/3/4 arduino digital pins and try to test it controlling, it doesn't works.

I do believe that the codes are not the problem here since I used the same pin slots and code for the first and second trials. (In short, I only changed the motor driver and wired it the as before where it works fine.)

My theory:
a) L298N is defective. (motor 1 rotates sometimes strangely even if without commands while it is pinned to arduino. the sequence is for every 1 sec i guess it rotates like 1 rev.)
b) Arduino has been affected by the explosion of L298N before.
c) Arduino's digital pins are doomed

int motorLpin1=3;
int motorLpin2=4;
int motorRpin1=5;
int motorRpin2=6;
int motorLpwm=7;
int motorRpwm=8;

int motorSpeed=125;
int turn=50;

void setup() {
  Serial.begin(9600);
  Serial.flush();
  pinMode(motorLpin1,OUTPUT);
  pinMode(motorLpin2,OUTPUT);
  pinMode(motorRpin1,OUTPUT);
  pinMode(motorRpin2,OUTPUT);
  pinMode(motorLpwm,OUTPUT);
  pinMode(motorRpwm,OUTPUT);
}

void loop() {
  String input="";
  while(Serial.available()){
    input+=(char)Serial.read();
    delay(5);
  }
  
  if(input=="Stop"){
    stp();
  }
  else if(input=="Up"){
    fwd();
  }
  else if(input=="Down"){
    rev();
  }
  else if(input.indexOf("left")>-1){
    lft();
  }
  else if(input.indexOf("Right")>-1){
    rght();
  }
  else if(input!=""){
    motorSpeed=input.toInt();
  }
}

void fwd(){
  analogWrite(motorLpwm,motorSpeed);
  analogWrite(motorRpwm,motorSpeed);
  digitalWrite(motorLpin1,1);
  digitalWrite(motorLpin2,0);
  digitalWrite(motorRpin1,1);
  digitalWrite(motorRpin2,0);
}

void rev(){
  analogWrite(motorLpwm,motorSpeed);
  analogWrite(motorRpwm,motorSpeed);
  digitalWrite(motorLpin1,0);
  digitalWrite(motorLpin2,1);
  digitalWrite(motorRpin1,0);
  digitalWrite(motorRpin2,1);
}

void lft(){
  analogWrite(motorLpwm,motorSpeed-turn);
  analogWrite(motorRpwm,motorSpeed+turn);
  digitalWrite(motorLpin1,0);
  digitalWrite(motorLpin2,1);
  digitalWrite(motorRpin1,1);
  digitalWrite(motorRpin2,0);
}

void rght(){
  analogWrite(motorLpwm,motorSpeed+turn);
  analogWrite(motorRpwm,motorSpeed-turn);
  digitalWrite(motorLpin1,1);
  digitalWrite(motorLpin2,0);
  digitalWrite(motorRpin1,0);
  digitalWrite(motorRpin2,1);
}

void stp(){
  analogWrite(motorLpwm,0);
  analogWrite(motorRpwm,0);
  digitalWrite(motorLpin1,1);
  digitalWrite(motorLpin2,1);
  digitalWrite(motorRpin1,1);
  digitalWrite(motorRpin2,1);
}

Using 4x battery instead of 7. It's 18650 battery 3.7v

Test the Arduino's output pins one by one by running a simple "blink" program, with an LED/resistor on each output pin.

Buy a modern motor driver that is appropriate for your motors and power supply. Pololu has a great selection.

Are there L298n which are incompatible anymore with some motors? I noticed that the prints of text in the PCB is somehow different from the previous one.

I'm using 4x 18650 battery already. Instead of 7x where I runned it before fine.