Go Down

Topic: (SOLVED) Help me: It's my first time using a mosfet (Read 2609 times) previous topic - next topic

mykiscool

Apr 15, 2015, 05:24 am Last Edit: Apr 15, 2015, 06:47 am by mykiscool
I bought the irf640n mosfet transistor. I see on the datasheet (datasheet link)
it say's:
                      parameter           |min | typ.|max|unit| condition
VGS(th) | Gate Threshold Voltage | 2.0 | --- |4.0| V | VDS = VGS, ID = 250µA

so my question is, is this the voltage that it's triggered at? Can I use the arduino 5v out to trigger it or will it break it? Does it turn on over 4v?



Secondly, is this wiring correct?


Mosfet
 _______
|                  |
|                  |
|                  |
|                  |
----------
|         |         |
|         |         |
|         |         |
1       2       3

1: to arduino
2: to load (horn)
3: from source
Technician at Yuneec Electric Aviation

MorganS

It just barely starts to turn on somewhere between 2 and 4 volts.

Look at the first chart (top-left) on page 3. This shows the current and voltage across the Drain-Source (the output) for various VGS (the input.) The lowest line in the chart is for 4.5V and that shows that the thing maxes out at about 500-700mA in that situation. It will also be dissipating a lot of heat.

It looks like this MOSFET is intended for high voltage work - they claim a 200V maximum on the front page. It would be the sort of thing that you would use optocouplers for isolation and additional smaller MOSFETS to drive the gate to the voltages it requires.

Overall, I would say that this is a poor choice of MOSFET to use with an Arduino. If you are only switching a small load - say 200mA then you could use this for testing while you wait for the logic-level MOSFETS to arrive.

Recently someone online here recommended the FDT86113LZ as a good logic level MOSFET. I've bought some, but not used them in a circuit yet.
"The problem is in the code you didn't post."

mykiscool

Ok, thanks a lot. That graph makes much more sense now it's a function where amp limit increases with input gate voltage. I appreciate your help.  :D 
Technician at Yuneec Electric Aviation

DrAzzy

IRF7308 is the nicest through-hole N-channel mosfet I could find. Was just about the only 3.3v through-hole mosfet with decent specs I could find on digikey. Expensive, but even works with 3.3v on gate. TO-220 package.
ATTinyCore and megaTinyCore for all ATtiny, DxCore for DA/DB-series! github.com/SpenceKonde
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

MarkT

If you want to drive a MOSFET from 5V then you need either a logic-level MOSFET
or a level-shifter circuit to switch the gate at 10 to 12V.

A logic level MOSFET will have an Rds(on) value quoted for Vgs=4.5V, typically
and the datasheet will usually also say "logic level".

The threshold voltage is a sort of turn-off voltage, ignore it, go by the Rds(on) figure.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

lmarklar

Something to bear in mind, even with Logic Level MOSFETS, watch the required current to drive them at temp.  Some of them draw 175mA or more.  The Arduino can only supply 40mA from the PWM pins.  You can get a MOSFET driver that doesn't draw much over 20mA, feed it the 5v from the Arduino output to it's Vcc, put your PWM to it's input and it will drive the MOSFETS properly.

An indication that you are not driving the MOSFET with enough power is soft switching, you won't have hard pulses, or you are generating a bunch more heat than you expected.

Wawa

Something to bear in mind, even with Logic Level MOSFETS, watch the required current to drive them at temp.  Some of them draw 175mA or more.  The Arduino can only supply 40mA from the PWM pins.  You can get a MOSFET driver that doesn't draw much over 20mA, feed it the 5v from the Arduino output to it's Vcc, put your PWM to it's input and it will drive the MOSFETS properly.

An indication that you are not driving the MOSFET with enough power is soft switching, you won't have hard pulses, or you are generating a bunch more heat than you expected.
Hmmm. Didn't know that (175mA) part. Can you explain?

I thought gate capacitance was the problem.

Exactly how long will the transitions be with 20mA drive current.
Will that be a problem at Arduino's default 490herz PWM frequency.
How hot will a TO-220 mosfet get, e.g. with a 12volt/2Amp load.
Enlighten me.
Leo..

nickgammon

Something to bear in mind, even with Logic Level MOSFETS, watch the required current to drive them at temp.  Some of them draw 175mA or more. 
I don't get this bit. With a suitable gate resistor to limit current, the only issue would be it not turning on fast enough.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

lmarklar

#8
May 06, 2015, 06:18 am Last Edit: May 06, 2015, 06:24 am by lmarklar
Sorry, bit late to the reply here, I completely missed the responses!

As to current draw on the gate, some FET's require enough current to slam the gate open and closed, otherwise you end up exactly as Nick said, the gate rise and fall time becomes too long and gives unexpected results.

The arduino is only capable of supplying 40mA on the output pin, if the MOSFET needs a higher current to be able to drop Vds fast enough to give a fast response you will end up with a slope instead of a pulse.  It can affect your fall times (off).

There is a reason that manufacturers give a curve with the gate charge.

All adding a current limiting resistor is doing is protecting the arduino and limiting your switching time.  If you have an application that requires a fast response / switching time, you are better off driving it from a transistor or MOSFET driver chip.

That way you can supply enough current for Vds to drop quickly.  Found a pretty decent explanation here:
http://www.edaboard.com/thread41454.html

If your switching time doesn't matter and you are simply using it as a on/off switch, then you'll be fine.

MarkT

Something to bear in mind, even with Logic Level MOSFETS, watch the required current to drive them at temp.  Some of them draw 175mA or more.  The Arduino can only supply 40mA from the PWM pins.  You can get a MOSFET driver that doesn't draw much over 20mA, feed it the 5v from the Arduino output to it's Vcc, put your PWM to it's input and it will drive the MOSFETS properly.

An indication that you are not driving the MOSFET with enough power is soft switching, you won't have hard pulses, or you are generating a bunch more heat than you expected.
MOSFETs draw no static current, the gate is isolated by a layer of silicon oxide (glass!)
They do draw a pulse of current when switching as the large gate-channel capacitance
has to be charged and discharged.  You can add a 150 ohm resistor in series with the
gate with a large MOSFET to limit the gate current spikes and protect the Arduino
pin.

MOSFET driver chips have logic inputs (very small current), and provide hefty drive
currents for fast switching of MOSFETs (needed for high frequency PWM).  MOSFET
drivers normally source/sink from 100mA to 5A or more - they need thorough decoupling.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Wawa

Sure, very fast switching is needed for switchmode supplies, class-D amplifiers etc.
But the question is if a hefty drive current is needed with the 490hz PWM signal of the Arduino.
If I'm right, the smallest PWM pulse width is ~4usec (1/256 of 490hz). The positive half of a 125Khz signal.
If I do the calculations for a standard 30A mosfet and 220ohm gate resistance, I get ~500nA risetime.
A small part of the smallest PWM pulse.
Who can enlighten me.
Leo..

lmarklar

MOSFETs draw no static current, the gate is isolated by a layer of silicon oxide (glass!)
They do draw a pulse of current when switching as the large gate-channel capacitance
has to be charged and discharged.  You can add a 150 ohm resistor in series with the
gate with a large MOSFET to limit the gate current spikes and protect the Arduino
pin.

MOSFET driver chips have logic inputs (very small current), and provide hefty drive
currents for fast switching of MOSFETs (needed for high frequency PWM).  MOSFET
drivers normally source/sink from 100mA to 5A or more - they need thorough decoupling.
You are absolutely correct.  You did a much better job explaining it than I did :)  Listen to what I mean, not what I say!!!

Sure, very fast switching is needed for switchmode supplies, class-D amplifiers etc.
But the question is if a hefty drive current is needed with the 490hz PWM signal of the Arduino.
If I'm right, the smallest PWM pulse width is ~4usec (1/256 of 490hz). The positive half of a 125Khz signal.
If I do the calculations for a standard 30A mosfet and 220ohm gate resistance, I get ~500nA risetime.
A small part of the smallest PWM pulse.
Who can enlighten me.
Leo..
I run my PWM at 31Khz for a buck converter (I'm using it as a PWM voltage regulator basically), the fall time is pretty important to me....

Go Up