ATX Flyback Transformer - Page 1
Forum section: electronics / projects

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 15, 2020, 10:53:20 pm
content: I'm stumped. Pulled a flyback transformer from an ATX power supply, and for the life of me I can't figure out how it's configured. No markings on any of the pins, and only a "Delta" label on top, which is the OEM brand of the power supply. But I assume it's a special made for Delta cuz I can't find ANY spec sheets or references whatsoever. It looks to me like a Wurth with that yellow-ish tape around it.The ATX supply provides 12, 5.5, and 3VDC. As you can see from the image, the right side is the primary (with an unconnected center tap). (BTW, I soldered those wires for testing. The xfmr is normally mounted on the PCB). I think the secondaries on the left represent only two windings even though there are 6 pins, since if you look close you can see a couple sets of pins are soldered together. So I'm guessing the secondaries are like a 12VDC plus an aux. winding.I applied a signal (sine wave) on the primary and get basically zilch on the secondaries. But I'm clueless about flybacks, so I'm not sure what I should get. It's just a transformer with the windings on a common core, right? Anyway, I especially want to figure out the polarities and ratios, but with nothing on the secondary I'm stumped how to figure that out.Anyone??

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 15, 2020, 11:55:27 pm
content: Nevermind...I dunno, cockpit error or something. Got some nice clean sine waves on the secondaries now. The ratio for both windings is is 12.5:1, and I've got the polarities sorted by superimposing primary and secondary voltages on the scopely.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 12:05:18 am
content: Ahhh...okay. The cockpit error was that it doesn't like low frequencies. I had the waveform generator set for like 60Hz, but you need to get up past around 1kHz to get anything out of the secondary.I imagine that will make sense if I think about it a lot...

author: wraper
author_rank: Unknown
timestamp: June 16, 2020, 12:18:46 am
content: It's not even a flyback transformer. PSU most likely uses forward or some type of bridge topology.QuoteVast majority of SMPS transformers use yellow tape. And there is 99.9% chance it's a custom part.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 16, 2020, 01:29:49 am
content: Some small ATX PSUs (less than 150W) use the flyback topology.

author: bin_liu
author_rank: Contributor
timestamp: June 16, 2020, 01:38:22 am
content: PC power supply is half-bridge or LLC topology.transformer is customized.

author: wraper
author_rank: Unknown
timestamp: June 16, 2020, 01:42:31 am
content: Quote from: NiHaoMike on June 16, 2020, 01:29:49 amDoubt that. Usually you won't find it even in non-knockoff laptop PSU. Flyback is no good for group voltage regulation. The only place you likely will find it is 5V standby PSU.

author: TimNJ
author_rank: Super Contributor
timestamp: June 16, 2020, 02:12:00 am
content: FYI, I am fairly confident Wurth doesn't make much of anything. I believe they are mostly acting as a middle-man between Chinese magnetics suppliers and the Western markets.Any SMPS manufacturer with reasonable volumes has either an in-house magnetics department and/or contracts with an outside vendor for custom designs. Magnetics are too important to try to make an off-the-shelf offering work.

author: TimNJ
author_rank: Super Contributor
timestamp: June 16, 2020, 02:23:46 am
content: Quote from: bin_liu on June 16, 2020, 01:38:22 amI think the majority of laptop PSUs are still flyback, but most laptop PSUs are <90W (hardly anything over 120W these days). Most laptops are shipping with a 65W adapter or less, as far as I cant tell.90W is on the edge of where you might consider using resonant LLC with respect to price/size/EMI. Interestingly, high powered USB PD power supplies (90-100W) basically need to be flyback because of the wide-output voltage range requirement (3-20V). LLC struggles if operating too far away from its design point. So, there's now renewed interest in flyback at these power levels.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 16, 2020, 03:37:09 am
content: Doubtful it's a full wave forward converter: that would require a FWB on the secondary, and screw that at those voltages and currents. It would be FWCT.I was looking for the common ground lead in the second picture, but there it is, none to be found. So it's not FWCT!Seems it's a new power supply. "ATX" covers a huge range of history by now. They used to be BJT half bridge inverter, forward converters. Then MOSFET, and now they seem to be largely 2-switch forward or flyback. The above seems to be the latter. Whether it's forward or flyback depends on the magnetizing inductance (high or low respectively), and whether the original application had a secondary series filter choke or not, obviously.It's also consistent with an ATX supply in that there will be an aux supply for primary control power, optionally secondary control power, and motherboard standby. No need for an aux winding on the main power transformer, hence the sparse primary side pinout.Active clamp flyback is also pretty popular, though I'm not sure how common it is among offline supplies, and it seems to give awful efficiency at light loads? At least that seems to be what I've observed from a few 1/nth-brick DC-DC modules I've seen.The 2-switch configuration seems to be popular with active PFC, probably part of the motivation behind it; straight flyback or forward (half wave) would require very high voltages, making trouble with transistor selection, trace clearance and EMI. Half bridge should still be attractive though, with LLC resonant being an option; perhaps the reduced EMI of 2-switch is worth the change after all. (Or maybe it makes no difference because you just can't time the switches accurately enough to get balanced primary voltages.)Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 10:29:14 am
content: Don't ya just love how these threads always seem to wander off into "I'm smarter than you" discussions of irrelevant pseudo-factiods?Geez people. The ultimate manufacturer's name, wrapping tape color and perfectly accurate transformer type are irrelevant. At some point I'll probably reverse engineer this thing to find out how it's configured, but at this point it's irrelevant since I'm looking only for the transformer characteristics.So, back to the question of the thread...I think the reason why my coupled inductor/flyback transformer/whatever the f*** you want to call it is giving no secondary voltage output at low frequencies is due to the fact that the waveform generator output impedance is 50 ohms, and the inductive reactance of the inductor drops below around 1kHz. And around 400Hz the measured volts drops to about 50%, which implies that it's like a 20mH. Cool, so now I can model it.Though I'm sure everyone already knew that...

author: wraper
author_rank: Unknown
timestamp: June 16, 2020, 10:37:04 am
content: Quote from: engrguy42 on June 16, 2020, 10:29:14 amIt's very relevant. Because it directly affects how transformer was made. You cannot simply take it and use for different type of converter. Say flyback transformer is not suitable for bridge or forward topologies, even if you rewind it.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 16, 2020, 10:55:21 am
content: Close -- you want the 70.7% point, that's equal impedance magnitudes. At 50%, it's 1/sqrt(3), or 50/sqrt(3) ohms, or 11mH.That's pretty high so I'm thinking this board had filter chokes on the secondary side, i.e. it's a forward converter.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 02:10:20 pm
content: Well after a bit of research I think I found a schematic for a very similar 450watt ATX power supply, and it appears that the two secondaries of this transformer are for the 12VDC and 5VDC, and they tap off the 5VDC to get the 3VDC. And a coupled inductor between the 12, -12, and 5VDC.FWIW, there's also a separate transformer listed as a flyback converter for the bias and 5VDC standby. And a 3rd transformer for the gate drive.Anyway, as you can see the secondaries of this transformer have a crap-ton of Schottky's on a big heat sink. Anyone know what those are for?These things are so freakin' complicated...

author: Buriedcode
author_rank: Super Contributor
timestamp: June 16, 2020, 02:19:11 pm
content: Quote from: engrguy42 on June 16, 2020, 02:10:20 pmMaybe start at the basics of the topology. The fact you used 60Hz on a ferrite transformer shows you've made assumptions that aren't true (and worked that out!).

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 02:54:47 pm
content: Quote from: Buriedcode on June 16, 2020, 02:19:11 pmAnyway, these Schottky's are made by STMicro, and I found a nice paper from them describing their use in this case.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 03:52:13 pm
content: OOooooo....some yummy LTSpice SMPS transformer switching goodness....

author: mariush
author_rank: Super Contributor
timestamp: June 16, 2020, 04:35:13 pm
content: My advice would be to look a DiodeGoneWild's youtube channel, he has some videos explaining atx power supplies and how they work.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 06:14:11 pm
content: Thanks, mariush. But for me personally, if I'm going to really understand something as complicated as a decent ATX power supply, a 10 minute video isn't going to do it.My long term plan is to take an actual spare power supply and, component by component, test it and characterize it, then model it in LTSpice. I already have the front end modelled (input filtering, bridge, etc.), and next I'm trying to tackle the main transformer.IMO, it's so much better to have an actual software simulation model of actual hardware that you can try things out on and do simulations and "what-if's" and test on the bench. And in this case, I already have a schematic that seems to be almost identical to the actual hardware, so it's a whole lot easier to reverse engineer.BTW, if anyone really wants to understand down on the engineering level how a lot of this stuff works, you might consider the videos of Sam Ben-Yaakov. He's an EE professor (he also writes tons of IEEE papers) with some really in-depth explanations of this stuff.Anyway, I guess I don't want to be a "10 minute video expert". There are more than enough of those out there.

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2020, 06:23:53 pm
content: Quote from: engrguy42 on June 16, 2020, 06:14:11 pmSounds like you need to stop asking basic questions and go and get on with your modelling then.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 06:29:03 pm
content: Quote from: Gyro on June 16, 2020, 06:23:53 pmI know, right? Dumb me, thought I could get some answers here to "basic" questions from the "experts".

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2020, 06:33:24 pm
content: Well whatarethe questions? Trawling back through the thread and filtering the arrogance, the only actual question I could find is 'why didn't my ferrite cored SMPS transformer produce any significant output at 60Hz?' and you answered that one yourself.Apart from that, you've just snubbed the replies that anyone's submitted.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 07:15:15 pm
content: Quote from: Gyro on June 16, 2020, 06:33:24 pmSo do you have any relevant technical input for the issue, or are you just here to complain? Because I'm still open to any relevant info on the characteristics and considerations regarding this transformer and how I can model and characterize it. I mean, I already gave a ton of info, including a schematic showing the actual circuit it's in. Why can't we discuss that, rather than go off on irrelevant tangents discussing who the actual manufacturer might be and what's the technically accurate identifier for this transformer?

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2020, 07:25:28 pm
content: Sorry, I provide help to lots of people, your responses are too much of a turn-off to be worth the effort though.You didn't clarify what your questions are by the way. A theoretical and practical text on magnetics and transformer design sounds like your best 'authoritative' option though.P.S. Member treez might be able to help you, he's done a fair bit of SMPS.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 16, 2020, 09:48:26 pm
content: Quote from: Gyro on June 16, 2020, 07:25:28 pm"Read a book" or "watch a video" is of zero help. That shit is beyond obvious. If you have nothing to add because you don't understand the subject then fine. stay out of the discussion.Geez you guys give me a headache.

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2020, 10:05:44 pm
content: Quote from: engrguy42 on June 16, 2020, 09:48:26 pmQuote from: Gyro on June 16, 2020, 07:25:28 pm... and I'm sure a lot of other potentially helpful folks feel the same. I don't know why you bother with this forum, you seem to have so little regard for other members.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 20, 2020, 12:10:01 pm
content: Okay, well I'm in the beginning stages of making an LTSpice model of an ATX power supply, based on one I have lying around and I decided to reverse engineer. Though I suck at reverse engineering PCB's, especially ones as complicated as this.The image below is where I am so far. The left side of the schematic is probably 80% accurate modelling of what's on the input side, and to the right of the 330uF cap it's just a kludge to get a basic 12VDC with a converter. And the controller was the first one I found in the LTSpice library (LTC3873), not the apparently unobtainable actual one (a Champion CM6800). Though I did find models of the actual STP18NM60N's, though I doubt they're not the best match for the LTC3873. Though it does seem to work, provide a flat-as-a-pancake 12VDC output with only about 25mA of load.Since the actual circuit is working at around 170VDC out of the rectifier, and the LTC3873 specs talk about much less than that for Vin, I added an AC transformer on the front end to drop the DC down to around 40VDC. And I kludged a resistor value to feed the Vcc, though it seems to work. And the switching transformer has a different, much lower ratio than the actual (2 vs. 12.5).I also added a switch to slam about 15watts of load to see how it responds, but at this point the voltage just wiggles +/- a couple volts with no damping. So clearly I have more work to do in figuring this out.As you can see in the LTSpice traces, the MOSFET gate is a fixed 200kHz out of the 3873, and it's around 30% duty cycle at this point. I also plotted the transformer input and output currents, as the input current ramps up, then the output current discharges.So at least I have a somewhat working 120VAC to 12VDC system. Now I need to do some more detective work to reverse engineer the switching part. Since there are 4 identical MOSFETS on the heat sink, I'm guessing it's a 2 switch converter of some sort. And then I suppose I'll have to locate an LT controller for a 2 switch converter (LT3705 maybe?).This is gonna take a while....

author: Buriedcode
author_rank: Super Contributor
timestamp: June 20, 2020, 04:25:23 pm
content: So you have modeled a flyback converter, which is I suppose a good stepping stone up to the ATX type converter - I believe ATX supplies use a smaller flyback converter for the standby supply.Note that in a flyback converter the "transformer" is really a coupled inductor, that stores energy - current doesn't flow in the primary and secondary at the same time. This isn't the case with forward converters or half bridges, which is why the " transformer" is deigned differently.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 20, 2020, 06:42:08 pm
content: Quote from: Buriedcode on June 20, 2020, 04:25:23 pmYeah, as I mentioned previously this supply is very similar to an ATX schematic I found, and it has a flyback transformer for the standby.And yeah, if you look at the traces from my simulation I specifically plotted the transformer coil currents to show the current ramping up on the primary, then discharging from the secondary when the gate signal shuts the MOSFET off.I guess what I'm grappling with now is the relationship between the turns ratio, the input Vdc, and the duty cycle of the gating PWM. And whatever else comes into play that, for larger loads, causes the output voltage to shut down (or drop to a very low value), while for lighter loads it just gets a small ripple that quickly damps and returns to the flat 12VDC. Or maybe the MOSFET has to be sized correctly to match the controller response?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 20, 2020, 07:06:33 pm
content: The heck is up with that input? I don't see a Kx L7 L8 y statement. What's D802 for? Does C1 have a .IC set, is that what's powering this thing? Why is L1 so huge? Why include Z1, are you also testing transient immunity..?Again as mentioned, it's a forward converter transformer; you won't get much power out of it this way, some watts I guess. Easy enough solution: turn around L10 (or set K5 = -1), double up D5 (use a diode from GND to L1), and use a, well, L1 is already there and roughly the right value so I guess that's alright once these changes are made.Primary side doesn't need to change because the transistor sees the reflected current charging into L1 -- the current ramp, and I suppose LTC3873 has slope compensation too -- which is basically the same story there as for flyback.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 20, 2020, 07:44:27 pm
content: Quote from: T3sl4co1l on June 20, 2020, 07:06:33 pmLike I said, the input is a reverse engineer of the actual ATX supply. That's why D802 is there. Because, well, it's there. And like I said, there's more circuit to the story that I haven't gotten to yet. I just added some core stuff and tweaked it 'til it worked.Regarding L1, you ask why it's so huge, then say it's about the right value. I just threw a number in there. And the "K4 L7 L8 1" statement is there, you just can't see it. And I tried reversing the switching transformer previously with a bunch of different ratios and it didn't make much difference in terms of improving response. And Z1 is there because, well, it's there. This is part a documenting of what's there and part a simulation to see how it all works.Now that I've answered your questions, can you answer mine?"I guess what I'm grappling with now is the relationship between the turns ratio, the input Vdc, and the duty cycle of the gating PWM. And whatever else comes into play that, for larger loads, causes the output voltage to shut down (or drop to a very low value), while for lighter loads it just gets a small ripple that quickly damps and returns to the flat 12VDC. Or maybe the MOSFET has to be sized correctly to match the controller response?"

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 20, 2020, 07:55:55 pm
content: Quote from: engrguy42 on June 20, 2020, 07:44:27 pmYes. In context, as language is wont to do.It's much too large for flyback (ideal value 0, typical value maybe 1-5uH as transformer leakage), and still probably too large for forward but in the right ballpark at least.And again, a flyback this size (100s watts) will have Lp ~ 100s uH, and Ls that much smaller still, so L1 is obviously off magnitude in that case. With values as shown, it's not a big deal, but it's also only good for a few watts.QuoteOh, great. I suppose there are parasitics on components too? Which LTspice isn't kind enough to display by default?QuoteI would guess the controller is doing a hiccup mode because it thinks it's overloaded. Depends on shunt resistor (not so much on transistor size, and what you've got there is way more than enough for the currents shown) and how the control works.Damping depends on compensation; or maybe it's switching ripple, depends on what components and time constants you're looking at.Play with this a bit,http://schmidt-walter-schaltnetzteile.de/smps_e/smps_e.htmland by all means, draw the waveforms by hand, they are quite simple to plot -- you should be able to see why, for example, less inductance means more power transfer in a flyback converter, or why duty cycle doesn't mean nearly as much in CCM as it does in DCM.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 20, 2020, 08:11:17 pm
content: Thanks. So riddle me this...The actual supply provides about 170VDC to the switching section (120VAC, then the bridge). In my case I dropped it down to around 40VDC and it seems to work.My confusion is regarding how to change this circuit to allow for 170VDC to presumably appear across the switching MOSFET and the switching transformer. And add to that the inductive switching overvoltages...And I measured the inductance of the actual main transformer (which I posted previously...10-20 mH). So I'm trying to understand what the actual circuit will look like in order to work for this condition, and also allow the rated 10-20 amps to flow on the 12V output rail.From what little I know of forward vs flyback there doesn't seem to be a big difference in components or configuration, though that comes from somone who is basically clueless.I'm just having a hard time imagining being able to use anything similar to the circuit I modelled to work with 170VDC input and 12VDC and 20 amps output, using those MOSFETS and the little 3 winding transformer I showed in my first post. I'm guessing it's a 2-switch forward converter like in the schematic I found, but that doesn't answer it for me.I've got a lot to learn.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2020, 06:02:51 am
content: Only thing you're missing is the phasing of the transformer, and another diode from GND to L1. This catch diode keeps L1's current flowing, from GND rather than from the secondary, while the transformer resets its flux.The transformer also needs something to clamp said reset flux, usually an RCD clamp snubber. Add a diode from the primary to an R||C to +V. The R and C should be relatively large (ballpark 10k, 33nF). Alternately, a diode into a zener (say UF4007 + P6KE200) which will clamp at a stable voltage rather than a voltage varying with PWM.In short, the primary looks like a boost converter, and you're just burning its output in a load resistor or zener.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 11:46:55 am
content: Thanks. This thing is driving me up a freakin' wall.Last night I modified it per the attached schematic, though without the R/C/Diode transformer reset circuit on the primary. And today I added that and still I'm getting what I've been getting all along. If you look at the attached, it's fine upon startup and hits 12VDC and stays flat, but when I apply a 2.4A, 30watt load the output drops to about 5VDC and stays there.I've varied the values until I turn purple and I can't understand what would be affecting its ability to recover from a load switching on. Unless there's something about the controller I'm missing (which is clearly the case).With minor load additions it recovers and damps fine, but with this it just loses it completely and gives up. Maybe it runs out of duty cycle?Oh, and the output inductor value and N1/N2 values came from that calculator website you recommended. Though I've also varied those about 150 times with little change....

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 11:53:05 am
content: And here's the traces for the gate voltage and the voltage on the diode side of the output inductor during the heavy overload. This controller supplies a fixed 200kHz, and the gate voltage is showing that 200kHz at a 30% duty cycle. And I recall for this config you need a duty cycle below 50%, so it looks reasonable. And it also looks like it's not running out of duty cycle.Oh, and you can also see the Vout trace at 5V, when it's supposed to be at 12V...

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 02:07:49 pm
content: First of all, LT data sheets SUCK!!!They tell you how to size the voltage divider resistors to give 1.2v into the FB pin at the desired output volts, but otherwise they tell you freakin' NOTHING!! Nothing on how to size the C for threshold (Ith) pin, or the R for the Vcc pin, or the size of the sense resistor, or what to do with the Run/SS pin.Anyway, I plotted the feedback voltage as I start the power supply, then apply the big load at around 20mSec, then remove it at around 40mSec and everything returns to normal.Attached is the FB voltage (this controller wants 1.2V here at the desired output) and the Ith threshold pin voltage. When output volts is good the Ith volts go to 0.9, and when the output is heavily loaded it slams to the ceiling of 2.0V, while the FB voltage drops down to around 0.7 volts (which means 7V output), then then decays down to around 0.3v.I dunno, something is limiting the ability of the controller to boost the very low voltage.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2020, 02:13:26 pm
content: Can't see the schematic; did you edit the attachment by any chance? I see the thumbnail but not the full size, something got out of sync.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 02:15:42 pm
content: Quote from: T3sl4co1l on June 21, 2020, 02:13:26 pmYeah, for some reason it's not uploading to the server. I got a message it's loading too slow or the file's too big. Which it isn't.EDIT:Okay, there it is...some sort of server hiccup I suppose

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 08:32:05 pm
content: BAM !!!! I think I got it...On a hunch, I assumed that with a higher turns ratio (N1:N2) I'd get more secondary amps and therefore more stored energy to feed the load. So I cranked the turns ratio up to about 4.5:1 (ie, a L1:L2 ratio of 20:1). And the result (it's still plotting) is just a tiny blip in output voltage as I slam a 2.4 amp, 30 watt load on the 12 output. And it instantly recovers.BTW, I also added a reset winding with diode to discharge the transformer rather than the RC/diode circuit on the existing primary, and it seems to work great.I'll post an image of the circuit and traces when it finishes. Sometime next month probably. One thing I hate about LTSpice is it's so freakin' slow on complex circuits.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 09:35:55 pm
content: LTSpice sure doesn't like nano-henries does it? Freakin' slow as molasses on a cold day in January at the South Pole...Anyway, here's what I have so far. I used mH for the transformer inductances to speed things up. At 100mSec I slam on the 2.4 amp load to the 12V output, and it's just a tiny blip. I'm gonna let it run for a while (like 0.5 seconds) to see if it holds or it drops off..

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: June 21, 2020, 11:14:24 pm
content: Quote from: engrguy42 on June 21, 2020, 09:35:55 pmu got your polarity wrong.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 21, 2020, 11:18:13 pm
content: WTF??? This isn't fair.So I fixed the ability to handle switching on load and maintain output voltage, but now if I run the sim longer 8mSec after it picks up load the freakin' controller shuts down. WTF?? I never told it to shut down !!! Apparently when the "Ith" (threshold) pin voltage gets up to 2 v it shuts down. And it stays off for like 50mSec, then turns on again. And keeps repeating the cycle (BTW, load is still applied the entire time).WTF?? Now it's just trying to piss me off.So now I have a freakin' science project to determine what happens with the "Run/SS" and "Ith" pins and what that crap all means. I have no clue how it works. And of course the datasheet for the LTC3873 doesn't tell you directly. I suppose you have to search for clues and figure it all out.I hate electronics.

author: Buriedcode
author_rank: Super Contributor
timestamp: June 22, 2020, 12:04:15 am
content: Look at your transformer. This is a flyback converter, remember what I said about current not flowing in both the primary and secondary at the same time?I realize you're getting quite into this, but others have suggested you start at the basics, but you don't seem to like links to articles. Do you want someone to provide a full explanation?

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 12:22:53 am
content: Quote from: Buriedcode on June 22, 2020, 12:04:15 amA while back (my post from yesterday) I changed to a forward converter in order to get a higher output and showed the updated schmatic. I'm applying a 30 watt, 2.4 amp load and therefore need (I believe) a forward converter. And it seems to work okay other than my latest problem with shutting off.And yes, I'm reading a lot of info on this, most recently the rather hilarious App Note 19 from Linear Technologies, "LT1070 Design Manual".EDIT:BTW, my favorite troubleshooting hint from that app note:12. Didn’t Read the Data SheetThen you shall have no pie.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 08:38:10 am
content: Simulations can be misleading like that -- the data comes in thousands of times slower than real time, so it can seem to be working, but if you've not checked something (like SS, Ith or Vcc) in that time, it can keep on doing things that you maybe weren't expecting.The power supply stopping and restarting isn't unintended behavior, much of the time; it's advertised as "hiccup" overload response. What does seem to be unintended, is you've got nominal supply and load, and it should be running fine. What's up with that?Datasheet:https://www.analog.com/media/en/technical-documentation/data-sheets/3873fb.pdfThe controller isn't magic, it needs power to run. It's got that 150k pullup from, whatever it is, 160V bus? (Can't seem to see the AC input section anymore, that attachment got mangled.) That gives about 1mA. Which will charge the 10uF bypass to startup voltage (p.3, UVLO rising: 8.4V) in about 84ms.Assuming you've set it to zero; you may want to speed up simulations by setting initial conditions on the DC link and VCC caps, and remove AC ripple for now by using a DC source, not AC + rectifier. Fewer things to mix up on the sim, eh?And the controller needs 45-400uA to run, depending on condition; in and of itself. That should be plenty, right, you've got ~1mA?Well hold on there, that's with no load attached. Useless right? Well, it wouldn't be very useful if they characterized it with one particular load, so they don't do any. Page 9 is your first hint on this I think, "since RSTART cannot supply enough current to operate the external MOSFET..."How much current does it need? Depends on the gate. TheSTP18NM60Nclaims 35nC total gate charge, at 10V. Supply max is 9.5V, I guess that's close enough. (The min/max will differ quite a bit anyway, and it's rather irritating they don't give limits. It's probably more like 50nC max.) To fully charge and discharge a capacitance, to some charge Q, at frequency F (~200kHz), requires current I = Q F. Or 10mA.Which is 10 times the startup current, so we'd expect it starts up, runs for about 4ms, then stops, waits 40ms, and so on. (Your simulation seems to be doing much better than this, which is interesting!)Referring to page 1, they have a flyback configuration, with a diode D1 from output to VCC. Since the output in that example is between 5-9V, they can use a single diode and that's that.If your output voltage is higher, you might consider using a voltage divider, sized to sink >>10mA, and giving a Thevenin voltage of say 8-9V, and then connect a diode from the divider to VCC. (You can't use just a divider, because that would load the startup resistor and nothing happens.) The voltage divider is poor efficiency, but expedient. (Better efficiency can be obtained say with an LDO, one that has low shutdown current and tolerates backwards voltages. Works the same way, sourcing current from the output to VCC once the output starts up, while not drawing the excess current a divider does.)On page 9, they show an auxiliary winding providing VCC; this is out in the present case (your transformer doesn't have one), but quite useful when available.As for Ith: that's the error or compensation node. When output voltage (sensed by Vfb) differs from the setpoint, a current proportional to that error is driven in/out the pin. This charges the capacitor, which integrates the current into a voltage; for small and brief disturbances, not much happens, but for large disturbances over long times, V(Ith) changes dramatically, and consequently the setpoint current (this is a peak current mode controller, so this is the peak switch current). Thus responding to load. Simple enough, right. Often a resistor is placed in series (e.g. page 1) to afford better compensation. In general, an R+C is much better, and you can simply adjust values up and down until you zero in on a good step response.You may want a resistor in series with SW, to introduce slope compensation and filtering. This is discussed on page 10.Vfb divider is also shown on page 10.The L2-D8 strategy is an equivalent winding-flux-reset network, obviously only an option if you have the extra winding of course. Since L2 and L9 are 1:1, it behaves the same as a 2-switch converter does. The RCD clamp shown earlier was drawn correctly, also.Hehheheh... also... page 18, can you spot the error?Ehhh...yikes!Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 10:15:25 am
content: Tim,Thanks much. I really appreciate your getting into this.In response to your wonderfully detailed response...HUH?Mostly over my head.Though I did extract something that might be pertinent. I plotted the Vcc voltage across the 10u cap, and superimposed my Vout voltage on the load, and it seems that the shutdown is occurring when/because Vcc is dropping to 4V, and starting/re-starting occurs when it gets up near 9V.So I guess I'll disconnect the AC/DC bridge and insert a DC source of 160V and see if that fixes it. Which begs the question:Why so much wigglies in the DC supply?

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 10:19:44 am
content: BTW, here's a zoom-in of the input circuit, including a trace of the Vin feeding the controller circuit.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 10:50:49 am
content: I have covered everything. Take your time, read it by paragraph if you have to. I kept the paragraphs short too, which should help.Cheers!Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 10:52:18 am
content: Anyone else notice the image attachments are all screwed up? Sometimes it shows the correct thumbnail, but when you expand it's a different image.I think the server was having issues yesterday with uploading too.Anyway, I replaced the whole bridge input section with a rock solid 160V DC supply to power this, and the shutdown cycles are still there.I don't get it.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 11:03:45 am
content: So Tim, it sounds like you're saying that the gate voltage will, due to the gate capacitance, decay as the gate voltage charges the gate capacitance? And that seems to match with the trace below where I plotted gate voltage vs. Vout, and the gate voltage peaks decay until they get around 4V, which I assume is the Vgs threshold?But I don't follow what you're saying after that, and how to resolve this.Anyone?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 11:05:10 am
content: Ohhh you're so close! Gate charge is drawn from the supply. Repeated charging means current draw. Gate drive voltage is essentially supply voltage. What's supply voltage doing then? And what is the shutdown and startup threshold for supply?Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 11:17:58 am
content: Ahh, so we're gonna play games...Anyway, if I can ever get the server to respond, here's a plot of Vcc vs Vout. After startup it decays to 4V, which is the point of shutdown. So is this a threshold setting issue or a "don't let the Vcc get so low" issue?

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 12:44:14 pm
content: Okay, well, (fingers crossed) I think I've resolved the minor shutdown/cycling annoyance. Instead of powering Vcc from the incoming bridge rectifier, I added a fixed 9VDC supply to power Vcc. At this point I'm not really interested in the idiosyncracies of a particular controller, but rather getting the basic design principles down. Since I'm trying to model what's actually a CM6800 I'm not gonna spend a lot of time on a science project with a different controller.In any case, it seems to be working fine. Slammed the 2.4A, 30 watt load and it's fine. I'll let it run for the full 0.5 seconds and see if anything else pops up.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 03:14:16 pm
content: Dumb question...On the DC side of a full wave bridge rectifier, if you ground the negative lead (which apparently LTSpice must have or its brain explodes...) that no longer gives you a full wave rectified output, right? Only half wave?Because after I apply my 2.4 amp load, it maintains perfect 12VDC output for about 25mSec, then decides to start decaying until it drops to around 10.8 volts, and from then on it has ripple between 10.5 and 11 VDC. And the period of the ripple is about 16.667 mSec.I go to all that trouble of making a full wave bridge, and it ignores 50% of my input waveform. That sucks.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 03:31:40 pm
content: Well great, the schematic disappeared again.Well, it only doesn't-work if you ground the AC source. Which I don't recall being the case, and it was also transformer isolated.You phrased it like it's 12V DC out of the FWB, which, are you now talking about a completely different circuit? I don't follow.Yes, you need a global ground, otherwise inverting the node matrix is equivalent to dividing by zero. Easiest way to avoid dividing by zero: put a ground somewhere useful, and don't connect capacitors in series with no resistance in parallel with them, and don't connect inductors in parallel with no resistance in series with them.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 03:36:21 pm
content: Quote from: T3sl4co1l on June 22, 2020, 03:31:40 pmNo, I'm talking about the 12VDC output voltage decaying and showing the ripple. I still have a 160VDC input to this coming out of the FWB, and a separate 9VDC source feeding only the Vcc input to the controller.For some reason the server is giving me problems again, not allowing me to upload cuz it says the file is too big or took too long to upload.

author: gnif
author_rank: Unknown
timestamp: June 22, 2020, 04:34:24 pm
content: Quote from: engrguy42 on June 22, 2020, 10:52:18 amEverything is loading fine for me and there are no errors reported on the server's end. Likely cache, browser or ISP issue. I actively monitor the server for slowdowns, network congestion, and load issues. Everything is running smoothly with good response times.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 04:53:32 pm
content: Quote from: gnif on June 22, 2020, 04:34:24 pmCool, thanks.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 05:34:36 pm
content: I cleared my cache and it still persists. Cloudflare cache setting..??Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 06:25:41 pm
content: Okay, well here's what I have so far.Dedicated 9VDC connected to the Vcc of the controller. Full 160VDC feeding the switching circuit. No ground on the 120VAC, only on the secondary of the associated isolating 1:1 transformer.And the 12VDC output is flat at 12VDC for about 20mSec after I switch on the 30watt, 2.4 amp load to the 12VDC. Then it decays, and settles at just under 11 volts with +/- 0.5 volt ripple, with a ripple frequency of 60Hz (not 120Hz as I'd expect for a full wave). BTW, the 160VDC input voltage at Vin looks identical in waveform to the Vout shown in the trace.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2020, 07:12:10 pm
content: Oh, you did have a ground on the AC side. Yeah, that. Poor bridge, it's shorted out...Other than that, I'd guess it's hitting current limit, i.e., for the values shown, it's running at the design maximum current, whatever that is. This is best illustrated by Ith saturating to its maximum 2V, i.e. it's commanding all the current it can.Tim

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 07:15:39 pm
content: Quote from: T3sl4co1l on June 22, 2020, 07:12:10 pmSo if I removed the 120VAC ground, why is it still showing 60Hz ripple on the DC??And what exactly is limiting this? Is it running out of duty cycle? Is it a limitation of the controller?

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 07:21:59 pm
content: Oh wait, I see. If there's a ground on BOTH the AC and DC a diode gets shorted. So no grounds at all on the AC side? I thought I tried that before and LTSpice freaked.EDIT:Ok, thanks...no AC grounds at all is working great. Maybe that will give me more "oomph" to "oomph" my 12VDC output so it doesn't languish at 11V.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 22, 2020, 10:37:55 pm
content: Wow, well I guess I answered my own question again...Looks like this circuitisn'tbeing limited, at least for the load I'm applying. In fact all I did was tweak the primary of the switching transformer and now the 12VDC output under load is flat as a pancake. And the Ith volts are hanging between 1.3 and 1.4 volts, not the 2 volt ceiling.Previously I had the primary set to 400mH, and secondary at 10mH, giving a turns ratio of a little over 6:1. I then brought that down to 300mH, for a ratio of about 5.5, and as you can see in the attached plot it's doing fine.And that's one area of this DC switching and the associated transformers that I haven't grasped yet. With AC it's pretty easy and straightforward. But with this DC crap it's about inductance magnitudes and relative magnitudes and stuff. And it's a whole freakin' science project to figure out what transformer parameters to use.Anyway, that's for another day. At least at this point I have a working forward converter, so now I can go back and tweak things per the actual power supply design.

author: nctnico
author_rank: Super Contributor
timestamp: June 22, 2020, 11:13:16 pm
content: Quote from: mariush on June 16, 2020, 04:35:13 pmBut these videos look like they are from flyback power supplies and not forward converters. With some Googling you can find good tutorials on how forward converters (and thus many of the ATX power supplies) work.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 23, 2020, 12:32:59 am
content: DAYUM !!!!So I thought this power supply I put together was, well, probably kinda wimpy. Yeah, I hit it with a couple amps and it just had a tiny blip then back to flat 12VDC. But I figured if I hit it with more power it would probably explode in a flaming mass of LTSpice metal.So I figured, "okay, just for grins let's hit it with some real power". So I did a simulation with applying 6 amps/72 watts to the 12VDC output. It probably wouldn't survive the initial dip.And how did the power supply respond??It replied "HA !!! I sneer and spit on your measly, wimpy 72 watts !!!"DAMN, this thing is a MONSTERA brief hiccup for 10mSec or so, then a nice smooth recovery back to a totally flat 12VDC. And Ith is still hanging below 2 volts after about 0.1 second.I'll let it run for a while, but it appears like we have a winner. It looks like tuning the switching transformer is a key component in all of this, so now I have to figure out why it worked so well.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 23, 2020, 10:14:43 am
content: And after letting this run overnight, here's the result of a 0.5 second simulation. Some ripple starts at 100mSec after applying load, and it's 120Hz and about 0.25V pk-to-pk.

author: engrguy42
author_rank: Frequent Contributor
timestamp: June 23, 2020, 03:17:13 pm
content: Okay, well this isINSANE !!!This little 12VDC power supply I kludged together is an absoluteBEAST !!!This time I slammed a 12A, 144watt load on the 12VDC output, and it did a nice, smooth recovery, and settled at 11VDC with some ripple.Damn. This is crazy.