Author Topic: MOSFET Gate Resistor  (Read 1032 times)

0 Members and 1 Guest are viewing this topic.

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
MOSFET Gate Resistor
« on: October 27, 2024, 11:56:27 pm »
This is driven by an ESP32 (3.3V logic).



Is 470ohms a good series resistor? As it's a relay, switch times are incredibly long. I'm mostly balancing trying to protect the MCU, but also not having too slow a rise time for the health of the relay.

(Any other tips also welcome. The SS210 was chosen BOM consolidation from the rectifier diodes.)
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7629
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #1 on: October 28, 2024, 12:17:13 am »
G6K-2F-Y-DC5 coil is rated 21mA so the back-EMF diode can only see that, a BAV99 is enough. SS210 1.5A 100V SMB is overkill for a small relay coil I think.
I would move R306 to the other side of R? so you are not losing 5% gate drive voltage there.
The gate resistor is not critical here, 470R is fine for the small mosfet. If you used peak-n-hold PWM to drive the coil, to save power then switching the mosfet at say 20kHz should be still OK.
The relay's release time is long due to D304 so I would not worry about pull-in time delays a few usec.
 

Offline TimNJ

  • Super Contributor
  • ***
  • Posts: 1720
  • Country: us
Re: MOSFET Gate Resistor
« Reply #2 on: October 28, 2024, 12:21:37 am »
This may be an interesting document:

https://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=13C3264_AppNote&DocType=CS&DocLang=EN

Switching speed of the MOSFET isn’t really relevant, except maybe at the extreme, like megaohms, maybe.
 
The following users thanked this post: tooki

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #3 on: October 28, 2024, 01:11:53 am »
That's pretty cool!

I do have 1K elsewhere on the design. That should be fine then?

I'm using a TVS diode so perhaps I can incorporate that based on those notes. I'm only switching 24VAC though (HVAC).
 

Online Konkedout

  • Regular Contributor
  • *
  • Posts: 200
  • Country: us
Re: MOSFET Gate Resistor
« Reply #4 on: October 28, 2024, 05:10:59 am »
G6K-2F-Y-DC5 coil is rated 21mA

If that 21 mA is anywhere close, I would just use a MMBT3904 NPN transistor instead of the MOSFET so long as you can get 1 mA (pessimistic requirement) of base drive. This bipolar transistor would be cheaper and less susceptible to ESD damage.  If you are stuck on using the MOSFET; it would be a good idea to add a 5.6V - 9.1V zener from gate to source for protection against any ESD gremlins which might want to damage destroy your MOSFET. 
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #5 on: October 28, 2024, 08:33:58 pm »
I'm not opposed to using a transistor. If I stuck with a 1k resistor for BOM consolidation purposes that would be approx 3mA of current.

How do I know what the maximum appropriate current for the base is? Not just in this application, but any future ones as well.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7133
  • Country: fi
    • My home page and email address
Re: MOSFET Gate Resistor
« Reply #6 on: October 28, 2024, 09:55:25 pm »
How do I know what the maximum appropriate current for the base is? Not just in this application, but any future ones as well.
The gate behaves like a capacitor, and the resistor limits the inrush or peak current draw (from your I/O pin) when the state of the MOSFET changes.  MOSFETs are voltage controlled devices, not current controlled devices like for example BJT transistors are.

The exact peak current depends on not only the gate capacitance, but also on the I/O pin slew rate and such.  I am not aware of any generally used simple formula to calculate it, although I think one could approximate it starting from a low-pass RC filter model.

If your logic level voltage is V, and the limiting resistor R, you can definitely say that even the peak current is limited to I=V/R or less.  In most cases, it will be much less.  A 220Ω resistor on a 3.3V I/O pin will limit the (peak) current to 15mA; a 1kΩ to 3.3mA.

As the gate acts like a capacitor, the resistor will also affect the time it takes for the MOSFET to change state.   In between the initial and final states, the MOSFET will act very much like a resistor (whose resistance varies), and thus dissipate energy exactly like a resistor would as heat.  Therefore, it tends to matter most when the switching happens often.

My own favourite logic-level or signal N-channel trench MOSFET is NXP NX138AKR.  It is very similar to BSS138 MOSFETs available from several manufacturers, but slightly faster due to smaller total gate capacitance.  Using a 220Ω resistor on the gate pin at 3.3V I/O, switching is fast enough to at least 100 kHz digital signals.  Its gate-source threshold voltage (which is really a curve!) is also low enough to be used down to 2.5V I/O levels without any worries or extra consideration.  (I originally arrived at it because it was A) cheap and easily available in SOT23-3, B) slightly faster than BSS138, and C) because NXP has a nice SPICE model for it I could use in KiCAD et cetera to model the circuit behaviour.)
« Last Edit: October 28, 2024, 10:00:44 pm by Nominal Animal »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9219
  • Country: fi
Re: MOSFET Gate Resistor
« Reply #7 on: October 30, 2024, 03:32:47 pm »
470R is probably fine.

But I would replace D304 with a bidirectional TVS (something which never conducts at 5V, but conducts well before the 30V rating of the FET. Something like 7-10V nominal working voltage). Using an antiparallel diode is the classic way to cause excessive contact wear. Basically with the diode, none of the relay datasheet ratings apply, as contact release is seriously slowed down causing more arcing during turn-off. This is because freewheeling diode lets the inductance-stored energy circulate in the coil itself, keeping it pulled for longer. Current diminishes and so does holding force, but this is slow; gradual release sparks the contacts.

Manufacturer tests and rates the relays without any snubbing components so that the relay coil inductance creates "infinite" voltage, but release time is faster.

Solution which satisfies both relay contact requirements plus desire to protect the switching transistor is a more lossy version of the diode: so that the coil-stored energy is not spent driving the coil but mostly dissipated in the external component. Typical solutions are: parallel resistor (instead of diode), resistor + diode in series, unidirectional TVS or Zener + normal diode in series; or, my preferred single-component solution, a bidirectional TVS, also suitable for drop-in replacement if the design is already done with a single diode.
« Last Edit: October 30, 2024, 03:35:32 pm by Siwastaja »
 
The following users thanked this post: tooki

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #8 on: October 30, 2024, 03:49:34 pm »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9219
  • Country: fi
Re: MOSFET Gate Resistor
« Reply #9 on: October 30, 2024, 05:29:29 pm »
Something like the SMAJ6.5CA ? https://www.littelfuse.com/products/tvs-diodes/surface-mount/smaj/smaj6_5ca.aspx

Yes - e.g. this is guaranteed to conduct less than 500µA at 6.5V (i.e., even less at 5V), and is guaranteed to clamp at 11.2V @ whopping 35.7A. So you can expect it to clamp somewhere around 7-8V at the coil current, and consume over ten times the energy compared to a schottky diode with Vf=0.5V or so, so much faster release time.

A much smaller part would do the job too but this is one of the cases where oversized part does not matter and is easier to find.
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #10 on: October 30, 2024, 08:53:38 pm »
Thank you everyone for your comments. I've updated the design

1. NPN transistor instead
2. Bidirectional TVS on relay
3. Move pull down resistor R304 in front of series resistor R306
4. Change R304 to 1K to reduce BOM

Any concerns with R306 being rated for 60mW? (0402)? My math says that should be safe by a large margin.

 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 384
  • Country: pl
Re: MOSFET Gate Resistor
« Reply #11 on: October 30, 2024, 09:12:11 pm »
3. Move pull down resistor R304 in front of series resistor R306

For MOSFET it is important to not make Vgs smaller, for npn not.
I would have R304 after R306.

Any concerns with R306 being rated for 60mW? (0402)? My math says that should be safe by a large margin.

My math too.
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 384
  • Country: pl
Re: MOSFET Gate Resistor
« Reply #12 on: October 30, 2024, 11:30:40 pm »
4. Change R304 to 1K to reduce BOM

if you care about BOM size than may be you also care about assemble time.
What about MMBTRC116SS ?
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #13 on: October 31, 2024, 01:51:32 pm »
MMBT3904 is better as it will be cheaper in the end - it will be fab'd overseas.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9219
  • Country: fi
Re: MOSFET Gate Resistor
« Reply #14 on: October 31, 2024, 07:09:42 pm »
If cost optimizing, why use pulldown on NPN base at all. A bipolar transistor is not going to conduct from tiny leakage currents, ESD or whatever, like a MOSFET would. So leave R304 out.
 

Offline joeyjoejoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: ca
Re: MOSFET Gate Resistor
« Reply #15 on: October 31, 2024, 07:26:55 pm »
Great point! I believe if a MOSFET fails, it will typically cause current to flow through gate, so that resistor can also help in the event of a MOSFET dying.

What would a failure mode of a transistor be?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf