Author Topic: MOSFET use in a uC application  (Read 16107 times)

0 Members and 2 Guests are viewing this topic.

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
MOSFET use in a uC application
« on: February 28, 2014, 11:00:13 am »
Hi chaps..

I am going to be driving a 12ohm load at 12v (1A) using a kinetis 3v3 MCU.

I currently use this mosfet:
http://uk.farnell.com/international-rectifier/auirf7805q/mosfet-n-ch-30v-13a-so8/dp/1909590

with a 1k gate resistor (I assumed this as I have never really used MOSFETs before)

I'm running it at 300Hz with a duty range of 20-80% .. it gets REALLY hot.

Its RDSon is very low, and so I thought its heat dissipation would be very low also.

Where am I going wrong?

I have scoped its rise time and it is approx 20uS is this too slow is that the issue?

Any recommendation as always, appreciated..

Cheers,
Matt
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #1 on: February 28, 2014, 11:03:16 am »
Also, I have a 100k pulldown on the gate, as was aware you cannot or should not leave them floating... is that not the case with logic level mosfets? Is that perhaps the issue?

Look forward to your replies
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: MOSFET use in a uC application
« Reply #2 on: February 28, 2014, 11:56:14 am »
Quote
Where am I going wrong?

Assuming PP output from the mcu, the likely cause is high switching losses caused by the high gate resistor and the gate capacitance. Check our mcu datasheet to see how much current is available on that pin and reduce the gate resistor to push the output current to that limit.
================================
https://dannyelectronics.wordpress.com/
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2031
  • Country: au
Re: MOSFET use in a uC application
« Reply #3 on: February 28, 2014, 11:59:55 am »
From what you have said, it shouldnt be so hot.

If the heat is mainly from the conduction it would be: 1A , 0.011 ohms  =  11mW.

Rough figures for switching losses, should really be done with calculus.
If the heat was from switching it would be 20u secs x 2 = 40uS; every 3.33mSeconds. so it is switching 1.2% of the time, the rest is either on or off.

The Vds while switching say average 6v.
Current while switching say average 0.5a.
Average power while switching is 3W.
Average power attributed to switching losses is 3 x 0.012 = 0.036 watts

Total losses is 47mW.

Probably shouldn't be so hot.

But I think the 1k is slowing down the switching a lot. so use the lowest you can keeping the  GPIO outputs happy as if they were driving a short.
Say they source/sink 20mA and at 3.3v then to limit conduction use 165 ohm. Obviously round up. That way you can drive faster and use less power while switching.

Ps. Hope my calcs are correct. I didn't check them.

Dannyf just posted.
What he said ^.
« Last Edit: February 28, 2014, 12:02:24 pm by HackedFridgeMagnet »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10151
  • Country: nz
Re: MOSFET use in a uC application
« Reply #4 on: February 28, 2014, 12:54:01 pm »
+1 for lower gate resistor.

Unlike with a regular transistor mosfets don't need a gate resistor at all.
However, without one your MCU's output pin is at risk of damage from over-current if you try switching very fast. Since the MCU output pin can only supply say 20mA there's a limit on how fast you can turn the fet on/off and any time spent transitioning between these states causes a high RSon resistance and lots of heat.
This is one of the reasons people use a mosfet "gate driver" chip which can handle high peak currents. The other reasons is higher gate voltages mean lower steady state RSon resistance, so a 3.3V mcu can drive a 12V gate driver IC for example


Try 100ohms and see what that does to the heat problem.

Also confirm your 100K pulldown is infact 100K. If you mistakenly grabbed a 1K for example it will form a 50% voltage divider and the Gate will get driven from 1.65V which will cause a really high on resistance and lots of heat.
« Last Edit: February 28, 2014, 01:12:53 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline uwezi

  • Supporter
  • ****
  • Posts: 272
  • Country: se
    • GreenPhotons
Re: MOSFET use in a uC application
« Reply #5 on: February 28, 2014, 01:48:57 pm »
Most probably you gate voltage does not rise enough. You are running a 3.3 V controller, which means that your output voltage at best reaches 3.3 V for a high level. If you look into the datasheet you will find Fig. 3 which gives you a "typical" RDS,on. But then you also find in the table on "Static Electrical Characteristics" that the actual threshold voltage for your transistor can be as high as 3 V - you will never be able to turn such a transistor fully on with a 3.3 V output pin.

The heat comes from the fact that your MOSFET is running significant amounts of time in the sub-threshold region.

If possible use a driver transistor to switch the gate from a higher voltage - if available in your system.
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #6 on: February 28, 2014, 02:38:47 pm »
Ok chaps, thanks for the info.

At 100ohms I am still seeing high heat generation.

I am going to go ahead and use a mosfet driver.

Would I need drive/gate resistors in this case?

Could you reccomend a small form driver (using 3.3 logic) and a small form (pref SO8) mosfet for driving this sort of thing (a approx 12ohm solenoid at 12v, which even with the hot mosfet the whole project inc solenoid running draws 700mA). I assume if I drive the current logic type mosfet I have with the 12v rail as I assume it would blow it?

Regards,
Matt
« Last Edit: February 28, 2014, 02:44:38 pm by mtechmatt »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: MOSFET use in a uC application
« Reply #7 on: February 28, 2014, 03:47:47 pm »
-100ohms I am still seeing high heat generation.-

something else is at work here. Gate drive isn't likely the issue.
================================
https://dannyelectronics.wordpress.com/
 

Offline uwezi

  • Supporter
  • ****
  • Posts: 272
  • Country: se
    • GreenPhotons
Re: MOSFET use in a uC application
« Reply #8 on: February 28, 2014, 03:54:22 pm »
For a 1 A 12 V load you should not overlook the possibility to use an NPN bipolar transistor instead. At a modest current gain of 100 you would only need a base current of 10 mA from the µcontroller resulting in a drive power consumption of less than 8 mW plus an additional power loss for the VCE,sat of perhaps 0.5 W at 1 A, which should be low enough for a SOT223 to handle.

 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 915
  • Country: us
Re: MOSFET use in a uC application
« Reply #9 on: February 28, 2014, 03:58:42 pm »
Turn the FET on 100% of the time and measure the voltage drain to source. Then you will know if it is fully turning on or not. I'm surprised that the datasheet for the FET you provided the link doesn't specify the gate capacitance - seems like an important parameter to leave off...

The other important parameter is the current drive capability of your uC on the GPIO you have connected to your FET.

If you want a great low Vgs FET I highly recommend looking at the TI CSD16340Q3. I've used them with excellent results from a 2.5V operated uC.

cheers,
george.
 

Online madires

  • Super Contributor
  • ***
  • Posts: 8037
  • Country: de
  • A qualified hobbyist ;)
Re: MOSFET use in a uC application
« Reply #10 on: February 28, 2014, 04:00:44 pm »
Maybe a silly question but have you placed the load between source and ground or drain and Vcc? Do you got a freewheeling diode for the solenoid?
« Last Edit: February 28, 2014, 04:11:20 pm by madires »
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: MOSFET use in a uC application
« Reply #11 on: February 28, 2014, 04:04:59 pm »
There's not enough voltage at the gate relative to the source, 3.3V from the MCU is not enough (assuming source grounded). The RDSon value in the datasheet is for a 4.5V gate voltage. The VGS(thresh) specification is for when the device BEGINS to turn on, you'll have lots of channel resistance at 3-3.3V hence the heat.

You need a gate driver, ideally you want 7-12V between the gate and source to turn it on reliably.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline uwezi

  • Supporter
  • ****
  • Posts: 272
  • Country: se
    • GreenPhotons
Re: MOSFET use in a uC application
« Reply #12 on: February 28, 2014, 04:06:03 pm »
-100ohms I am still seeing high heat generation.-

something else is at work here. Gate drive isn't likely the issue.

Gate drive is not the issue, but rather the choice of MOSFET. This particular MOSFET is specified with its RDS,on at a gate voltage of 4.5 V. Yes, it is a "logic level" MOSFET, but for +5 V logic, not 3.3 V. According to the datasheet the threshold voltage can be as high as 3 V for the MOSFET used here.

IRF has a parametric selector where you can select MOSFETs for their at different gate voltages of 2.5 V and 4.5 V. You need to choose a MOSFET with specified low on-resistance at a 2.5 V or apply a higher gate voltage by means of a separate driver.

I just clicked in the table, not knowing anything about availability, but the IRLML6346 and IRLML2502 appear suitable for 3.3 V logic signals.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: MOSFET use in a uC application
« Reply #13 on: February 28, 2014, 04:58:38 pm »
Quote
but rather the choice of MOSFET.

Likely the circuit or wiring, not the mosfet.

Without the OP providing more specific information, no way to tell.
================================
https://dannyelectronics.wordpress.com/
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #14 on: February 28, 2014, 05:37:16 pm »
Guys,

Some really great info so far, but as requested, here is further info for what I am using.

Source is grounded.
Drain goes to the solenoid (12ohm inductive load), other side of solenoid to 12v.
No protection diode (do mosfets also need this?)
Driven currently by 100ohm from a Kinetis K20 3v3 MCU
100K pull to ground on gate also.
300Hz operation, 20-80%, 50% duty typical

Doing some looking into the recommended part numbers provided.

I appreciate all the information so far, thanks :)

Matt



« Last Edit: February 28, 2014, 05:46:51 pm by mtechmatt »
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #15 on: February 28, 2014, 05:44:17 pm »
Turn the FET on 100% of the time and measure the voltage drain to source. Then you will know if it is fully turning on or not. I'm surprised that the datasheet for the FET you provided the link doesn't specify the gate capacitance - seems like an important parameter to leave off...

The other important parameter is the current drive capability of your uC on the GPIO you have connected to your FET.

If you want a great low Vgs FET I highly recommend looking at the TI CSD16340Q3. I've used them with excellent results from a 2.5V operated uC.

cheers,
george.

George,

Have looked at this device and it seems very suitable. What drive resistor would you use with the Kinetis, assuming 20mA source, 3v3

Regards,
Matt
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #16 on: February 28, 2014, 05:48:41 pm »
I just clicked in the table, not knowing anything about availability, but the IRLML6346 and IRLML2502 appear suitable for 3.3 V logic signals.

Again good devices, cheap as well, what would be the usage schematic for this in my case do you think? (resistors etc) and is there a strict formula for calculating this?

I assume you consider the gate a cap and want the lowest rise time as possible without maxing out the uP source current?

Cheers,
Matt
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 915
  • Country: us
Re: MOSFET use in a uC application
« Reply #17 on: February 28, 2014, 05:57:54 pm »
Yes, you really should have a diode clamp for the back emf of the solenoid.

Do you have a scope? That would make life a LOT easier since you could just probe the gate and see what kind of signal you are getting (rise time etc).

No idea about your uC. I use Atmel AVR's and the ones I use have a symmetrical drive (high and low) and do just fine for direct drive of FET gates with no added series resistor since their GPIO's are current limited. I put a 100k pulldown to guarantee the FET is off when the uC is first 'booting up'.

IRLML2502 works fine (nice compact FET and I've used them in many designs) and for your 1A application would be a good solution. The TI part I linked is obviously a much high current capable device with lower Rdson and much better thermal path - basically an overkill for only 1A.

FET gate looks like a capacitor (sorta/kinda) and that is the main characteristic you need to consider when driving it especially at high speed. You're only doing a few hundred Hz so that is quite low speed. Vgs is possibly a problem but most likely the high gate charge/capacitance isn't helping with the switching speed. A scope would show you what is going on...

cheers,
george.
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #18 on: February 28, 2014, 06:01:52 pm »
George,

Yes have scoped it we are getting 3.3v at the gate with a rise time of approx 17uS...

I will see if this device is symetric and if it is. I dont believe the outputs on the Freescale Kinetis are current protected, will check into this also.

Will be back in a mo with the info on this :)

Matt
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #19 on: February 28, 2014, 06:04:55 pm »
From the DS for the kinetis:
digital I/O switching characteristics assume:1.  output pins•  have CL=30pF loads,•  are configured for fast slew rate (PORTx_PCRn[SRE]=0), and•  are configured for high drive strength (PORTx_PCRn[DSE]=1

They are -25mA to 25mA max ratings....

Unsure if they are limited as such, so reistance reccomendations?
 

Offline StevenB

  • Contributor
  • Posts: 36
  • Country: us
Re: MOSFET use in a uC application
« Reply #20 on: February 28, 2014, 06:09:09 pm »
You should also (as has been recommended) place a flyback diode from the drain (anode) to the supply (cathode connected to 12V) to make sure you aren't exceeding the breakdown voltage of the FET when switching off.
« Last Edit: February 28, 2014, 06:11:09 pm by StevenB »
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #21 on: February 28, 2014, 06:12:59 pm »
You should also (as has been recommended) place a flyback diode from the drain (anode) to the supply (cathode connected to 12V) to make sure you aren't exceeding the breakdown voltage of the FET when switching off.

Steven,

Yes, thinking of using an S1A for this, or should I go for a faster acting TVS (?) type?

Matt
 

Offline StevenB

  • Contributor
  • Posts: 36
  • Country: us
Re: MOSFET use in a uC application
« Reply #22 on: February 28, 2014, 06:34:35 pm »
The S1A should probably be fine.
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 915
  • Country: us
Re: MOSFET use in a uC application
« Reply #23 on: February 28, 2014, 07:13:05 pm »
17us rise time is very slow. What's the fall time? the same? Likely you gate resistor is slowing things down - what's the signal look like at the uC side of the gate resistor? Make the gate resistor smaller (value) and see what happens to your rise/fall time. Consider you have a few thousand pF of gate capacitance to charge/discharge on each on/off transition.

Have you turned the FET on 100% of the time and measured the source/drain voltage? Multiply that by your 1A current and you'll have an idea of static dissipation and know if you have and Vgs(th) issues.

You just need a diode that can handle the collapsing current when the solenoid is de-energised, so most any silicon diode will be fine, even 1n4148 :)

cheers,
george.
 

Offline mtechmattTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: MOSFET use in a uC application
« Reply #24 on: February 28, 2014, 07:56:15 pm »
17us rise time is very slow. What's the fall time? the same? Likely you gate resistor is slowing things down - what's the signal look like at the uC side of the gate resistor? Make the gate resistor smaller (value) and see what happens to your rise/fall time. Consider you have a few thousand pF of gate capacitance to charge/discharge on each on/off transition.

Have you turned the FET on 100% of the time and measured the source/drain voltage? Multiply that by your 1A current and you'll have an idea of static dissipation and know if you have and Vgs(th) issues.

You just need a diode that can handle the collapsing current when the solenoid is de-energised, so most any silicon diode will be fine, even 1n4148 :)

cheers,
george.

George,

I can get it down to 12uS with a 33ohm gate resistor, just checking the Volt drop accross it now, brb.

Matt
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf