Electronic – Motor activation using MOSFET

mosfetmotorpmosswitches

I need to switch a motor on and off by cutting it's battery connection and even though I could use a relay, I would rather to use a MOSFET, so things will be smaller and quieter.

The problem is, I am not sure about the best way to activate the MOSFET. It will be connected directly to he battery, so the load will be just after the MOSFET, which prompts me to use a P-Channel MOSFET…BUT the battery will be around 10V (7 cells of NiMH) and the MCU controlling the MOSFET will have a 5V signal, so the MCU won't be able to turn the MOSFET off, since 5V will still left the P-Channel MOSFET conducting.

The first thing that comes to my mind is to use a BJT to control the MOSFET and the MCU will control the BJT…but I wanted to ask in here first if there are other options out there, and ask for recommended circuits.

I am also concerned about flyback diodes, because since the motor is in a sealed box, there is no way I can place a diode in parallel with it to avoid voltage spikes around the MOSFET, so alternatives are most welcome (but please avoid saying "hey what about a relay", because this option I already know, and I am looking for new ones 😀 ).

Best Answer

Depending on the current needed by the motor, select a suitable N-channel MOSFET as a low side switch:

schematic

simulate this circuit – Schematic created using CircuitLab

The flyback diode need not be physically at the motor coil - if the motor is not accessible, using a diode on the control board will work too - subject to somewhat greater EMI. Depending on the parasitic diode of the MOSFET for flyback voltage inhibiting is a really bad idea: Those body diodes typically have poor characteristics - High Vf and slow switching.

The MOSFET indicated here, IRLML2502, is a really inexpensive logic level MOSFET which turns on quite well at 4.5 Volts gate voltage, for motor current of ~ 3.4 Amperes. If you need greater current, alternatives like the OnSemi NVTFS5826NL can be used instead (20A @ 60V).

The low value gate resistor inhibits ringing, and limits current spikes from the GPIO pin. The pull-down ensures that the MOSFET remains off while the microcontroller is starting up or in high impedance state.