1
\$\begingroup\$

I am having trouble getting my N-channel MOSFET to work. I am using the MOSFET to control a DC motor. I have the the positive end of 5V power supply going to my motor and from the motor to the drain. I then have the drain grounded to the negative end of the 5V power supply. I believe that this part is set up correctly. I'm really confused about how to get the gate to complete the circuit between the drain and source. I tried just touching the positive end of a 3V power supply to the gate and sometimes the motor turns on and sometimes it doesn't. When it does turn on, it seems to stay on... I'm not sure that I'm even using the gate correctly because I'm not grounding it in any way. To apply a voltage to the gate do I have to have a ground involved?

Also, sometimes, when the motor does turn on, the speed of the motor varies quite a bit. It goes fast and then slows down and then goes fast again. What is happening?

\$\endgroup\$
  • 1
    \$\begingroup\$ Is this a typo? "I then have the drain grounded " Do you mean "i then have the source grounded"- as that is what you want. What MOSFET are you using? Many FETs will not turn on with 3V on the gate. Part number would be useful. \$\endgroup\$ – Russell McMahon Jan 26 '12 at 20:03
  • \$\begingroup\$ make sure that the input pin is ground when not switched on. FETs require 0 volts and not hanging in the middle \$\endgroup\$ – skyler Apr 16 '13 at 13:47
7
\$\begingroup\$

You want the negative end of the 5V supply (let's call it ground) connected to your MOSFET source, not the drain.
To turn on, you need to apply a voltage between gate and ground, 3V should work okay for most small MOSFETS. You would need to connect the negative side of your 3V to ground (i.e both 3V and 5V negatives tied together) and positive to the MOSFET gate.

Alternatively you can just apply 5V to the gate (the same 5V used to drive the motor)

Also, if you are just touching the voltage to the gate (i.e. not driving with uC or something) then you will need a pulldown resistor between gate and ground to make sure it turns off when power is removed. Something like 10k will do (if you don't have that value, try anything between say, 1k and 100k)

As Faken mentions, a reverse biased diode across the motor is needed to prevent the voltage spike on switch off destroying the transistor. Connect e.g. a 1N4002, cathode to V+, anode to MOSFET drain.

For clarity, here is an example circuit:

MOSFET motor switch

Your motor is driven from 5V, so you just put your supply where the 9V supply is. To drive you apply a voltage (above MOSFET turn on) to the gate (FROM MCU) Check your datasheet for the turn on voltage, but 3V or 5V should probably work fine (note with part number shown more than 3V will be needed for reasonable turn on)

Under electrical characteristics in the datasheet, you are looking for a graph like the one shown below. Along the bottom is the drain-source voltage, along the vertical axis is the drain-source current, and each line is a different gate voltage.

Your drain source voltage is 5V. We can see if we apply 3V to the gate we will only get around 30mA, as the MOSFET is not turned on fully. Raising the gate voltage to 4V we will get around 400mA, which should be enough to drive a small motor. Note that the maximum drain source current is only 200mA for this part, so you need to make sure your motors current rating is less than this. If you need more than this then the part shown is no good.

2N700

If you give details on the MOSFET and motor used (part numbers, datasheets) more detail can be given.

\$\endgroup\$
  • 1
    \$\begingroup\$ Don't forget the diode. \$\endgroup\$ – Faken Jan 25 '12 at 23:03
  • \$\begingroup\$ @Faken - good point, thanks - I updated to mention it. \$\endgroup\$ – Oli Glaser Jan 25 '12 at 23:16
1
\$\begingroup\$

Make sure you use a logic level MOSFET that can accept the gate drive voltage you have available (5V or 3V or whatever). If you use "regular" MOSFETs, they are typically spec'd at 10V between gate and source; if you apply less than that, you won't get much current flowing.

I wrote a blog entry a while back about driving inductive loads from a microcontroller with a MOSFET -- it might be helpful reading for you; in addition to the MOSFET you should have a freewheeling diode and a couple of resistors to ensure proper gate drive.

\$\endgroup\$
1
\$\begingroup\$

You need to have a pull down resistor on the gate. When there is no power, it still thinks it is on when you turn it off because it is in a "floating state". Put a resistor from pin 1 of the MOSFET to ground, and this should work. I would suggest 10 k ohm resistor to ground, but any above 1 k should work.

\$\endgroup\$

protected by clabacchio Apr 6 '18 at 6:37

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?