MEan Voltage Too High On PWM Circuit.

Hi folks,

I have a bit of a problem I can't seem to resolve. I'm using an Arduino PWM output to switch a FET circuit in order to regulate the power to a low resistance load. I use a frequency of 31KHz because any arduino available PWM frequency lower than that is audible. The problem is that at these frequencies, the mean voltage (and thus the power) I get at "OUT" is far higher than expected. Even with a duty cycle at just 1 analogWrite(10, 1); the mean voltage I see at "OUT" is almost at VCC. I had similar problems to this with other components and concluded that they weren't switching fast enough, so I used components that are supposed to be able to switch in the MHz range, so I though 31kHz would be no problem, but the problem still persists.

If I use much lower frequencies, I do indeed get the expected mean voltage at OUT but using lower frequencies makes a very loud hum and also renders certain equipment designed to be hooked up to OUT useless.

If the components are supposed to be able to switch at these frequencies without issue, then I'm at a loss to explain what's happening. Can anyone shed some light onto it please?

VCC = 12V

I would guess that D3 being oriented the way it is keeps OUT from going low.

CrossRoads:
I would guess that D3 being oriented the way it is keeps OUT from going low.

It's for back emf suppression. An inductive load is always connected between out and ground, usually around 1 ohm.

Ah.
In that case, use a different MOSFET.
IRF9540 is only a logic level at very, very low current levels.
This would be better.

Thank you, I may owe you a beer, this has been troubling me for a while now. Will the existing circuit be ok with this new mosfet? Any resistors need changing etc? I'm afraid I only know the basics of how all this works and when you say "Logic Level" you've lost me a little.

You might find that 10k is too low a resistance to drain off the charge on the gate of a more powerful MOSFET.

Logic level means it is fully on with 5V on the gate relative to the source, or in this case -5V on the gate with respect to source.

Non-logic level MOSFETs generally are rated to be fully on by the time the gate-source is 10V (-10V for P MOSFET). Since Vcc is 12V, that should not be a problem.

PWM on an inductive load may do strange things, though.

Right, I think I get it. The VCC does tend to drop a little when the fet is turned on due to the high power, but not as low as 10V so that should be fine. I've just ordered one of the fets that was recommended anyway, always good to have parts in stock, and the current rating of that fet is higher than the one I'm using too. So do you think replacing the 10K and 1K resistors with say, 220R might improve the situation? I am noticing the FET is getting quite hot, suggesting it's in its ohmic region, i'm guessing that may be during the gate discharging during the OFF phase and gradually turning the FET off?

RE: hot MOSFET, yes, that may be due to slow turn-off.

Best not to pull more than about 20-30mA from an Arduino pin, so 4.3V/25mA = 172 ohms, so 220 should be fine, for both. Maybe even change the one on the collector of the NPN transistor to something lower than that.

Thank you both. I really appreciate the help. I'll let you know how it performs with the lower resistors and with the new fet when it arrives. I'll try a 220R on the arduino pin and a 100R as the gate pull-up (technically I suppose it's actually a pull-down. Does a p-channel "see" the VCC as the ground rail and the ground as a negative VCC?).

IT WORKED!!

The lower value resistors worked a charm. I'm getting only just slightly above the expected mean voltages and the FET is not getting any where near as hot as before. Thank you so much, you've helped me solve a problem and learn something new as well.

At high PWM frequencies you have to drive charge into the gate fast, and since its capacitive that means high
currents.

Its best to use a MOSFET driver chip for situations like this and make sure the device isn't spending a large
proporttion of the time switching.

MOSFET drivers have a few ohms output resistance, meaning MOSFET can actually switch at datasheet
rates (100ns or so).

This is new to me. I've done a quick google of Mosfet Drivers but I have a lot more to read and understand yet. I suppose technically the NPN transistor is serving as a kind of gate driver in the circuit I posted, but more efficiency certainly wouldn't hurt. Do you have any recommendations on which type of driver chip I should use?

I may be being naive here, but wouldn't a small capacitor between the FET gate and VCC act as a shunt for the charge in the gate when the FET is turned off.

No.
A capacitor is exactly what you do not need, it will slow things down.

Grumpy_Mike:
No.
A capacitor is exactly what you do not need, it will slow things down.

Yeah I know, I tried it, lol.


I'm having problems finding a suitable mosfet gate driver. The only one I could find that seemed ok was a LTC1693-5 but an e-bay search showed no results, which is always a bad sign, a couple of other sites have them but they're very expensive and only surface mount, I need regular through hole ones.

that was difficult..... : mosfet driver for sale | eBay

nicoverduin:
that was difficult..... : mosfet driver for sale | eBay

Except I live in the Uk. Could have done without the sarcasm btw. Doesn't this forum have rules about that sort of thing? I swear some of you guys don't realise some of us are still learning. Learn some tolerance.

At least I now know I need a TC4426 but you don't get any gratitude for it, because of that sarcasm. Just a word of advice, keep that sort of thing to on-line forums, don't do it irl, or you may just wind up with a sore nose if you spoke like to that to someone's face.

BapZannigan:
I'm having problems finding a suitable mosfet gate driver. The only one I could find that seemed ok was a LTC1693-5 but an e-bay search showed no results, which is always a bad sign, a couple of other sites have them but they're very expensive and only surface mount, I need regular through hole ones.

eBay is very hit and miss for components, and there are significant number of fakes too.

You need to find a proper electronics supplier, which depends on where you are in the world. In then UK I
use Farnell/element14 mainly, they have 1050 MOSFET driver chip lines... For instance IRS2001, FAN7888, HIP4081
MIC4422 and many more, some high-side bootstrapped, some low-side, some H-bridge half-H-bridge, 3-phase...

BapZannigan:

nicoverduin:
that was difficult..... : mosfet driver for sale | eBay

Except I live in the Uk. Could have done without the sarcasm btw. Doesn't this forum have rules about that sort of thing? I swear some of you guys don't realise some of us are still learning. Learn some tolerance.

At least I now know I need a TC4426 but you don't get any gratitude for it, because of that sarcasm. Just a word of advice, keep that sort of thing to on-line forums, don't do it irl, or you may just wind up with a sore nose if you spoke like to that to someone's face.

It is a pity that you picked it up like that. your own words were that you found it difficult to find a mosfet gate driver and on ebay. I literally typed in "mosfet drive" and up came the list. That was all. So I wonder what you looked for. And your remark about getting punched in the nose..... I doubt it... But so be it...

Zen...