I am trying to build my knowledge of working with dc motors by using an IRF510 MOSFET to switch a motor on and off. Please refer to the schematic below to see how I hooked everything up.

\$S_1\$ = jumper I used to toggle the gate voltage to \$0\$ or \$5V\$
\$R_P\$ = pulldown resistor (\$9.85k\Omega\$, measured)
\$R_M\$ = electric motor resistance (\$1\Omega\$, measured)
\$i_{DS}\$ = drain current (\$\approx750mA\$, measured)
\$R_{DS}\$ = drain-source resistance when MOSFET is on (\$0.6\Omega\$, from \$V_{DS}/i_{DS}\$)
\$V_{BATT, open}\$ = open circuit voltage of 9V battery (\$8.68V\$)


The first thing that put me in a loop was when the battery voltage dropped after closing the switch. I took some more measurements to get a grip on what was going on:

\$V_{BATT, closed}\$ = battery voltage when \$S_1\$ is closed (\$3.11V\$, measured)
\$V_{M}\$ = motor voltage (\$2.57V\$, measured)
\$V_{DS}\$ = drain-source voltage (\$0.54V\$, measured)

After some research, I determined that the voltage drop was due to the internal resistance of the battery. This is what I was able to figure out after some more calculations:

\$V_{R_i}\$ = voltage across \$R_i\$ (\$5.11V\$, from \$V_{BATT, open}-V_{BATT, closed}\$)
\$R_i\$ = internal resistance of the battery (\$2.87\Omega\$, from voltage divider)

My gut reaction tells me to use a voltage divider to maintain the voltage across the motor. I want to do this because my motor is rated to operate between 5V and 9V. I also want to add a current-limiting resistor in series to prevent the current from getting so high that it burns out my circuit and drains my battery. Ideally, I can achieve the desired \$V_M\$ if I add a resistor in parallel to the motor (\$R_P\$) such that the equivalent resistance of the motor and its \$R_P\$ (\$R_{EQ}\$) is much larger than \$R_i + R_{DS}\$. However, since \$R_M=1\Omega\$, the best equivalent resistance I can achieve is \$approx1\Omega\$, which puts be back squarely where I started. Furthermore, the series current-limiting resistor will take the lion's share of the voltage drop, thus robbing the motor of the voltage it needs.

How may I achieve the voltage drop I want and limit the current? Any help would be greatly appreciated. This is the first time I posted to StackExchange so I apologize if I broke any protocol.

  • 1
    \$\begingroup\$ \$R_P\$ is the wrong side of S1. You need it to discharge the gate charge when S1 opens. You can't get 3/4 A from a PP3 style 9 V battery. +1 for giving good details and a schematic on your first post. \$\endgroup\$
    – Transistor
    Commented Mar 25, 2016 at 19:35
  • 2
    \$\begingroup\$ Very well presented, +1. I hope your colleagues appreciate how well you present your facts. As others have said, it looks like the power supply is a low-capacity battery. It's voltage will fall because of its internal resistance and low-capacity, and it is going to run flat very quickly. I'd recommend getting a much lower current motor, or a much higher capacity battery. Anything with a stall current under 400mA should be okay, then they can be powered from an Arduino's 5V (as long as you don't stall the motor too long), e.g. rapidonline.com/Search?query=37-0441 \$\endgroup\$
    – gbulmer
    Commented Mar 25, 2016 at 20:12
  • \$\begingroup\$ @transistor, thanks for the clarification. The explanation for the pulldown makes perfect sense and I dropped the ball on that one! \$\endgroup\$ Commented Mar 26, 2016 at 0:25
  • \$\begingroup\$ @gbulmer, thank you for your response. I think I saw a 4-battery or a 6-battery AA battery pack lying around the house. I will use that instead. \$\endgroup\$ Commented Mar 26, 2016 at 0:27

2 Answers 2


Your voltage dropped b/c a 9V battery is just a poor voltage source. If you use a few AA batteries or larger in series, your voltage drop will be much less.

In motor control - and in many fields - you will want to use pulse-width modulation (PWM). Imagine toggling your switch thousands of times each second. If you pulsed it half the time, then you would have a 50% duty cycle, or half of the effective voltage on the motor.

PWM is the standard method of controlling voltage and/or current through motors and in DC/DC converters.

I don't use Arduino very much, but I believe that it has a PWM on board and analog functions that are actually PWM. I think it operates at ~500Hz. I'm not sure if this is fast enough, but it won't hurt anything to switch too slowly. Use it to control your MOSFET directly (remove the switch) using the analogWrite function. To implement this, move your MOSFET gate to an analog or other PWM and use the appropriate function to apply PWM.

If your PWM frequency is too low, then you will be able to hear the motor responding to it. For instance, if it is 1Hz, then the motor will turn on for half a second, then off for half a second. You will be able to hear that clearly. Increase the PWM frequency until the motor runs smoothly. There are other reasons to change the PWM frequency as well, but in your stage of learning this should be sufficient. Enjoy, motors are fun!

  • \$\begingroup\$ thank you for your answer. I totally forgot about using PWM to control the motor. That being said, if my effective voltage is below the operating voltage, will I still run into the problem of damaging my motor. For example, my motor is spec'd for 5-9V. If I use 4 AA-batteries in series, a 20% duty cycle on this 6V source, assuming \$R_i = R_{DS} = 0\$, would result in an effective voltage of 1.2V across the motor. Will I be operating my motor below the operating voltage, or will I be okay since the peak voltage of the PWM pulses will be 6V? \$\endgroup\$ Commented Mar 26, 2016 at 0:37
  • 1
    \$\begingroup\$ You can run your motor at as low a voltage as you like using PWM. I routinely operate 200V motors at 5% duty cycle in order to slow them way down. The problem is when you are running a low-voltage motor at high voltage, and this is usually a thermal limitation. \$\endgroup\$ Commented Mar 26, 2016 at 0:43
  • 1
    \$\begingroup\$ Nice answer. Btw, the Arduino's default PWM frequency is 490Hz (976Hz on pins 5/6), but it can be increased if necessary: up to 31.3kHz (62.5kHz on pins 5/6). But 490Hz should be fine for this application. \$\endgroup\$
    – uint128_t
    Commented Mar 26, 2016 at 1:20

There are some "short cuts" that you should be familiar with, so that you can do a quick "operational analysis."
When the transistor is on, you can think of it as a short (a piece of wire), so if you want 5v across the motor (which is 1 ohm), you need 5A. Since the internal resistance of the battery is about 2 ohms, that would drop 10v, so you would need a 15v battery capable of delivering 5A (75 watts... 25W for the motor and 50W inside the battery).
If you can get a battery with only 1 ohm internal resistance, then you would only need 10v, 5A (50 watts... 25W for the motor and 25W inside the battery).

Keep in mind that since the transistor is not really a short, its resistance would also use up some power which the battery would have to supply.

So now, using 1 ohm for the motor 1ohm for the transistor, and 2 ohms for the internal resistance gives 4 ohms total resistance. The maximum current that the 9v battery can provide is (9/4 =) 2.25A, which means that the maximum voltage the motor can get (under these parameters) is 2.25v (2.25v across the transistor, and 4.5v inside the battery).

The above would be considered a "steady state" analysis. So now to limit the current and still provide the voltage required, the PWM method (which has been proposed), would be a way to do it - at the cost of less torque produced by the motor.

I would recommend that you use a 12v car battery and see if the measurement changes are closer to what you want.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.