The arduino drives the gate of the mosfet (irf540n) just fine (I've tested it with an led + 100 ohm resistor) and now I want to drive a small dc brushless motor. I've connected everything properly but it works not quite the way I want it to.
The drain and source are supposedly not connected if there is no gate voltage applied and thus the motor should not spin but it does spin (I've connecting it correctly, just the standard way that is found all over the internet).
When the gate voltage is made high by the arduino the motor spins a little faster.
My question is thus: why does the motor spin when there is no gate voltage applied?
Difference with the above schematic is: - No diode - Mosfet is irf540n - Motor is driven by 9V
Other than that the configuration is the same (connected ground of arduino to the - side of the 9v battery, the - side of the battery is connected to the source and the + side of the battery is connected to one terminal of the dc motor while the other terminal of the dc motor is connected to the drain)
EDIT: I got it working when I tried it again (using another irf540n MOSFET). Diode in parallel with the dc motor is indeed a good thing. Placing a resistor as you guys said is also needed indeed so that the capacitance of the MOSFET is able to discharge I think. Btw drain & source mixing up isn't that big of a deal is it? Thanks everyone.