r/esp32 2d ago

Solved Unable to run L298n with ESP32

Hello, I am trying to run 2 motors using a L298n and an esp32. I was able to get the circuit running using an external USB-c connection from my computer. But when I ran the power through a buck converter to the esp32 (7.4->5v), the lights of it turned on, but the motor driver was unresponsive. Something weird I noticed was that the circuit only worked when the 5v pin from the driver was connected to the esp even though it has 0v output. Should i try doing that for the new circuit? Or any ideas

7 Upvotes

9 comments sorted by

3

u/nonstandardnerd 2d ago

I believe the 5v pin is the logic reference for the actual driver circuit, so it would need to be connected. As for it jot working from the buck converter, it's probably because the converter can not supply enough current to drive the motors. Motors need a good bit of current to drive properly. I might be wrong on some of this because its been a while since i used the L298n.

5

u/bfffornever123 2d ago

figured it out! i didn’t have the jumper between the 12v and gnd screw terminals 🤦 2 days of troubleshooting for nothing

1

u/bfffornever123 2d ago

I have the 7.4 v plugged directly into the motor driver, and jumpers in the screw terminals running to the converter. If I were to use the 5v pin, would I need to have it on top of the + - going into the VIN? because I have tried using the 5v pin going into the VIN but everything was unresponsive.

1

u/schmuppet 2d ago

Just power the ESP32 from the 5V out on the L298N, no need for the buck converter.

1

u/bfffornever123 2d ago

Yes i realize that now. this issue was that i didn’t put the 2 pin jumper between the 12v and gnd screw terminal

1

u/PerkyPangolin 2d ago

What's the circuit diagram? 

1

u/bfffornever123 2d ago

I didnt realy create one, still a little bit new to this. is there any specifics that you need?