# Single NPN or NPN+PNP (push pull) to drive a P-MOSFET

I need an ESP32 to drive two p-MOSFETs (https://datasheet.lcsc.com/szlcsc/1808131746_Diodes-Incorporated-DMP2104LP-7_C260933.pdf) as PWM controlled output for a motor. As the ESP32 can not deliver enough current, I want to add a simple gate driver for the MOSFETs. Board space is very limited, so a dedicated driver IC is not an option.

I now have two solutions: First, a driver with a NPN BJT, with a current rating of 600mA, using a MMDT2222A (https://datasheet.lcsc.com/szlcsc/Diodes-Incorporated-MMDT2222A-7-F_C96379.pdf)

Second, a driver using a NPN+PNP BJT in push-pull configuration, with a current rating of 200mA, using a NST3946DXV6 (https://datasheet.lcsc.com/szlcsc/ON-Semicon-ON-NST3946DXV6T1G_C232646.pdf)

Space wise, both versions fit on the board, but which version is preferable regarding speed and power consumption? The device is battery driven and very small, so power consumption and heat dissipation are important.

• "Which version is preferable regarding speed and power consumption?" - Those are often regarded as opposite things, and they depend on your use case. How fast do you need to switch? Given it's pwm for a motor, probably not fast enough for the speed of this circuit to matter much. I'd probably just go for the resistor-transistor method. – ambitiose_sed_ineptum Feb 17 at 17:16
• Why two series MOSFETs? Why no back emf protection? Why not use n channel MOSFET? – Andy aka Feb 17 at 17:19
• Which motor? Does the other side of the motor have to be grounded? What is the PWM frequency? Why are you using 2 MOSFETs in series? What is the purpose of C6? – Bruce Abbott Feb 17 at 17:20
• This is not what you are asking but I suggest you put the FET's with their sources connected together so that the pullup is from gate to source on both of them. You always want your PMOS pullup from gate to source, or your NMOS pulldown from gate to source. Otherwise carefully think through whether everything will work the way you want it to under all conditions. – mkeith Feb 17 at 19:44
• You can also use a CMOS logic gate to drive your FET's. This will switch much harder and faster and use much less power than what you have proposed so far. You can get single logic gates in packages the same size as a transistor package. – mkeith Feb 17 at 19:50

Your NPN transistor MMDT2222A-7-F is in a SOT363-6 package. It lists currently at Mouser at $0.45 in quantity 1. You can go to the same manufacturer and get the ZXGD3009DY gate driver which is also in the SOT363-6 package. It currently lists at$0.41 in quantity 1.

This ZXGD3009DY (data sheet) offers up a NPN and PNP which can be joined to produce a push-pull type gate driver as you show in your second circuit.

The chip has no space penalty and gives you the faster switching performance for your MOSFETs to save in switching losses power dissipation.

• I should have clarified: On the PCB are two PWM controlled outputs, which might be connected at the output terminal. That's why I use two p-MOSFETs for each output, to block the voltage output of one output from the other. That is also the reason why I can't use a dedicated gate driver, as there are no drivers in SOT-363 or smaller that can drive two different MOSFETs. – Spatz Feb 17 at 17:42
• @Spatz, the two mosfets have their body diodes pointing in opposite directions. If +3V3 is energized and Q3 is on, then the motor will be energized regardless of the state of Q5 because current will flow through the body diode of Q5. Is that what you want? Or is the diagram in your question inaccurate? – mkeith Feb 17 at 19:56
• To anyone seeing this, be careful selecting gate driver chips. Not all gate driver chips are actually compatible with microcontroller 3.3V signals; the push-pull types, like the one linked, can require quite a bit of input current to work properly. I've personally gotten trapped by this with one of the ZXG Diodes Inc. gate drivers on a little flyback converter I designed, where my uC couldn't supply enough current to the gate driver. There's some TI ones too, like the UCC27519, which won't work if the gate driver VDD is higher than 3.3V. – Ocanath Feb 17 at 20:54
• @Spatz - Well you present one thing in your question and get a fully valid answer only to turn around and say you need something else. Decent engineering work has to be based upon full specifications as to requirements. Half defined projects rarely succeed. – Michael Karas Feb 17 at 23:59
• @MichaelKaras 45 cents for a 2222A? Seriously? That's more than 100X what I pay. Of course, I hand them out to students like candy. So do buy in more than 1 unit apiece. But 2000 in an ammo pack for $8 I'll bet is cheaper than the ZXGD3009DY in 2000 qty. Ah, yes. More like$208. That's better. :) – jonk Feb 18 at 0:24

You should put ALL the POSSIBLY relevant information in the question (initially AND now) to save people having to answer spurious questions and/or troll through comments for enlightenment.

The two transistor version is faster in pullup.
It has the disadvantage of losing 0.6V Vbe drop on Vout on both high and low drive. The FET has adequately low Vgsth when turning on,
BUT has Vgsth = -0.45 V minimum at 250 uA so SOME versions of the FET will possibly provide the better part of 1 mA (and just possibly more) when turned off, due to the ~= 0.6V on the gates.
This MAY be acceptable but as you say you have two voltage sources, it may add complexity.

The 1 transistor plus a resistor circuit does not have this issue but PWM turnoff time (470 Ohms + gate capacitances) needs checking.

• Thank you for your answer! I think I will stick to the single npn solution then! – Spatz Feb 18 at 11:18
• @Spatz Note that with thj 1Q 1R solution power consumption when Q is on is about 20 mW in the resistor. IF that matters, make R as large as possible consistent with getting adequate FET turn off speed. | The 2Q cct has essentially zero dissipation except when switching. – Russell McMahon Feb 19 at 0:48