# Flyback transformer for high-voltage capacitor charging

I have a personal project to charge/discharge high-voltage capacitors of 0.1-0.3 μF up to 1.5 kV at various levels (i.e voltage control.) I would like to use a standard flyback transformer topology operating from a 3.3-5 V DC input source for the charging.

I am getting super confused now when it comes to the function of this circuit, especially when it comes to the role and specifications of the transformer. I would really appreciate your inputs to correct what I understood from such a topology given my application:

1. The base principle is that the primary inductance stores energy when energized in the form of magnetic field. When the switch is off, the magnetic field collapses and is transferred as energy into the secondary. The diode allows the current to flow in only one direction, into the load, and the output capacitor stabilizes the output and acts as an intermediary energy storage.

What I fail to understand is the relationship between voltage and current at the output: is it correct to consider the flyback a "current source?" By pulsating the input, we inject current into the secondary that is integrated by the capacitor and allows maintaining some specific voltage level (through control and regulation.)

1. What is the relationship between the transformer turns ratio and the ouput voltage and current? I read people claiming that I should not be able to achieve 1.5 kV with a 10 turn ratio transformer with a 5 V DC input, but I have seen applications and schematics where an 8 turn ratio transformer is capable of charging a 2 kV capacitor, albeit slowly. I also understand that current only flows in the direction of voltage drop, therefore for current to flow the voltage on the output of the secondary must be higher than the voltage at the output of the capacitor. Is this a misconception? I have seen people use voltage multipliers to raise the output voltage to appropriate levels but if my understanding is correct, a voltage multiplier is technically not needed if charging is perceived from a current injection perspective. It would offer more stability perhaps with correct dimensioning, but would just slow down the system.

1. I understand that the transformer's other specifications, such as DCR, switching frequency, primary/secondary inductance and saturation current will eventually define the power envelope I can deploy, the efficiency giving a working point (load and dynamics)/control strategy. In my case, I would ideally like to get peak power of around 10 W on the output (and not more) to charge/discharge fast enough (at least 10 Hz ideally, up to 50 Hz.) I know that the rate of charge will be dependent on the output power and of course the capacitance of 0.1-0.3 μF. What should I pay attention to here for the transformer?

I would really appreciate all inputs related directly to my blurry understanding but also generally recommendation on how to achieve this charging/discharging of high voltage capacitors with highest power envelope on the output.

I would not consider a flyback transformer as a current source. Instead, I think of it as an energy storage device. When the transformer primary is conducting, the current in the primary is related to the voltage V=Ldi/dt. So the current rises at a rate amps per second (di/dt) dependent on the voltage on the primary and the inductance. At the end of the stored period, the energy in the inductor is 1/2 Li^2. You could think of this as a bucket of energy that is filled on each pulse, then dumped into the secondary. Flybacks regulate by changing duty cycle dependent on the load, which is what I think you are alluding to in your comment.

When the primary can no longer conduct, the energy stored in the bucket is "poured out" of the secondary through its winding. The math is always easy, because the windings act as two separate inductors, with only one conducting at a time. Only the bucket of energy is shared. So using the same relationship, the energy is dumped into the load. So you are correct; you could generate very high voltages in the secondary with a flyback converter.

Keep in mind that the diode will not start to conduct until the secondary voltage reaches a level above your capacitor voltage. The primary voltage also sees an increase above your power supply at a voltage ratiometric to the secondary, so you have to pay attention to the turns ratio. If you were to use a 1:1 ratio, and had no losses and 100% mutual coupling, it would theoretically charge the capacitor but the 1500 volts would also appear on the primary above the 3.3 volt rail. Obviously, a snubber would defeat your purpose.

A capacitor is also an energy storage device, and its energy can be calculated as 1/2CV^2. So a 0.3uF charged to 1500 volts has 0.34 Joules of energy. To do this fifty times per second would require 17 watts (0.34 *50 joules per second) in a 100% efficient system.

For your transformer, in addition to the turns ratio, be aware that the inter-winding capacitance can be a problem for high voltage windings with many turns. Try to wind in a manner where there is not high voltage between adjacent turns (single layer with no overlap, bank wind, etc.) Watch your spacing and be careful.

Incidentally, there are IC's available for doing just what you are doing, used for charging capacitors for flash cameras and similar.

• Thanks a lot for your very detailed answer John. I think you touched a lot of the points I wanted to address. I will now focus on this energy trasnfer persoective. What is not clear however is how the turn ratio then affects this point. If the energy is shared and assuming perfect efficiency what is the impact of the turn ratio ? I also saw those ICs and i'm actually using one but they're usually designed for <1kV and using them for hugher voltage depends a lot on the appropriate selection of transformer Apr 24 at 6:52
• When you fly back, and the capacitor is near its final voltage, the ratio of output voltage to input voltage will appear on the transformer primary based on the turns ratio. In practice it will be higher because of the stray and leakage inductance. Because you don't want to use a snubber, you will need a switching element that can handle high voltage on the primary. The other consideration is that the primary inductance sets the rate of energy buildup in the transformer. This affects your switching frequency and duty cycle. Be careful in your layout to minimize stray inductance. Apr 24 at 11:38
• Winding capacitance is a killer. When you turn the FET off, dv/dt is very high, so capacitance provides a current path which dissipates power in the winding resistance. Apr 24 at 12:11

When the switch is off, the magnetic field collapses and is transferred as energy into the secondary.

Let me start here: the magnetic field doesn't collapse when the switch turns off; the magnetic field ramps-down in a controlled manner and, so does the current in the secondary. So, the magnetic field ramps-down to zero (discontinuous conduction mode) and the secondary current also ramps-down to zero in exactly the same time period. Importantly, the rate at which the secondary current decays dictates the secondary voltage produced (more below on this).

What I fail to understand is the relationship between voltage and current at the output: is it correct to consider the flyback a "current source?"

Here's where your misunderstanding likely occurs. As mentioned above, the magnetic field and current ramp-down to zero and, the rate at which the current ramps-down $$\\left(\frac{di}{dt}\right)\$$ multiplied the secondary inductance, equals the secondary output voltage. Below are input and output current waveforms when the primary and secondary inductances are equal i.e. a 1:1 transformer: -

The slopes follow the basic inductor equation: $$\V = L\frac{di}{dt}\$$

Image from this answer. Maybe this mini-explanation from my basic website will also help you understand the voltages produced: -

Below is another image of the currents seen during charging (red) and transfer (green). The waveforms begin with the output capacitor fully discharged and gradually move through to the right where the output capacitor is charged to a voltage that is three times the input supply voltage: -

• The green-line slope is zero on the left during the 1st cycle meaning that Vout starts at zero
• It's slope increases during that elongated first cycle meaning that Vout rises
• In the 2nd cycle, the green-line slope equals the slope at the end of the first cycle
• This is because Vout restarts at the same voltage when it stopped in the previous cycle
• This repeats for every subsequent cycle
• As the charge and transfer cycles progress the change in slope becomes less evident
• This is because the change in capacitor voltage becomes less as time progresses
• Notice that a flat blue line appears indicating that the conversion has dropped into DCM
• Eventually the slope of the green line is three times the slope of the red line
• This means that the output voltage is three times the input voltage
• If I drew more cycles the green line slope would become greater

What is the relationship between the transformer turns ratio and the output voltage and current? I read people claiming that I should not be able to achieve 1.5 kV with a 10 turn ratio transformer with a 5 V DC input, but I have seen applications and schematics where an 8 turn ratio transformer is capable of charging a 2 kV capacitor, albeit slowly

Let's work through an example. Your turns ratio ($$\N_{P:S}\$$) is 1:10 and, when fully charged, the output capacitor voltage is 1500 volts. When the secondary is producing 1500 volts, the primary (now disconnected by the switch) receives a flyback voltage from the secondary.

This next bit is important to understand

In the "transfer" part of the switching cycle, the primary and secondary roles are reversed and, the primary receives an induced voltage of:

1500 volts ÷ 10 (turns ratio) = 150 volts.

This happens because the primary is disconnected (the MOSFET switch is open) and the secondary has 1500 volts. It doesn't matter that the secondary is generating 1500 volts or receiving 1500 volts from an external source; transformer action still takes place.

Now that isn't quite the full story because the voltage seen on the switch (assumed to be the drain of a MOSFET) is 155 volts. This is because you have a 5 volt DC supply.

If your MOSFET can handle a peak drain voltage of more than 155 volts then you could be in business. But, let's not forget that the primary to secondary coupling is never 100% and there will be another glitch on top of the 155 volts that you should try and quench with some form of snubber or clamp. A 250 volt MOSFET should do the job just nicely.

But, if you decided that a 1:100 step up transformer is your choice, the flyback voltage from the secondary is only 15 volts. Add this to the supply of 5 volts and, add another 10 or 20 volts for the back-emf due to non-ideal coupling and, the MOSFET drain will see about 30 to 40 volts.

In other words, the choice of transformer can make the choice of MOSFET simpler.

Of interest might be the fact that I'm designing a 50 kV capacitor charging supply but I can't supply details unfortunately.

the output of the secondary must be higher than the voltage at the output of the capacitor. Is this a misconception?

Not a misconception: the secondary output voltage must be exactly one diode volt-drop higher or, the capacitor won't receive charge.

I would ideally like to get peak power of around 10 W on the output (and not more) to charge/discharge fast enough (at least 10 Hz ideally, up to 50 Hz.) I know that the rate of charge will be dependent on the output power and of course the capacitance of 0.1-0.3 μF. What should I pay attention to here for the transformer?

If you need to get 1500 volts, go through what I said above and see what MOSFET is needed. Clearly if the transformer is only 1:1.33 your MOSFET choices are nearly non-existent except for SiC devices so, the big thing that influences the transformer turns ratio is the MOSFET you want to use.

I would really appreciate all inputs related directly to my blurry understanding but also generally recommendation on how to achieve this charging/discharging of high voltage capacitors with highest power envelope on the output.

Simulate, simulate and simulate. Then simulate some more. This type of circuit is so suited to simulation and you'll learn so much but, the basic equation for power is related to how much energy the capacitor acquires and how many times per second this is repeated. That directly tells your the power needed i.e. energy multiplied by frequency is the average power.

Because you want to boost 3.3 V to 1500 V (large ratio) it will be hard. You probably will not get more than 50 % efficiency.
You want 10 W out. 1500 V @ 6.67 mA. On the input side 10 W is 3.3 V at 3 A (but with 50% efficiency you might need 6 A). Can you find 12 V for the input side?

Output 1500 V with a 24:1 turn ration, you will need to make 63 V on the primary. So the primary side needs to boost 3.3 V to 63 V. That is a 20:1 boost.
If you turned on the transistor for 20 units of time at 3.3 V, and turned it off for at least 1 unit of time you should get about 63 V.

Looks like a CoilCraft transformer.

• Why would a large ratio be needed ? I thought that the Vout = N*Vin is only valid for pure AC going through a transformer and not in a classical flyback setup. There is a notion of regulation in a flyback topology that makes me believe it should be seen on the output as a power output with the load defining the voltage and current draw ... I also understand the snubber circuit diode + capacitor is there to accumulate charge and stabilize voltage Apr 23 at 17:50
• 3.3V to 1500 is a large ration. The transformer is 24:1 of that. So the transistor needs to boost from 3.3 to 63 which is 20:1. That is large.
– user338146
Apr 23 at 22:32