MOSFET Gate Resistor - Page 1
Forum section: electronics / beginners

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 27, 2024, 11:56:27 pm
content: 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.)

author: floobydust
author_rank: Super Contributor
timestamp: October 28, 2024, 12:17:13 am
content: G6K-2F-Y-DC5 coil is rated 21mA so the back-EMF diode can only see that, a BAV99 is enough.SS2101.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.

author: TimNJ
author_rank: Super Contributor
timestamp: October 28, 2024, 12:21:37 am
content: This may be an interesting document:https://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=13C3264_AppNote&DocType=CS&DocLang=ENSwitching speed of the MOSFET isn’t really relevant, except maybe at the extreme, like megaohms, maybe.

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 28, 2024, 01:11:53 am
content: 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).

author: Konkedout
author_rank: Frequent Contributor
timestamp: October 28, 2024, 05:10:59 am
content: Quote from: floobydust on October 28, 2024, 12:17:13 amIf 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 todamagedestroy your MOSFET.

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 28, 2024, 08:33:58 pm
content: 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.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 28, 2024, 09:55:25 pm
content: Quote from: joeyjoejoe on October 28, 2024, 08:33:58 pmThe 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/Ror 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 isNXP 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.)

author: Siwastaja
author_rank: Super Contributor
timestamp: October 30, 2024, 03:32:47 pm
content: 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 ofdiode), 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.

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 30, 2024, 03:49:34 pm
content: Something like the SMAJ6.5CA ?https://www.littelfuse.com/products/tvs-diodes/surface-mount/smaj/smaj6_5ca.aspx

author: Siwastaja
author_rank: Super Contributor
timestamp: October 30, 2024, 05:29:29 pm
content: Quote from: joeyjoejoe on October 30, 2024, 03:49:34 pmYes - 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.

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 30, 2024, 08:53:38 pm
content: Thank you everyone for your comments. I've updated the design1. NPN transistor instead2. Bidirectional TVS on relay3. Move pull down resistor R304 in front of series resistor R3064. Change R304 to 1K to reduce BOMAny concerns with R306 being rated for 60mW? (0402)? My math says that should be safe by a large margin.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 30, 2024, 09:12:11 pm
content: Quote from: joeyjoejoe on October 30, 2024, 08:53:38 pmFor MOSFET it is important to not make Vgs smaller, for npn not.I would have R304 after R306.Quote from: joeyjoejoe on October 30, 2024, 08:53:38 pmMy math too.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 30, 2024, 11:30:40 pm
content: Quote from: joeyjoejoe on October 30, 2024, 08:53:38 pmif you care about BOM size than may be you also care about assemble time.What about MMBTRC116SS ?

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 31, 2024, 01:51:32 pm
content: MMBT3904 is better as it will be cheaper in the end - it will be fab'd overseas.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 31, 2024, 07:09:42 pm
content: 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.

author: joeyjoejoe
author_rank: Frequent Contributor
timestamp: October 31, 2024, 07:26:55 pm
content: 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?