2

I am new to MOSFETs and I could use some help!

I want to turn a DC motor on and off using a N-channel MOSFET. I was trying some things out and I found that this works:

Turning motor on and off with a Rpi as I have seen done The motor turns on and off very quickly.

The circuit that I want to build is actually a bit more complex and I would like to use a diode like this:

Same circuit with added diode

Now the motor turns on quickly, but it takes a few seconds before it is turned off. Could anyone explain why this happens?

Thanks a lot!

winny
  • 13,064
  • 6
  • 46
  • 63
  • 3
    Gahhh! Please use conventional schematic drawing with positive voltages up and negative down. Yours is sideways. – winny Jul 18 '21 at 17:08
  • During turn-on the gate-source capacitance of the MOSFET can be charged up quickly because the diode is forward biased. During turn-off the diode is blocking so the gate-source capacitance cannot be discharged. The fact that it turns off eventually is just real-world imperfections (diode leakage) and should not be relied upon for good design IMHO. – Unimportant Jul 18 '21 at 17:08
  • Also, your motor needs a freewheeling diode. – winny Jul 18 '21 at 17:08
  • 2
    Bad positioning of the diode. Possible XY problem. State why you think you need that diode. – Andy aka Jul 18 '21 at 17:32
  • A yes I see that I need to do more research into Mosfets and how their current flows. Thanks guys and girls! I will ask in a different post on the circuit that I would like to make – PurpleTurtle Jul 18 '21 at 17:40

1 Answers1

4

It happens because there is a diode in the circuit you built. Connected like that, the diode only allows the MCU to turn the FET on, but then the diode will prevent turning the FET off. So it turns off only slowly due to leakage currents.

So while it is possible to put a diode like that, why would you do it as it makes very little sense to do so.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • Thanks mate I will do some more research into how the current flows in these mosfets! – PurpleTurtle Jul 18 '21 at 17:42
  • @PurpleTurtle The better place for a (correctly rated) diode is across the motor as a [snubber](https://electronics.stackexchange.com/q/318013/50736). Cutting power to the motor can create large negative voltages that can pollute the entire power system. A diode in parallel with the motor allows that energy to dissipate through the windings. – J... Jul 19 '21 at 02:03