I want to drive a MOSFET gate with about 10V. I use the following circuit as described in Fig. 4 http://tahmidmc.blogspot.com/2012/12/low-side-mosfet-drive-circuits-and_23.html
Is this okay? How do I choose the correct resistor values?
I want to drive a MOSFET gate with about 10V. I use the following circuit as described in Fig. 4 http://tahmidmc.blogspot.com/2012/12/low-side-mosfet-drive-circuits-and_23.html
Is this okay? How do I choose the correct resistor values?
Like all designs, it depends on what you want to do. Richard Thiessen has a complete answer, I just want to add what to do for high speed in case it helps.
Below are minimal schematics for higher current, lower current, and for fast (e.g., >1 MHz switching, if that's what you're looking for)
simulate this circuit – Schematic created using CircuitLab
For each of these, RE will determine how much base current is needed. To calculate that, you need to know your desired switching time for the mosfet (how fast will you turn it on/off?) and the MOSFET's gate charge. From that you can get the gate current needed \$I_G=Q_G/t_s\$. Assuming a worst case scenario of a saturated \$\beta=10\$, that means the current in to Q2's base should be \$I_B\approx Q_G/t_s/10\$. So RE should be something like $$ R_E=\frac{(V_{DD}-V_{be,sat}-V_{ce,sat})\times 10 t_s}{Q_G} $$ Since the lowest voltage the gate will see is a CE above Q1's emitter plus a BE from Q3.
In the high current case, Q3 will discharge the gate (and should have no problem as it's being pulled down to ground). In that case, the base current for Q1 should just be \$10\times\$ whatever the current through \$R_E\$ is (again, assuming saturated \$beta\approx 10\$). The highest \$I_C\$ for Q1 is \$I_C=\frac{V_{DD}-V_{ce,sat,Q1}}{R_E}\$. Therefore, for Q1: $$ I_B = \frac{V_{DD}-V_{ce,sat}}{10 R_E}\\ R_B = \frac{(V_i-V_{be,sat})\times 10 R_E }{V_{DD}-V_{ce,sat}}\\ R_B = \frac{10 (V_i-V_{be,sat})\times }{V_{DD}-V_{ce,sat}} \frac{(V_{DD}-V_{be,sat}-V_{ce,sat})\times 10 t_s}{Q_G}\\ R_B \approx \frac{100 (V_i-V_{be,sat}) t_s}{Q_G}\\ $$
If you require less current, you can exchange Q3 for a diode. In the circuit I used a Schottky diode to save some voltage drop. \$R_E\$ stays the same, but you'll need to put more current through Q4 than before. The peak current will be all of the gate charge switching, therefore:
$$ I_B = \frac{Q_g}{10 t_s}\\ R_B = \frac{ 10 (V_i-V_{be,sat}) t_s}{Q_g} $$
So in the low current case, \$R_B\$ has to be 10x smaller since all the current goes through Q4.
Finally, if you want to go fast (>1 MHz), you have to add a speed up capacitor and a Baker clamp. That's because BJTs have a pretty long storage time (there's a long turn off delay). You also should use fast recovery diodes (1n4148 or the Schottky BAT54 or similar). You can add those components on either the high or low current versions.
Here's a simplified schematic that has slightly more informative resistor names.
Sizing is pretty straightforward and quite forgiving. You just need to avoid over-driving Q2 and Q3. Choose a base current that works for both these transistors, remember that HFE drops as you increase current so use the characterization graphs in the datasheet.
Rpu depends on Q2 characteristics. Q2 is rated for 600mA continuous or 800mA peak current. Conservatively I'll say 600mA and the HFE @Ic=600mA is around 40-50 so you'll need something like 10mA of base current. Which calls for a 1k pull up resistor. Given that the peak current rating is 800mA and HFE goes down I'd guesstimate 680 ohms would still be safe and would speed up operation. I'm ignoring Rrl right now which is going to be fairly small in comparison.
Of note, my math is a little sloppy but we're working with datasheet graphs that are "typical". Check what the actual current is with an oscilloscope and a 1 ohm resistor on the Q2 collector or something. That's how you know the values are right. Alternatively trust the transistor model in your simulator.
For turn off, Rpd limits base current to Q3. Again, figure out what the maximum current you want to flow is, the Hfe at that current and then get a resistor value that gives you that. Current is similar but Hfe is lower at around 30-40 so a lower valued resistor make sense here. 680 0hms is what I'd go with (10/680*40=0.588).
Worth noting here is that reverse breakdown of Q2 could cause problems. Expect it to happen here at least briefly. The BE junction in a BJT has about a 6V reverse breakdown voltage and acts a little like a zener diode. That's why Rrl is there, limiting reverse breakdown current in the Q2 BE junction. (10v-6v)/100=40mA
Ri and Ri_off handle turn on and turn off of Q1. Sizing here isn't that straightforward. Ri_off speeds up turn off while Ri should provide enough base current to turn the transistor on quickly. These depend on capacitance and stored charge. I chose an Ri that gives 10mA of base current @5V since it seems like a reasonable value. You could probably omit Ri_off if driving from a microcontroller pin since Ri provides a 470 ohm resistor to ground when the MCU output is low anyways.
but that's not the best circuit to use there are better ways to do it
You can get rid of Rrl, Rpd and Q3, replacing them with a diode. The resulting circuit is just objectively better in almost every way.
Since we need an NPN transistor anyway because of the 10V gate drive voltage it can be used for turn off too. This significantly speeds up turn off mostly since Q3 provides a constant current that doesn't drop as the MOSFET gate voltage changes.
A normal 1N4001 works fine.
So what is Rg supposed to do anyways?
It's for people who don't lay out their boards correctly. If you put the Mosfet driver far away from the MOSFET, you form a big wire loop that acts as an inductor. This makes an LC circuit with the MOSFET gate capacitance. Rg damps this to reduce peak voltage on the gate and avoid nastiness in the switching waveform that come out of the MOSFET. Do your layout correctly and you mostly won't need it. For this design, put the transistors and diode next to the MOSFET along with a few microfarads of bypass capacitance and it should work just fine with no need for a gate resistor.
A few other things to consider
I'd have to know more about the application to make further recommendations but I hope this helps.
Q2 and Q5 are wrong types - you got them swapped. Q2 should be an NPN, and Q5 should be a PNP. Those would be then connected as complementary emitter followers, with emitters connected together, and thus able to both source and sink current. But, as another answer points out, Q5 can be just an E-B diode with collector open.
This would be my prefered circuit if Q2 and Q5 were exchanged, I then get the Hfe gain of the transistor to help. This would eliminate the need for R7 and R8. I have been using this variation for years. It gives good gate drive whether turning on or off. R9 prevents oscillation in a few rarer instanstances. R1 guarantees the MOSFET is off during power down and power up. If it is a P -channel fet R1 would become a pull up. In this drawing R7 and R8 determine the current available to drive the gate on or off.