Driving N channel mosfets using bipolar transistors

crutschow

Joined Mar 14, 2008
34,280
Right, I thought he meant the output from the NPN, not the MOSFET.
But still isn’t that pull up resistor connected to 12 volts?

And if it is, why can’t a pull up be used to turn off a PNP instead.
Good point.
R1 should be increased to 40k so the maximum input voltage is <3V when the processor output is high.
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
TS said he is using IRFZ44N.
Why not use IRLZ44N?
VGS = 2V max.
oops thanks, i should have looked up this part instead, this would solve it out of the box
i could literally replace those mosfets on the ramps board that's designed for a turn on voltage of 4.5v
in my searches i run into many part numbers that literally seemed priced higher possibly as those aren't that popular after all
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
but i'd still try out this discrete transistor circuit as in a sense the existing mosfets on the ramps board won't goto 'waste', but certainly IRLZ44N is far simpler if i simply replace the parts on the board itself
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
If you do that it might be a good idea to add a pull-up resistor (e.g. 10kΩ) from the transistor resistor input to plus 3.3V so that the output is off with no input, as shown below.
this seemed to be a good idea and saving the pnp transistor, and i'd probably only need to use 'open collector/drain' drives on the pin.
the only minor question would be as the pins are normally only 3.3v-5v tolerant would it cause an issue given that it is a pull down from 12v across the 10k resistor? it still seem feasible as that would imply only 1.2ma currents due to the 10k resistor[/QUOTE]
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
this seemed to be a good idea and saving the pnp transistor, and i'd probably only need to use 'open collector/drain' drives on the pin.
the only minor question would be as the pins are normally only 3.3v-5v tolerant would it cause an issue given that it is a pull down from 12v across the 10k resistor?
See post #21
 

Thread Starter

ag-123

Joined Apr 28, 2017
276
thanks i'd probably try out something that way, possibly i'd leave the pull down from 12v at 10k and use a 1k series resistor into the NPN transistor. this would more likely switch the NPN 'fully on'. if i setup as 'open collector/drain' when the pin is on the mcu should pretty much be able to pull that down to ground, turning off the NPN and turning on the MOSFET
 

ElectricSpidey

Joined Dec 2, 2017
2,757
No, that 10k is a “pull up”.

If you are going to go with the NPN, you should set the GPIO to rail to rail and ditch the pull up resistor, this insures there is no overvoltage issue, just be sure to use a base resistor that allows enough current to get the transistor at or near saturation, to turn off the MOSFETS.

Setting the GPIO to rail to rail won’t affect its ability to pull the output to ground, and turn off the NPN, but is does solve any overvoltage issues.
 
Top