Author Topic: Bidirectional TVS a better choice?  (Read 8526 times)

0 Members and 1 Guest are viewing this topic.

Boltar

  • Guest
Bidirectional TVS a better choice?
« on: September 23, 2014, 12:25:08 pm »
Hi,

I've got a bit of a problem with a circuit. It all works fine at regular loads (1 ohm +) but when the load is very low, say 0.35 ohms, it destroyed the bypass cap on the input side of the 7805 on the board. The VCC is 12V and I used a 16V tantalum, which I now know was a bad idea. I've replaced it with an expensive 63V aluminum can capacitor and now it works fine even at low loads, but, my thoughts drifted into what caused it to go bang to begin with. The load is a very small heating coil, which of course will be inductive, high side driven by raw PWM (no smoothing) using a p-channel mosfet. Now I know this will be an absolute nightmare for back emf, so I put a shokkty across the load, but thinking about it, I don't see how this would help anything. A forward spike would just go straight to ground and a reverse spike would travel back up the internal diode on the fet into the PSU and thus into the bypass cap on the 7805, which is what I think caused it, either that or spikes directly from the PSU.

My thought was, if I put a bidirectional TVS across the load (and across the PSU input), say 13V min 21V clamping, would this keep the spikes to within a manageable level? The TVS is shown as two back to back zeners and the mosfet driver as a schmitt trigger in the diagram as the package I used to draw it didn't have the parts in the database.

 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17811
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Bidirectional TVS a better choice?
« Reply #1 on: September 23, 2014, 12:30:07 pm »
Bidirectional TVS diodes would be for AC really. You want a uni-directional, this way for negative spikes it acts as a back emf diode but for positive ones it limits them. You don't want any negative spikes getting back into your circuit do you make them circulate around in the back emf diode and the load.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #2 on: September 23, 2014, 12:37:41 pm »
Thanks Simon. I'll order some unidirectional ones. Do you think I should put one on the psu input as well, in the diagram I used a battery but it's actually a switch mode 12V power supply I'm using. I was worried that the PWM might be causing spikes from the PSU as at such low load resistances it is actually over driving the PSU, but it has such a high pulse current rating (If I turn it off, the circuit runs on idle for about 2 minutes before the caps in the psu discharge fully) so I thought it should be fine so long as my average current draw doesn't exceeed the PSU's rating, but now I'm not sure if it's causing noise in the supply line.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17811
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Bidirectional TVS a better choice?
« Reply #3 on: September 23, 2014, 01:12:07 pm »
If you have a heavy load in particular one that exceeds the rating on the supply albeit for a very short period make sure you have a large output capacitance, although try and use a few in parallel instead on one big one. The output capacitors help hold the voltage while the regulator gets it's head around and responds to the sudden load increase.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #4 on: September 23, 2014, 01:18:22 pm »
I currently have a big 10mF on the output at the moment. I take it the different values will help to filter the different frequencies better? Am I right in thinking high power square waves will cause a huge amount of harmonic noise? Square waves cause harmonics of higher frequencies that gradually drop in amplitude if I remember one of Dave's previous videos on this subject? Although the regulator is not being asked to do anything heavy during the time the load is being fired, that just supplies power to the MCU, the load is driven directly from the VCC.

EDIT: Oh you mean the regulator in the PSU, sorry. LOL.
« Last Edit: September 23, 2014, 01:22:02 pm by Boltar »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17811
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Bidirectional TVS a better choice?
« Reply #5 on: September 23, 2014, 01:24:50 pm »
Well yes whatever supplies the load. your load if inductive may have a self resonant frequency that it may try to oscillate at it's the sort of thing than can be hard to know unless you have data on the load.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #6 on: September 23, 2014, 01:43:29 pm »
Well that's the thing, the load is replaceable and can vary from 200 milliohms up to 6 ohms depending on the user, plus the loads are usually hand built, they're basically coils of Kanthal wire that the users construct themselves (sometimes 2 or more in parallel), so accurate data on the load is impossible, so as many different value caps as I can fit in the box seems the best option.

Cheers Simon, I appreciate the help.
« Last Edit: September 23, 2014, 01:50:34 pm by Boltar »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17811
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Bidirectional TVS a better choice?
« Reply #7 on: September 23, 2014, 01:48:45 pm »
If you have the load clamped your input should be ok
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Bidirectional TVS a better choice?
« Reply #8 on: September 23, 2014, 03:16:30 pm »
You don't need a TVS diode across the load.

When the MOSFET turns off current flowing in the stray inductance of the VCC line (and ground return) causes a +ve spike on VCC at the MOSFET end. That is probably what killed your tantalum capacitor, that or if the power supply is a bit crappy it might spike up when a heavy load is quickly removed. You need a TVS diode and possibly more capacitance across VCC at the MOSFET end.

If the load is inductive (and it will be at least a bit) turning off the MOSFET causes a -ve spike on the MOSFET drain. If it breaks down it continues to draw current from VCC actually reducing spikes on VCC. A normal diode across the load at the MOSFET end allows current to continue to flow through the load dissipating energy stored in the load and stray inductance.

You ought to put a resistor in series with the MOSFET gate to slow it down (100R, 1k?). It is the high rate of change of current which generates voltage spikes in these inductances. MOSFETs in circuits with stray inductance tend to oscillate at RF frequencies, a gate resistor stops that as well. 

Slowing down the MOSFET causes more power dissipation during turn on and off so it will run a bit hotter, don't use a higher PWM frequency than you need to.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #9 on: September 23, 2014, 03:58:16 pm »
I use 31.25kHz as that's the lowest inaudible frequency the MCU will generate. Anything lower and there's an awful noise comes from the unit and the load (rattlesnaking / buzzing). If I slow down the mosfet switching at that frequency, then the PWM will be completely ineffective, even at 2 or 3% I'll have the mosfet on all the time, this is the reason I had to use a mosfet driver instead of a simple npn/resistor pull up configuration, it was just too slow. In the early version of this device (there have been 3) I used about 30Hz, and it sounded like a kid riding a bicycle with a lollipop stick stuck in the spokes. Higher frequencies became a tone and inaudible frequencies didn't work because the mosfet couldn't switch on and off quickly enough. So a major design change in the later version was to specifically get it to work at high frequencies to stop the noise and stop the mosfet from overheating in seconds which it would do switching a load of 350 milliohms with sloping gate voltages. Bear in mind as well that the usual duty cycle being used is about 10% so I'm effectively needing a gate response of 300kHz. The only other option I have is to actually smooth the output with an inductor/cap/diode which is next to impossible at 31kHz, I'd need at least 100Khz to get an inductor suitable for the job and the MCU cannot go that high.

So I should put the TVS across the mosfet source (Which is VCC but physically close to the source pin?) and ground, rather than across the load?

« Last Edit: September 23, 2014, 04:16:49 pm by Boltar »
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Bidirectional TVS a better choice?
« Reply #10 on: September 23, 2014, 06:09:03 pm »
If you switch 5A in 10ns the self inductance of 1m of straight 18 awg wire will produce a voltage spike of around 250v. If you are switching high currents fast you need to consider small inductances. You can easily kill MOSFETs switching high currents fast with a bit of stray wiring inductance.

A TVS diode to clamp the spike needs to go at the end of the inductance where current is switched, or across the thing you are trying to protect which probably includes the MOSFET. A few uF of low inductance capacitance would also mostly absorb the spike and help not put a hole in VCC when the MOSFET turns on (but load inductance helps reduce the rate of change of current on turn on so the turn on dip won't be as significant as the turn off spike).

A normal free-wheeling diode across the load and wiring inductance is still likely required, again at the end of the inductance where the current is switched.

 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Bidirectional TVS a better choice?
« Reply #11 on: September 23, 2014, 06:19:31 pm »

Well that's the thing, the load is replaceable and can vary from 200 milliohms up to 6 ohms depending on the user, plus the loads are usually hand built, they're basically coils of Kanthal wire that the users construct themselves (sometimes 2 or more in parallel), so accurate data on the load is impossible, so as many different value caps as I can fit in the box seems the best option.

Cheers Simon, I appreciate the help.

This sounds like a *really* powerful eCig mod!


Sent from my Smartphone
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #12 on: September 23, 2014, 06:24:46 pm »

Well that's the thing, the load is replaceable and can vary from 200 milliohms up to 6 ohms depending on the user, plus the loads are usually hand built, they're basically coils of Kanthal wire that the users construct themselves (sometimes 2 or more in parallel), so accurate data on the load is impossible, so as many different value caps as I can fit in the box seems the best option.

Cheers Simon, I appreciate the help.

This sounds like a *really* powerful eCig mod!


Sent from my Smartphone
It is indeed, lol. Here it is in operation, this was before the cap killed itself.


Rufus, so the TVS needs to go across the mosfet? I don't need to protect the load, it's just a bit of wire. And when you say "A few uF of low inductance capacitance" do you mean a snubber? A Film cap and a resistor? Again across the mosfet? I don't really understand what you mean when you say "At the end of the inductance". Sorry.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Bidirectional TVS a better choice?
« Reply #13 on: September 23, 2014, 06:29:39 pm »
The atomizer is the inductance.

Man, that thing looks like a beast! And here I am still using a two year old "Kicked" mod from Evolv in a generic 18650 non-eGo tube. I should build my own mod!


Sent from my Smartphone
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #14 on: September 23, 2014, 06:36:39 pm »
Yeah I just didn't understand "The end of the inductance", does that mean the end connected to ground or the end connected to the fet drain?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Bidirectional TVS a better choice?
« Reply #15 on: September 23, 2014, 06:38:36 pm »
0.2 ohms at 12V is a freaking 60A pulse, no wonder the tantalum grenaded.  If you require the circuit to be stable for any load in that range, you're going to have a hard time...

At 60A, it doesn't take much inductance to kill the MOSFET, if it's going fast.  You didn't mention what IC1 is, though.

Even if the MOSFET is perfectly happy (no inductive spike causing avalanche, or going slow enough to absorb it), that much ripple (PWM at 31kHz means it's going on and off, i.e., the bypass capacitors have to supply 0/60A alternately for ~16us at a time) means plenty of amps RMS going right through the cap ESR.  A 20mohm ESR cap with 60A pulses will drop 1.2V (i.e., the supply droops from 12.0V to 10.8V, during the pulse); a small cap with > 0.2 ohm ESR will drop more than half the supply voltage -- a poor 10uF tantalum will be destroyed in no time with its many ohms ESR!

The formula for RMS from a pulsed source is: RMS = pk * sqrt(D)
where D is the duty cycle (t_on / t_cycle) and pk is the current while it's on (zero elsewhere).

This works recursively, so pk can be the RMS during the on-time, if it varies (so you can use this to find the RMS from a half-wave rectified sine (which is a sine hump, then zero elsewhere), or a triangle (often encountered in SMPS), etc.).  Probably, your resistive element isn't changing much while it's on, so you won't need to worry about this.

Then, find a cap with ripple rating high enough to handle this.  Place it (or them, if you end up needing many in parallel) as close as possible near the transistor, and place the snubber or TVS as close as possible to them.  You're protecting the transistor, not the load.

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

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #16 on: September 23, 2014, 06:54:36 pm »
Thanks T3sl4co1l. Yeah, 0.2 Ohms is a bit too low to be frank. The cap died with a 350m load although with the newer cap it's not died yet, but there's still time. IC1 is nothing,  it's a representation of a mosfet driver, the model I used isn't in the database of the package I used to draw the diagram. It's actually a TC4426, which is a low side driver, but it's inverting (output is at VCC when input is 0V and vice versa) so it still drives a p-channel ok. Film caps have low ESR don't they? Would they be best do you think?
 

Offline DanielS

  • Frequent Contributor
  • **
  • Posts: 798
Re: Bidirectional TVS a better choice?
« Reply #17 on: September 23, 2014, 07:16:34 pm »
In the thread you say you used an "expensive" 10mF cap but the schematic says 10µF, which one is actually correct?

To handle ~60A current pulses, you would need about a dozen low-ESR 2200µF caps - even good quality electrolytic caps can only handle about 2-2.5A RMS ripple. Some can handle 3-5A but you need to go up in size to 3900-5600µF and 35+V, which makes the solution that much more expensive and every bit as bulky.

If you had a 10µF cap with power supply leads carrying 60A pulses, it is quite possible the wiring's inductive kick was enough to kill your tantalum cap: if your wiring has 100µH inductance, that's 180mJ of stored energy on top of the 10µF cap's 720µJ... so your tantalum may have been overshooting to something like 190V or whatever voltage it breaks down at so no surprise it died. If you crank the capacitor up to 1000µF, the overshoot should go down to 22.5V.
« Last Edit: September 23, 2014, 07:29:58 pm by DanielS »
 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #18 on: September 23, 2014, 07:35:06 pm »
no no the 10uF cap is on the 7805 the 10mF cap is a different one that's directly on the power input. But yeah, I know this is a very difficult thing to do, especially with the sheer range, as the selected output can vary, the load can vary, so it's not easy to get the parts right. I appreciate all the help guys.

Seriously though, there are other boards out there that can do exactly what I want to do and are minute using only small SMD devices and measure 20mm by 40mm. So clearly I have a lot to learn.

I need to make sure I have the Physics of this correct in my head. When a cap discharges into a load, it is effectively discharging through a resistor, the ESR, which is going to act like a voltage divider between it and the load. So the lower the resistance of the load, the more current is being dissipated by the ESR. Thus many caps in parallel will reduce the ESR. I need to keep the amount of dissipated power through this ESR to within the tolerance of the cap(s) which can be worked out using its ripple current rating, Using the formula posted earlier I can work out the RMS of the circuit which needs to be below the combined ripple current rating of the cap(s)?

So if for instance I have a 12v charged cap with a 2 ohm ESR and a 1 ohm load. The discharge is effectively passing through 3 ohms with 66% of the power dissipated by the cap and 33% dissipated by the load. 12 @ 3 ohms is 4 amps, 66% of 4 amps is 2.6 amps so I'd be looking for a cap with a ripple current rating of about 3 amps? Just as an example. Have I got that right?


For my situation I'm going to limit the load resistance to 0.3 ohms, if it detects anything less it won't fire. So that's a maximum pulse of 40 amps @ 12V. It is unlikely that anyone will use more than a 75% duty cycle so RMS = 40 * root(0.75) = roughly 34.5A . If I can find 5A ripple current caps, i'd need 7 of them in parallel with a combined capacitance of about 15mF ? Also bearing in mind electrolytic caps's ESR increases with age, so what other choice of caps do I have here? Also, the device is not in constant use, the load is only fired for 4 to 5 seconds at a time normally, so how much thermal tolerance will there be? I can limit the device through software to only allow so many seconds firing per minute for example.

Agh, it's too hard. I'd be better making a variable SMPS circuit instead. Just the SMPS controller chips are beyond me. Isn't there a simple signal generator chip that can be controlled via I²C? Say like I want a 150kHz PWM at 14% duty cycle, then just tell a chip over I²C that's what I want and it outputs it for me? That's all I need.
« Last Edit: September 23, 2014, 09:23:56 pm by Boltar »
 

Offline DanielS

  • Frequent Contributor
  • **
  • Posts: 798
Re: Bidirectional TVS a better choice?
« Reply #19 on: September 23, 2014, 10:35:23 pm »
The caps I use for switching applications are Panasonic FM-series which have 100kHz ESR in the neighborhood of 0.018 ohms depending on capacity and voltage ratings. Where ripple current is concerned, the highest-rated models in that line only go up to 4A a pop so you would need almost a dozen.

For your hypothetical power dissipation between cap and load, power dissipation through a resistor for a given current is P=I2R so if you had 2 ohms ESR in the cap into a 1 ohm load, 80% of your power would be lost in the cap's ESR.

Aging-wise, electrolytic caps can last quite a while as long as they are operated well within their tolerances.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Bidirectional TVS a better choice?
« Reply #20 on: September 23, 2014, 11:16:32 pm »
Arg, I should know better:

RMS through the supply and the load resistor are as given above...

RMS through the capacitor has no DC, so it goes positive (current drawn from cap) and negative (supply recharges cap) alternately.

In this case, the RMS of a square wave is Irms = Ipk * sqrt(D*(1-D)).

Handy way of looking at this: if D = 0, it's off, and Irms = 0, as one should hope.  If D = 1, it's steady on, and Irms = 0.  The world is happy.  At D = 0.5, current alternates between Ipk/2 and -Ipk/2, so Irms = Ipk/2.  For oddball values, it takes that "geometric mean" shape (stuff under the sqrt) with respect to D.

Yes, you have the physics right.

Film caps are fantastic, but ridiculously huge (large values aren't very available under 250V).  How much would you need, anyway?

Since you're essentially discharging a capacitor into a resistor, you can take the RC time constant, and figure R*C needs to be way the heck longer than a cycle, to keep ripple down (assuming ESR doesn't already just totally thrash the ripple to begin with).  Namely, R is the total R, which includes ESR, switch Rds(on) and the load.  If t_cyc = 32us, then R*C should be more like 320us, or even more.  320us / 0.3 ohms (the minimum load resistance, assuming Rds(on) and ESR = 0) is 1000uF already.  So, hey, an electrolytic is the right way to go, because, where the hell are you going to find 1000uF worth of films anyway?

There is one option, instead of electrolytics, try aluminum polymers.  Currently, these fill in the low-voltage range that film capacitors miss -- they're under 100V, moderate values (nothing in the mF+ range, unfortunately), and wonderfully low ESR (typically 10s of mohm even for the small ones).  The dissipation factor and energy and power density are all comparable to film capacitors.  They're rather pricey though.

Another way to estimate capacitance is to start with a ripple figure.  This is handy because the fundamental capacitor equation,
I = C * dV/dt
is calculus, but it's no-thinking-required if you replace dees with deltas, and all your waveforms are straight lines.  (We know they're not, because as supply voltage drops, load current drops, and it's a section of an exponential waveform.  But dammit, we can still try!)

If we assume ripple << Vsupply, then the slope will be fairly constant, and this won't be off by too much (if ripple is some percentage of Vsupply, then the capacitance figure will be at least as accurate).  And we can pick something much bigger, just in case.

If we take the middle case, dt = 16us, dV = 1.2V (let's say 10% of Vsupply), and I = 20A (remember, half up, half down), then C = 266uF.  So again, something very roughly on the order of 100-1000uF.  Apparently the earlier case (at RC = 10*t_cyc) will give lower ripple.

A few aluminum polymers that size (say 16-25V, a few 100uF or thereabouts), or a few electrolytics much larger (1000uF 25V?), should do well enough in either case.  You may actually need many more (or larger) electrolytics, just because of ripple rating.

By the way: the capacitors only store energy for on the order of R*C duration, so after a few [tens of] cycles, you're completely dependent on the supply, and if the supply isn't rated for 20A, it's going to brown out as well (first as its capacitors discharge, then as its control circuit responds, then finally, as it goes into current limiting... if it does..).  If you want to pulse this thing for seconds at a time (even fractions of a second!), you need MASSIVE capacitors.  Ultracapacitors, you might say.  But beware that they need to charge up as well, which might not be so nice for your power supply.

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

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Bidirectional TVS a better choice?
« Reply #21 on: September 23, 2014, 11:54:22 pm »
My thoughts.

I would forget about the TVS, and just use a freewheeling shottky diode where D2 is in the schematic, as close as possible to the heater.
So just D2 as shottky no D1.

Also run two wires from each battery terminal. One thick pair for the high current path only. +ve FET source, drain, load -ve.
and one thinner pair for the rest of the 12v, -> 7805 and op amp rails.
Separating the 12v should help with any voltage spikes.

A small gate resistor too.


 

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #22 on: September 24, 2014, 01:22:49 pm »
Thanks so much guys, you've given me a ton of information that's going to take me while to process but I think you've all given me enough for me to make an informed decision on what to do to make this particular design as stable as I can get it. I think I'm going to have to up the low limit of the resistance of the load, when it starts to get <0.5 ohms the ripple current really begins to get silly so I'm maybe going to limit the load resistance to 1 ohm on this particular design. So again, many thanks for the help and your time in helping me.

For the next design, I've been watching some videos and reading about SMPS designs, and I've put together an initial idea of an alternate system so if I can run this by you guys as well, I'd again appreciate any advice or pointing out errors etc.. This is the circuit:

Now obviously I've goofed somewhere as this is my first attempt, but the way I see this in my head is: VREF is a voltage supplied by a buffered DAC output from 0 to 5V, so this is used to adjust VOUT by the microcontroller. I felt it was too bulky to show the whole DAC and MCU config so I just show it as a voltage source, but it can be varied from 0 to 5V. This is 1:1 divided down to half and fed into the NII of the comparator with a small amount of hysteresis from R5. The II is fed from a 22:10 divider (8V becomes 2.5V) giving me a VOUT of VREF * 1.6 for a maximum output of 8V.

So when VOUT/3.2 is below VREF/2 the comparator will be output high (5V), this will be inverted by the mosfet driver to 0V which switches the mosfet on causing VOUT to rise, when it rises so that VOUT/3.2 is a little higher than VREF/2 the comparator will latch to low (0V), which is then inverted by the driver to 12V which switches the mosfet off causing VOUT to fall, and thus the process repeats. Am I right in thinking this type of arrangement will put less stress on the PSU and components? The output voltage doesn't have to be flat, it is after all only a heating coil it's powering so output riupple is not a problem.

Again many thanks for all the help.
« Last Edit: September 25, 2014, 07:00:17 am by Boltar »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Bidirectional TVS a better choice?
« Reply #23 on: September 25, 2014, 12:07:41 am »
Putting VREF or setpoint or whatever on a sky hook is perfectly acceptable.  I frequently run simulations with a voltage source component in that place, adjusting or sweeping it as needed.  It's handy, and about as representative as anything you might want to drive it with, as long as you make it clear it's an input of course.


Anyway, this hysteresis / bang-bang circuit is a fair sight better than switching the resistor directly (assuming the switching frequency is reasonable).  It'll be more efficient for a given power output, and easier to filter the supply ripple.

But it has some problems, too:

- Suppose the diode fails shorted.  Will it stop?  No, the output voltage collapses, the comparator calls for "MOAR!", and it'll quite happily latch on, until the transistor melts and smoke ensues...

- What happens as C3 ages (ESR rises)?  The ripple rises proportionally, effectively subtracting more and more of the hysteresis set by R5 into R3 || R4.  This forces ripple voltage lower, and switching frequency higher.  LMV7219 is a rather peppy little chip, so the switching frequency will ultimately be limited by U3 and Q1 at a few MHz.  Needless to say, neither one will be very happy about it. :D

- What happens if the load is a very small resistance, or none at all?  If you're sensing VOUT or a shunt resistor (not shown), or something like that, how fast will the surrounding circuit respond?  Mind that 1uH will take only 10us to charge up to 120A peak -- and that's assuming it doesn't saturate by then, which would be a large inductor indeed!  Any small stray inductance in your circuit won't produce very happy results when that switches off, either.  If you're controlling current or power based on an ADC reading that takes not even 10us, but ten times longer still... I think you can see where this is going. :)

The only reasonable way to do it is this: monitor the inductor current, and control that firstly.  For this purpose, that's good enough already -- you only need the current or voltage into a load resistor, and that's that.  For regular purposes, you use an op-amp to control the current setpoint, regulating the output voltage.

There's a few simple ways you can achieve current mode control.  Sensing the current flow through a live inductor isn't very fun, but Q1 source is "grounded" (supply is considered ground at AC, so sue me :P ), so it might be a good place to put a shunt resistor.  If you put a comparator around that, so that the shunt voltage rises to some point, then fires a trigger to turn off, you're set -- even if the diode fails shorted, the transistor will never be on for more than a few hundred nanoseconds into a short circuit!

The tricky part is the logic around it.  That 'trigger' stuff doesn't mean wiring the comparator to the gate driver, no, that would oscillate as bad or worse than the hysteresis circuit with C3 absent!  What you need is, some event turns the transistor on, then nothing happens until the current comparator turns it off.  A latch or flip-flop.  Usually, an R-S flip-flop is used, with the 'start' pulse generated by a separate oscillator block (you could do worse than a 555... actually, really you couldn't... it would absolutely work just fine, but, come on... :P ).  Pulse meaning, a low duty cycle of course, so the flip-flop doesn't get forced on while the comparator is still screaming 'uncle' (alternately, the F/F should be "reset dominant", so the comparator has the final say).

So, in short, you can use a couple transistors wired as a flip-flop, or some logic gates, or even the comparator itself (trying to tweak hysteresis and thresholds and stuff to be useful is generally crude at best, though).

You can also use one of many purpose-made chips, like UC3843, which unfortunately contains a ground-referenced comparator (not supply referenced), so it can't be used directly in your circuit.  Now, if your load doesn't need to be ground-referenced, you can turn it upside down (use an N-channel MOSFET and so on), and it'll work great.

BTW... MC34063 is crap, and has some sort of hysteresis PWM smooshing thing.  It's current mode...sort of, but just isn't worth considering.  It also doesn't teach proper control methods, so there. :)

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

Boltar

  • Guest
Re: Bidirectional TVS a better choice?
« Reply #24 on: September 25, 2014, 09:42:25 am »
Right, I think I'm following you, in short terms I need an oscillator with a relatively short duty cycle and follow this logic?

Gate To Be Turned Off when VOUT is greater than VREF+Hysteresis -OR- Current Sense is greater than Current Limit
Gate to Be On when VOUT is less than VREF-Hysteresis -AND- Oscillator Pulse is High -AND- Current Sense is less than Current Limit
Thus I need a flip-flop as you described to prevent the gate turning off when the oscillator pulse is low, the oacillator should only be used for the logic of turning it on, not turning it off.

Then it's just a question of figuring out the logic for that with the options you described?
I also think I know what you mean about the source being grounded, that's how I always picture P devices, I imagine them like an N device but with their view of the world inverted, they see the +ve rail as ground and the -ve rail as a negative supply voltage. Unfortunately, due to the established system in place for these kind of devices, the eventual load is always common to the supply negative (the load is put into the mouth using a metallic mouth piece which is electrically common to -ve due to the power supply also being mains earthed to the -ve to prevent a psu failure from electrocuting someone's face) so using N channels is not impossible, but far more tricky.

EDIT:
To help me visualize logic, I often try to write them as computer code, obviously this would be impractical without a 100mHz processor and fast ADC, but basically, would the logic be like this:
Code: [Select]
loop()
{
event=false;
if(microSeconds()>nextEvent)
{
nextEvent=microSeconds()+frequency;
event=true;
}
vIn = SenseVIN();
vOut = SenseVout();
vShunt = SenseShunt();

if(vOut>vRequired+Hysteresis || vIn-vShunt>currentLimit)
GateOff();
else
if(event && vOut<vRequired-Hysteresis)
GateOn();
}

Another problem is I somehow have to detect the load resistance. I currently do this by applying 5V to the load through a 220 ohm resistor and an npn transistor (to prevent the actual vout getting back into the resistance sensing circuit) and then using an opamp to amplify the node between the two. This circuit is switched on and off by the MCU as it doesn't need to be constantly sensing it, only once every 3 seconds or so and then it's only on for a few milliseconds. Now this becomes more complex, the vout has a cap between it and ground, so this approach won't work,

Argh, the problems are too big. I have no idea how these other manufacturers manage to produce a board that can do everything I want and make it so small. There's a board out called an SX350, it can output 50W to a load of as low as 0.2 ohms and it measures less than 30mm square. It can sense resistance, it has ground common load, current limiting. Hell, just the size of the shunt resistor alone to handle shunting to a 0.2 ohm load would be crazy, not to mention the amount of power I'd lose through it. *sigh*
« Last Edit: September 25, 2014, 11:34:34 am by Boltar »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf