Flyback Converter for High Voltage Capacitor Charging

Tony Alfrey (tonyalfrey at earthlink dot net)

A Flyback Converter is a type of switching power supply that may be used to generate an output voltage that is lower or higher than the starting voltage (even if not used with a transformer).  In the specific application we're interested in, we'll be using it to raise the voltage and store energy in a capacitor, both by a careful selection of the component values, but also through the use of a "coupled inductor".  And we'll also mention that we're using this circuit not to provide a continuous current to a load, but to charge a capacitor, and then turn the circuit off.  So there is no "steady state" operating condition for this version of the converter, which is a little different from the usual discussion of a flyback converter.  But we're getting ahead of ourselves;  let's first examine the basic circuit operation.

              Inductor, Switch

Figure 1

First we'll examine a simple circuit consisting of a battery (voltage source), and inductor (a simple coil of wire) and a switch.  The assembly is wired together as in the schematic to the left.

The wire will have some resistance R, quite possibly small, but we include it here anyway.  When the switch S is closed, current will flow through the inductor L and resistance R.  Were it not for the magnetic field generated by the inductor, and the to-be-described interaction of the inductor with that magnetic field, the current I would instantly rise to a value determined just by the battery voltage Vo and the wire resistance R.

I  =  Vo/R

For a small wire resistance, that current would be extremely high.

Figure 2

But Faraday's law tells us that when a changing magnetic field B passes through a loop of wire with area A and N turns (we'll assume the direction of the magnetic field is pointing perpendicular to the plane of the loop), that an electromotive force EMF will be generated in the wire, and appear across the terminals of the loop.  In the present circuit, the loop that "sees" the magnetic field happens to also be the source of the field.  This EMF will appear in opposition to the applied battery voltage, so as to nearly exactly cancel the applied voltage Vo.

This EMF will have a value of

EMF  = N A dB/dt

and since the value of the magnetic field created by the inductance L is related to the current I through the inductance, the EMF will be

EMF  =  (1/L) dI/dt

Just after the switch is closed, the EMF developed within the inductor will be the same as the applied voltage Vo and the current I through the inductor will increase linearly at a rate equal to dI/dt = Vo/L.

Because the EMF produced within the inductance is applied in opposition to the applied battery voltage Vo, the EMF produced within the inductance is referred to as Back EMF.

Current vs Time

Figure 3

If we wait for some time T1, the current will have reached a value (Vo/L) x (T1-T0). Energy has been provided by the battery (area under a graph of current x voltage = 1/2 Vo x Vo x (T1-T0)/L), and this energy is stored in the magnetic field (because we have assumed that the resistance of our circuit is zero, and hence resistive heating losses are zero).

Now, if we then open the switch, it seems that the current through the inductor must immediately drop to zero.  In turn, this would force the magnetic field within the inductor to also immediately drop to zero.  But from Faraday's law, this implies that dI/dt must be infinite (dt = 0)  and that there will then be an infinite EMF induced across the inductor terminals.  Since the inductor is in series with the switch and battery, then there will be an infinite voltage applied across the switch as it opens.  If the switch is a simple mechanical switch, then as soon as the switch has opened even an incredibly small amount, this essentially infinite voltage will be applied across an incredibly small air gap.  Of course, the air in this gap would become ionized, causing current to flow and an arc to form.  The energy previously stored in the magnetic field is then deposited into the ionized gas within the arc between the switch contacts.  Faraday's Law is another way of saying that the energy stored in the magnetic field which you worked so hard to create can't be simply swept away without being deposited somewhere.

Figure 4.

Since the current through the inductor is now decreasing instead of increasing, the direction of polarity for the induced EMF in the inductor will now be opposite to the Back EMF generated previously.  So the EMF will have a polarity as in Figure 5;

Figure 5.

and so point "B" will be at a very high positive potential, and much higher than the potential at "A".  Of course, the arc that forms will yield a finite current, and result in a finite induced EMF, but energy will still be dissipated uselessly in this arc.  Is there some way that we might make use of this high Back EMF?  

Figure 6.

We may add some additional parts to our circuit.  We add a second switch S2 and a capacitor C, ignore the voltage drop across R, and we restart the whole process from the beginning.
As before, when the switch S1 is closed, the current through the inductance will increase.  No current will flow to the capacitor.  Again, at a time T1, we open the switch S1 and immediately close switch S2.  This time, rather than the current falling immediately to zero, the EMF generated by the change in current that occurs when the switch S1 opens will be applied across the capacitor C.  We'll start off with the capacitor sufficiently charged (to 12 volts) so that point "C" is at zero volts, just as point "B" is when S1 is closed.  Now, when S1 is opened and S2 closed, the current that had been flowing through the inductor will continue to flow, instead, into the capacitor C, transferring energy stored in the magnetic field in the inductor into the electric field in the capacitor.  The voltage across the capacitor will be

V = Q/C where Q is the charge stored in the capacitor,

but dQ/dt = I, the current flowing in the inductor.

So dV/dT = I/C

and from Faraday's Law the voltage across the inductor will be V = (1/L) dI/dt or dV/dT = (1/L) d2I/dt2

Solving together yields

d2I/dt2 = I  /(LC)

whose solution is (starting at a time t = 0 at the switch opening)

V = Vo*(T1-T0)(1/LC )^1/2* sin (wt)

and similarly

I = Vo*(T1-T0)/L * cos (wt)

where w = 1/sqt(LC),
where we've assumed that the initial current in the inductor is limited by L, not R
and we've made the approximation that most of the initial energy is stored in the inductor .
We plot these below.

Figure 8

The upper graph is the voltage at point "B" (not actually the voltage across the capacitor) and the lower graph is the inductor current.  They oscillate sinusoidally with a period 2pi*sqt(LC)

At the risk of getting overly consumed by equations, let's see if we can get an intuitive feel for what this all means.

Let's examine the peak voltage

Vo*(T1-T0)(1/LC )^1/2

across the capacitor that results from the magnetic field resonantly "discharging" into the capacitor. 

First we see that it depends linearly on Vo, the battery voltage.  This makes sense because we expect that all of the voltages in the circuit should increase as the supply voltage increases.

Secondly, we see that it depends on how long we've been "charging" the inductor, in other words, how long the switch is closed (T1-T0) at the beginning.

And finally, for a given inductance L, a smaller capacitance C results in a higher peak capacitor voltage.


If we wait a time period pi/2*(sqt(LC), the voltage across the capacitor will reach a maximum value and the current will have fallen to zero.  All energy previously stored in the magnetic field will have been transferred to the capacitor.  At this instant, we could disconnect the capacitor (open S2) and take it someplace to another circuit, where we would have, at least for a brief period, a new voltage source.

If we select some component values roughly representative of values we might find in such a circuit:
Vo = 12 V
L = 10 uH
C = 1 uF
T1- T0 = 10us

and use our expression Vo*(T1-T0)(1/LC )^1/2

we see that the capacitor will be charged to a voltage of 38 volts,  a higher voltage than our battery source of 12 volts!  Because of the approximations we've made, we've ignored the initial 12 volts of original capacitor charge, so the capacitor will actually reach 50 volts peak.

It is also important to look at the current flow in the coil during both switch-closed and switch-open periods.

Figure 9.

As we saw before, when S1 is closed, the current through the inductor increases at a rate of 1,200,000 amps/second and reaches 12 amps in the 10 microseconds that the switch is closed.  When S1 is opened, the current stops flowing through the switch, but the back EMF induced in the coil (caused by the falling magnetic field) now causes the same (but falling) current to flow through inductor and capacitor.

Now, we let the process continue.  Each time the switch S1 opens and S2 closes, more energy will be added to the capacitor.  But each time S1 opens, the voltage across the S1 (at "B") will rapidly rise to the voltage across the capacitor at the very beginning of the switch transitions.  Soon, the voltage at "B" will once again be high enough to cause an arc across S1, and this arc will dissipate energy.  We could replace the mechanical switch with an electronic switch such as a MOSFET, but the MOSFET will also tolerate only a limited applied voltage.

Figure 10

Let's replace S2 with a component that does the same thing as "S2 closing when S1 opens";  a simple diode D. 

As S1 opens and the voltage at "B" begins to rise rapidly, the diode D will be forward biased and the current that was flowing through L will be diverted through the diode and into the capacitor.  When S1 is again closed, and the voltage at "B" is pulled to near zero, the diode will be reverse biased (because C will have charged) and therefore stops conducting, just the same as the behavior of S2 in Figure 6.

Figure 11

Let's continue with more modifications to the circuit.
We may add an additional coil of wire exactly like the first coil of wire, and wind the two coils in such a way so that the magnetic field created by current through the first coil is completely "enclosed" by the second coil.  Then any changes in the magnetic field will be seen by both coils and the same EMF will be induced in both coils.  And even more importantly, components added to the second coil will act as if they were attached to the first coil.  

However, for the student familiar with some of the ideas associated with a "transformer", in advance, we emphasize that we are NOT making a transformer.  It is more accurate to call what we are making a "coupled inductor";  it's main purpose is to store ENERGY during an initial "charging" period, after which the energy will be transfered to a second coil, unlike a transformer whose principle purpose is to transfer POWER in real-time.

So let's modify our circuit diagram with a second coil.  Further, let's move the diode and capacitor from the first coil to the second.
Again, when the switch is closed, current builds up in the first coil.  The magnetic field builds up, and this is seen by both coils.  Within the first coil, a constant back EMF appears leading to a constant, linear increase in the current in the first coil.  But the same back EMF is induced in the second coil, too.  We have installed the diode onto the second coil in the same way as onto the first coil.  So while the switch is closed, just as before, the diode is reverse biased, and no current flows through the diode and into the capacitor.  Note the dots on the two coils.  These dots indicate the "phase" of the winding.  In other words, this indicates that both coils were wound clockwise (for example) and that the terminals with the dots both represent the start of a clockwise winding.

Again, when the switch is opened, the magnetic field begins to collapse as it should because the open switch will not allow current flow.  But the induced EMF, which would otherwise appear across the switch, now also appears across the second coil of wire, forward biases the diode, and current begins to flow into the capacitor just as before.  But how does the first coil "know" what is happening across the second coil?  Because the induced EMF at the second coil causes a current to flow in the second coil, and this current would generate a magnetic field seen, in turn, by the first coil.  So while there is now no current flowing through the first coil, that current has been "replaced" by a current flowing in the second.

Precisely the same thing will happen in Figure 11 as in Figure 9:  the capacitor will charge in steps, eventually the voltage on the capacitor will grow to a level that can cause an arc at the switch.  How can we manage to get a high voltage across the capacitor without destroying (and wasting energy in) the switch?

We'll make some changes to our coils.  Let's say that the first coil consisted of only 10 turns of wire.  In most any reasonable sized coil (say 2 cm in diameter) this would result in a low inductance, causing a very rapid rise in the current in the first coil when the switch is closed.  In fact, such a loop of wire (2 cm diameter, wound tightly into a tube or solenoid) would have an inductance of about 10 microhenries.   We'll wind our coil in the form of a tube, or solenoid.

Next, we wind our second coil with 100 turns in similar fashion, and wind it over the top of the first coil.  This will help insure that most of the magnetic flux created by currents in either coil will be completely "enclosed" by the opposite coil.  Here are the results of our construction:

First coil:
Number of turns = 10
L1 = 10.0 microhenries

Second coil:
Number of turns = 100
L2 = 1000 microhenries

Capacitor attached to second coil:
C = 1 microfarad

Now we repeat our analysis as before.
When the switch is closed, a back EMF is induced in the first coil, limiting the rate of current rise to 1.2x10^6 amps per second.
Now when the switch is opened, an EMF will be induced in both first and second coils.  The first coil is no longer connected when the switch is open, so current cannot flow in the first coil, and instead must flow in the second.  But to maintain the same magnetic field, the current in the second coil need only be 1/10 of the first coil because the second coil has 10 times the number of turns of the first.  And the voltage developed across the capacitor as it charges will be "reflected" back across the first coil and reduced by a factor of 10, allowing the capacitor to be charged to a level 10 times greater before the back EMF across the switch reaches a level larger than the switch will tolerate.   The current through, and the voltage across, the capacitor will follow the same equation as before.  So the capacitor may now be easily charged to several hundred volts while the back EMF seen across the switch on the primary side will only be tens of volts.

Figure 12

Finally, we replace the mechanical switch S1 with an electronic switch, a MOSFET transistor, that can be rapidly turned on and off by other circuitry.  Additionally, we see that the capacitor gets charged so that the lower terminal is positive with respect to the upper terminal:  it's often desired to have the output voltage positive with respect to a common system "ground" terminal, so we turn the second coil symbol upside down and create a common ground connection.  Finally, we remove R from the circuit, because we would like to minimize this as much as possible.  We indicate circuitry used to turn the MOSFET switch off and on, and circuitry to measure the output voltage and to stop the MOSFET switching when the output voltage on the capacitor has reached the desired value.  In a conventional power supply used to supply a continuous current, the duty cycle (the "on" time) of the MOSFET would be adjusted to maintain a constant output voltage under varying load conditions.  When used as a capacitor charger, the MOSFET is operated at a constant duty cycle until the capacitor is charged, then the MOSFET is turned off.

Figure 13

Details, Details - The Flyback Coupled Inductor

While the description up to this point provides all of the basic fundamentals of operation, some extra details are helpful.  The first detail is that the coils are usually wound onto a ferrite or powdered iron core of high permeability material, configured into the shape of a doughnut or toroid (or a closed rectangular approximation of a toroid), and provided with a small air gap, or slice, removed from the core.  The first function of the core material is to localize the magnetic flux created by the current flow in the loop.  In essence, this is to insure that the energy stored within the magnetic field will actually be enclosed completely by both coils and can thereby be extracted by both coils.  The presence of the magnetically permeable core means that more energy can be stored at a lower inductor current (although the measure of stored energy is proportional to the voltage applied to the inductor times the length of time applied). 

The gap in the core is included to prevent the magnetic material from saturating (magnetic field reaching a plateau as the current increases) and this actually means that most of the magnetic energy is stored within this air gap.  It is as if the purpose of the magnetic core is to localize the magnetic energy to within a confined space, rather than allowing it to be distributed out beyond the center of the coils.

Figure 14

The second important consideration is that the use of a core will reduce, but not eliminate, the leakage inductance.  This is as if there were an additional coil of wire added in series with the first coil whose magnetic field energy is not available for transfer to the second coil when the current in the first coil is turned off.  So we create an equivalent circuit with three elements replacing our coupled inductor:  a Leakage inductance Li, a Magnetizing inductance Lm, and an ideal transformer of some turns ratio (for example, 1:10) that perfectly "reflects", or "transforms" the voltage across the Magnetizing inductance to the secondary (and vice versa) multiplied by the turns ratio.

If the transformer is properly designed, the leakage inductance is minimized, and the majority of the energy is then stored in the magnetic field within the air gap which can be considered to be part of the Magnetizing inductance.  However, when the MOSFET switch is turned off at the end of the "charging period", the period in which the current through the primary coil increases, the energy stored in the leakage inductance will not be transferred to the secondary coil and will instead induce a back EMF across the MOSFET switch.  Current in the leakage inductance will continue to flow, charging the small capacitance that exists across the MOSFET to a high voltage.  Some scheme is needed to prevent this. 

Figure 15

A larger "snubber" capacitor and additional diode "switch" are added so that the leakage inductor current will instead flow and charge the snubber capacitor to a lower voltage insufficient to damage the MOSFET.  Afterwards, capacitor is relatively slowly discharged through the snubber resistor.  Therefore, the energy stored in the leakage inductance is first transferred to the snubber capacitance and then safely dissipated in heating the snubber resistor, rather than damaging the MOSFET switch.  There are a variety of ways to select the snubber components.  Here is a typical application note that describes the procedure.

By looking carefully at the schematic for the Capacitor Discharge Pulser here, you will be able to identify all of these flyback converter components within the larger circuit of the pulser.  Of course, all of the individual 'equivalent' components - the magnetizing inductance, the leakage inductance and the ideal transformer -  are 'hidden' within the flyback transformer, as is the small drain-to-source capacitance 'hidden' within the MOSFET switch.  One further complication is that our Capacitor Discharge Pulser actually uses a transformer with 4 primary windings in parallel, but all of these windings can be replaced with a single winding that has the characteristics described above with the various equivalent inductances.