Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Driving a FET via a micro

Status
Not open for further replies.

fxdif

Industrial
Nov 19, 2003
17
0
0
GB
Hi, I'm trying to drive a FET via a micro with PWM (ST7FLITE09).

I'm doing this via a 22R resistor from Port pin to gate. However when I do this the voltage from the micro drops to about 1V and won't turn on the transistor. Any ideas anyone as I am stuck???
 
Replies continue below

Recommended for you

Are you sure you've got the data direction register set correctly?

Are you also sure that you haven't got the output programmed to require a pull up resistor (sorry not familar with that micro, but you can generally programme outputs with or without pull-ups).

With the right kind of FET you should be able to drive it directly from the micro without a series resistor. I used to use ZVN3306 all the time for this kind of thing until I noticed that RETs (resistor equipped transistors) are a hell of a lot cheaper.
 
You don't say what kind of FET.

An n-channel JFET operates in the NEGATIVE Vgs regime. A positive source, such as your micro will simply drive the gate-source junction into forward-bias.

An n-channel MOSFET operates in the POSITIVE Vgs regime. It's possible that the device has a gate short, which would forward bias the subtrate-source junction

TTFN
 
1) Try putting a 100K pull down on the gate.

2) Verify that your PWM output is working correctly.

3) Check the output drive strength on your PWM signal, and compare it with the load that you are attaching it too (i.e. the FET).
 
Pinout, pull-up, defective device (or perhaps wrong device, FET instead of MOSFET, wrong polarity) have already been mentioned. There might also be a problem with available drive from the pin. If you are using a PWM output, the gate capacitance will draw "a lot" of current, which many micros cannot deliver. You say that you are using a 22R gate resistor and this value implies that your transistor is quite hefty - and hence needs a lot of gate current.

Recommendations:

1 Study data sheet for transistor. Is it really what you think it is? Check pinout, gate capacitance, calculate peak gate current and mean current.

2 Check transistor by applying external gate drive using a variable resistor.

3 Study data sheet for micro. Can the pin be programmed to deliver the gate needed gate drive? Has it been programmed to do so?

4 Talk to an analogue designer. Look for an elderly person without any computer on his/her desk ;-). Analogue designers know a lot about interfacing to transistors.

5 Review Ohm and Kirchoff. They are still valid.
 
Hi, thanks all for your replies. The transistor I am using is a IRLZ34N n type logic level mosfet. The transistor is OK becuase I applied a direct drive to the gate from an external power supply and it switched ok.

Reading the data sheet for the ST7 micro it can deliver up to 25mA which I am now thinking is not enough to drive the FET.

Any ideas on an alternative drive technique. (micro use +5V)
 
Will the ST7 actually supply 25mA in the high state? That sounds quite high to me.

The input capacitance of the IRLZ34N is probably quite high, and miller effect will multiply it during switching (though we haven't got to that stage yet apparently).

In some automotive applications I worked on, the gate would be driven by a pnp transistor to give a high current pullup for fast switching with a 1k resistor to ground for reasonably fast turn off.

Do you have 12V available on the board?

rgds
Zeit.
 
Well, the IRFLZ34N has 1500pF Cgs(max), it's a bit bigger than a ZVN3306...

That's going to take a fair amount of charge to turn it on & off, even ignoring the miller effect.

You could try paralleling the inputs & outputs of a 74hc04 hex inverter to increase the current drive available.

If that's no good, then a complementary pair of bipolars might do it.

For pwm, it's as important to switch it off quickly as it is to switch it on quickly.

rgds
Zeit.
 
Tried a pull-up but that made no difference. Then tried zeitghosts solution. Took the output from the micro into a PNP transistor (BC857) with 1K resistor on collector to ground. Then used that 'inverted' output to drive my FET. Now it works great. Thanks zeitghost for your comments. I have tried to display the soln below for others who may find it useful.


________________ +5V
| |
_|_ | to rest of cct
10K | | | |/ BC857 /|\
| | | /¯ |
¯|¯ |/ |
|-------|\ 1K |--|
_|_ | \ _____ | |
_____ | | -----| |-----| |<-| IRLZ34N
m | 1K | | ¯¯¯¯¯ | | |
i | ¯|¯ |--|
c |_________| |
r | PWM |
o | _|_ GND
¯¯¯¯¯ _
 
fxdif,

It is a bit hard to read your schematic (distorted), but I cannot see that you really have improved anything. The 1 k resistor limits the drive &quot;punch&quot; to almost nothing compared to the 25 mA short circuit current available from the micro. I think that you should find the real problem and not hide it behind a handful of extra components. They do not only add to cost and complexity - they also obscure the working of the circuit and can easily turn you into a Kludge Wizard - and you don't want that. Do you?
 
FYI-

ST7 uses CMOS outputs and is specified to sink AND source 25mA.

Using that as a minimum current, the output slew rate into 1500pF is about 16V/us, so it's not at all clear why the ST7 couldn't drive the device directly.

TTFN
 
Trouble is that it isn't 1500pF.

As the fet switches on, the miller effect multiplies the Cgd many times.

It's a big fet even if it is &quot;logic level&quot;.

Where did you find the ST7 data IRstuff?

The datasheet I found doesn't seem to specify 25mA pullups.

The i/o pins are rated at 25mA Absolute Max.

In section 13.8 of the datasheet I downloaded, Ioh is defined as -2mA at Vdd-1V or -5mA at Vdd-1.6V.

So, the closer the pin gets to 5V, the slower it turns the fet on.

In the schematic above, a pulldown from the collector of the PNP to ground is missing.

Without that, the fet shouldn't switch off!

rgds
Zeit.
 
That's a valid point.

If the device is not CMOS, then the outputs will be limited to 2 mA source current, reducing the slew rate to 0.4V/us after correcting for both the current and total gate capacitance, which is actually 4500pF. The datasheet 1500pF applies only when the device is off, which is a pretty short period of time, since the threshold voltage is about 1V. The Miller effect, per datasheet, increases the total effective gate capacitance by 50%, reducing the slew rate to 0.3V/us

The datasheet I downloaded was from:
which is a CMOS device, see page 24, with p-channel pullups. Page 44 shows +/-25mA output current.

In any case, there's still no obvious reason why the device was able to drive the MOSFET, even in a static DC condition, unless... the I/O pin was actually being programmed to go high.

Referring to pages 23 and 24, you can see that the I/O ports can be programmed as open-drain, so if the I/O is not specifically commanded to drive high, the output will float and require an external pullup to go high. Using the same 10K pullup in the schematic, the current is limited to an average of about 0.2mA, which still gets you a slew rate around 30V/ms.

TTFN
 
[tt]Sorry, what I should have put is

________________ +5V
| |
_|_ | to rest of cct
10K | | | |/ BC857 /|\
| | | /¯ |
¯|¯ |/ |
|-------|\ |--|
_|_ | \ | |
_____ | | |----------| |<-| IRLZ34N
m | 1K | | | | | |
i | ¯|¯ _|_ |--|
c |_________| | | 1K |
r | PWM | | |
o | ¯|¯ | GND
¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

[/tt]

I originally did the circuit using a BUK555 (similar spec to IRLZ34) and a PIC 16F873 which would drive the FET directly. The PIC also sources 25mA. However when I changed the FET to the IRLZ34 it didn't work.

Would it make any difference that I am using the FET to switch an inductive load (the circuit is part of a boost converter)?
 
fxdif,

OK. That makes sense. Now you have &quot;unlimited&quot; gate drive and you should be able to turn the transistor very quickly. But the turn-off will be painfully slow and will give you a lot of switching losses when you put some current through the FET. You need to speed up the turn-off by using a push-pull output stage. I still think that Zeitghost's tip about using parallel 74HC04 (without any gate resistor) is the best solution. It will give you very good drive - both on and off - and is also the least complex circuit.
 
Status
Not open for further replies.
Back
Top