Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

'Fast' switching of NPN transistor.

Status
Not open for further replies.

Nigel Goodwin

Super Moderator
Most Helpful Member
This is driving me mad, I can only imagine I'm doing something particularly stupid?.

I'm working on PIC based buck and boost converters, mostly for charging Li-Ion batteries in products we build - and while driving the FET gate direct from the PIC via a resistor works (for low-side), the FET doesn't switch 'that' fast, and gets warmer than I'd like. Using an NPN transistor and pull up resistor works for high-side, but even less well than the low side.

So after a quick googling, I added an NPN transistor and pullup, driving a pair of NPN/PNP emitter followers (as shown all over the net, and in application notes), with very little success.

A little scope work showed that the drive from the PIC was a nice square wave, but the wave on the FET was much wider, and the switch-off time was pretty slow.

So I've 'cut back' to just a resistor from PIC to NPN base (dropped it down to 220 ohm), emitter to chassis, and collector to 12V via a 10K - just those three components, nothing else connected.

Base.png
Collector.png


CH1 (yellow) is the drive from the PIC, first picture CH2 (blue) is on the base of the NPN (a BC337), so either side of the 220 ohm. Second picture is the collector of the NPN, it bears little resemblance to the drive waveform, and is what comes out of the FET when it's all connected. I've shifted the yellow trace up a bit so as to not overlap on zero volts.

Any clues? - I was going to try a 2N7000 FET instead of the NPN - but I haven't got one (they have all disappeared in a box of bits to a guy we sub-contract some construction to - he's an old friend who appreciates the work). So I ordered some from RS last night, and they have just turned up - so I'll try sticking one of those in and see what happens.

I've also ordered some IR2011 8 pin FET high/low drivers to have a play with.
 
OK, chucked a 2N7000 in, same 220 ohm feeding base, same 10K to 12V.

Drain.png


Much nicer now, the pulse width stays the same, although the rise time is still crap - however, switching the scope probe to x10 helps that quite a bit (picture below), and holding a 1K resistor across the 10K drain resistor helps even more. I'll see about sticking the emitter followers in, changing the drain load, and see how that goes.

Drain2.png
 
OK, 1K fitted in drain, emitter followers put back in:

Drain of 2N7000

Drain3.png


And emitters of emitter followers - pretty much same, as you would hope. From there it's just a 10 ohm to the main FET gate.

Emitter_Followers.png
 
The source to gate capacitance of a power mosfet is quite high so it requires quite large current pulses at the transitions. This normally requires active pull up and pull down rather than just a pull up or pull down resistor. I think this was the reason for your problems. I think the reason using the 2N7000 in place of the NPN transistor improved things was because the 220 ohm base resistor did not turn the transistor on hard enough to discharge the Gate capacitance of the power mosfet. With the 2N7000 the 220 ohm to it's gate would have very little effect so the 2N7000 would provide a low source to drain path. (I think the gate to source capacitance of the 2N7000 would be quite low so the 220 ohm would not have much effect.

Les.
 
The source to gate capacitance of a power mosfet is quite high so it requires quite large current pulses at the transitions. This normally requires active pull up and pull down rather than just a pull up or pull down resistor. I think this was the reason for your problems. I think the reason using the 2N7000 in place of the NPN transistor improved things was because the 220 ohm base resistor did not turn the transistor on hard enough to discharge the Gate capacitance of the power mosfet. With the 2N7000 the 220 ohm to it's gate would have very little effect so the 2N7000 would provide a low source to drain path. (I think the gate to source capacitance of the 2N7000 would be quite low so the 220 ohm would not have much effect.

Les.

I don't think you've read the first post properly:

So I've 'cut back' to just a resistor from PIC to NPN base (dropped it down to 220 ohm), emitter to chassis, and collector to 12V via a 10K - just those three components, nothing else connected.

All the scope pictures are with just those three components - nothing else, no big FET or anything else.

Currently, with the emitter followers back in place, 1K drain resistor on 2N7000 and large FET refitted, all is working well using the 2N7000 as the first stage.

The 2N7000 drops nicely in place of the BC337 - you just need to turn it round (flat of the 'D' the opposite way), and the connections are correct.
 
You are correct. I must have skipped over " just those three components, nothing else "

Les.
 
OK, here's the buck converter charging 18650's at 1A, yellow is output from the PIC, blue is the drain of the P-channel driving the inductor. It's still in CC mode, the batteries are only reading about 3.9V at the moment.

Buck_Output.png
 
What NPN were you using?
For fast switching you should use a fast switch, such as the 2N2369.
General-purpose NPNs such as the 2N3904 have a lot of saturation delay.
 
As mentioned in the first post, a BC337
Missed that obviously.

Below is the LTspice simulation showing the difference in switching time between the 2N2369 and the BC337:
The BC337 has a large saturation turn-off delay.

The 2N2369 speed can be improved by adding a small capacitor (e.g. 10pF) across the input resistor, R3.

1628695900088.png
 
Last edited:
Below is the LTspice simulation showing the difference in switching time between the 2N2369 and the BC337:
The BC337 has a large saturation turn-off delay.

Thanks very much for that, that looks to explain it then - I'll stick with the 2N7000, and see how the IR2011's work when my boards come for them.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top