I have a 12V motor that I am trying to drive with a PWM signal from a PIC, and I've successfully gotten the circuit to work with an NTE 2986 N-Channel MOSFET. I just have a few questions that came up while I was doing the research on figuring out how to do this (this is my first PWM motor project).

How do we determine the proper frequency of the PWM? I first had the PWM set at 2KHz which did not drive the motor very well, made the MOSFET get hot, and the motor whined at low RPMs. After doing some reading, I hear that most DC motors should be run at 20KHz with PWM, which I set and now the motor seems to work just fine, no whining, and the MOSFET doesn't get hot.

The other question is, what determines the value of the capacitor (bypass capacitor?) that you run in this circuit? I haven't actually put one in yet, but I'm reading values somewhere around 1000uF and rated for twice the voltage that the motor runs at.

Last question, how does putting the diode in parallel with the motor help with anything?

Diode across motor: When current is switched off, the magnetic field around the coil windings inside the motor collapses, creating a large voltage spike. The diode routes that voltage away from the transistor.

Which bypass capacitor? Do you have a schematic of your circuit? Easily drawn with Tina-TI (free download).

PWM Frequency is best found through trying different frequencies, although it can be calculated given enough data about the motor and driver. Generally, between 100 and 300Hz, or 14kHz-40kHz. The larger the motor, the higher the inductance, which forces a lower PWM frequency. The 100-300Hz range is for larger motors, where the noise made from them moving is typically louder than switching frequency noise.

There isn't really a "lower bound" to PWM frequency, other than to keep it out of ranges where hearing is sensitive 20-15kHz, approx, up to 20kHz for younger people.

thanks for clearing up the PWM frequency thing. So the higher the inductance of the motor, the lower I should set the frequency? I still have to set it out of audible range of human ears to avoid whining right?

The cap is to prevent oscillation in your supply voltage, in case there is a length between the supply and the motor. 100uF should be enough. a 30 ohm resister between the gate and the PIC will help also. With a small motor and low voltage the frequency isn't that important, but it helps to get it above audible range. The diode is important. An MUR110 is a nice one. A very fast recovery diode is needed. If your worried about the frequency, a scope across MOSFET while it's running will show you what the square wave looks like. Try a few different frequencies to see the difference.

Yes, although some motors do not make that much noise from the PWM. Try to get the best efficiency, If it is audible, try changing it a bit. Some frequencies, especially those in the voice range, seem louder than they actually are. if you can stay on the edge of a sensitive band, it's a good tradeoff.

To decide the filter capacitor, the amount of current drawn needs to be known.

The actual formula is

Using batteries, Voltage drop is calculated with internal resitance and wire lengths. Using a power supply, the "Ripple Formula" is used.

What is left is to decide voltage drop. This is dependent on the power source. If it is a large battery, 1A may only drop 0.2V from internal resistance. Using a worse case scenario, a 9V transistor battery, or 9 AA batteries in series, the internal resistance is 1.5Ω, which would create a 1.5V drop (11.5V output) during switching. To "Stiffen" that source, the capacitor would need to be 33uF using the equation above, or a 50uF using the rule of thumb.

You will also want to add a 100nF (0.1uF) cap across the motor to reduce EMI, as well as a 100nF(0.1uF) cap between V+ and GND on the PIC. Both of these should be NPO/Mono ceramics, or a film cap. A 0.1uF Electrolytic has too high of an ESR for effective decoupling.

The cap is to prevent oscillation in your supply voltage, in case there is a length between the supply and the motor. 100uF should be enough. a 30 ohm resister between the gate and the PIC will help also. With a small motor and low voltage the frequency isn't that important, but it helps to get it above audible range. The diode is important. An MUR110 is a nice one. A very fast recovery diode is needed. If your worried about the frequency, a scope across MOSFET while it's running will show you what the square wave looks like. Try a few different frequencies to see the difference.

Click to expand...

is it ok to use the MUR110 on a high current motor? I am trying to power at motor that runs at 25-30A on full load

Another question: can anyone recommend a good mosfet for this application? (driving a 30A 12v motor). The NTE 2395 got really hot when I used it with the motor and I think the motor killed it because all the pins are shorted out.

ahh ok thanks. Question, I since I don't have the high side driver right now, instead I have a few npn transistors along with some darlington pairs. Could I just put the PIC signal to the base of the transistor, then link the emitter to the gate of the MOSFET? I'll draw this up if it's hard to visualize.

here is the schematic I am talking about with using an NPN transistor to increase the current to the gate of the mosfet.

also, I was looking around and I saw other PWM circuits implement this idea where they use two MOSFETs, probably to split up the load so it doesn't overload a single MOSFET. do you think this is a good idea?

First of all, the high side drive will not necessarally produce higher efficiency. It depends on the fet you are useing. The high side drive however can be more fault tollerant.

The fet probably smoked due to switching loss (and/or lack of heat sinking). Although your fet datasheet may say it can handle 30 A, the power rating quoted on the datasheet is assuming there is perfect heatsinking from case to ambient temp (I.e. the case stays at approx. 20 C). In real systems this is impossible. Therefor you need, let's say, a 60A fet to switch the current and good heatsinking to prevent the device from becoming a smoke bomb.

Also it sounds like you are driving the fet with a logic output. These typically have a pull up resistor of a relatively lare impedance. The fet has capacitance from gate to drain that has to be charged before it really turns on (and has the quoted Rds(on) from the data sheet. Once the command to turn on is given the gate charge begins to fill up. At this point the current flowing thru the armature begins to flow thru the fet as well. During the time that you are charging the gate you have Pfet = Iarm * rds(on) power in the fet. This can be a substantial amoun of power. This power surge will cause the fet to overheat. This phenominon is referred to as switching loss. As you increase the switching frequency this can get to be the majority of the loss.

The way to fix this is to buffer the logic output with complametery emitter followers or what is commonly called a 'gate drive'.

To make a long story short, get a higher current device, heat sink it, and insert a gate drive circuit to reduce switching time and thus reduce switching loss.

Either way I need to buy new parts, and I might as well get a driver instead of trying to find the right combination of parts to make one. I was looking into high side vs low side drivers, and it sounds like I need a low side driver for what I am trying to do? I am switching the ground part of the motor, not the power.

I'd suggest getting the ST MOSFET Driver that matches the Devices you will be using. They are often referenced in both the driver datasheet, and as an example application in the MOSFET datasheet.

When testing, and ALL voltages are below 50V, Start the circuit for 1 second, turn it off, then feel for anything hot. Then go to 5, repeat. Up until you run 30 seconds.

With teh circuit above, there isn't anything limiting base current on either transistor, which would give good drive as well as a possibility of a 3 legged diode. A 470-1k resistor in series with the base lead will sill allow enough current through for full saturation of most BJTs, check your datashet if you have a "Freak" grab bag model.

The D1 across the motor is Absolutely required, and should be a Speedy high voltage fast swtching diode. "Fast" means switching speed at voltage/current used is at least equal to and preferable shorter than switching time of MOSFET.

There's a couple other things with your circuit that cause issues, but they've drifted away. One was related to simulation of the invention. The second is about the size of the motor. One diode might not cut it if you are killing parallel MOSFETS. Have you simply "run" the motor with a MOSFET "power switch" for on/off, rathr than PWM? That might be a good start.

John, your MOSFET gate-source voltage is being driven at 3 V over the absolute maximum rating, which won't help. Add some series resistors to the gates and a zener diode across the gate-source junctions to clamp it. Normally the resistor is a few 10s or 100s of ohms, but this might have to be increased a bit so the zener doesn't dissipate too much. Even without the zener the gate resistor damps down the ringing that's a product of the interaction between the g-s capacitance and trace inductance, and that can increase the dissipation in a PWM MOSFET by operating it in the linear region for longer. It might not explain all the heat (it's may be mostly switching losses from driving a big MOSFET with a large gate capacitance at high frequencies), but it won't help either. If winding the frequency down reduces the heat, then that's the clincher.

If you haven't got a 'scope handy, then you can generally tell the difference between a clean and ringing PWM motor drive signal by the sound it makes. Even at ultrasonic frequencies the undertones are often slightly audible.

Connect with Us

Sign Up

Quote of the day

“Electrical science has disclosed to us the more intimate relation existing between widely different forces and phenomena and has thus led us to a more complete comprehension of Nature and its many manifestations to our senses.”