LTC6101 confusion. - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: October 03, 2014, 07:08:06 pm
content: Hi,I'm trying to design a current mode supply and thus need to sense the current through the load at the output stage. In order to do this I'm trying to use an LTC6101 but I'm coming across problems in LTSpice. All the diagrams I've seen use the same voltage source to power the 6101 and the load. Like this one.The problem with that is I'm trying to sense the SMPS output current not a load directly on the VIN. Since the output of the SMPS may fall below 5V I cannot just power it from the SMPS output either. If I try to power it from VIN (at 12V) and try to sense a load being powered at say 3.7V, I don't get any output from the 6101 at all.I can of course rearrange the circuit and sense the current being drawn from VIN, but this is impractical because it's jumping around because of the SMPS PWM operation and also, the current sense reading will change if VIN changes which wouldn't be the case if I were sensing the VOUT current. So I'm a little stuck. Can anyone offer any suggestion?If I'm right in my understanding. the -IN should always start out higher than the +IN causing the amp to output low, this switches on the internal fet draining some voltage from -IN through ROUT until -IN matches +IN and reaches balance. The resulting voltage across ROUT is then proportional to the current through the shunt. Is the internal fet having problems with low source voltages? Would I be better to construct the sense amp from separate components and use a PNP BJT instead?Many thanks,Marc

author: Zero999
author_rank: Super Contributor
timestamp: October 03, 2014, 07:33:11 pm
content: It's on the data sheet:Quotehttp://cds.linear.com/docs/en/datasheet/6101fh.pdfSo from a 12V supply, the minimum input voltage to the -IN pin is 8V.You need a 5V power supply for this to work.Another thing you should do is put the current sense resistor inside the feedback loop of the regulator, that way the regulator will compensate for the voltage dropped across it.

author: Unknown
author_rank: Unknown
timestamp: October 03, 2014, 07:39:20 pm
content: Ah, thanks for the clarification there, I'd missed that somehow. Although It's going to cause some issues as the SMPS is supposed to output anything from 3V to 10V, if it's powered from a 5V supply, I don't think there would be enough swing on the gate voltage for it to work properly, but I'll give it a go anyway, the ohmic region should be very narrow on a fet so it could fall into a mid zone for all output ranges. I also tried thisand it also seems to work at any voltages, although I'm not too sure if the amp I'm using is the best suitable one. With regard to the shunt going inside the feedback loop. I assume that means before the inductor?Cheers

author: Zero999
author_rank: Super Contributor
timestamp: October 04, 2014, 12:07:58 am
content: I'm not sure what you're trying to do there.I doubt the voltage on the +IN pin can exceed the supply voltage either and if your SMPS can output between 3V to 10V it appears you need to find something else.

author: Unknown
author_rank: Unknown
timestamp: October 04, 2014, 11:14:37 am
content: Hmm, I read on Wikipedia that the amps used in current sense amplifiers are specifically designed to deal with input voltages outside the range of the supply voltage. I guess this one isn't. Ah well, I'll see if LT make anything else suitable.EDIT: The LT6105 seems much better, it needs a 20m shunt rather than a 1m but I think I can manage with that.EDIT2: Nope, LT6105 seems to be too slow. *sigh*EDIT3: Upping the inductor value seems to have helped. This seems to be working. I know there is no ramp stage yet. I'd still be happier with a faster sense amp. There's a lot of swing on that current, but that may be due to the internal hysteresis of the LT1720.http://i62.tinypic.com/kbbmdz.jpg

author: Zero999
author_rank: Super Contributor
timestamp: October 04, 2014, 06:14:28 pm
content: Why not connect the LTC6101 to the 5V rail and the regulator output via diodes?That way, it will draw its power from the 5V power rail when the regulator voltage is below 4.4V. To minimise voltage drop, you can use Schottky diodes but the LTC6101 is specified down to 4V so you may be able to get away with it. Make sure the LTC6101 has a 100nF decoupling capacitor across its supply rail.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 04, 2014, 06:37:44 pm
content: Ehh, I don't like the ratings. And it's not a particularly cheap part, either (maybe as LT parts go?).I would recommendhttp://www.analog.com/static/imported-files/data_sheets/AD8210.pdfmore expensive still, but has all the common mode range stuff you need to know.Note that the pass-transistor-from-sensed-line topology can only deliver output voltage below input voltage, so if you need a e.g. 0-5V output, you need to guarantee the input is >5V. If it's dropping to 3V, your current sensor saturates and your short circuit protection or current mode limiting or whatever goes bye-bye!Tim

author: Unknown
author_rank: Unknown
timestamp: October 04, 2014, 07:55:09 pm
content: Thanks Tim. I was sticking to LT parts because I was using LTSpice to simulate, I know you can import other parts too, but I haven't gotten around to that yet. I can do the same thing in Proteus but I've come to actually like LTSpice now even though I hated it at first, once I got my head around it, it's pretty good. It sorts all the convergence and stepping problems out automatically, which saves so much headache. Cost isn't really a major problem so long as it's not hugely expensive. That part you recommended looks like the one though, definitely. I only need a maximum output the same as the maximum I set for the current reference. I can go to 1V or even lower if need be. So the output limitation shouldn't be an issue. I can use a 5V DAC output (or even a low pass filtered PWM output from the microcontroller directly), buffer it then voltage divide it down to whatever I need.This is a circuit I've got down tohttp://i62.tinypic.com/6nqcft.jpgUsing a 2V 7us ramp compared against a duty cycle reference voltage to generate a PWM with the duty cycle being generated by averaging the VOUT with the required output (REF) when the VOUT is lower than REF the voltage across C3 increases due to it charging, when the VOUT reaches REF the cap is kept around the same charge due it being partially charged and discharged rapidly by U2. Takes a few ms to stabilize and I'm getting about 0.04V of wobble which is more than acceptable for my application. The LT6105 in that image is not wired up yet, but my thought was, if I wire it in and replace the VOUT at the inverting input of U2 with IOUT, that should change it to a current mode supply. Hopefully anyway.

author: Unknown
author_rank: Unknown
timestamp: October 05, 2014, 05:01:59 pm
content: Tim, that was exactly the part I needed, the AD8120 seems perfect. With a 5m shunt I'm getting about 100mV per amp. With a maximum output of 20A that puts the reference maximum well below the minimum output voltage of 3V. Brilliant advice as always, thank you. The simulation seems to be running great(I forgot the cap on V+)Now I need to figure out how to generate the ramp (555 probably?) and source some higher current rated n fets that don't mind their gates being driven at 30V. I don't know why the LTSpice example circuit for the 4446 uses IRF7468s when they are only rated at 12V gate to source voltage (EDIT: Is it the potential difference between the gate and source that matters not the voltage referenced to ground at the gate?).EDIT:Would this circuit be sufficient for the ramp generation? Seems to simulate OK, but that's not a guarantee.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 05, 2014, 09:34:42 pm
content: Quote from: Boltar on October 05, 2014, 05:01:59 pmIf you look at the internal diagram, you'll see the output voltage is independent of the input, because the supply is separate. You can set whatever voltage range you want with that part.Also, you want that before C2, not after, so you can control DUTY with IOUT as feedback. And then control either the average of that, or the output voltage, for regulating what goes into R1.QuoteUhh...yeah? Check the datasheet, maximum gate voltage is Vgs(max), not Vg-gnd. How could a device just sitting around know what your arbitrary concept of "ground" is?QuoteEww, I don't think that's going to cycle that fast. You'll have storage time over a microsecond, easily. SPICE doesn't model spooky physics like that very well.Tim

author: Unknown
author_rank: Unknown
timestamp: October 05, 2014, 10:17:51 pm
content: Lol, sorry about the gate-source thing there, bit of a brain fart, I should have known that.I moved the shunt before the output cap like you said but the swing on IOUT was horrendous, probably because the inductor is very low? This resulted in the eventual VOUT being lower than it should have been for a given current (either that or it would have taken too long to get there). So, I split the 100u into two 47u caps one before and one after the shunt in order to calm down the swing of IOUT a little, I figured it would also reduce the ESR of the output cap as well. It seems to have worked.http://i58.tinypic.com/jpe8sp.jpgSorry I still have that grubby ramp generator in there, but it's working for the simulation anyway, I'll have to use a timer chip or something to get a decent ramp. All seems within spec though, a 500mV REF equates to 5 amps, which should give 5V out with a 1 ohm load, which it does. Takes just over a ms to get there, which is fine.The finished build will have a microcontroller setting REF and monitoring VOUT so it's no problem to regulate in voltage mode, just a few milliseconds at startup at 1A to give me the load resistance and I can calculate the needed current to set for whatever voltage the user selects. Plus it solves the problem of having to have a separate circuit for detection of resistance. Neat. I can't thank you enough for all this help Tim, I think I'm finally getting close to a decent design now.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 06, 2014, 03:08:32 am
content: No, you don't understand. You regulate inductor current first. Because if inductor current goes crazy, transistors die. If 1u is too small (too large I ripple), use a bigger one. The current amp should be fast enough to cover that, so you only need an error amp slow enough to average over that plus the response time of the modulator + inverter.Note that, since you have a synchronous buck, you can get negative current. Which the current amp won't read if it's supplied and referenced to GND. So you will necessarily get errors under that condition.Tim

author: Unknown
author_rank: Unknown
timestamp: October 06, 2014, 09:49:55 am
content: Nah it's too complicated.I'm simplifying it. I'll use an MCU (and a DAC) to set the duty cycle, then sense VIN, VOUT and IOUT to ADC ports. A short blast at a low duty cycle before firing to gauge the load resistance and that's all I'll need. All this feedback, error amp nonsense is too disjointed and frankly unnecessary for what I need to do.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 06, 2014, 11:03:26 pm
content: three transistors"BAH IT'S TOO MUCH! I'll just use two thousand instead"........

author: Unknown
author_rank: Unknown
timestamp: October 06, 2014, 11:41:35 pm
content: Maybe it's ok for you, because you know what you're doing. I've only just started doing this and quite frankly it's very difficult. What do I do with these three transistors? I may as well shove 'em up my rear because I've not no other idea what to do with them. The end product ALWAYS used an MCU because it has a display and controls to select output voltages and powers and display load resistances etc.. So if I already have an MCU, why not use it?Remember this is the beginners section, I'm no expert. Half the stuff you tell me I don't even understand and it takes me hours of googling and research just to even figure out a single concept. Like above you mentioned "you'll have storage time over a microsecond", which is just total gobbledigook to me, I don't know what you mean by "storage time", remember, I'm a beginner. I also have a life and can't spend every waking minute reading up on stuff. Like right now, I can't even generate a stupid ramp, I can't charge/discharge a cap that fast, so I'm stuck. Every ramp circuit I google uses a charging cap and is meant for much lower frequencies.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 07, 2014, 05:28:41 am
content: Well, alright alright... it's hard to tell, you haven't been asking questions about things like that. If you have questions, just ask. Yes, you could ask about everything, and yes it could balloon into a thousand threads of conversation, but that's fine, that happens too.As for ramps, I like to throw in one of these:Which includes the PWM comparator. Note that it doesn't matter if the ramp is a triangle or sawtooth, and in a feedback circuit, it also doesn't matter* if the ramp isn't very straight.*Well, not very much. Or over a long period of time. But that's a concern more for, say, class D audio amplifiers than power supplies.Tim

author: Unknown
author_rank: Unknown
timestamp: October 07, 2014, 07:53:06 am
content: Thank you, sorry about the krankiness, it was late and I was extremely frustrated.I need to understand and comprehend that circuit before I would feel comfortable using it. So ummm, R1 and R2 set a mid point reference (4.5V,) which goes to to the NII of IC1a. Initially the II will be low, so it will output high. I assume R4 is just a default pull-up, as it doesn't seem to have any use other than that. So Q1 will turn on allowing a kind of constant current charge of C1 through R5 with what's left of the emitter current before R6. R3 sets up the trigger hysteresis, making the charge threshold higher than 4.5V, when the cap reaches this charge threshold the comparator latches to low output turning Q1 off, the hysteresis from R3 then sets the discharge threshold of the cap below 4.5V,. The cap discharges through R5 and R6 until it reaches the discharge threshold and the comparator latches high again, and the process repeats. Hopefully I've understood that now. I already understand the PWM comparator partI notice you've put a little hysteresis on the PWM generator as well, I didn't do that because of this problem I have with always thinking ideally. I'll have to get out of that habit.EDIT: Will that be ok at a period of 4us? I've modeled the circuit in LTSpice (using an LT1720 which has super fast response time) and 5V supply, changed C1 to 220p and R5 to 12k and that gives just under a 4us period. But I'm worried about it being in this spooky physics region with storage times.Also do you think I should think about using something a little better than a 7805 for the 5V rail? The loads and switching speed being used would cause it immense grief I would think.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 08, 2014, 01:54:50 am
content: Quote from: Boltar on October 07, 2014, 07:53:06 amDon't be shy about looking up parts and trawling datasheets if you have missing information, either -- as it happens, LM393 is a dual comparator with open collector outputs (and ~200ns response time). So, it simply won't do anything at all without R4. (A push-pull output type, like the LT1720, won't care about R4 at all, and it would indeed have no use!)QuoteNot quite. Q1 is an emitter follower. One way to think of it: if the base is supplied with a resistor, the R+BJT can be transformed into an equivalent Req = R / hFE. This is handy for making stiff pull-ups (4.7k is pretty weak, but at hFE > 100, under 47 ohms looks like a good driver!), without wasting the current of such a low-value pullup (the comparator still only sees 4.7k).The emitter follower is not saturated, so it doesn't suffer from storage time. (It's actually much faster than the LM393, which limits this circuit to 1-3MHz of questionably-useful range.)Storage time is a phenomenon where, if you dump excessive current into the base to saturate the transistor, it takes a looooong time to come out of saturation. In fact, the B-E junction behaves like a battery with just the teeniest bit of charge stored in it: you can actually connect a resistor across B-E, and current will flow out of the base, through the resistor, until this charge runs out. While discharging, the voltage hovers around Vbe. If you don't use a pull-down resistor (your circuit showed a diode pumping up a capacitor, no pull-down, which is what triggered my remark), the voltage will sit there for a very long time (10s of microseconds), as it self-discharges. So, limited charge capacity, sort-of-constant-voltage during charge/discharge, and self-discharge: it looks like a very fast, very teeny battery!t_stg is commonly listed on datasheets, with the switching parameters. Typical for a 2N3904 I believe is 200-250ns, which is an eternity compared to your LT1720 (~5ns response!), or even compared to the other parameters (rise/fall time ~30ns) of the same transistor.The reason for that is, the "saturated switch" test is conducted at hFE = 10, meaning, hFE might be 100 or more (for linear operation), and you always need a little more to make it saturate nicely. By going all the way down to hFE = 10, you get a nice low Vce(sat), but you also store a lot of base charge.Moral: if you want BJTs to switch fast, you need to pull current out of the base as well. Like MOSFETs, but in that case you have explicit gate capacitance. Well, the base does too, and then some. It's NOT a current controlled device, you need to yank that base voltage around to get it to do what you want!QuoteYup!You can even calculate the threshold shift:The Thevenin equivalent of R1 || R2 is 5k and 4.5V. R3 has about 8V of swing on the 'hot' end (the emitter follower doesn't quite pull all the way up to +9V, or down to 0V), and acts as a 22k + 5k voltage divider, so that the NII swing is 8V * 5k / (22k + 5k) = 1.48V. This is nearly symmetrical around the 4.5V mean, so the actual thresholds will be half above and half below, or about 3.75 and 5.25V.The threshold voltages are, of course, the P-P swing of the capacitor voltage, and also the useful range of the "CV In" connection. Which sucks a little, because if you hook up an error amp to CV In, its output will swing 0-9V (if it's a R2R type op-amp), which means the first 0-3.75V and the last 5.25-9V are useless dead zone. You can reduce the range with a resistor divider (much like R3 into R1 and R2 does here) to fix that.QuoteThe purpose here is to give just a little bit of "snappiness", so the output (hopefully) doesn't make half-assed pulses around the edges (when CV In ~= top or bottom peak voltage). If the edges of the ramp wave are perfectly sharp (they aren't -- the LM393 takes maybe 50-100ns to swing, but even if it were instantaneous), the output PWM should ideally go to perfectly fine slivers of pulses, for CV very near the peak. But real comparators are sloppy, and real circuits are noisy. You can actually play with the "fine slivers" condition, but it's more practical to simply cut them off entirely.The effect of hysteresis is, it won't switch for an input swing less than threshold. So, for inputs hovering right over the peak voltage, just under threshold will produce no pulses at all, and just over, it will only make a certain minimum width pulse or larger. Very thin pulses are limited by response time and rise time, and end up sloppy. If you're following it up with switching transistors, you don't want them turning halfway-on before going right off again, because failed switching means way more power dissipation than good clean switching.QuoteYeah, it's fine there. You don't need the transistor at all, for LT1720; in that case, it's probably happy anywhere from 250kHz to 100MHz.QuoteAs long as you have enough bypass capacitance, the high frequencies won't even touch it. Its internal loop response (it's an error amplifier, guess what!) rolls off in the 100s of kHz, so it just looks like an impedance at those kinds of frequencies. (The 7805 uses an emitter follower, so it actually behaves very well at high frequency, tending towards a moderate resistance, which tends to help dampen supply resonances. LDOs are common-emitter or common-source devices and generally have far higher impedances, often reactive at that (inductive, or worse) -- this is why LDOs generally need capacitors with known ESR, and if the datasheet isn't talking about capacitors, ESR and stability, run away and find a better one!)Tim

author: Unknown
author_rank: Unknown
timestamp: October 08, 2014, 11:03:47 am
content: Cool stuff. I used the lt1720 because I'd already used 3 in the circuit and the lt1721 is the same thing but in a quad package. Seems to be ok without the transistor too, like you said, awesome. Since this is powered from a battery, I'm looking at reducing power overheads wherever possible. My thought was to use a smallish p-fet to create a switched VIN power rail. The main switching fets would be on the actual VIN of course but everything else is on the switched rail and I'd probably have to pull the gates of the switching fets to ground via a large resistor to deal with any possible open states in the gate driver if it's not being powered? Probably a good idea to do that anyway? The MCU can then turn the entire circuit on and off when required and when off it'll be using virtually no power.Leaving it duty cycle referenced is actually fine. The original design used the PWM output of the MCU to drive a P-FET, so all the firmware is geared around that already. By low pass filtering the PWM output of the MCU, the firmware will need very little modification to slot in with the new design circuit. I may need to combine two PWM outputs to get higher resolution, and the resistance detection will obviously be totally different as I'm detecting output current to do that now, I may have to have a course and fine current output to ADC however, as detection of the load resistance when not being fired will require a pretty low duty cycle, and the resolution of 100mV/Amp may be too low to get a decent reading, so probably just multiply it by 30 or something.