irf 510

hello, new to all this stuff :) Im trying to run a 9v motor with the arduino by using a battery and a mosfet irf 510. What im confused about is how to connect the negative terminal of the battery and the source of the mosfet. gate goes to pin5 of the arduino, and drain to the motor, whose other end is attached to positive terminal of battery.Now I think I have to connect the source to the ground pin of the arduino but then what to do with the negative terminal? any help? thanks harsha

The good part... is that you are getting the concept of needing to close the circuit. The black lead (or negative terminal, as you say) is better referred to in this case as COMMON or GROUND.

So, you could attach it to the common-ground pin of the arduino board to close the circuit. The Positive lead of the Battery remains ISOLATED from the arduino... since the arduino has it own positive supply at 5 volts. The + voltage for the battery only involves the MOTOR circuitry.

The IRF510 is common, but no designed to work with a 5V drive signal. It will only supply about 6V to the motor if you drive it directly from the Arduino data pin. That's why you need to drive the GATE pin with a higher voltage using an Extra Transistor... and this WILL invert your logic. Low=ON HIGH=OFF