Author Topic: BJT totem pole questions  (Read 31101 times)

0 Members and 1 Guest are viewing this topic.

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
BJT totem pole questions
« on: March 04, 2016, 02:46:34 pm »
Hi there.

I have been messing around with microcontrollers, and wanted to run the PIC from a 2.8V source, where as it needs to switch a mosfet at 5V.
I figured a BJT gate driver would do, but i get nothing but the voltage from the microcontroller - diode voltage drop from base-collector, so around 2.2V.
The BJT's are set in a totempole config, and the test setup is pretty straight forward. 5V goes to the drive, and the MC is set to the connected bases of the BJT's.
I'm using a A733 PNP http://vakits.com/sites/default/files/2SA733.pdf
and a C945 NPN http://cdn2.boxtec.ch/pub/diverse/C945.pdf
The MC is switching at 2kHz.

Pretty new at this stuff, that's why it's in the beginners section :)
 
The following users thanked this post: Cliff Matthews

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: BJT totem pole questions
« Reply #1 on: March 04, 2016, 03:04:12 pm »
That's a complimentary push-pull emitter follower, not a totem pole.  Its output is smaller than the input as you loose one Vbe drop top and bottom.   To make it work, you'd need a level shifter in front of it.
 

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
Re: BJT totem pole questions
« Reply #2 on: March 04, 2016, 03:10:54 pm »
So a transistor with a pullup?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: BJT totem pole questions
« Reply #3 on: March 04, 2016, 03:29:29 pm »
Yes, in front of the push-pull pair you already have, but that will lift the 'off' level by Vce_sat which will end up giving you about 1V on the gate in the OFF state.   Depending on the MOSFET minimum gate threshold, this may be an issue and cause excessive leakage current when off.  A gate pulldown resistor may be required.   You *MAY* be better off scrapping the whole discrete driver circuit and using a dedicated MOSFET driver chip, but you will need to be certain the PIC output @2.8V Vdd can meet its minimum logic '1' threshold.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: BJT totem pole questions
« Reply #4 on: March 04, 2016, 03:34:59 pm »
Single gate logic, dirtbag cheap, small packages.

http://www.diodes.com/pdfs/74LVC%20Single%20and%20Dual%20Gate%20Logic%20Flyer.pdf

Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #5 on: March 04, 2016, 03:36:03 pm »
You could use a fet, which has been designed, especially for low voltage gate drive activation. There are many new ones available (primarily produced for the huge mobile phone market, which are usually low voltage (3.6/3.7V)).

Unless you need very fast switching speeds, they can usually be driven directly from the port pin (resistors etc, as needed).

http://www.digikey.co.uk/Web%20Export/Supplier%20Content/ROHM_511/PDF/ROHM_LowGateDriveMosfets.pdf?redirected=1
« Last Edit: March 04, 2016, 03:38:50 pm by MK14 »
 

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
Re: BJT totem pole questions
« Reply #6 on: March 04, 2016, 03:43:02 pm »
@Ian
Ye, the BJT's driving the mosfet seems to give that voltage drop issue. . . Making it not turn completely off.
The whole problem in a nutshell is, that the mosfet used is a SI2301 with quite the gate capacitance, and with a direct pull-up resistor, it causes quite the power loss due to the small resistor size at higher switching speeds, if I want a nice square wave.

Was looking at a dedicated mosfet driver, but wanted to see if there was another way.

How about a CMOS switch instead of BJT's?
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #7 on: March 04, 2016, 04:02:54 pm »
Single gate logic, dirtbag cheap, small packages.

http://www.diodes.com/pdfs/74LVC%20Single%20and%20Dual%20Gate%20Logic%20Flyer.pdf

Regards, Dana.

Good suggestion.
I think some people, parallel up multiple outputs, if they want to get even faster speeds, with this low cost, simple solution.


How about a CMOS switch instead of BJT's?

What exactly do you mean by CMOS switch ?

Do you mean discrete small signal fets ?

EDIT: On reflection, I think I see what you mean now. I'm use to CMOS only being used to describe integrated circuits, rather than external fet combinations.

This is why it is usually better to carefully choose the output fet(s), to have the correct gate driver voltage and/or be low enough capacitance to be easily driven, by your circuit. (N.B. NOT always possible, or cheap enough etc. So more easily said than done, in practice).

But different people/organisations, vary in how they do things. So fair enough, if you want to use that specific fet (or already have it in stock).
« Last Edit: March 04, 2016, 04:08:04 pm by MK14 »
 

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
Re: BJT totem pole questions
« Reply #8 on: March 04, 2016, 04:52:02 pm »
@MK14
The SI2301 is what I'm currently in possession of, and after looking on Digikey, a lot of the FET's don't have a gate capacitance rating.
The ones with very low capacitance for their current rating, are very expensive compared to the manstream 2301.

Yes, the CMOS as complimentary mosfets in an external circuit :)
The question here is if it's cheaper to make a CMOS switch from 2 lower rated mosfets, with a very low gate capacitance, or to buy a better transistor, or to use a mosfet driver?

P channel http://www.infineon.com/dgdl/Infineon-BSS223PW-DS-v01_05-en.pdf?fileId=db3a3043321e49940132481523b6245f
0.6 nC max on gate, should do the trick with a complimentary N channel?
Very cheap also :)
« Last Edit: March 04, 2016, 04:58:48 pm by step_s »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: BJT totem pole questions
« Reply #9 on: March 04, 2016, 05:04:06 pm »
Are you sure you gave the right number? The SI2301 has only a dozen nC or so gate charge, not at all much.
,
 

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
Re: BJT totem pole questions
« Reply #10 on: March 04, 2016, 05:27:40 pm »
@dom0
Ye, I'm sorry that i have said 2kHz in my test setup, when what I'm currently talking about is the implementation.
The SI2301 is sitting in a buck converter setup, where it will have to switch at around 250kHz-500kHz, and if the 10nC on the gate needs to be drained fast enough, a simple pullup resistor on the gate will have to be around 200ohms, and cause a lot of power loss in the system.
So the CMOS would drive the SI2301 and the microcontroller would drive the CMOS :)
Hope it makes sense.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #11 on: March 04, 2016, 05:49:16 pm »
@MK14
The SI2301 is what I'm currently in possession of, and after looking on Digikey, a lot of the FET's don't have a gate capacitance rating.
The ones with very low capacitance for their current rating, are very expensive compared to the manstream 2301.

Yes, the CMOS as complimentary mosfets in an external circuit :)
The question here is if it's cheaper to make a CMOS switch from 2 lower rated mosfets, with a very low gate capacitance, or to buy a better transistor, or to use a mosfet driver?

P channel http://www.infineon.com/dgdl/Infineon-BSS223PW-DS-v01_05-en.pdf?fileId=db3a3043321e49940132481523b6245f
0.6 nC max on gate, should do the trick with a complimentary N channel?
Very cheap also :)

I did not realize you needed somewhat high frequencies. 2 KHz is normally very easy with MCU port pins (unless very high currents or something are needed, even then you may still be ok).

Hundreds of KHz, is a completely different matter, especially if you want high conversion efficiency and/or low device dissipation.

Ironically I was looking into a similar problem, fairly recently. The best ideas (low cost), seemed to be to use cheap, high speed logic gates, and parallel the outputs (not everyone likes doing that), to increase the output drive current capabilities, still further.

But there are many ways of doing it.

For one offs (with little prospect of manufacture), or early prototyping. I prefer to take the quick/lazy/easy option of using standard fet drivers or fets with built in drivers (expensive, but ok for one offs). I've forgotten the part numbers. But some fet drivers I bought a significant stock of a while ago. Are so powerful, you don't even need the output fet, unless the currents are somewhat big, or it needs to dissipate power.

Your low gate capacitance fets idea (driving the bigger output fet), could we worth trying. Sometimes the most successful solutions, are found, immediately after something does not work quite right.

The pair of bipolar transistors, was a good idea in principle. But in practice, it can be exceedingly difficult to design it, given the huge potential of shoot through and/or the wrong voltages being produced at the output.
2.8V is rather low.

Good luck with solving the problem!
« Last Edit: March 04, 2016, 06:23:04 pm by MK14 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: BJT totem pole questions
« Reply #12 on: March 04, 2016, 08:51:35 pm »
Two BJTs and a diode can be used to make a push-pull driver. This circuit was designed for 12V but it'll work fine from 5V.

 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #13 on: March 04, 2016, 09:00:03 pm »
Two BJTs and a diode can be used to make a push-pull driver. This circuit was designed for 12V but it'll work fine from 5V.



If I understand it correctly. There would be about a volt, when it is trying to bring the gate (fet) low. (0.7V diode drop + transistor voltage drop). But it could well be fixable/improvable etc. Which might partly/slightly activate the fet ?
« Last Edit: March 04, 2016, 09:01:49 pm by MK14 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: BJT totem pole questions
« Reply #14 on: March 04, 2016, 10:25:38 pm »
If I understand it correctly. There would be about a volt, when it is trying to bring the gate (fet) low. (0.7V diode drop + transistor voltage drop). But it could well be fixable/improvable etc. Which might
partly/slightly activate the fet ?
It will be about 0.7V when the transistor is on. The voltage drop due to the transistor is negligible, as long as there's adequate base current. Using a Schottky diode would reduce this down to below 0.4V. Whether this is a problem or not depends on the MOSFET.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #15 on: March 04, 2016, 10:56:16 pm »
If I understand it correctly. There would be about a volt, when it is trying to bring the gate (fet) low. (0.7V diode drop + transistor voltage drop). But it could well be fixable/improvable etc. Which might
partly/slightly activate the fet ?
It will be about 0.7V when the transistor is on. The voltage drop due to the transistor is negligible, as long as there's adequate base current. Using a Schottky diode would reduce this down to below 0.4V. Whether this is a problem or not depends on the MOSFET.

I agree. It can fall below 1 volt. Especially with a Schottky diode.

When I originally said it was 1 volt, I was at least partially mistaken. Because I did not take full account, of the fact that the current will be very low, in the transistor, hence its voltage drop should be very low. (Even with significant current, it can still be rather low, depending on the specific transistor, and if it is saturated, or not).

Maybe the $64,000,000 is, can it do it quickly enough ?

There is plenty of potential to twiddle with the component values and types. Maybe the fet could be guaranteed off (at low gate voltage), and yet guaranteed on (at high gate voltage), by suitable device selection. Even if there is a small residual voltage, of a volt or whatever.
I.e. at 500 KHz, and with good efficiency ?

We are really getting to the point where I would prefer to simulate and/or build the circuit, to learn more about its behavior.
« Last Edit: March 04, 2016, 10:58:43 pm by MK14 »
 

Offline step_sTopic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: dk
Re: BJT totem pole questions
« Reply #16 on: March 04, 2016, 11:19:48 pm »
@Hero999
The voltage drop being around 0.7V (Maybe 0.45V with SK diode?) could potentially still affect the mosfet. The issue here was effeciency, and even a small amount of current floating backwards in the buck converter, will make it lose those sweet % that I was trying to gain.
I thank you for the suggestion, and I will play around with it to see how much the drop matters :)

@MK14
Hehe, if you want to test it out, I would be delighted to see the results xD
I'm afraid I live in a country where parts and postage are very expensive, and takes ages to arrive, so will try and get some < 1nC gate mosfets to play around with.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #17 on: March 04, 2016, 11:29:51 pm »
@Hero999
The voltage drop being around 0.7V (Maybe 0.45V with SK diode?) could potentially still affect the mosfet. The issue here was effeciency, and even a small amount of current floating backwards in the buck converter, will make it lose those sweet % that I was trying to gain.
I thank you for the suggestion, and I will play around with it to see how much the drop matters :)

@MK14
Hehe, if you want to test it out, I would be delighted to see the results xD
I'm afraid I live in a country where parts and postage are very expensive, and takes ages to arrive, so will try and get some < 1nC gate mosfets to play around with.

Some of the simulators available, e.g. LTSPICE (which is genuinely FREE!). Can be useful, to help better understand your circuits, and play around with the values.

http://www.linear.com/designtools/software/
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: BJT totem pole questions
« Reply #18 on: March 05, 2016, 02:40:27 pm »
Another transistor can be added to get close to 0V.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #19 on: March 06, 2016, 08:30:36 am »
Another transistor can be added to get close to 0V.


I've tried simulating it (LTSPICE IV), with general purpose parts, but it does not seem to work very well.

At 500KHz, it basically does not seem to work.

At 250KHz, it does work, but takes ages to switch states. So may not be very efficient.

Simulations can get things WRONG. Since it is NOT my project, I DON'T want to build it for the OP, sorry!

I've had a quick look (so could easily be mistaken), at what is going wrong.

When the PIC's output port pin (input on diagram), attempts to switch off. There is some current in the pair of 1K resistors (while it is transitioning, and the bottom pair of transistors are trying to switch off), so the relatively weak port pin has a few hundred (very approximately) milli-volts on it.

So we have about 700 milli-volts on the bottom pair of transistor bases, so there is only a few hundred milli volts across the 1K resistors. So not much current available, to fight the stray and base capacitance's. So it takes quite a long time. The simulator seems to say this is about a microsecond, which for a signal which changes state about every microsecond, it is too slow to keep up. (500KHz = 1,000,000 voltage transitions per second).

To make matters worse, while the top transistor is conducting, the lower pair of transistors, ALSO begin to conduct, potentially causing lots of current to flow. I don't fully understand why yet. But the lower right most transistor, switches on, well before the lower left hand one.

tl;dr
Bottom right transistor conducts while the top transistor is still full on, potentially causing lots of current to flow.

The bottom left transistor struggles to turn the top transistor off, because it is held up, by the diode and the top conducting transistor.

Eventually (about 1uS), things settle down, but it is TOO late, because the 500KHz, has changed state again. (I set it to 50% on off duty cycle).

I have NOT spent enough time with it to be sure of the exact faults/diagnosis, I also may have NOT chosen the best component parts. So if you want to say the circuit is still 100% fine until proven otherwise, or insist it is built and tested, rather than simulated. I already agree!
I have NOT properly checked how bad the possible shoot through condition(s) are, because I had spent too much time with SOMEONE ELSE's project, as it is.

Also the FET the OP is specifying, p-channel, seems to be fairly slow as well. Making 500KHz, even more out of reach, as well. (Yes it can reach that frequency, but spends too much of its time, potentially partly on, which would probably make the circuit inefficient). I did NOT use the OPs specified part, as it was NOT built in to the simulator. I did not want to download the correct spice model, as I don't want to spend that much time on it.

If it was me, I would go for the Fet driver chip and be done with it.
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: BJT totem pole questions
« Reply #20 on: March 06, 2016, 09:40:55 am »
With some Baker clamps and reducing the top resistor (R1) it looks kinda good at 500KHz having a load capacitance of 10nF.

In steady-state the circuit draws 0.3watts when the input is high and 0 when input is low.  It can be reduced by increasing the value of R1 at the expense of the wave shape.

EDIT: I saw that the drive was 5 volts, not 12. But that doesn't change the result...




« Last Edit: March 06, 2016, 09:45:23 am by matseng »
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #21 on: March 06, 2016, 09:55:37 am »
With some Baker clamps and reducing the top resistor (R1) it looks kinda good at 500KHz having a load capacitance of 10nF.

In steady-state the circuit draws 0.3watts when the input is high and 0 when input is low.  It can be reduced by increasing the value of R1 at the expense of the wave shape.

EDIT: I saw that the drive was 5 volts, not 12. But that doesn't change the result...





You've got nice clean 12V signals, coming from the 2.8V PIC MCU! (V2 on your diagram).

2.8V (rather than your 12V) slows it down a fair bit, and has some resistance to it was well, as the PIC only likes to give a limited current. By the time the OP pays for all those extra components, the fet driver looks more and more interesting.
« Last Edit: March 06, 2016, 09:58:20 am by MK14 »
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: BJT totem pole questions
« Reply #22 on: March 06, 2016, 10:04:21 am »
As I wrote in the edit it looks the same with a 5 volt input.

I re-ran it with 2.8 volts input and with 50ns rise/fall times and it looks like this:
The load capacitance of 10n is probably an order of magnitude too large for the fet that was discussed earlier as well.



Still not too shabby for like 50 cents of parts...
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4531
  • Country: gb
Re: BJT totem pole questions
« Reply #23 on: March 06, 2016, 10:06:50 am »
As I wrote in the edit it looks the same with a 5 volt input.

I re-ran it with 2.8 volts input and with 50ns rise/fall times and it looks like this:
The load capacitance of 10n is probably an order of magnitude too large for the fet that was discussed earlier as well.



Still not too shabby for like 50 cents of parts...

I'm going to try your modifications in my simulation circuit, and see how it goes.

 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: BJT totem pole questions
« Reply #24 on: March 06, 2016, 10:16:12 am »
Adding 470p caps in parallel with R2 and R3 improves the rise/fall times of the output a bit even if I add a 75 ohm resistor in series with the input to simulate the limitations of the microcontroller drive capabilities.
Nope, I take that back.  It only looked like that, but when I did a real comparison of both circuits in parallel the changes was just changes, not improvements...
« Last Edit: March 06, 2016, 10:22:19 am by matseng »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf