This being my first blog, i'll begin with a short introduction:
My name is Sara, I'm an electronics engineering student and electronics is also my hobby, I came across the element14 community when looking for help with a function generator, and have continued to visit it occasionally as it has proved to be a valuable source of knowledge and fun content.
When I started in electronics, adventuring into power electronics felt a bit scary, and when it came to switched-mode power supplies, I just wanted to avoid them, even at the cost of efficiency and space.
It seems many newcomers to the world of electronics also find them at least a bit confusing, so I'll try my best to remove the mystery around designing your own switched-mode supply, in this case, around the flyback topology.
This series of blogs will assume you have some basic understanding of how inductors work, and what a transformer is.
With that out of the way, let's get to it, first,
Meet the family!
Thanks to element14 and Bourns for providing a fairly comprehensive transformer kit. This kit contains all the magnetic components you'll need to build a proper power supply: Gate driver transformers(in green), Flyback transformers, and common mode chokes(in red).
And that's it? Won't you tell us more about them? Well, rather than going into detail about each transformer in this blog, I'm just going to jump right into building a circuit and see what happens!
I thought it would be easiest to start with the lowest input voltage transformer:
The BA60951CS
This is a really tiny transformer
Bourns has made this really compact transformer to work with an input voltage between 7 and 24V and rated the secondary to 15V. Perfect to work with at the bench. They specified the working frequency of this transformer to be 120KHz, but the electrical specifications were, well, specified at 250KHz. Because of this, I'll be using a switching frequency of 250KHz, especially since it's also here that its Q factor approaches its maximum of around 70 when measuring it with an impedance analyzer. This tells me that the 120KHz working frequency is likely a mistake in the datasheet.
With the impedance analyzer we can of course also measure the leakage inductance, which is the inductance that isn't magnetically coupled to the other windings of the transformer, but instead acts as if we added an inductor in series to an ideal transformer.
To measure the leakage inductance, we short all the windings, except the one we want to measure:
Knowing what this leakage inductance is will be useful later when it's time to design the snubber circuit, because this inductance, together with the parasitic capacitance of our switch will determine the ringing frequency during the off portion of the flyback cycle, and knowing this frequency wll inform the component selection for our snubber. If you have no idea what a snubber is, or why a flyback cycle has an off portion, don't worry, we'll get to that in the next blog.
Bourns says in the datasheet that this transformer has a nominal primary inductance of 25 µH, a nominal leakage inductance of 0.6 µH, and a primary DC resistance of at most 0.55 ohms, and this is confirmed by the measurements with values of 24.75 µH, 450nH, and 553 milliohms, respectively. They also provide us with the turns ratio between primary and secondary of 0.77, and from the equation that connects turns ratio with inductance:
we input the inductances:
and get a turns ratio of 0.7696, almost exactly what the datasheet claims. Perfect!
now let's take a look at
The Flyback converter topology
This is the simplest flyback converter schematic representation, and in this case, the components used are all ideal, except for the MOSFET, as I couldn't get LTspice to run a proper simulation with an ideal voltage controlled switch. The selection of the MOSFET and that of the other components is such just because those were the components I had lying around, it was random, and after all, this was just meant to be a proof of concept, to see if the circuit would work.
Using this almost ideal schematic, we can see how the voltage output equation for a flyback converter (in DCM mode) gives us a close match to what we see in the simulation, where R is the load resistor, T is the period of our switching frequency, D is the duty cycle, and Lp is the primary inductance (primary inductance for the ideal case only):
Lp should technically be the magnetizing inductance, but for now, as the modeled transformer is ideal, the entire primary inductance is assumed to be magnetizing.
After seeing the simulation results, I went to build the circuit:
I also added 10 ohm resistors in series with both the input and the output to take a look at the currents, which according to the (close to) ideal simulation should look like this:
(that ringing on the primary side current has to do with parasitic components in the mosfet, which we'll see later)
but since my real life components are far from ideal, I went ahead and measured everything using the impedance analyzer, and then modeled the circuit in LTspice as well as my measurements allowed me to, and now the current waveforms became spicier:
you might also notice that the transformer coupling is no longer 1. This is because with real components we have less than perfect coupling, and the uncoupled part is what becomes the leakage inductance.
We can calculate the coupling factor like this:
This equation also assumes no losses, but if we model the transformer as measured, ideally coupling the magnetizing inductance and adding the leakage inductance in series, uncoupled, as well as taking into account the series resistance of the windings, we get a very similar result, just with larger amplitude ringing as you can see here:
now let's take a look at the MOSFET and diode currents in the real circuit:
we can see that they are an almost exact match to what we see in the simulation. From this we can now safely assume that the circuit will behave just as in the simulation once i bridge the 10 ohm resistors. We won't be able to see the currents anymore, but knowing that the circuit behaves just as expected from the simulation, we can use the results of the resistorless simulation, together with the voltage measurements of the real life circuit to get the complete picture of what's going on with our circuit.
So, does it fly back?
Well, from this experiment we can see that this simple converter cobbled together from an assortment of randomly selected components does behave exactly as seen in the diagrams found all over the internet which show the waveforms of a DCM flyback converter. It does fly back!
But what exactly is it that *flies back*?
While the circuit's behaviour is almost textbook, and that's great! it is still not entirely clear to me what flies back, having found different answers in different places, with some saying that "flyback" refers to the beam in CRT TVs flying back to where it would begin drawing the next line, others saying it is about the energy "flying back" from one winding to the other on the off portion of the cycle, and others saying it is about the magnetic field collapse in the transformer.
Another explanation which seemed pretty reasonable is that when it came to the CRT high voltage transformers, they got their name because if you touched one live, it would make you fly back!
Anyway, seeing how easy it is to get a flyback converter going was very encouraging, and since this cobbled together circuit worked perfectly, I'm going to continue exploring the flyback topology on it.
In this image from TI's "Power Tips #98: Designing a DCM flyback converter" PDF, we see all the waveforms we should expect to see, as well as the ones we actually saw.
but there is one important waveform left we have yet to look at, the voltage at the MOSFET (Voltage between Drain and Source). Let's take a look:
On this almost ideal circuit, we see it is just as expected, with the maximum Vds of around 20.5V, which would be what we get from the equation described in TI's guide:
and from our closer to real life simulation:
well, that is *not ideal* for sure! we're getting spikes of over 25V at Vds!
and our real life circuit, again, agrees with the simulation:
so, what is going on here? That's what I'll explore in the next blog, what that ringing is, where does it come from, why do we not want it, and how to get it under control. Here's a sneak peek at how that looks like when it's under control:
Again, this is my first blog, and I'm far from being a writer, so I'm also taking this as an opportunity to ask for feedback, let me know what you think I can improve about my writing, so the next blogs are nicer to read.
Any questions, I'll be happy to answer in the comment section.
Thank you!
How to properly measure transformers: Transformer Measurements
Top Comments