What else I can do improve bjt/mosfet switching time ?

Thread Starter

Simranjit

Joined Apr 16, 2024
26
Hi, i have trouble with bjt and mosfet switching not properly at high frequencies (trying to get to at least 300khz). BJT is 2n2222, Mosfet is IRF540n. Without CB22 capacitor (just had that laying on hand) the mosfet doesn't switch at all (pink line) when I add capacitor it does switch properly but only at lower frequencies. When I add capacitor the signal from collector of bjt also drops drops significantly (yellow line). If I use lower resistance from collector to gate of mosfet (without cap) the signal (yellow) drops again. Frequency is 1khz on oscilloscope. Please give me some guidance.
 

Attachments

dl324

Joined Mar 30, 2015
16,996
BJT is 2n2222, Mosfet is IRF540n. Without CB22 capacitor (just had that laying on hand) the mosfet doesn't switch at all (pink line)
Please post a schematic. It will give us more information than your description.

Give the full part number for your 2N2222. Technically, 2N2222A should be in a metal can. PN2222A and P2N2222A are in TO-92, but have different pinouts.
1713385714238.png
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
Please post a schematic. It will give us more information than your description.

Give the full part number for your 2N2222. Technically, 2N2222A should be in a metal can. PN2222A and P2N2222A are in TO-92, but have different pinouts.
View attachment 320165
Hi, sorry for that.i will share exact details and everything in 5 hours. Currently I just arrived at work.
 

MisterBill2

Joined Jan 23, 2018
18,970
The only way to make a MOSFET switch on rapidly is to rapidly drive the gate to deliver the gate charge , and the only way to rapidly switch it off is to rapidly remove that charge. What I see looks a lot more like a resistor pull pull-up delivering the charge and a transistor removing it quickly. Rapidly driving the gate to provide rapid switching will take two transistors at least, OR a high performance gate driver IC. No way around that that I am aware of. The mosfet gate capacitance must be charged to switch on, and must be discharged to switch off.
 

crutschow

Joined Mar 14, 2008
34,682
Below is the LTspice sim of an example MOSFET driver, consisting of a two-transistor totem-pole circuit to drive the high gate capacitance of an N-MOSFET at 300kHz.
(I didn't have the IRF540n model, but the MOSFET I used has the same gate charge (capacitance), which is the critical parameter determining the switching speed for a given drive circuit.)
Edit: Q1 is a common-emitter to discharge the gate capacitance through D1 and Q2 is an emitter-follower to charge the capacitance.

Note that the switching speed is good, although there is a slight delay between the input and output switching times.

1713389325909.png
 
Last edited:

Thread Starter

Simranjit

Joined Apr 16, 2024
26
The only way to make a MOSFET switch on rapidly is to rapidly drive the gate to deliver the gate charge , and the only way to rapidly switch it off is to rapidly remove that charge. What I see looks a lot more like a resistor pull pull-up delivering the charge and a transistor removing it quickly. Rapidly driving the gate to provide rapid switching will take two transistors at least, OR a high performance gate driver IC. No way around that that I am aware of. The mosfet gate capacitance must be charged to switch on, and must be discharged to switch off.
Hi, thank you for your input. Its just im fascinated by transistors. In college I never really understood how they worked in real life. I was just blindly building circuits and hoping they would work. I finally got a oscilloscope and I'm loving it so much. I feel like if I understand basics than I can debug circuits easily. For example I could use same circuit to drive induction heater or Tesla coil, or I could connect inductor and capacitor in parallel and watch them oscillate.. I ordered the driver ICs from AliExpress the seller only sent one instead of two. So I took it as a sign to learn more.
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
Below is the LTspice sim of an example MOSFET driver, consisting of a two-transistor totem-pole circuit to drive the high gate capacitance of an N-MOSFET at 300kHz.
(I didn't have the IRF540n model, but the MOSFET I used has the same gate charge (capacitance), which is the critical parameter determining the switching speed for a given drive circuit.)
Note that the switching speed is good, although there is a slight delay between the input and output switching times.

View attachment 320179
Hi, thank you very much. I heard about this program in college but never really tried it. I didn't know that even professionals use it.
 

crutschow

Joined Mar 14, 2008
34,682
I heard about this program in college but never really tried it. I didn't know that even professionals use it.
Suggest you give it a try as it's a good way to see how your circuit should work before building it.
LTspice is free from Analog Devices.
It has a somewhat steep learning curve but there are good tutorials and example circuits to learn with, and several on this website can help you with any questions.
One thing you will likely also want to learn is how to install model files for other devices that don't already come with the program.
 
Last edited:

dl324

Joined Mar 30, 2015
16,996
On the BJT it says 2N2222A but its to-92
What is the manufacturer?

TI and OnSemi say it should be in TO-18:
1713406529114.png
I have attached the circuit.
You don't have an active pull-up, but at 1kHz, the waveform shouldn't be that bad. I happen to be using a single comparator PWM driving some IRFZ44N that have a slightly higher gate capacitance and I'm not seeing such a slow transition (I think my pull-up resistor is 4.7k, frequency is just under 1kHz).
 

MisterBill2

Joined Jan 23, 2018
18,970
The very best passive R-C time constant is going to be a whole lot slower than an active pull up, at any frequency. The unfortunate reality is that during the time the MOSFET device is passing thru the linear region there can be a great deal of power dissipated in the junction area. It might not look that bad on a slow scope trace, but it certainly would be.
So aside from revising the circuit to an active pull-up arrangement, a faster and larger base drive can be provide improvement as well.
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
Suggest you give it a try as it's a good way to see how your circuit should work before building it.
LTspice is free from Analog Devices.
It has a somewhat steep learning curve but there are good tutorials and example circuits to learn with, and several on this website can help you with any questions.
One thing you will likely also want to learn is how to install model files for other devices that don't already come with the program.
Hi, I tried LTSpice. It saved me a lot of time and headache. I finally settled on NPN driving a NPN & PNP in a push-pull config. I was able to drive my IRF540n very hard. Now I'm just working on reducing noise from inductor I connected with IRF540n. Again many thanks for your guidance.
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
Glad you got LTspice and the circuit to work.

The totem-pole driver I showed is basically a push-pull circuit using just two NPN transistors.
I realized that but I couldn't understand properly how it worked in the beginning (that diode threw me off a little bit) so I Just started experimenting. Now I understand a little more about them. I watched some YouTube videos about totem pole configs. I will try more deep understanding of transistors. Thank you again for your time and guidance.
 

crutschow

Joined Mar 14, 2008
34,682
I couldn't understand properly how it worked in the beginning (that diode threw me off a little bit)
So you understand now that the diode provides a path for Q2, when it turns on, to discharge the MOSFET gate charge. but blocks the current from R3 to the gate when Q2 turns off, so it can turn on Q1 to charge the gate(?).
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
So you understand now that the diode provides a path for Q2, when it turns on, to discharge the MOSFET gate charge. but blocks the current from R3 to the gate when Q2 turns off, so it can turn on Q1 to charge the gate(?).
Yes, that exactly what is understood.
 

Thread Starter

Simranjit

Joined Apr 16, 2024
26
So you understand now that the diode provides a path for Q2, when it turns on, to discharge the MOSFET gate charge. but blocks the current from R3 to the gate when Q2 turns off, so it can turn on Q1 to charge the gate(?).
capture_2.PNGI modified the circuit a little to discharge q3, and m1 faster. Although I'm guessing the Q3 and Q2 discharging the M1 in parallel. Speed-up capacitor parallel with R1 instead of D2 results in better looking waveform (no Q2 needed in that case). . Any feedback please ?
 
Last edited:
Top