EveryCircuit
Contact
Reviews
Home
PrathikP
modified 6 years ago

Modelling a Transformer for Flyback SMPS

7
26
381
04:47:59
We have seen many flyback SMPS circuits in the past over here in EC, some of which were fully discrete. For such models, a transformer with one primary, one secondary and one auxiliary is needed. Due to the lack of such a transformer on EC, users have used 2 transforms with their primaries in parallel, which results in an incorrect model as shown: http://everycircuit.com/circuit/5697835620892672 The reason for that is that 2 seperate transformers with their primaries in parallel will behave exactly like 2 seperate transformers drawing different currents from the same power source, hence failing to emulate a flyback switching transformer. As you can see from the simulation, they draw completely different currents. Obviously, that's not what we want. We want the two transformers to behave like one. Putting them in parallel isn't the solution. So I thought of putting them in series. It has been done before, but incorrectly. Users have put 2 IDENTICAL transformers in series, thus leaving each primary with only half the supply voltage. But that is actually a step in the right direction. Putting two transformers in series results in the exact same current flowing through both primaries, which is exactly what we want, but the primaries equally share the input voltage if they are identical, which isn't what we want! So what is the correct combination, series or parallel!? The solution: put two transformers' primaries in series. Not two identical step-downs, but one main step-down and a smaller one-to-one for the auxiliary. The trick is simple. Let's say that we want to model a flyback transformer that has 150 primary, 30 secondary and 10 auxiliary turns. We now use one main EC transformer with 150 primary and 30 auxiliary turns and another transforms with 10 primary and secondary turns, putting the primaries in series. That is step one. Now let's say that the transformer that we want to model has a primary inductance of 1mH. We need to split that value between the 2 EC transforms in the ratio of their respective number of primary turns. So 150x + 10x = 1mH, which implies that the main transformer's primary inductance is 937.5uH (I had to set it to 920 to keep the sim from crashing. So annoying!) and that of the one-to-one is 62.5uH. And that's it. The flyback SMPS transformer is modelled: http://everycircuit.com/circuit/4657889787248640 Now, the primaries share the same current without sharing the same voltage. The one-to-one only gets a fraction of the power supply voltage, allowing the main primary to hog on most of the input voltage. This is a more accurate model of a flyback SMPS transformer. You can see that in the following simulation: http://everycircuit.com/circuit/5695517110304768 Thus, we have created a more accurate model.
published 6 years ago
hurz
6 years ago
One little note: 10:10 is obviouly 1:1 to indicate turns its much to small what EC provides. 1000 turns can easily be a lot more turns in some transformers. So TURNS can not be reflected with this parameter. Just a ratio. 30:150 is obviouly 3:15 or 1:5
PrathikP
6 years ago
"One little note: 10:10 is obviouly 1:1 to indicate turns its much to small what EC provides." I'm not sure I understood that
PrathikP
6 years ago
Ok I think what your saying is that EC pri:sec parameter is just a ration and not the actual number of turns, so I should have just entered 1:1 or 5:1. I didn't do that cause It's kinda better (in my opinion) to specify the actual number of turns. And I've seen a lot of diodegonewild teardowns. He writes the actual number of turns against each winding so I'm kinda used to seeing the actual number of windings
hurz
6 years ago
you know the actual number of turns? What core are you using and what data you have for it?
PrathikP
6 years ago
Oh my transformer is a hypothetical one. But typically the winding ratio is 5:1 or 10:1. I chose 5:1
PrathikP
6 years ago
I could find an old charger and "autopsy" the transformer for actual numbers, but that isn't really the point of this post
hurz
6 years ago
Sure you need turns, they are importante!!! Never said forget turns. No no. But everycircuit and its transformer are unfortunately just useable as ratio! If it comes to absolut turn values one must put them anyway into the describtion. Check the number of turns for only little transformer 230VAC down to 6VAC they have much more then 1000 turns. Only one example. diodegonewild i like this guy, he is doing practical good electronics! I also watch him sometimes, to be honest i dont like cats πŸ˜πŸ€§πŸ€’
PrathikP
6 years ago
Oh but I love cats😁
hurz
6 years ago
as child i also loved them, but now i have them at our houses around. Street cats, loud and annoying and they stink and come into kitchen without authorisation. Having one, yours, is fine but having 10 which are not yours is annoying 🀧🐱
kiani
6 years ago
EC transformers, I am begining to learn to understand,, I agree with @Hurz, that it ought to be kept at ratio. A multiplying factor and any number of turns can be selected, when we know about core, frequency, etc..etc..
kiani
6 years ago
It is a very useful post, thank you @PrathikP.
kiani
6 years ago
One question about EC transformers,, the primary inductance, , is it at all frequency dependant?! As in real life !? Or is it just some kind of mutual inductance, defined by turns ratio !? Np/Ns =sqr(Lp/Ls) {think got it right},! Does not say anything about frequency....
kiani
6 years ago
Oh and about Cats ,, they can never be owned. They own the keeper,. They think its their house and they are keeping you. Lions are cats too.
hurz
6 years ago
right, you are the can-opener
PrathikP
6 years ago
You are welcome @kiani. About the primary inductance, I don't know for sure, but I have a strong feeling the primary inductance is determined by the switching frequency. We know the the switching frequency is kept high to keep the magnetics small. I remember in the datasheet of the TNY267 it said somewhere that the Transformer must be so choosen that the primary current doesn't ramp up to the current limiting too quickly, or else the duty cycle with be limited to a low value. They said choose the primary inductance carefully to make sure that the current limit is hit right around the end of the on time. All this leads me to believe that the switching frequency and output power determines the inductance of the primary.
PrathikP
6 years ago
Oh and you need to keep in mind that the aux and sec have an opposite winding polarity to the pri.
kiani
6 years ago
Right,, the primary current depends on the XL=2pi*f*L, with no load, there myst be enough current (ie. Magnetization current),, and as load is increased on secondary side, the primary current is increased... So how does EC primary inductance dies not care about frequency, i don't know... Perhaps it calculates it when it runs.. And current has to be measured. Who knows,,!? Have to do some tests...!?
PrathikP
6 years ago
What do you mean by this: So how does EC primary inductance dies not care about frequency, i don't know...
niko_20010
6 years ago
in a flyback the current is a linear ramp, kiani
niko_20010
6 years ago
Also for this sorta stuff you better usr ltspice or similar
PrathikP
6 years ago
This is the equivalent circuit http://everycircuit.com/circuit/5278276472537088 Close the switch and observe the waveform
PrathikP
6 years ago
The current may look linear to you over a small piece of the waveform (say from 0 to 2A of the 0-300A range) and can even be approximated to a linear ramp, but it's actually an exponential current
hurz
6 years ago
yes but at this part/begin of exponential curve its very close to a linear one. Only if its in this linear range it can be efficient. Otherwise its waste of energy
kiani
6 years ago
Right a transformer must be operated in linear window, otherwise its nightmare !?
PrathikP
6 years ago
Well yea that does make sense to me. If the rate of change of current starts decreasing, especially near saturation, the entire supply voltage falls across the mosfet.
kiani
6 years ago
What i meant by my earlier comment, about mag. Current,, is, that EC also makes use of K, the coupling factor,, which somehow relates to inductances and, somehow frequency does make a difference to the EC transformer operation... I don't know how the relation works from K, Ls, Lp, Ns, and Np.
kiani
6 years ago
The Np = Vs(max)/ {duty factor *f* Acp *B} Acp (cross section), (B flux dendity). I think thats the formulea !!? So some how K is related to all this,, i don't know..

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy