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

Oscope - Roman Black's Two Transistor Switcher Design

Discussion in 'General Electronics Chat' started by Jony130, Aug 2, 2012.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,185
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE

    Hi RB,
    This is a LTS sim with a 5mA load current.
     
  2. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi Roman,

    Isnt the 1nf cap the feedback cap? I mentioned it by value so that there would be no mixup :)

    Honestly, if i cant understand a simple 2 transistor switching circuit by now i better hang my slide rule up :)
    I started designing switchers in the very early 80's professionally, which means you might find some of my designs in some commercial equipment but since things have changed since then it might make better sense to buy something newer and probably get better specs (although how much better is debatable). I also have actual hands on experience in both the lab and in the field (half way across the US). I've worked with sine synth power supplies from something like 100mW up to 30kW where the output transformers weighed more than i did. These power supplies sometimes had card cages with various functions and one design which i was almost solely responsible for had a big backplane and large heatsinks and ran off of a million dollar solar panel and tied to the line to produce AC power that was pumped back into the 120v or 240v AC line, which back then was a relatively new thing.
    So if i cant understand this tiny 2 transistor circuit im in big trouble :)
    What you are talking about is common to many switching power supplies.
    I appreciated you bringing up switching speed. With larger output cap for filtering we might even see less cap ESR. A drawback is di/dt in the inductor which means more span of the BH curve which also equates to a drop in efficiency, but just how much is probably better off tested.

    Im also a firm believer in adding a small hand wound coil and extra cap on the output to smooth ripple down. Actually this sims good and also i've tested in real life and it's even better in real life.

    Your interest in the lower power version is nice to see for a change where we are almost always after higher and higher power. It shouldnt be too hard to convert. The transistor will be more efficient so i dont see that as being a problem, when that is so often the biggest concern. We can do a sim here and see what is what.
    Keep in mind that the 10k zener bias resistor eats 1ma of current on the INPUT side. That's a lot for only 5ma on the OUTPUT side. 1ma on the output is just 5mw, while on the input it is almost three times as much. So the efficiency struggle will involve increasing that resistor or else finding another way to bias the zener. Perhaps going to a voltage reference diode would be a nice idea.
    Changing R1 and R2 probably wont have as much effect because the current through that branch includes the Q2 collector to emitter, which means the current will be regulated by Q2 more than anything else. With a given (through the regulation scheme) current through Q2 changing the resistors probably only changes the place where the voltage drops occur...either in R1, R2, or Q2, but they will always be there.
    The inductor series resistance should be of less concern with the 5ma output. That's because the efficiency is lost by means of the nominal output current times the voltage drop across the ESR. With 10 times less output current, we'll see ten times less voltage drop which equates to better efficiency with the same ESR as used on a higher current design. Thus a 100ma design that looses 10 percent due to inductor ESR will only loose 1 percent due to ESR at 10ma output max.

    Anyone in the mood to breadboard the 5ma output circuit? How about you Roman? :)
     
    Last edited: Aug 7, 2012
  3. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Hi Eric, thanks for simulating the design with 5mA output. It's good to see the sim still oscillating ok even at such low output current, but at a high freq now (140kHz) compared to the nice efficient sim you did before at 100mA out (40kHz).

    If I read your info right, it is consuming 14v 4.8mA and supplying 5v 5mA? As a SMPS it's not efficient at all there and could be replaced by a linear regulator with low quiescent current.

    It would be nice to see a setup offering the typical 80-90% efficiency that the circuit can produce, but "tuned" to produce that type of efficiency with a 5mA output. I was not able to do it with some parts swapping, although I admit not spending too much time on it as this circuit was tuned for a reasonable current range and I left it at that.

    In SMPS ICs they usually run in "discontinuous mode" for very low output currents, this means the OFF period is very long with a short ON period, so inductor current actually reduces to zero for most of the OFF period. This gives higher efficiency as the inductor current is high enough to get good magnetic properties during the time it is on. I toyed with the idea of making a long RC delay OFF period to try to mimic a proper discontinuous cycle but as I said never got it working very well.

    Yep, the mistake was mine, I misread your post sorry. :) I didn't mean to sound as though you didn't understand how to get the efficiency up, it was more to draw attention to the way I "tuned" R1 and R2 for the Q1 saturation issues, and of course for the benefit of others who may read this and want to try tuning for efficiency. (Just for the record, I too have done a couple of commercial SMPS buck designs over the years. ;))

    The big efficiency problem with the circuit Eric is simulating is that crappy high-ohms inductor, that was from my circuit 1 and was chosen as cheap and common. Some of the other circuits on my page had better inductors and much higher efficiency, and I was able to get >95% with a well chosen toroid and tweaking resistor values, which is a significant milestone in efficiency from a buck with no synchronous rectification.

    Re getting the efficiency up, yep decreasing zener current is a start.

    No, in the existing circuit during the ON cycle Q2 is quite saturated and has a low Vce, so R1 and R2 are the main things that affect current through that branch (and Vin of course which sets the R2 voltage).

    However if reducing the zener current with RZ far enough it might start to limit Q2 base current enough that Q2 won't saturate, so in that case you would be right Q2 might have more of an effect on the R2 current. I worry if that happens that Vin regulation will then be compromised.

    Yes and no. As it is running now in continuous mode that is right, but if it ends up requiring discontinous mode to maintain a nice high inductor current then the inductor ESR will remain important. Either way if I was aiming for good efficiency as a goal I would lose that crappy little inductor. :D

    Sure, if needed I can breadboard up a circuit I have no shortage of nice performing inductors, I even have some of the good Motorola glass schottky diodes left over from a commercial app, you can't buy good schottkys anymore. :(
     
    Last edited: Aug 8, 2012
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ


    Hi Roman,


    Thanks for the detailed reply there. I can get a good idea what your thoughts are too that way and it makes it easier to talk about this circuit and after all it's more interesting too that way :)

    Ok i'll take another look at the efficiency issue with R1 and R2, but the way i understand it is that the snap on pulse from the 1nf cap only turns Q2 on fully for a brief time, then Q2 just maintains some level of current for Q1 to operate where it should in order to get the required inductor peak current. So in other words it appears that R1 and R2 will only affect the efficiency for the time of the snap on pulse. I'll take another look at this though just to make sure (or not he he).

    I was aware of the fact that raising the zener bias resistor (you are calling Rz) value would have other negative effects that's why i mentioned 'some other way'. I just wanted to make the point that the 10k resistor is a major factor in any kind of 5ma output version. How we would actual deal with it remains to be seen. For example, i raised it to 100k just for the simulation but yes that could affect the actual regulation ability of the zener too so i was thinking maybe a reference diode instead. Just some quick thoughts really.

    I was assuming continuous mode all along because if we allow it to drop into discontinuous mode the efficiency will drop due to that alone. In discontinuous mode it would act partly as a switcher and partly as a mere PWM which means lower efficiency not even considering the inductor series resistance yet.

    I'd like to see your results if you breadboard this thing for 5ma or even 10ma would be nice too. I guess we'd have to see what we can do with the 10k resistor maybe you have some ideas you might share.

    And yes i guess you are right about the efficiency in general being higher than normal for a simple transistor circuit. I've seen more common around 75 percent. Partly what helps is the input output voltage relationship. If this was a boost it might be different, but that brings up another thought...perhaps we should also try to achieve the same with a boost topology which as im sure you know would be very useful in portable LED lighting applications. I dont like many of the ones i've dealt with in the past as they are not that efficient and some of them would prefer to bang the little 20ma LED with 100ma peak like the Brinkmann circuit :) (no doubt they probably fixed that by now).

    Nice to hear that you've done some commercial design too. I wasnt trying to 'brag' or anything i just wanted you to get an idea what my background was, and it was good to hear about yours a little too. Due to that alone i would bet we both have similar ideas for this kind of circuit.

    So now on to the boost circuit which would be very handy for me as i do a lot of LED stuff as a hobby now, both 120vac and small battery lights. Maybe you already have some starting ideas...
     
  6. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    I would be very interested in something like this too. In stores all over you can pick up these cheap little 9 LED flash lights for like $5. And in a perfect world they would be brighter, smaller, more correct color, and more efficient than the filament based counter parts. Problem is, most of them simply put all the LED's in parallel, then power them with 3 AAA batteries in series through a current limiting resistor. So even light use on them brings the brightness down so much that your better off just adjusting your eyes to the dark. When you pull the batteries, they are only drained down to 1.35v from 1.6v, which is hardly "dead".

    I have like 10 of these units in pieces waiting for me to make a circuit that will do the job the right way. I would also like to some day replace the battery with a Li chemistry that fills the battery compartment as much as possible. In the current design they use, most of the volume of the battery compartment is taken up with the battery holder :)/). They were made cheap, not efficient. But that doesn't mean they can't do both.

    I know what you mean, I have a whole parts drawer full of blown up week Chinese white LED's from "The Joule Thief" circuit. Needless to say, high peek current and persistence of vision isn't exactly optimal for part longevity. Something that worked the same to "steal" all the power from a battery, but was somewhat regulated would be an improvement to be sure. For Li, It would probably be better for it to stop at a controlled voltage, rather than drain until the circuit physically stops functioning.
     
  7. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi there,

    Oh ok so you've ran across those cheapie 3 x AAA LED lights too then :)
    I hate those buggers :)

    I have a few of them and i only keep them for emergencies so i use other lights in between, but i did mod one of them with an AA size Li-ion cell. The AA cell fits in the package without the battery holder. The resistors are in the head so no need to add them. The Li-ion voltage is close enough to 3 x AAA cells in series so that's cool too.
    So the only thing to add is a bit of cardboard or other spacer.
    But i think i modded it again with a battery holder and added a push button switch too. That worked out pretty nice. The battery holder was a one cell AA holder.

    I think i actually have about 5 or more of those 3 x AAA cell lights, but i dont use them just saving them for emergency use.
     
  8. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Hi MrAl, there are already results for efficiency etc for the circuit under discussion, seen on my web page under the first link (A00);

    [​IMG]

    At 5v 10mA Iout the input is 14v and 5.4mA Iin, which is better than I remember, and still useful I guess due to an almost 2:1 current gain. Like I said this is going back a lot of years and I remembered not getting much success at really low currents. Now it is 11 years on, and PICs etc generally use a lot less current than in 2001 and an "extra low current" version might be worth looking at.

    I did do a 2-transistor boost design, but the feedback systems in boost are very different. In boost, the current must be built to max in the inductor with no feedback from the output (load) so it really needs 2 feedback systems; one to control ON peak current, the other for Vout regulation.

    I cheated and just regulated on inductor max current, which equates to Iin max, with this design;
    [​IMG]
    http://www.romanblack.com/smps/conv.htm

    Which basically just turns off when inductor current >setpoint. With a fixed input voltage it runs at a fixed input power and is pretty useful for 5v->12v type converters, or running a string of LEDs etc from 5v.

    A drawback of that design is it requires 0.6v wasted in the ON current path, in the current sense resistor (at Q1 emitter). But it is very safe and reliable, as the switching occurs at a current limit in the inductor.

    Back to the discontinuous buck, I think that might pay off. In a SMPS IC running discontinuous it basically oscillates at a speed and duty high enough to be able to give Vout>setpoint, then if a Vout>setpoint situation occurs then all oscillation stops until Vout<setpoint again. That system is used in the 34063 IC.

    I had an idea using 2 transistors as an astable multivibrator giving fast square wave switching (one of the transistor is Q1, the main switch). Then a third transistor as the regulator which inhibits turnon whenever Vout>setpoint.

    I don't know if it can be done with just 2 transistors though, which would be something of an achievement. :)

    Currently the 2-tran buck we have been discussing in this thread turns off at Vout>setpoint, and has an RC timed off period, but is practically guaranteed to turn on again after the RC period due to the Vbe setpoint being such a large fuzzy V range. (As you noticed earlier it regulates more around an "average" Vout, not an instantantaneous Vout setpoint). If we replaced Q2 with a comparator with a very narrow setpoint voltage things would be different.

    Another option for discontinuous (and a good option!) would be to use the RC delay to force ON time instead of OFF time. So for a fixed ON time period IL1 would be relatively large and known, and Vout would be pumped up and then the OFF time period would be discontinuous and be very much based on Iout. That *should* be possible with just 2 transistors but I have not tried it. :)
     
    Last edited: Aug 9, 2012
  9. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi again Roman,

    Oh ok i'll have to simulate your interesting boost circuit and see what i can find out. I was hoping for efficiency like with the buck we were talking about so maybe we can tweek it a bit. Not bad already though :)

    I need a rest right now as i was doing a lot today but a little later or tomorrow i should be able to get it "up and running" and with some test results. Offhand though that 6.8 ohm resistor looks a little high in value for current sensing in a high efficiency circuit.
     
    Last edited: Aug 9, 2012
  10. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Boost circuit.
    I was simulating your boost circuit and came up with something interesting that improves regulation with less waste I think.

    If you take the zener diodes anode and connect it just below R4... like this.

    View attachment 66240

    Then anything over the zener break down "quenches" the inductor "stop section" early causing it to draw less power with little waste. I will need some one else to simulate this for real of course. But it looks OK so far in the falstad sim. May want to put a resistor in there too, but that may reduce regulation.

    Again, this is just a theory right now (do to sim unreliability), So I expect possible new data and criticism.

    Edit: I may bread board it too actually.
     
    Last edited: Aug 9, 2012
  11. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    MrAl, if you want to do something with the boost design you could try adding positive feedback by adding a small cap across R4, originally I had that but decided in the end for simplicity it was not needed, as the phase delay caused by RC delay R3 C1 was enough to make it oscillate ok, and 80% eff was ok for the purpose at the time (I was asked for minimum parts count).

    Re the 6.8ohm current sense R2 efficiency problem this will be even worse if you want to drive LEDs from 3.3v Vin etc, it might be possible to bias the base of Q2 regulator at say 0.5v then the current sense R only needs to ADD 0.1v to turn Q2 on. I used a similar system (that only needs 0.1v to turn the transistor on) here;
    http://www.romanblack.com/current.htm

    Oblivion; That's a nice simple addition putting the zener there and would perform some level of Vout regulation. I saw someone before putting a separate transistor on Vout but your circuit is simpler. You might want to put a resistor in series with the zener to improve efficiency as there will be much less zener peak current (as flyback is now clamped to zener and Q2 base).

    Also you could improve on the Vout regulation I think by putting a resistor between C1 and Q2 base, that will let the Vout regulation pulse charge C1 and there will then be a longer OFF delay while C1 discharges slowly through that R into Q2 base. So you get a nice long timed OFF period for each Vout regulation pulse through the zener. :)
     
  12. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Thanks. It just occurred to me out of the blue.

    Yeah, I have it breadboarded now too. It works amazingly well. With the right parts it regulates as well as a 78xx as far as a DMM can tell. I get about 0.05V drift from no to full load. A scope will likely show different results. Some post filtering should take care of it though.

    Yup, I did mention this in my previous post, and the breadboarded unit has this. The schematic I posted just didn't have it is all. One thing though, during start up if you're operating with a light load and Vin > 1/2 target Vout, there is a large unwanted spike of higher voltage on Vout. Not having a resistor on the zener clamps this faster. This spike would not cause any problems for basic circuits like the before mentioned LED lighting, but if you're doing say... Li-ion to regulated 5V for PIC's or similar, the sensitive digital logic's could potentially die from the abuse. Using the zener as a clamp through a diode fixes this at the cost of some efficiency. My current version has both a resistor and a clamping diode. Assuming a 0.65 voltage drop for D2, then it should only conduct right at first when the circuit starts up and has that burst of voltage. There may be other ways to fix this problem also that I haven't though of yet.

    My Version
    *HERE* is a clickable direct link to a falstad simulated version of my modifications to this circuit.

    In the simulation, all the waveform views on the bottom are displaying power being lost. And the diagram view is set up to show power as well. Power absorbed is shown as more red color, power being delivered is shown as green. You can change this with the options drop down menu item if you want. Some components absorb power, then immediately return it (capacitors and inductors) these do not add to power being lost and should not be included in any efficiency estimations as they have nearly neutral effect. I have also considered the transistors as only ever saturated or fully OFF, and thus have ignored them power loss wise.

    You can hover over each individual waveform to see what part we are tracking, they are all roughly grouped together. You can also hover over any part to see all of it's pressing details. Note that the waveform values being shown are *PEEK VALUES*, not an average. You will have to deduce the average off of the waveforms yourself. I simply approximated to about half the peek value shown. A more accurate simulator should be used to more closely determine the real efficiency.

    Also note that some of the changes I made to the original circuit are mostly because one can't breadboard with part values one doesn't have. So all the values may not be optimum for any particular kind of performance characteristic. Play with this as you wish.

    And finally, for those who can't use or see the simulation, here is a schematic for you.

    View attachment 66260

    How over voltage clamping works
    When the circuit starts, there is no base current on Q2. This keeps it off and stops it from stealing Q1 base current, allowing Q1 to switch on Via R1 current, thus grounding the inductor. At the same time, the Vout filter capacitor has no charge, and thus also momentarily looks to the inductor like a short to ground through D1. These two things create two independent and simultaneous current paths for the inductor, so it ramps up to energy levels it would not see during normal operation. Eventually, current through Q2 base get's high enough to switch ON, which in turn pulls all the current away from Q1 base, causing it to switch off. At this point, and with a light load, the inductor is inducing a significantly larger voltage onto Vout than it would normally ever be doing. When this happens, and Vout exceeds a safe voltage level, Zd1 breaks down, and D2 also starts to conduct. This clamps the extra voltage to ground momentarily. D2 needs to be a normal diode for this to work well, as the effect is very voltage drop dependent. But since D2's V-drop will increase with an increase in current, which will push Q2 off even more it should be self correcting. R5 limits Q2 peek base current to safe levels.

    Edit: D2's forward voltage drop is critical in certain instances I just found out. Need to do more playing around still.

    How regulation works
    The original Boost converter circuit would keep charging the inductor through Q1, and dumping it's power into C2/Vout, basically making the circuit nothing more than a voltage multiplier of sorts. Regulation was done after multiplying with a simple zener shunt regulator, which has some what poor efficiency. With my modifications, we are instead taking the zener and allowing it's break down current into Q2's base, by charging C1. This effectively slows or stops the boost converter oscillator process whenever Vout exceeds V -Zd1. This can cause some significant ripple during certain load conditions. But it is more energy efficient and more well regulated. Thus it is now more or less "pulse-by-pulse" regulated.

    Power and efficiency theory
    In any boost converter, one is effectively converting current directly into voltage. This is done via the physics of inductors not wanting to stop producing current when you get current moving through them. So, you charge the inductor with current through one path, then you switch it in series with Vin and Vout. This momentarily creates two voltages added together, who's current then channels to Vout. This is boost converters 101.

    In order to obtain any amount of power output, one must have the same amount of power coming in PLUS the loss in efficiency. Then, to optimize design efficiency, one must lower the resistance for a given current in all high current paths, as well as get nearly perfectly clean switching out of high current switching elements. All of this is done while the remaining circuitry draws just enough power to provide the above functions.

    Power and efficiency practice
    The resistances that are in high current paths are Vin's ESR, stray resistance of interconnects, the current sense resistor R2, the DC ESR of the inductor, and the ESR of the Vout filter capacitor C2. The main high current switching elements are Q1, and D1.

    Stray interconnect resistance can be lowered by making them short and fat, and is not a major factor either.

    Vin's ESR is almost never a problem. But can be lowered many ways depending on the circumstances. With my setup, I'm using Li-ion battery's, which have very low ESR. And they can be put in parallel quite easily.

    Most of the inductors that would be appropriate for this circuit have excellent DC ESR, usually less that 0.7 Ohms. So power loss in this element is minimal across a wide arrangement of inductors.

    Lowering ESR on C2 can be achieved by getting low ESR "polly caps", or by putting several smaller capacitors in parallel. And like the inductor, is not a major factor.

    Q1 is set up in positive feedback, and thus usually switches nearly perfectly. But still is a critical component to efficiency. A saturated NPN has about 0.1~0.2 Vce Volts drop, and one in cut off has no current going through it, thus almost no power is dissipated inside Q1 when working right. Higher gain transistors for a given max current improve this point even more, as they switch faster/harder. Darlington transistors improve gain massive amounts, but at the cost of a 0.6 volt minimum drop when on. The 6 fold increase in voltage drop may or may not be worth the 200 fold increase in Hfe. If your transistors are saturating and cutting off properly already, then it's a pointless modification. A supper supper low V-threshold N-FET with supper supper low Rds on would most likely be more efficient.

    D1 was changed from a "normal diode", to a low forward drop Schottky, this moderately improves efficiency. More efficiency could be had if the design was made for synchronous rectification, or if an even better diode was used.

    Taking R2 down from ~8 Ohms to ~0.1 Ohms GREATLY improves efficiency because it both drops inductor charging path resistance, AND increases inductor charging path current. The cost is that it is harder to make the current sense system without increasing support circuitry power drain. This balance mainly effects R1 and cause it to need to be lowered significantly. The increase in power draw of support circuitry is an order of magnitude lower that the power gained from lowering R2 though. Thus making it an improvement over all.

    Conclusion.
    Most of what I have said above is based on simulator observations and some experience with these kind of things. The simulator has flaws, as does my brain. It would be best if the above design was simulated with a real simulator, and if others with more equipment than me where to prototype it and do some proper measurements and tests. I have prototyped a previous version of this, and it was in agreement with what I was seeing in the simulator. But there is certainly room for more and better tests.

    If anyone would like to tackle this, I would really appreciate it. And I am sure I have made some mistakes in the above, let me know and I will correct them. Finally... Mr.Rb, feel free to do whatever you want with my improvements. It's still 95% your circuit after all.
    -()blivion
     
    Last edited: Aug 12, 2012
  13. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,029
    Likes:
    951
    Location:
    NJ
    Hi again,


    This is getting more interesting by the day :)

    Oblivion, i like your mods there, so what are you seeing as far as efficiency with various loads so far?
     
  14. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Great post Oblivion. :)

    Good to see you added that R5, that should give more a "discontinuous" operation when Vout goes into regulation, which you reported as a "pulse by pulse" type operation.

    However I'm a bit converned by that problem where the initial Vout goes too high? I'm trying to understand why it happens. What should be happening is that the oscillator is switching based on the inductor and Q1 current sense, which should be reliably feeding pulses of power into Cout. This should slowly charge Cout until the zener starts to conduct which SHOULD just inhibit the oscillator turnon. So it should slowly charge Cout until it gets to the regulation point then stay there.

    Can you please post a screenshot of the output voltage, if possible showing oscillation too (like with Q1 Vc shown as well). And what current limit did you use in the oscillator vs what load current?

    I think the problem is largely due to an excessive current limit, with your R2 of 0.1ohm the current pulses will be 6 amps!! And then there is overshoot by the time R3 charges C1, it might be 10A peak. That is way past the sat current of the inductor!

    A good choice for the current limit is at a rate just above the output current times Vout:Vin ratio, so with 3v in, 5v out and max 100mA out needed;
    current limit = 5/3 * 100mA = 167mA
    allowing for 70% efficiency;
    167mA / 0.70 = 238mA
    so you calc R2 as 0.6v over 240m
    R2 = 0.6 / 0.240 = 2.5ohms.

    I still think the diode clamp is a bad idea as it really hurts efficiency. Flyback produces a short duration high voltage pulse, and with zener+diode clamping a significant amount of energy will be 100% wasted. I think a better solution is to reduce the current limiting (via R2) and increase the size of Cout. And possibly improve the regulation by some parts changes.

    It's probably not going to regulate Vout to anywhere near a 7805 type standard, and trying to clamp the output with zener+diode will help regulation but will hurt efficiency a lot.

    My preference would be to reduce the current limit a lot, increase Cout so it charges slowly and won't overshoot much (and also won't drop very fast under load) and just accept an "OK" level of Vout regulation and enjoy the higher efficiency. Then you get more of a "average" regulation of Vout which will be perfectly acceptable for most micro type applications that don't need superb 5v regulation.

    If you really want good Vout regulation then it might be best to add one more transistor on the output and get good Vout regulation AND good efficiency. :)
     
    Last edited: Aug 11, 2012
  15. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Thanks, I'm still playing with it so efficiency is coming and going. Who knows what we can come up with. At one point I did have over 80% estimated efficiency. But the sim lies and I didn't count some losses. We need real sim and some one with a good test equipment build it. Most of my equipment is sub par at best.

    Yeah, It seems to help with very light loads. Also in simulation the over shoot that punched through ZD1 would go to ground straight through Q2 base. I was seeing in excess of 500mA peek in the simulator. The zener may be able to handle it, but it's definitely not good for Q2 base. R5 at 10 Ohms dropped that quite a lot. Now I even have R5 up to 33 Ohms on my latest incarnation. Still functions mostly the same it appears. But I'm also still playing with it and it may come back to bite me later.

    As I understand it, discontinuous operation is when the inductor current reaches zero for any amount of time? That being said, in simulation that's not what I'm seeing. Or more specifically, you see this at low load. Then with even lighter load, it goes even farther to the point that the oscillator runs in short bursts. Point of fact, I actually misspoke when I said it works in a "pulse-by-pulse" mode. To me, it looks to operate more like pulse skipping modulation. But again, that's just what I see in the simulator, who knows what's really happening.

    As far as I can tell, the reason it happens is because Rsense can not sense the current dumping into Cout, which during start up is a short to ground for the inductor. This makes about twice the normal current go through the inductor before Q1 shuts down. Twice the current should mean about twice the energy. A larger Cout may fix this problem among other things, but that also makes more inductor current divert past the sense resistor. Increasing Rsense might be a better route since it will open the inductor sooner. Also note that this spike does not happen when target Vout is greater than 2x Vin. (change ZD1's value and drop R4 some, then restart the sim) The first pulse will approximately attempt to double Vin, so with Vin greater than 1/2 target Vout, the first pulse tries to make Vout way higher than the target. This whole problem is survivable for simple circuits, but if you want to boost a 3.7 nominal Li chemistry to power 5v logic, you will need to work around this some how. The clamp is not energy efficient, but logic's that end up short circuiting from being over volted waste a lot of power too. ;)

    Sure... More or less... :)/)

    Vout, with diode clamping.
    View attachment 66292

    Vout, Without clamping.
    View attachment 66293

    Target Vout greater than 2x Vin, And NO diode clamp
    View attachment 66294

    Q1 collector current and voltage during oscillation. (~250mW load)
    View attachment 66291

    On that note...
    Can you not use the simulator for some reason? It's just a small Java applet, so all you have to do is click the link I provide and should will load. (Unless you have IE or have Java disabled in your browser that is) Then just hit the reset button at the top right of the window and watch the voltage above the load. *HERE* is another link to the simulated circuit, this time setup a little differently. The right graph now shows voltage, and there is a switch on the diode. You can reset and watch the graph with the clamp in place, then you can left click on the switch to open the clamp circuit, and reset the sim to see what happens without it.

    (Note that all of the simulated component data is stored in the link it's self, making it miles long. It's not some kind of exploit attempt or anything. You can check by going to the falstad site yourselves and opening the simulator, then clicking File >> export link. You will see that every thing looks the same as my links, if not for mine being a little longer. And yes, it's an odd way of sharing circuits, but it works without having to download anything.)

    And I know I'm repeating my self, but... notice that the spike only happens when your Vout is twice Vin. This fact is what makes me believe that it is caused by the momentary dual short circuit paths to ground. One through Q1, and the other through Cout. And once again, this spike would be survivable for 90% of electronics, and could be omitted at the builders discretion. But as we all know to well, some devices can never see an over voltage for even an instant. LASER diodes are a perfect example.

    WOW!!! I didn't know that the current limit was going to be 6 Amps!!! The simulator does not show this at all. I only get ~500mA current through Q1. As I said, it needs to be simulated with a better sim, like LTspice. The falstad simulator should only be used as a preliminary design phase tool IMO, not taken seriously. Or only for dirt simple projects like lamps and such.

    In any case, I will most likely make Rsense 1 Ohm. We need to strike a good balance between low resistance, for high efficiency. And high sense output, so the thing actually shuts down Q1 from time to time.
     
    Last edited: Aug 11, 2012
  16. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Sorry for double posting. But I have a new circuit with some more information and pictures for you all to look at.

    OK, What we have here is my most recent modifications to the boost circuit. It is set with a 7.5v zener diode to make regulated 8 volts. This eliminates the need for the clamping diode (do to our Vout Target being over 2x Vin) and should thus increase efficiency as stated by Mr RB. I have also increased R1 and R2 some to lower current draw, at the cost of lower max power I believe. (though I am still getting ~250mW out of it ;))

    The supply is assumed to be low internal resistance ~4.7 volt stable power, IE... A Li-ion battery. There are three pictures, each for different loads. Note that all the values shown above the graph are PEAK LEVELS. This means that the actual power loss in that part will be some what lower, estimated about 50-75% lower than whats shown. The exact percentage will depend on the part and it's waveform. Also note that power loss in the output filter capacitor ESR, power lost in inductor ESR, power lost in Q1, and power lost in the remaining "support circuitry" is not included, as it is assumed to be negligible when compared to other losses. Finally note that when in "discontinuous mode", the time between "bursts of oscillation" can be quite long, as low as a 5% duty cycle. During this time the circuit is drawing nearly no power, only really from R1 through Q2 to ground and the zener bias current are noticeable. So efficiency is quite up there you would think.

    Edit: It appears I have two resistors labeled R4 :p the lower one is R3. Far to lazy to change it now.

    Here is the "Discontinuous mode" power drain
    View attachment 66300


    Here are the other power drain pictures...

    High load
    View attachment 66295

    Medium load
    View attachment 66296

    Low Load
    View attachment 66297


    Again, I can not stress enough that this is JUST A SIMULATION, and not even a very good one at that. A real device will be effected by other factors that are not taken into account. Some real testing and better simulation should be done to delve into this any deeper.

    Finally... *HERE* is yet another link to a simulation of the circuit above.
     
    Last edited: Aug 17, 2012
  17. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Thanks for taking the time to post the pictures, that helps a lot. :) I can't use online simulators as I have most of my internet Java features disabled for speed and security.

    Ok, based on your current chart (last picture in your post #54) I think the simulator is getting something wrong.

    It definitely looks discontinuous, based on Q1 voltage chart. You can see Q1 ON (Q1 at 0v) the flyback period where inductor current is delivered to the load (Q1 at 5v) and the discontinuous period (RC delay etc) where there is no inductor current (Q1 at Vin = 3.3v). That's the good news.

    The bas news is that something is not right with the current regulation, the main mechanism of the oscillator. There should be no voltage to turn Q2 base on UNTIL the voltage on R2 (0.1ohm) reaches 0.6v, which will occur at a current of 6 amps. Your chart for Q2 collector current shows it only reaching 228mA.

    Until that problem is sorted I would go back to the original minimal parts version (remove the zener for now) and make sure it is oscillating based on R2 voltage hitting >0.6v. At your "high load" requirement of 31mA output, you only need about 100mA input so I would set R2 current sense resistor at 0.6v/0.100A = 6 ohms. If you can get the simulator working at about 3.3v 100mA in and near 8v 30mA out, that will show at least the simulator is setup right and working ok.

    Another thing that would help is a chart of R2 voltage, at least you could see then that R2 is getting >0.6v to kick in the current limit end of cycle. :)
     
  18. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    OK checked the previous 3.3 --> 5v circuit again, and I did have it wrong :p

    You're mostly right of course, Q2 base current was not coming from R2's effects on the circuit at all. The zener diode was providing this after Vout was high enough for it to break down it would appear. And as you predicted, taking out the zener made it stop oscillating in the simulator. Then I made R2 6 ohms w/o the zener.... and it started back up again.

    With absolute respect, I was under a different impression of how it works. The voltage across R2 only needs to reach a level high enough for the difference from ground to cause the current going through R4 and R3 to drop, thus raising the effective resistance of the lower half of the voltage divider. It is actually this voltage divider that raises the voltage on Q2 base above 600mV like you said. But R2 doesn't need to actually see >600mV for this to happen. Point of fact I'm seeing 500mV across R2 and it's still getting 600mV on Q2 base without the zener. Here is an image...

    View attachment 66337

    I was even able to take this theory farther and amplify said effect by dropping the total resistance of R3 and R4 so as to be able to drop R2 down to 1 Ohm. This makes R4 and R2 burn up about the same amount of power, optimizing the total arrangement. Here is an image of that....

    View attachment 66338

    Why do this?
    As I said before, the way I understand the theory behind Buck/Boost converters, for best efficiency one wants to drop the resistances in all the high current paths as much as possible while still maintaining proper operation. It's the current being pumped through a resistance that dissipates power and thus lowers efficiency, not just a moving current by it's self. Any current you cause to flow through the inductor that has nothing to dissipate as heat in, returns back to the system as energy... in accordance with the first law of thermodynamics. This is why we want to lower R2 as much as possible since it will dissipate less heat/watts while charging the inductor to the same energy levels.

    However, 0.1 Ohms was certainly far to low for what I was trying to do. It would be nice to get it that low and still have it work right though.

    Smart man. Browsers wit Java has been a hackers wet dream for a while now. Many many many exploits available. But Java 7 is out and is far better than it was. Much emphasis was placed on better sand boxing. So it's more solid. Though I'm sure that there will be exploits for it too.
     
    Last edited: Aug 12, 2012
  19. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Here is a plot of device current. Combined with the input voltage and the output power, one can calculate the approximate efficiency.

    View attachment 66340

    Being that the current waveform is close to an ideal triangle wave, and has an average peak to peak current of about 230mA, and we see pulse skipping/discontinuous mode about every ~8 pulses, I have guesstimated the average total constant current draw to about 116mA, and thus about an 80% conversion efficiency.
     
    Last edited: Aug 12, 2012
  20. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Now you've got me scratching my head! :) If Q1 is properly turned on and saturated (as it should be) it will have about 0.15v Vce. (That is assuming L1 does not saturate and force the Vce up).

    As the current rises from 0mA, R2 voltage rises and the only thing that can charge C1 are the two voltages at Vc and Ve, (Vc through R4, and Ve through R3).

    So for Q2 base to turn on (>0.6v), it needs Vc and Ve to be roughly 0.6v. (Obviously since the 1k impedance is much lower from Ve that is the main factor, Vc is 0.15v higher than Ve but it's resistor is 10 or 15 times larger so Vc should have little effect.)

    I can't see what is happening in your second diagram. It shows the current rises from zero, and when the current gets to 124mA (124mV on 1ohm R2) SOMETHING turns off Q1 (or turns on Q2), and initiates the off cycle!

    At this point all I can guess is that the simulator is faulty, OR maybe if the inductor badly saturates at 124mA this might drag Q1 Vc right up, to initiate turnoff through brute force.

    Where is the + voltage coming from at Q2 base, enough to get get Q2 base >0.6v? :eek:

    Maybe if your simulator model is broken, it might be modelling the top of R4 as connected to Vin, instead of being properly connected to Q1 collector? Or some weird simulator issue like that?
     
    Last edited: Aug 13, 2012
  21. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Hummm... Your right RB, I'm not sure whats happening now :confused:

    Q2
    In the sim, Q2 does not get enough base voltage to turn on as you suggested it might. It's only getting ~150mV before positive feedback suddenly kicks in and Q1 shuts off.... Why?.... I have no idea. I put a diode on Q2 base with fake voltage drop of between 30mV up to 200mV and it did not seem to affect the operation. Only after 200mV did it start to have an effect, and what it did was just shut down oscillation. It did not delay the operation like I though it would. Q1 still turned OFF, and Q2 still turned ON at Q1 base >150mV

    Q1
    During Q1 ON time, Vce goes from 30mV up to about 150mV, doing so 1mV a simulator tick. After ~170mV, the rate at which Vce climbs up increases exponentially until it gets to about 250mV, then Q1 suddenly snaps OFF and the voltage rises to Vin. It plateaus at Vin for a bit before going up to the inductor kick back voltage for the remaining duration of the OFF time.

    Inductor saturation
    I can get oscillation in the simulator with and without R2 in the circuit!!!?!?? This would make it appear that inductor saturation is what's actually causing Q2 to switch ON. That or Q1 is operating in some other switching mode. Following is a picture of Vce without and then with R2 in the circuit. There is a definite switch speed difference in Q1 with the current sense resistor. And the Vin plateau vanishes with R2 in.

    View attachment 66367

    I have NO idea why this is happening. It could be an artifact of the simulator to be sure, but I want to say it's something else for now. A proper simulation should be done. As well as some one build and scope the different voltages and wave forms. I will maybe build the circuit again as per the picture and see if it even oscillates without R2 in place. If not, then that would most likely point to simulator failure.
     
    Last edited: Aug 13, 2012

Share This Page