Perfect. Also regarding your suggestions: I understood about half of what you said, but it's no problem, I'll learn gradually.
Confession time: until last year, the most I ever did with transistors or mosfets was blink LEDs
My goal over the summer break (electrical engineering first year student here) is to get a basic, regulated, isolated stepdown FBT working.
I can settle with a few shortcomings or inadequacies if it helps me to learn, in person, through these nooby experiments and (sometimes) magic smoke.
Great!
Attack it from all sides. Practical: breadboard a circuit. See how it works. Discover its drawbacks. Improve it.
Analytical: what is a switcher?
Hint: you're putting current into an inductor. Control that first! This is why current mode controllers are the only kind that matter.
What is a snubber?
Hint: as the transistors and diodes turn on and off, you get various combinations of RLC components carrying switching voltage or current. As the switches change state, the continuity condition is that a voltage or current, that had been carried by one device, now gets handled by another.
For example, at the instant the transistor turns off, inductor current is carried by its output capacitance Coss, in parallel with the R+C snubber. A moment later, the voltage has risen, and current gets diverted to the output diode instead. Which in turn causes ringing on the primary side (because of where the voltages and currents were), and so on.
Control loops: understand what an error amplifier is, and the basic blocks (error amp, "plant", feedback, compensation). Understanding poles and zeroes and stability analysis may be a little much (it's a 3rd or 4th year subject), but at least knowing about those representations will give you a huge kickstart.
None of these subjects are insurmountable. The whole may seem intimidating, but it's easily broken down into little pieces. And once you understand those pieces, you gain the whole picture.
Soo...going back to your suggestions now.
1. Current limiting can be added later on. I'm not going to overly stress this thing and there is no one who wants to make my FBT explode (I hope).
If you don't want to make it explode, I don't want to talk to you anymore.
(It is, of course, the loftiest goal of the engineer, to make things that the average schmuck cannot explode. Yes, try as might, they always find a way -- but it's a matter of degree. They have to
want it dead!
)
2. I was worried about the opto loading down the 5V reference, though with a 100k resistor, I guess the current is low enough to not be a problem.
It's capable of 10mA or so. Not a problem.
Should also aim for a couple mA on the opto -- the TL431 needs at least 1mA*, and you've got up to ~20mA of headroom (at opto ratings). Less than 1mA quiescent will make it awfully slow (the opto has a lot of capacitance), which can be a problem.
*That's what R13 is for, by the way.
3. Doing a quick search I learned that a unity gain configuration op-amp "... makes a copy - at the output - of the the input voltage, Vin..." Could you please explain what purpose R10 and C9 serves? I got them off the design notes for a 400Watt PSU by OnSemi.
It was probably a design for local regulation (no opto). Typical application has the TL494 on the secondary side, so it senses output voltage directly. (Gate drive signals are then coupled to the primary side with a transformer.)
R10 is an aberration -- it reduces error amp gain, which means the DC output voltage won't be perfectly stable, but will vary with load.
Reducing gain was a common technique to improve phase margin, a big problem for voltage-mode controllers like this. But that's handily solved by using current-mode control -- another point for the superior method.
But yeah, you don't want the TL494 error amp(s) being error amps -- that squares the loop gain, making it impossible to stabilize. (The TL494 would be attempting to control its output, so as to regulate the opto's output at 2.50V. Simultaneously, the TL431 is trying to control the TL494 so as to regulate 5.0V DC output. Who wins?)
4. First my FBT explodes from being shorted, and then I find a madman who enjoys turning potentiometers for fun? When will this series of unfortunate events end!
Na, FBT's fine -- it's made of wire and iron [oxides]. You can short that sucker for seconds at a time.
Poor little Q3 will expire in a few hundred
microseconds.
You can put a fuse in the supply, but keep in mind, those blow in
milliseconds. So Q3 is dead a hundred times over and then the fuse blows...
Except for very few situations (that are engineered accordingly!), fuses are only ever for fire protection -- when Q3 dies shorted, you don't want it taking out all your wiring and stuff. It's a good idea, even for prototyping... especially for prototyping? But kind of annoying, so an active current limiting circuit is a bit more handy.
(There are also self-resetting fuses, which work fine at this voltage and current level.)
5. Fair point. But what if the peak current needed by the mosfet during the switching period happens to exceed that? I'd need the totem-pole driver then, right?
2N3904 is only 200mA, too.
You can push them harder than that, but it's ugly. In this circuit, as shown, if the gate were quasi-shorted*, it would probably deliver around 500mA (200 from the TL494, 300 from the 2N3904 -- yes, driving it so hard, hFE = 1 or 2!).
*You wouldn't want to test with an actual short circuit, but a heavy load, like 0.1uF (and no 4.7 ohm R4), would rise slow enough that you can see how much current it's dumping in the process. (Some gate driver ICs use this test method!)
But IRF540 isn't a big deal, and 200mA will be more than enough.
Indeed, the TL494 output risetime is a whopping 200ns or so. If IRF540 were 20nC gate charge (at 10V, that comes out to 2nF equivalent average Ciss), it would only draw 100mA during the rising edge.
Fundamental capacitor equation: I = C * dV/dt
Inductor: V = L * dI/dt
Both of these apply very usefully in switching circuits, because the waveforms can all be diagrammed as square waves and trapezoids.
7. I think those values should be just fine. At 100kHz, the ripple should be very little even with those caps. I'm not drawing more than 1Amp @ 5V.
How do you figure?
Hello, Ladies and Gentlemen, and welcome to another episode of
When is a Component Not a Component? Today, courtesy of out poster above, we have the:
Electrolytic Capacitor!
Okay, anyway... so, where is it true that a capacitor is a pure capacitance?
. . .
In the SPICE simulator and nowhere else.
A real component is always a complex mixture of R, L and C. How complex?...How close do you need to look? This is an approximation thing. Normally, you'll only bother with three series components: the capacitance, resistance (ESR), and inductance (ESL).
Since no real component is ideal, we simply call them what they are, when they show that characteristic over a useful frequency range. Resistors are resistive from DC to ~MHz (wirewound) to ~GHz (film), so they're quite practical resistances. Film and ceramic capacitors are capacitive from very low frequencies (~mHz) to high frequencies (MHz to GHz). Inductors, well, they come in so many kinds, but the point is they're still usefully inductive over some range as well.
So what's the dirty little secret about electrolytics? They have relatively high ESR.
You would hope for 100uF to be 16mohm at 100kHz, but in reality, you'll probably get ESR around 0.3 ohm in series with that. This is
not a frequency where an electrolytic capacitor
capacitates! (At lower frequencies, where Xc > ESR, it does look capacitive. Electrolytics are good in the mHz to maybe 10kHz range: it's not a very wide range, which shows they're not very good capacitors. We put up with them because they're big and cheap.
)
And even then, 0.3 ohm, that's pretty good, that's 0.3V at 1A, right? Well...
Keep in mind, if this will be a DCM (discontinuous conduction mode -- the inductor current rings down to zero before the switch turns on again) circuit, then the most output duty cycle you can have is 50% (for an optimal transformer ratio), and that means, half the time, D2 is delivering zero current. So the average current
during conduction is double, or 2A. And the inductor current is a ramp, so it has to start at
4A and discharge to zero during that time! So your actual peak current is
quadruple the output average.
(This is why flyback converters aren't very common above about 100W, by the way. It just takes so many electrolytics to filter all that ripple, that it's worthwhile using a more complicated circuit, usually a full wave forward converter.)
If you're in CCM (continuous conduction mode), the best you can possibly do is 2A peak, but in reality it'll be somewhere inbetween, because the inductor current starts at, say, 3A (when switch turns off and diode turns on), then discharges to 1A (when switch turns on again, yanking the diode off). The amount of inductor current ripple is set by operating frequency and transformer inductance.
So for the worst-case situation, 4A peak, you'd have around 1.2Vpp ripple. Yeah, you've got an LC filter on there that can quiet that down nicely, but, that poor C5 will have to bear 1.5Arms of ripple current, whereas I don't think you'll find one that size that's rated for much over 100mA. It'll get
toasty! 1000uF and 2200uF caps are plentiful though, with ESR under 0.1 ohm and ripple current ratings around 1-2A. Excellently suitable here.
8. Praise be to Nikola Tesla, I finally got something right! I imagine it'll be hard to find the transient load response.
Nope! Just set up, guess what, another switching circuit!
This is so simple,
I'd even recommend a 555 for the job: you need an audio frequency square wave (low kHz or below), and a MOSFET that switches a resistor load.
Normally, you'll have an idle load as well, so one load resistor connected at all times, and another switched by transistor. This way, the SMPS is always running, it's just running at, say, half and full throttle, alternately.
While that's tugging away on the output, watch the output voltage with the scope. (You may want to select AC input coupling, so you can zoom in closer on the change.) You'll see it dip and stabilize, and overshoot and stabilize, with each edge.
Or maybe it doesn't stabilize, but then you'll know...
You should pretty easily get a feel for what different values of R15 and C4 do. You should find that, as you increase R15, you generally get more phase margin, so that C4 can be smaller: your loop is responding faster! As you adjust the values, you'll find a region where R15 is "about right", and C4 can't be made any smaller without making the output really lumpy. This is about where you want to be. For a safety factor, you can slow it down a bit by doubling C4, more or less, which will account for things you didn't test for initially -- reactive loads, capacitive loads, that sort of thing.
Too slow of a control loop means you need much bigger filter caps than otherwise, and that the output voltage changes an awful lot in response to load changes.
Tim