How do I use the Arduino to control the speed of a DC motor with a transistor?

Dear all,

I am trying to figure out how I can use the Arduino to control the speed of a 23.5V DC motor with a transistor.

Any kind of help will be much appreciated.

Kind regards,

Deadman

Use PWM output to drive a transistor to switch the required current.

This is a regular question and has been answered many times. Do a search of the site.

Weedpharma

weedpharma:
Use PWM output to drive a transistor to switch the required current.

This is a regular question and has been answered many times. Do a search of the site.

Weedpharma

Thank you for your reply.

I think I am using the correct circuit but finding it difficult to pick the correct components with the correct values.

Please find the file attached which contains a schematic diagram of my circuit.

Kind regards,

Nayan

This motor? http://www.pml.com.cn/ver2en/motors/GPM12.html

If so that has a stall current of 25A or so, not 5A as it says (stall current = supply voltage / resistance),
so you need a transistor that can handle 25A.

Definitely want a beefy power MOSFET, backed up by a MOSFET driver probably. No bipolar transistor
is suitable on its own since they have about 10 to 20 fold current gain only in saturation (used as
a switch). The transistor you have selected would require 0.4A on the base to drive only 8A output
and would be dissipating 8W to do so. The Arduino pins output about 0.03A maximum without
risking damage.

Something like the IRFP3077 with 3 milliohm on resistance and a MOSFET driver to feed its
gate would be good. 10A continuous would cause only 0.3W heating in the MOSFET.

MarkT:
This motor? http://www.pml.com.cn/ver2en/motors/GPM12.html

If so that has a stall current of 25A or so, not 5A as it says (stall current = supply voltage / resistance),
so you need a transistor that can handle 25A.

Definitely want a beefy power MOSFET, backed up by a MOSFET driver probably. No bipolar transistor
is suitable on its own since they have about 10 to 20 fold current gain only in saturation (used as
a switch). The transistor you have selected would require 0.4A on the base to drive only 8A output
and would be dissipating 8W to do so. The Arduino pins output about 0.03A maximum without
risking damage.

Something like the IRFP3077 with 3 milliohm on resistance and a MOSFET driver to feed its
gate would be good. 10A continuous would cause only 0.3W heating in the MOSFET.

Thank you for looking at the schematic.

That is the correct motor that i'm using.

How did you work out that the transistor will require 0.4A on the base?

Kind regards,

Nayan

I didn't work anything out, I found the datasheet and looked at it. That's what you do with
electronic devices.

No bipolar transistor has much gain in saturation, 20 or so is very normal.

Saturation is completely different from using the transistor as an analog amplifier,
where the base-collector junction is reverse biased. Saturation involves the
base-collector junction being forward biased yet it carries current in the reverse
direction due to massive carrier injection from the emitter and the emitter being
doped 100's of times more than the base or collector. The current is due to diffusion,
not an electric field.

As MarkT has pointed out, using a MOSFET is by far the better way to go due to the much lower power loss in the switching element.

Weedpharma

Can I replace the transistor with a MOSFET and use the same circuitry in the file I attached yesterday?

Kind regards,

Nayan

You could if you use a logic level gate MOSFET. But as has been said you should use a driver to get rapid switching speeds. If not used, the time taken to actually switch between off and on represent a high R with current flowing and hence heating.

Weedpharma

EDIT, logic gate MOSFET.

I hate autocorrect!!

weedpharma:
You could if you use a login level gate MOSFET. But as has been said you should use a driver to get rapid switching speeds. If not used, the time taken to actually switch between off and on represent a high R with current flowing and hence heating.

Weedpharma

If the motor is running at 2-6RPM of speed, will I still require a MOSFET driver?

Kind regards,

Nayan

The PWM frequency is the main thing. You may be ok without driver if the frequency is lower.

Weedpharma

weedpharma:
The PWM frequency is the main thing. You may be ok without driver if the frequency is lower.

Weedpharma

I converted RPM to Hertz by using the formula 1 RPM = 1/60 Hz.

Therefore, 5 RPM (Required speed) = 5/60 Hz = 0.0833Hz.

Is that correct?

Kind regards,

Nayan

I have not used PWM so will leave it to others to check.

Weedpharma

You might just get a kit like below and do some testing. You might be able to parallel more of the MOSFETs with the one supplied in the kit to control more current.

A lot of people seem to have a lot of resistance to the idea of using a MOSFET driver to drive
a MOSFET, and I can't figure out why. They are purpose built to drive MOSFET gates which are
a nasty load to drive (very capacitive, fights back when switching high voltages and high powers).
You are less likely to have problems in a high power MOSFET circuit if you use a driver designed
for the task (and keep the layout tight and compact).

You can also add a 4k7 resistor in line with the input of a MOSFET driver and protect the Arduino
from the worst case scenario of the MOSFETs frying and taking out the driver too.

zoomkat:
You might just get a kit like below and do some testing. You might be able to parallel more of the MOSFETs with the one supplied in the kit to control more current.

https://www.sparkfun.com/products/12959

Will this be able to handle a 23.5V DC motor?

Kind regards,

Nayan

MarkT:
A lot of people seem to have a lot of resistance to the idea of using a MOSFET driver to drive
a MOSFET, and I can't figure out why. They are purpose built to drive MOSFET gates which are
a nasty load to drive (very capacitive, fights back when switching high voltages and high powers).
You are less likely to have problems in a high power MOSFET circuit if you use a driver designed
for the task (and keep the layout tight and compact).

You can also add a 4k7 resistor in line with the input of a MOSFET driver and protect the Arduino
from the worst case scenario of the MOSFETs frying and taking out the driver too.

I am struggling to figure out which MOSFET driver to use and is capable for the Arduino and the IRFP3077 MOSFET in order to drive the DC motor.

Kind regards,

Nayan

Will this be able to handle a 23.5V DC motor?

In the link I posted there is a data sheet link in the "documents" section for the MOSFET being used that might answer your question.

I am struggling to figure out which MOSFET driver to use

It may be that you don't actually need a MOSFET driver. Order a couple of the below replacement MOSFETS along with the kit in case the one in the kit gets damaged, or use them in parallel with the MOSFET in the kit to increase the current switching capability.

zoomkat:
In the link I posted there is a data sheet link in the "documents" section for the MOSFET being used that might answer your question.

The MOSFET can take up to 60V of drain source voltage and drain gate voltage, the DC motor has a maximum voltage rating of 23.5V therefore this should not be a problem for the MOSFET.

It can take up to 30A of drain current, the DC motor has a maximum current rating of 7.6A therefore this should not be a problem for the MOSFET either.

Am I correct?

Also, the motor will run at 2-6RPM of speed so I do not think I will be using the maximum voltage and current of the DC motor.

Kind regards,

Nayan