DC motor use

Hey looking at wiring a DC motor into my project and using the arduino uno board to control it. I have read around online and everywhere seems to say i need a resistor in there somewhere along with a diode to protect the board from back emf. I have a mosfet transistor to control current to the DC motor but neither a diode or resistor. Do i need these or can i wire in the 12V DC motor to the arduino uni via just the mosfet transistor?

With a FET you can get away without the resistor providing you are not PWMing the line but can not do without the diode.

Also just a note that i just want to turn the motor on for a given amount of time and then turn it off again. No speed or direction control is needed here. I suppose an LED would dot he trick as the diode?

Stomper90:
I suppose an LED would dot he trick as the diode?

Not really, no. A typical LED has a very low breakdown voltage so unless you're planning to drive your motor at very low voltage an LED won't cope. An LED also typically only takes extremely low current. You want a plain simple cheap diode with a reverse voltage that is significantly greater than the supply voltage you're using and a rated surge current that is similar to the current your motor will be drawing.

Hmmm that makes sense Peter.
So I have the DC part of my setup wired like this
http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-motor.png
but the motor turns even when there is no signal from the arduino (i.e. theoretically G should have no signal and the gate should be closed meaning S and D arent connected). Is there any explanation for this or is the only possibility that my wiring is wrong?

Do you mean a logic zero is no input from the arduino?
Do you have that 10K, in that circuit that is a pull down and stops the FET turning on when there is no power on the arduino, or the arduino pin is set to an output.
If the motor is turning on when the arduino is connected up and pin 3 is set to an output and you have written a LOW to that pin then you either have it wired up wrong or your FET is broken or of the wrong type.

No the resistor is not in my circuit

And it turns on when the arduino isnt even on

Yes it will that is what I have just told you!!!

I have also told you how to stop it doing this.

This is the transistor. You wouldnt happen to know if its suitable for the specs of the DC motor?
DC Motor specs
• Torque: 12.0kg.cm
• Rated Voltage: 12.0V
• Operating: 4.5 - 18V max
• Current - No load: 70mA
• Current - Full load: 1380mA
• Gear Ratio: 244:1
• Shaft Speed: 36rpm

Photo of transistor

You wouldnt happen to know if its suitable for the specs of the DC motor?

Only if you tell me what the spec of the DC motor you want to drive is.

Its listed above the picture

Stomper90:
Its listed above the picture

I can't see it. The only picture is that Fritzing abortion and that just says motor from 0 to 60V.
Now what motor do you want to use. What voltage and what current?

Hmmm that's odd its not showing up. Specs are as follows
-Torque: 12.0kg.cm
-Rated Voltage: 12.0V
-Operating: 4.5 - 18V max
-Current - No load: 70mA
-Current - Full load: 1380mA
-Gear Ratio: 244:1
-Shaft Speed: 36rpm

Yes that FET is suitable for that motor.