Finally found the solution for l298n motor driver with Pixhawk!

Greetings all,

When I was building my first Ardurover, due to my budget constraint I chose the l298n motor driver over some other expensive drivers. Guess what I faced the same issue that all faced, NO PWM OUT from the driver. So what I did was I added an extra circuitry to the IN1-IN2 and IN3-IN4 pins (1 for each pair) and keep the enable pins default connected with a jumper clip. What’s the interesting circuit that actual made that driver work, don’t laugh guys I just used a servo motor circuit. I dismantled the servo motors completely leaving just the circuit with it’s cables(signal, power and ground on one side which will be from the Pixhawk to receive signal and control of the motors and on the other side…actual power, ground connection to the source to power up the motors). In the servo motor circuit, the place where the original motor was present now replace it with your dc motor and you are set to run this rover. Even with this circuit I had another problem and that was with respect to arming of the rover, it wasn’t arming even after doing it on the rover hardware. I had to Force arm in the mission planner every time I turn on the rover. I guess people with experience would not have this problem and figure out the solution easily but still others can see if they face the same problem as well.
Happy to share this information with my fellow techies :grinning: :grinning:!!!

1 Like

Any pictures or schematics of what you are referring to?

Thanks.

No idea what you’re on about here. The LN298 is already well documented:

Brushed Motors — Rover documentation (ardupilot.org)

And that page links to this one in case you have trouble:

jazzl0ver/ardupilot-rover-l298n: How to setup Ardupilot based Rover with L298N motor driver to control with reverse simple DC brushed motors (github.com)

A need to force arm has nothing to do with the driver in use and everything to do with poor configuration.

yes you can use a servo board connected to a L298N to drive a larger motor. I use it for custom servos. But you don’t need to do that to operate drive motors with ardurover assuming your not using an APM, just set the motor output to brushed bipolar and it will drive them directly.

Here you go, this is the best possible way to get an idea of what I have told.

Good one, but I haven’t tried this nor I have got this solution. Thanks though, hope people find this helpful.

I agree it is well documented but I have done everything that is present there and I did not get the results as expected.

Don’t do with software what you can do with hardware.

what flight controller are you using?

I am using the Pixhawk 2.4.8