Speed control of motor using arduino

Hi,

I am trying to control the speed of a 12v, 5amp dc motor with the PWM from an arduino uno. I have seen people use things like the L298N, but it is not rated for a high enough current for my motor. I have also seen some people just connect the PWM line straight to a MOSFET and control the motor that way.

My question is how should I go about controlling this motor?

Thanks.

You actually need a couple of resistors and a MOSFET designed for 5 volt control.

A logic level MOSFET driver is fine if the motor is always to turn in one direction (like a water pump), but not good for a motor that needs to be reversed.

An L298 is ancient and inefficient technology that is good for only 2A. It will not survive long trying to drive a 5A motor.

You must pick a motor driver based on motor supply voltage and the motor stall current. Stall current can be many times the running current. The motor will draw stall current, briefly, every time that it starts. Until you know the stall current you cannot, intelligently, choose a driver. The stall current should be listed on the motor data sheet. If not, one can estimate the stall current. Measure the motor winding resistance. Short the meter leads and measure the lead resistance so that you can subtract lead resistance from the final reading. Take several measurements rotating the motor a bit between readings. Use the lowest reading in the calculation. The estimated stall current is the motor supply voltage divided by the measured resistance (after subtracting lead resistance).

Pololu has a good line of DC motor drivers.

1 Like

Is that 5A full load current? If so, the starting / stall current may be more than 40A, you need a switching device that can tolerate this. Post a datasheet link or brand name and exact part number for your motor. Does the motor need to be reversed?

So let's have some clarification from the OP.

Does it need to be reversed, or not? :thinking:

No, the motor does not need to be reversed.

As for the data sheet, the motor I am using is a windshield wiper motor from a car, so I have no information about it. The 5amps is the most I measured when holding it back by hand. However after re-measuring just now the draw on the motor while running in it's application, it never drew more than 2amps.
Also, I calculated the stall current to be 15 amps. (12v / 0.8ohm)

Edit: After some digging, I may have found my motor. It could be an Ankarsrum KSV 5035. One source(link is not working) listed it as having a 75Nm starting torque. (Not sure if that's useful)

You could check out something like this. Uses PWM control input. For the price, it would be hard to beat, esp after you factor in testing.

Thanks for the suggestion. After some research, it looks like it will be perfect for what I need, so I've got one on order.

Thanks everyone for taking the time to help me. I really appreciate Arduino's community of helpful people like you guys.

1 Like

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