Go Down

Topic: L298N motor control (Read 3425 times) previous topic - next topic



I'm trying to control an ordinary 5 V DC Motor with the Arduino Board and the L298N H-Bridge.
I didn't yet figure out how the drive the motor in both directions in different speeds.

This is the way I connected the L298N to the Arduino:
Motor: Pin 2 and 3
Ground: Pin 1,8,15
+5V: 4 and 9
PWN9: Pin 5
PWN10: Pin 6
PWN11: Pin7

Here you can find the datasheet of the L295N:

In programming I just switch PWN9 and PWN10 to high but the motor doesn't move.

Could anyone please tell me if I connected it correctly and what I have to do to make it work?


So long   trip


Hello tripmaster,

 Your wiring seem to be good so I think that is your code that is bad.

 If pins 5 (In1) and 7 (In2) of the l298 are at the same level the motor stop quickly. If they are at different levels, the motor turn in one direction or the other.

 If the pin 6 (Enable) is low the motor don't turn is "free" (I don't know how to say "en roue libre").

 summary :

 Enable : LOW -> Nothing

 Enable : HIGH :

     In1 and In2 : LOW or HIGH -> Quick stop
     In1 : LOW and In2 HIGH -> the motor turn in one direction
     In1 : HIGH and In2 LOW -> the motor turn in the other direction


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131