Motors doesn't work with L298N

I have used the l298 before and it worked.
But this time the motor doesn't rotate.After that I connected a LED instead of motor and LED worked.
Motor rotates if it gets power direct from the battery.
Is there a problem with L298?
Sorry about bad English.

We can't see how the circuit is wired, we don't know anything about your motors and we can't see your code. Without at least those things, how can we even start to solve your problem.

Read this how to use this forum sticky to get some advice on how to get the most from the forum.

What motor? What are you powering it with? How is everything connected? What code are you trying to drive it with?

It sounds like whatever you are powering the L298 with is too weak to run whatever motor you're trying to run but it could be plenty of other things. Details are important.


The L298 is ancient, inefficient and weak.

Find out the stall current of your motor, and pick a modern motor driver that can handle it.

Being a darlington based driver, the L298 works best at 24V or higher, where the voltage losses
are proportionately less horrendous. It can drop 2.5 to 4V.