Mosfet gate voltage

thanks majenko,

I do have a 100 ohm series resistor between the I/O pin and the mosfet gate, but I'll try a 220 ohm resistor.

You are right about the breadboard. I am planning to solder the entire circuit into a perf board, but I just wanted to use a breadboard first to test my circuit wiring because I don't have many spare parts.

If I insert the ATmega chip back into the arduino board, power the board from the same batteries and regulator and wire the I/O pin to the mosfet gate the motor runs as it should and I measure 5V between the I/O pin and mosfet gate. Any idea why that works but the standalone arduino doesn't? Could it be the values of the decoupling capacitors that the arduino uses? That's one more thing I would like to check before I solder the circuit into the perf board.