Electronic – Controlling a very small DC motor with PWM

mosfetmotorpwm

I have a very small DC motor (from a Walkman), I would like to control the speed from a micro-controller. For that I would like to connect a MOSFET in series and apply a PWM signal to its gate in order to change the speed of the motor.

I have measured the motor's L & R = 4.7mH, 11.5Ohm (Tao 0.41msec).

From running a few experiments with the motor using a bench power supply I can see that it runs well from a voltage of 0.2V up to somewhere around 0.4V – that is all the range I require.

The power supply I have for this is set to 1.8V (used for the digital part of the circuit) so this makes using standard MOSFETs a bit difficult because I can not supply the voltage required for the gate saturation. I bought a few P-channel MOSFETs like this.

So even though I would have thought this setup would work (Vcc -> motor -> FET -> GND) I can't seem to get good resolution over the control and I don't get as much torque from the motor as I used to get when ran from a DC power supply.

I am not sure what freq. I should be using and not sure what other parameters need to be checked in order to make this work as intended. Any help on this will be appreciated.

* UPDATE *
Following Olin's answer I have built the circuit he suggested. I have used a 2N3904 transistor, 180Ohm resistor paralleled with a 4.7nF cap. Attached is the collector voltage when running from PWM code 100 (out of 256). Vcc is 1.8V.

enter image description here

Best Answer

The simplest solution would be to use a low side NPN switch:

You say the motor DC resistance is 11.5 Ω, so the maximum current it can draw is 1.8 V / 11.5 Ω = 160 mA. Actually the transistor will eat up a few 100 mV lowering the maximum possible current, so this is a safe maximum to design to. Figure the transistor is good for a gain of 50 minimum, so we need at least 160 mA / 50 = 3.2 mA base current. 5 mA is then a good target to make sure the transistor is solidly saturated when on. Figure the B-E drop to be 700 mV, so that leaves 1.1 V across the resistor when on. 1.1 V / 5 mA = 220 Ω.

C1 is there to speed up the turn-on and turn-off. (220 Ω)(4.7 nF) = 1 µs, which is the C1-R1 time constant.

The PWM frequency should be fast enough so that the current thru the motor changes little each on and off phase. The ripple caused by the PWM is a AC voltage superimposed on the average DC voltage. Only the DC voltage goes to moving the motor. The AC component causes no torque, only heat, so you want to keep it low relative to the DC. Generally you run motors a bit above the human hearing limit, which is also usually fast enough to keep the AC component small. At 25 kHz, for example, the PWM period is 40 µs, which should give you plenty of resolution from any reasonable PWM peripheral in a microcontroller.

Added in response to collector scope trace

The basic shape of the waveform looks good, so it appears the transistor is switching properly and the voltage is being applied across the motor properly.

The spikes at turn-off are worrisome. They could possibly be scope artifacts, but if your scope trace is accurate, then the diode is not working or not connected properly. The spikes shouldn't be more than a volt or so above the supply.

D1 not only keeps the transistor from getting fried, but it preserves much of the motor current during the off time. The first is necessary, and the second increases efficiency.

Added 2

Looking more closely at your scope trace, I see that the collector voltage when the motor is off is 2.48 V. You say the supply is 1.8 V, so that makes the off voltage 680 mV above the supply. That means you did not build the circuit as I said. You obviously used a ordinary silicon diode, probably a slow one like a 1N400x. The slow turn on time of the diode explains the voltage spike, and reduces overall drive levels a bit at a specific PWM duty cycle. It will also cause shoot-thru for a time when the transistor is turned on again, since the diode is still conducting. A Schottky diode will have lower forward drop and effectively instant reverse recovery in the context of this circuit.

The system should still generally work, but try with a Schottky diode like I specified.