Problem with L298N motor driver

I am having trouble running motor with L298N motor driver. To keep things simplified, I removed everything from my project and now only have a motor (specs not known, it's the one that comes with Arduino 4WD car kit project), 12V battery, and L298N driver. There is no Arduino board involved.

Motor works fine when connected directly to battery.

Then I connect battery to 12V pin
And battery's GND to L298N GND
ENA pins have jumper, ENB as well
5V pin is connected to EN1
It makes Out1 high (around 10v), and Out2 low, as expected
Then I connect motor to Out1 and Out2. Both become high. That's the problem.

I also tried with EN2 pin, same problem
I also tried with EN3 and EN4 pins separately, in those cases both Out3 and Out4 become high simultaneously when motor is connected to them, but only one of them high if motor is disconnected.

I have searched on many forums, but couldn't find anyone facing this issue, or a pointer.

Thanks in advance,
Usman

Doesn't exist.
It has ENA and IN1, IN2.
If you want to drive the motor in one direction you connect ENA to HIGH (5V),

  • IN1 HIGH + IN2 LOW -> Motor A moves forward
  • IN1 LOW + IN2 HIGH -> Motor A moves backward

All 3 pins need to be connected (high or low).

To facilitate our help, please post a schematic of your project (even if it's freehand).

There are basically two models of the L298N module:

this one:

and this one:

Which one is yours?

I have the bottom version.

Here are the connections.

Here is the close up. You can see ENA has a jumper, ENB too. IN1 is connected to 5V. In this configuration, OUT1 is high (getting 11+ v), and OUT2 low, which is perfect.

But as soon as I connect motor to OUT1 and OUT2, both become high, so motor doesn't work. If I connect motor directly to the battery pack, it runs.

You didn't connect pin IN2
See post#4

I have now connected IN2 to GND as well. Still the same result.

So you have ENA jumper in place, IN1 connected to 5V and IN2 to battery negative?
And motor connected to OUT 1/2 ?

I am having trouble running motor with L298N motor driver.

From the photo in post #6, it looks like you forgot to connect the motor as well.

That's right.

That's exactly right. But OUT 1/2 both are high when motor is connected. Don't know why.

When I remove the motor, like in my attached image in post#6, Out1 is high and out2 is low as measured by multimeter; which should be the case.

  • With ENA_installed/IN1=5V/IN2=0V and motors connected, measure the voltage on the 3 terminal power terminal strip.
    What do the 12v and 5v terminals read for voltage ?

Look at the truth table on page 6 of datasheet:

If an "In" pin is not connected, the input logic sees it as HIGH, if IN1 is HIGH and IN2 is not connected and ENA is high (the EN pins are pulled HIGH by jumpers) the motor will brake (both outputs HIGH or LOW).
https://www.st.com/resource/en/datasheet/l298.pdf

When motor is connected:

12V reads 11.77
5V reads 4.99
Out1 reads 10.67
Out2 reads 10.67

When I remove motor:

12V reads 11.45
5V reads 4.99
Out1 reads 11.45
Out2 reads 0.67

I have now all 3 pins connected. ENA high, In1 High, In2 to GND for low. But issue still persists. Voltages mentioned above.

Sounds like a damaged L298. Have you switched wires with power ON? Try the other channel (IN3, IN4, ENB, OUT3, OUT4).

  • With what’s being reported in Post #15, this suggests a faulty motor driver board.

What is the current rating of the motor?

Tried other channel. It also behaves the same way.

70mA at 4.5V

And you're putting 12V on it?

I thought 12V was not a problem because motor is working fine when connected directly to 12v source.

Also I tried the setup with 6V battery pack and L298N still behaved the same way.