Electrical – How to get 6V DC motor running using PWM through STM board

dc motormicrocontrollermosfetpower supplystm32f4

First image is edit of image 2.
Use this circuit to build unidirectional motor control using PWM.

Ignore 3v pin, MOSFET can be any mosfet having small threshold gate-source voltage eg, 30N06, Fairchild TO52-AA.
These MOSFETS are very small, it will be not easy to connect it to bread board. Everything after the first image are questions.

schematic

simulate this circuit – Schematic created using CircuitLab

I have taken help from previous posts to redraw the circuit, but the 6v motor is not driving at all.
However, instead of connecting PD12 pin, if I connect 5v pin from STM board , motor rotates good without PWM.
MOSFET Gate is connected to PWM signal, Drain is connected to motor and Source to Ground.
Frequency used in STM board for the pin is 10kHZ.

Details of mosfet used is here.

Also, there is an onboard LED connected to pd12 pin in stm32f407 board, it blinks as written in the code, this shows that PWM signal is working fine.

What changes should be done so that motor can be controlled unidirectionally using only the software code written for board? what is wrong here.
Is the signal of 10-20mA from microcontroller not enough for MOSFET to amplify it?

Confused.

Circuit to drive motor using PWM from STM board

Best Answer

From IRFZ44 datasheet it appears +3v3 won't be enough to drive current for a DC motor. From the typical output plot:

IRFZ44-Output

Vgs of +4v5 would drive 8A, considering Vds=9V. Extrapolating the curves you could guess that, with +3v3, Id would be close to 1A or lower. It appears that +3v3 is too low for Vgs threshold. Does connecting gate directly to +3v3 properly drive the motor? Can you measure the motor current in this condition?

You could try using a simple NPN as a buffer for gate voltage, like here:

schematic

simulate this circuit – Schematic created using CircuitLab

Just be aware that in this case the current will flow though the motor when PWM voltage is below ~500mV.

Or you could try these MOSFETs: Mouser - N-MOSFET