L298N, PWM, Arduino Uno: Make it stop!

Hi there -
I have been following various tutorials to work with a L298N breakout board.
Setting the digital output logic, I can determine the direction of the motor. With the analog out, I can use pulse-width modulation to change the speed, within a certain range.

What I'd like to do, though, is be able to slow the motor down to a stop, using a potentiometer at the input.

Is there a guide to do this? Is it possible?

Thanks.

https://create.arduino.cc/projecthub/electronicprojects/dc-motor-speed-control-using-arduino-0e5b2b

2 Likes

This is great - and it seems to work fine for the first motor on the chip. The second motor doesn't seem to be operating at all, though. I'm wondering if I have a defective chip or if there is something else to take into consideration (maybe the Enable pin?)..

How are you powering everything? Motors tend to use a fair bit of power so it's generally best to have them powered with a separate power supply.

12v, 3A power supply. Although, I'm running three boards chained together.. strangely, the first motor works on each board..

Show how you have everything connected.

I soldered the pad under the 12v binder post from the first LM298N board to the pad on the second board and from that board to the third board. Same for the ground. Ground and 5v input are attached to the Arduino.

Pins are connected to Arduino via Dupont wires, which I've tested. The thing is the - the boards all light up and the first motor driver on each board works.

Probably... but if you don't ...

Then no idea. By "everything" I mean every wire from every component to every other component. It impossible to say what might be wrong as we are blind to what you are doing.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.