DC Motor Control

thetree:
Thanks for the quick response. Can I just ask how you came to 100 - 220 ohms?

The gate of a mosfet behaves like a capacitor. The purpose of the series resistor is to limit the peak current to/from the Arduino pin when it changes state. 100 ohms limits it to around 40mA (the maximum continuous rating), and 220 ohms limits it to around 20mA. Higher values will slow down the mosfet switching, causing it to run hotter - especially if you are using PWM to control the motor speed.

thetree:
I'm struggling to find diodes rated to 21A - the current limiting plan might be a better option. Also, if I want to limit this to 10A then I'll need a 0.72 ohm resistor. Finding it hard to find a 0.72 ohm resistor too, so would having a 1 ohm resistor limit the current to 7.2A matter? The motors normal current is ~3A so it would only limit the spin up current, meaning it would just be slightly slower when accelerating? If I were to use a 1 ohm resistor its not going to drop a significant voltage across it as I assume the resistance in the motor is much higher?

There are plenty of diodes available rated 21A or above - just search the distributor web sites. For example, http://uk.farnell.com/ixys-semiconductor/dss-25-0025b/diode-schottky-25a/dp/1080065. Alternatively, you could use a second mosfet of similar type. If you connect the gate to the source, the mosfet will be permanently off. However, all power mosfets have a body diode between source and drain, and this diode is normally rated to carry at least as much current as the mosfet channel itself.

The DC resistance of the motor is 7.2v/21A = 0.34 ohms. At 3A, a 1 ohm resistor would drop 3v, which is quite significant given that the power supply is only 7.2v. You could use a 0.4 ohm resistor (which you can make up from three 1.2 ohm resistors in parallel), which when added to the 0.34 ohm motor resistance will limit the current to 10A.

Alternatively, you could implement active current limiting, i.e. sense the current and turn off the mosfet for a short time if the current reaches some limit. You might want to implement current limiting for other reasons, e.g. to protect the motor from burning out, or to protect the battery or power supply.