# high side MOSFET switch and BJT interface with MCU GPIO

im operating a 28V contactor using a GPIO from my MCU, i have a 28V supply readily available.

im looking to surpass the gate threshold of the MOSFET by introducing a NPN BJT with a 10V supply, with the base connected to the GPIO,

The MOSFET turns on, however, VGS = V_GPIO - V_BE

and not VGS = 10v - ICRC - V_BE

There is something clear and obvious that im missing?

when the BJT is switched on the voltage should be seen at the gate of the MOSFET??  How can i increase the MOSFET gate voltage without inverting the input?

• You've got an emitter follower configuration. The emitter, effectively, can never achieve a voltage higher than about Vb-0.6V. If you invert your MCU output, you can connect your Q1 emitter directly to ground and the gate of M1 to the collector of Q1. Jun 28, 2018 at 12:33

You make the common mistake of using a common collector or emitter follower configuration of the BJT. In that configuration, using an NPN the output voltage (at the emitter) can never be higher than the voltage at the base.

Imagine for a second that the emitter was at a higher voltage than the base, then the base-emitter junction would be in reverse mode. That's not how a BJT is supposed to work, the base-emitter must be in forward mode so Vbe = 0.7 V (roughly).

The solution is to change the NPN to be in a common emitter circuit, make the NPN short R2 and connect R4 directly to the NMOS gate. Then the NPN will short the NMOS's gate to ground and turn it off when the NPN is on. Indeed that's an inversion compared to what you have now.

You could do such an inversion twice but that will require a more complex circuit and extra components. Accepting the inversion is the easy way to go. Are you sure you cannot accept the inversion, if you have access to the code running in the MCU the change is trivial.

• One way to combat the inversion would be to replace the N-FET with a P-FET that switches the 28V to the contactor coil. The other side of the contactor coil would then go to the GND. Jun 28, 2018 at 13:14

Something like that can do that job. This isn't really a push-pull since a resistor R_2 draws down that gate (I assume so to guarantee that the power nmost is off while powering up!)

BTW:

• The nmost and pmost shown in schematic are an awful choice, search for a raisonnable one. Check for the n- and pmost what is the max. rating of Vgs! In this circuit it is assumed to be ~10V.
• If no fast shutdown is needed you can cancel the inverter and M1 ! simulate this circuit – Schematic created using CircuitLab