PWM mosfet control of 12VDC Motor

hi,
im trying to control a 12v DC pump motor using PWM.
Ive hooked up a RFP3055 MOSFET with a resistor and diode like in these instructions:
http://bildr.org/2012/03/rfp30n06le-arduino/

When I put 5v power to the gate it works as expected. When i hook the gate up to pin 9 on the arduino and DigitalWrite the pin high or analogeWrite it 255, nothing happens.

It doesnt make sense to me, i though that would be supplying the pin with 5v and that would be the same as going right to the 5v on the board, yet it doesnt do the same.

what am i missing?

That he's using pin 3 not 9?

Mark

Oh, not thats not it. Pin 9 is just the pin that the sample analog write and fade sketches use. So I used 9 because it was easier. 9 is pwm too right?

gr0p3r:
i though that would be supplying the pin with 5v and that would be the same as going right to the 5v on the board, yet it doesnt do the same.

It's not quite the same, because the I/O pin driver will drop the voltage slightly from the nominal 5V. You could try switching the pin HIGH and see what output voltage is present at the pin and compare that to the 5V line voltage. Is that difference enough to affect the MOSFET?

Thanks,
I just tested like you said,
The 5v is actually 5.10v and the High pin is actually 4.93v
is that enough that it wont trip the mosfet? i tried 3.3v, and that doesnt work too.
Should I use another transistor to switch 12v from the 5v pin? and use the 12v from the transistor to switch the mosfet?
this is the Mosfet i have:Intelligent Power and Sensing Technologies | onsemi
this is the transistor i have: http://inst.eecs.berkeley.edu/~ee105/fa07/labs/2N4403.pdf
or these: http://svn.clifford.at/metaparts/trunk/datasheets/DS_63ff076584efa6cbd5ff6e997095eaa1.pdf
are they any good for what this?

The data sheet says your MOSFET has a gate threshold voltage in the range 2V-4V, so I guess it should be possible to get it working. What is the voltage between the MOSFET gate and ground terminals? Are you certain that the only change between the working and non-working circuit is that you moved the wire from 5V to pin 9?

The data sheet says your MOSFET has a gate threshold voltage in the range 2V-4V

i saw that too, so even the lower 4.93v is still more then enough, but the 3.3v on the arduino board does not work, only the 5v. i dont get it.

What is the voltage between the MOSFET gate and ground terminals?

im at work now, ill test that tonight when i get home.

Are you certain that the only change between the working and non-working circuit is that you moved the wire from 5V to pin 9?

i was just unplugging the wire that goes to gate from pin 9 and moving it to 5v, it would start and stop as i did that.

Got it working. I pulled it all apart and put it back togeter and it worked. must have been a lose wire or something.
thanks for the advice still