×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Driving a FET via a micro

Driving a FET via a micro

Driving a FET via a micro

(OP)
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???

RE: Driving a FET via a micro

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.

RE: Driving a FET via a micro

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

RE: Driving a FET via a micro

Are you sure you've got the pinout of the fet correct?

Some packages can be confusing...

rgds
Zeit.

RE: Driving a FET via a micro

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).

RE: Driving a FET via a micro

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.

RE: Driving a FET via a micro

(OP)
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)

RE: Driving a FET via a micro

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.

RE: Driving a FET via a micro

(OP)
Only have 5V to work from.  I'll look into your solution and report back any findings.  Many thanks

RE: Driving a FET via a micro

Hi, you need a pull up resistor.

RE: Driving a FET via a micro

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.

RE: Driving a FET via a micro

(OP)
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
¯¯¯¯¯                                           _  

RE: Driving a FET via a micro

Glad to help.

rgds
Zeit.

RE: Driving a FET via a micro

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 "punch" 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?

RE: Driving a FET via a micro

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

RE: Driving a FET via a micro

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 "logic level".

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.

RE: Driving a FET via a micro

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:
http://www.flashmicros.com/pdfs/7212.pdf  whi... 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

RE: Driving a FET via a micro

(OP)
Sorry, what I should have put is

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



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)?

RE: Driving a FET via a micro

fxdif,

OK. That makes sense. Now you have "unlimited" 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.

RE: Driving a FET via a micro

Hi, the voltage you are switching makes the difference. You need a large current pulse to the gate when switching high voltages quickly.

RE: Driving a FET via a micro

REad the data sheets!  St7 cannot drive 25mA at a level to turn on/off the mosfet at high speed, and indeed without a limiting resistor you may violate absolute specs.  Make sure you have a limiting resistor on the output pin to limit the current to its max level though (not less than 200 ohms for 5V at 25 mA).
Then do as Melone suggested and hook a 10k resistor to the UP output and observe with a scope (not a DVM) to see it the waveform is going high and low properly.  Finally, make sure your FET is switching on/off fast enough by observing with a scope.  Your present buffer PNP may be enough with the 1k pulldown on the GS of the FET, but make sure your FET drain-source is looking like you expect.
 

RE: Driving a FET via a micro

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

Inductive load is a nasty one. Have same problem here in a echosounder Tx-powerunit drive (6A at 100V). The FET gate source must be low imp. to drive the FET. Good drive improve switching time - reduce power loss -
Take a look at irf an-937.pdf

rgds

AJK

RE: Driving a FET via a micro

Before questioning the FET interface or drive problem, I think you should first remove all that circuitry, expect maybe a pullup.  Does any PWM signal gets out of your micro?
Felix

RE: Driving a FET via a micro

What eventually permeated my brain was that the IRLZ34 has a zener protected gate.

Sometimes the zener gets damaged, which increases the amount of current required to turn the "voltage operated" FET on.

Just a thought.

rgds
Zeit.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources