Hello. I'm working on a project which involves building a car with two DC motors. I'm controlling their speed through the L298N driver, but when I put it into operation, one of the wheels spins faster than the other and the car doesn't go straight.
I've been taking measurements and I see that it provides different voltage and current through the connection pins to the motor cables (OUT1, OUT2, OUT3, and OUT4). I suppose this is why the motors aren't spinning at the same speed.
I'm not sure what could be causing this. I'm powering the L298N with a regular 9V battery, and the Arduino with the 5V output from the driver. Can anyone help me?
Not without seeing the code. Nobody can help without that, at least. Don't forget to use code tags, please. Also, details about your circuit, a drawing is helpful, the more detail you give, the better help we can give. Are they straight DC motors? Identical? Gearboxes?
And the motors turn in the directions you want them to, just gradually veering to one side? I mean, by the drawing, they are wired identically. Without seeing it in person, if you reverse the wires on one of the motors does it make the problem better or worse?
I understood that one of the engines turns faster than the other.
Just to better understand, what happens if you reverse the connection of the motors.
Connect the engine on the left where the one on the right is and the one on the right where the one on the left is.
What happens?
Does the higher speed change with the engine or not?