Can not maximize motor speed with arduino mega + L298 motor driver

I have a 12v motor, with arduino mega2560 and l298 motor driver. When I run motor directly from 12v battery it is in its highest speed, but when I run via program(even its value is 255) but still it is not going into its highest speed. How can I maximize motor speed using program?

ghafor1:
I have a 12v motor, with arduino mega2560 and l298 motor driver. When I run motor directly from 12v battery it is in its highest speed, but when I run via program(even its value is 255) but still it is not going into its highest speed. How can I maximize motor speed using program?

Replace the L298 with something from the 21st century.

Or maybe feed the L298 with at least 16V to give you a chance of actually getting somewhere near 12V to the motor.

The L298 drops a lot of voltage...which is just one of the reasons why using a more modern motor driver would be a good idea.

Steve

I agree with Reply #1 - the L298N is old technology that wastes a lot of energy - especially if the motor is drawing a substantial current.

You have not told us how much current the motor draws and if you need more help please post a link to the motor datasheet.

You should choose a motor driver that can handle the stall current of the motor. The stall current is usually several times larger than the operating current.

The Pololu website has a good range of motor drivers.

…R