Author Topic: Switch mode inverter, totem-pole MOSFET driver, need help  (Read 25371 times)

0 Members and 3 Guests are viewing this topic.

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Switch mode inverter, totem-pole MOSFET driver, need help
« on: April 20, 2014, 04:00:35 am »
Hi,

I'm prototyping a MCU based switch mode inverter. The testing circuit is attached below.
The circuit works fine for driving frequency at 250-300kHz at duty < 60%, with VCC at 5V, output -27V.
However, if I further increase the duty to 70%, the circuit enters into a lockup condition:
1. VCC has been pulled down to 0.8V (I'm powering using 5V/2A current limited PSU), current reaches limit.
2. The gate of MOSFET stays at 0.8V (somewhere near AO3400A's minimal threshold voltage)
3. The totem pole transistor's base are at 1.5V, no PWM signal is seen, although the MCU is still outputing PWM signal.

I suspecting it is a driving speed problem. AO3400A's total gate charge is 7nC, with Ciss at 630pF.

Please enlighten me what is happening here. Any help will be appreciated.

 

Offline peter.mitchell

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: au
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #1 on: April 20, 2014, 04:38:33 am »
MCU pwm probably can't drive the totempole fast/hard enough directly, buffer it.
 

Offline johansen

  • Super Contributor
  • ***
  • Posts: 1354
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #2 on: April 20, 2014, 05:42:21 am »
if you don't have an oscope to figure out what is going on, reduce the frequency to half what it is now.
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #3 on: April 20, 2014, 06:47:57 am »
Yes reduce the frequency and increase inductor does the trick, but at the cost of PCB real estate.  It looks as though the totem pole does not sink enough current for the mosfet to cut off in time, just like peter has said earlier.

I'm more interested to know what caused the lock up. Maybe I can prevent it by switching some parts ?


Sent from my iPhone using Tapatalk
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22435
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #4 on: April 20, 2014, 08:35:14 am »
This is not how a buck-boost (inverting) circuit is made.

Using an MCU is also the wrong choice.  If its output decides to latch on, you get, well... what you've got, more or less.  If it hasn't destroyed itself already, it will sooner or later.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #5 on: April 20, 2014, 08:44:34 am »

This is not how a buck-boost (inverting) circuit is made.

Using an MCU is also the wrong choice.  If its output decides to latch on, you get, well... what you've got, more or less.  If it hasn't destroyed itself already, it will sooner or later.

Tim

Agree. This is a charge pump inverter. A buck-boost inverter requires a high side switch, which is harder to drive.

Using MCU is probably a bad choice for a SMPS but this particular PIC16F1509 has some interesting peripherals (NCO and CLC) that enable SMPS control without CPU  involve. That's why I wanted to try.


Sent from my iPhone using Tapatalk
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #6 on: April 20, 2014, 02:16:05 pm »
i got curious about this circuit as i was mucking around with MOSFETS. i went and dump some stuff in the simulator. i managed to get over -80 volts with some combination of parts. i am guessing, with even more power, this could be multiplied into a "tesla voltage" configuration yes?

3roomlab, if you're interested, attached is my simulation. The D trigger part is to simulate the MCU CLC. The regulation is working on pulse-skipping-mode


 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7518
  • Country: nl
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #7 on: April 20, 2014, 02:36:29 pm »
The microcontroller can source/sink 25 mA ... but not through that huge 2K base resistor ... try 200.

At that point the transistors become a limiting factor though ... zetex/diodesinc has some integrated NPN/PNP pairs for MOSFET gate driving, 50 cents on digikey for singles.
« Last Edit: April 20, 2014, 02:41:11 pm by Marco »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #8 on: April 20, 2014, 03:45:42 pm »
Quote
I suspecting it is a driving speed problem.

The totem pole drivers cannot deliver enough current to the mosfet. I would use a gate driver here, or reduce the base / gate resistors - they look appropriate for linear applications.
================================
https://dannyelectronics.wordpress.com/
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #9 on: April 20, 2014, 05:21:40 pm »
The microcontroller can source/sink 25 mA ... but not through that huge 2K base resistor ... try 200.

At that point the transistors become a limiting factor though ... zetex/diodesinc has some integrated NPN/PNP pairs for MOSFET gate driving, 50 cents on digikey for singles.

BBM.

This is good advice.  That should increase the bandwidth by roughly an order of magnitude.  According to my simulator, the bandwidth, as-is, is about 800kHz.

On another note, you're probably pushing your luck using a 30V MOSFET in this particular application.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 21836
  • Country: gb
  • 0999
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #10 on: April 20, 2014, 07:13:28 pm »
I don't see any need for a base resistor. Get rid of it. The minimum resistance seen by the MCU's output pin will be equal to the transistors' beta multiplied R3 so should be high enough, not to cause any problems.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7518
  • Country: nl
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #11 on: April 20, 2014, 07:32:19 pm »
Question is how high is the current while the base travels the 1.2 volt necessary for the transistor to actually start behaving like an emitter follower?
« Last Edit: April 20, 2014, 07:34:55 pm by Marco »
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #12 on: April 21, 2014, 05:44:36 am »
Well thanks for everyone pointing out the driving current issue of the base resistor. That makes sense. I wake up early this morning did some quick test, the MOSFET gate waveform seems improved a lot after reducing the resistor value.

However the lock up situation still persists: if I power MCU first, then power VCC from a current limited power supply, the VCC is pulled down again at 0.8-0.9V and maximum current is drawn. I guess during the initial contact, excessive inrush current causes VCC to drop below base voltage, then some lockup condition occurs. Does it make sense?
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #13 on: April 21, 2014, 05:48:19 am »
okay, i kind of cheated. :D
its a larger NMOS. i kind of just dumped parts into this simulation, so i dont really know what i was going to get ... but -88v not that bad, it sort of worked.

Your source is 4700/5000ns, meaning 94% duty? That explains why the output is so high.
 

Offline peter.mitchell

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: au
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #14 on: April 21, 2014, 06:55:47 am »
Put some decoupling on your totempole and/or run it from a different supply to the actual inverter, i'd hazard a guess the inverter is pulling the supply to the totempole too low when the duty cycle is high.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 21836
  • Country: gb
  • 0999
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #15 on: April 21, 2014, 09:45:16 am »
Question is how high is the current while the base travels the 1.2 volt necessary for the transistor to actually start behaving like an emitter follower?
It always acts as an emitter follower with a 10 Ohm resistor and the MOSFET gate capacitance connected to the output.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7518
  • Country: nl
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #16 on: April 21, 2014, 12:03:05 pm »
When the NPN is on the PNP has a Veb of -0.6,  to start pulling the gate down Vbe for the NPN will first have to go to -0.6 and Veb for the PNP to 0.6. During this transition the load on the MCU would not act like an emitter follower, neither transistor is in it's active region, more like a capacitor.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 21836
  • Country: gb
  • 0999
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #17 on: April 21, 2014, 01:03:28 pm »
When the NPN is on the PNP has a Veb of -0.6,  to start pulling the gate down Vbe for the NPN will first have to go to -0.6 and Veb for the PNP to 0.6. During this transition the load on the MCU would not act like an emitter follower, neither transistor is in it's active region, more like a capacitor.
When the output voltage is in-between the active regions of the BJTs, it will see an open circuit as neither transistor will be on. As soon as either transistor starts to conduct, it acts as an emitter follower.

At an infinite frequency, the output current progresses towards (1/2VCC-VBE)/R3. The input current will depend on the beta, probably about 10mA maximum.
« Last Edit: April 21, 2014, 01:07:31 pm by Hero999 »
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #18 on: April 21, 2014, 01:38:01 pm »
Hi,

I'm prototyping a MCU based switch mode inverter. The testing circuit is attached below.
The circuit works fine for driving frequency at 250-300kHz at duty < 60%, with VCC at 5V, output -27V.
However, if I further increase the duty to 70%, the circuit enters into a lockup condition:
1. VCC has been pulled down to 0.8V (I'm powering using 5V/2A current limited PSU), current reaches limit.
2. The gate of MOSFET stays at 0.8V (somewhere near AO3400A's minimal threshold voltage)
3. The totem pole transistor's base are at 1.5V, no PWM signal is seen, although the MCU is still outputing PWM signal.

I suspecting it is a driving speed problem. AO3400A's total gate charge is 7nC, with Ciss at 630pF.

Please enlighten me what is happening here. Any help will be appreciated.

im sorry to say this, without a scope you not going very far, even if you do manage to get it working.

You don't need a gate driver (it seems like over kill)  do the Math, a 7 nC of gate drive doesn't require alot of energy to charge the channel.

Fsw = 300kHz
Qg = 7Qg
VGS(th) 1.45 V, 5.0V will give you full saturation. 20mOhms @ 10amps
 
Gate Drive Power = V * Fsw * Qg

P = (5 * 300 * 10 ^3 * 7 * 10 ^-9)
P = 0.01 Watts

Without a scope you cannot assume or make reliable decisions.
« Last Edit: April 21, 2014, 01:41:41 pm by diyaudio »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22435
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #19 on: April 21, 2014, 01:43:35 pm »
Like I said, you're trying to do buck-boost with a circuit that isn't.

Use current mode feedback instead, and get rid of the voltage doubler (it's not a charge pump, at least not exclusively, with that inductor there).

If you insist on a charge pump, you must use a current limited switch.  A 10A MOSFET is only going to destroy power supplies or at least cause resets, exactly like you're seeing here.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #20 on: April 21, 2014, 02:37:21 pm »
can they even switch that fast.

@300Khz of course ! :D, You speak of timings (I deliberately omitted this) ,he has no scope to authenticate our finding and proves. besides is it even on a PCB? 300Khz on a breadboard is sure to show some dynamics of its own (that we cannot blindly prove)

 





« Last Edit: April 21, 2014, 02:41:49 pm by diyaudio »
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #21 on: April 21, 2014, 02:40:53 pm »
Thanks for everyone who helped. It was overwhelming.

Though I like the discussion about totem pole driver, just let me segway back to the inverter topic.

To T3sl4co1l: You're right. The circuit I designed is not correct. I pluck this from LT1617 datasheet without fully understand it. I've redesigned a buck-boost convert, please see the attached if it is any good. Can I still use voltage feedback, does it impose any danger?

To diyaudio, I'm curious to understand the calculation of MOSFET switching loss too.
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #22 on: April 21, 2014, 03:17:43 pm »

can they even switch that fast.

@300Khz of course ! :D, You speak of timings (I deliberately omitted this) ,he has no scope to authenticate our finding and proves. besides is it even on a PCB? 300Khz on a breadboard is sure to show some dynamics of its own (that we cannot blindly prove)

I'm a bit lost here. What you want me to measure. I have a scope.


Sent from my iPhone using Tapatalk
 

Offline baoshiTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: sg
    • Digital Me
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #23 on: April 22, 2014, 01:19:15 am »
If I'm understanding correctly, here are some waveforms with or without totem-pole stage.
Driving frequency is 380kHz at 10% duty.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22435
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Switch mode inverter, totem-pole MOSFET driver, need help
« Reply #24 on: April 22, 2014, 06:01:02 am »
To T3sl4co1l: You're right. The circuit I designed is not correct. I pluck this from LT1617 datasheet without fully understand it. I've redesigned a buck-boost convert, please see the attached if it is any good.

Ahh, much better! :)

I wouldn't bother with the fancy gate driver -- or, rather, I wouldn't bother with anything fancier than usual.  The supply is so low that you don't need level translation between the MCU's output and the gate voltage.

The complementary emitter follower you had isn't too bad.  It's a little marginal when used with logic-level FETs, because the base-emitter voltage drop prevents Vgs pulling below 0.6V or so (at least, with any speed).  Still not usually a problem.

You could use a large logic buffer (a few "bus driver" size gates in parallel), a proper gate driver chip, or "build-your-own" with a 2N7002 and BSS84 (CMOS inverter on steroids).

Quote
Can I still use voltage feedback, does it impose any danger?

No, and yes.  At least, you shouldn't use it.  The inductor current is an independent variable, and also the one that causes transistors to explode.  A poorly designed voltage-mode PWM circuit will gladly drive 100% PWM, because it doesn't have any way of knowing that it is a dangerous condition.  At best, you have to add an explicit duty cycle limit or dead time to prevent it from shorting the supply into the transistor into the inductor, but this still leaves no control over excessive inductor currents; if the output is shorted, the inductor current will continue to blindly build up.

Instead, by regulating on inductor current, you prevent such a situation, implicitly.  If the error amplifier commands maximum output, all the current regulator can do is deliver maximum current: no more, no less.  The PWM % doesn't matter in this case; it can be 0 or 100% and everything is perfectly happy.  It may spike to 100% (i.e., staying on for a few cycles), which is just to say, it's trying to drive as much current into the inductor as quickly as possible to keep up with demand; it stops once it reaches maximum.  Handy, eh?

Buck-boost is particularly nice, because you have one end of the inductor grounded, so all you need is a shunt resistor (and possibly a current sense amplifier, to save on voltage drop) and the current control op-amp.  The voltage regulator op-amp goes outside, so it's an inner loop controlled by an outer loop.

It's much easier to do once you've seen some circuits.  I don't have a block diagram handy, but this is one of many examples:

http://seventransistorlabs.com/Images/UC3808-2.png

The UC3808 is a peak current mode controller (essentially a push-pull version of a UC3842, most often used for isolated flyback converters), so it's not regulating the average voltage on the shunt resistor, but turning on until the current reaches a threshold; the effect is generally the same however.  The TL431 feeds back an error signal, from the output voltage, through an optoisolator.  The 3808's error amp is wired for -1 gain so it acts as merely a current source, but if isolation is not required, it can be used and no TL431, opto, etc. is needed.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf