Flyback Converters for Dummies

A simple flyback converter high voltage power supply for NIXIE tubes.

Ronald Dekker

In words: the inductor does not allow for any abrupt changes in the current. When a change in applied voltage occurs, the inductor will always generate an e.m.f. that counteracts this change. When the circuit is interrupted for instance, the inductor will still try to maintain the current flowing by generating a very high voltage over its terminals. Usually this will result in a spark in which the magnetic energy stored in the inductor is released. This particular behavior of inductors is used in boost converters to boost the voltage to levels above the battery voltage.

Materials like ferrites can be used to increase the magnetic flux in an inductor. When a magnetic field is applied to a ferrite the small magnetic domains in the ferrite will align with this field and increase its magnitude. In this way inductors can be made smaller and with lesser turns and thus with smaller series resistances (smaller losses). Note that the flipping of these domains costs some energy, but in good ferrites this can be very small.

With increasing magnetic flux more and more magnetic domains point into the direction of the field. At a certain point all the magnetic domains point into the direction of the field and at that point we say that the ferrite saturates. Any further increase in current will only result in a small increase of flux, basically as if the ferrite was not present. Since most ferrites have a very high permeability, already small currents can result in a high magnetic flux. As a result the ferrite will saturate at a current which is not practical for power conversion applications

Ferrite cores for inductors and transformers for power applications therefore have an air gap. An air gap reduces the effective permeability and thus the magnetic flux. The larger the air gap, the stronger the reduction in flux an the higher the maximum current the inductor can handle. We say that the magnetic energy is stored in the air gap. The photograph shows several inductors for DC/DC converters salvaged from old PCBs from PCs, Laptops etc. If you consider playing with DC/DC converters it is best to buy at least one decent inductor with a known inductance, series resistance and maximum current. The inductor in front of the picture is the 100uH "reference" inductor I use.





The boost converter

The boost converter is perhaps the simplest of all switched mode converters. It uses a single inductor without the need for "difficult" transformers. It's working can best be explained with the simplified circuit diagram given in Fig. 2. Here the transistor is represented by an ideal switch and the control circuitry has been omitted. The dissipation by the NIXIE tubes is represented by the load resistor Rload. A high voltage capacitor C is used to buffer the output voltage. In a typical configuration the input voltage would be something like Vbat=12V and the output voltage Vout=180V.





Figure 2 Simplified circuit diagram of a boost converter.

At t=0 the switch closes (Fig. 2A). As a result the current through the inductor will start to increase linearly according to I=(Vbat/L)*t. At a certain moment the switch is opened by the control circuit (Fig. 2B). The current at that monent has reached a certain value Ipeak. We have seen in the previous section that the inductor wants to keep the current flowing through it's windings constant, whatever it takes. The switch is open, so the only way the inductor can achieve this is to forward bias diode D so that the current (and thus the energy) can be dumped in the buffer capacitor C. Now remember that the capacitor was charged to 180V! So in order to forward bias the diode, the inductor has to generate an e.m.f. (or induction voltage) of something like 180-12=168V., something like a "controlled spark. The current now quickly drops according to I=Ipeak-(Vout/L)*t. For Vbat=12V and Vout=180V this means that it will take only a fifteenth (180/12) of the time it took to reach Ipeak when the switch was closed, to drop again from Ipeak to 0 now the switch is open. After a certain time the whole process repeats at a rate of f times per second.

So far so good. However, the boost converter has a serious disadvantage. To understand this we first have to consider the switch that we have been using. In a real circuit most likely a power MOS transistor will be used as the switching element. In the boost converter this transistor will have to handle both a high current when the switch is closed and a high blocking voltage when the switch is open! For the transistor this is a difficult combination. In order to make the transistor withstand high blocking voltages, the manufacturer of the transistor has to include regions in the transistor that will accommodate these voltages so that the intrinsic transistor will not breakdown. However, when the switch is closed (transistor conducting), these regions will result in additional parasitic series resistances and thus in an increased Ron. This is the reason why transistors with a high breakdown voltage always have a higher Ron than transistors with a lower breakdown voltage. Since the currents can be quite high, this inevitably means losses in the form of dissipation in the transistor. As we will see in one of the next sections this problem is solved in the fly-back converter by the use of a transformer.

By balancing the amount of power stored in the inductor to the amount of power dissipated in the load it is possible the calculate the output voltage of the boost converter.

Every second the amount of power dissipated by the load is:



A simple boost converter high voltage supply for NIXIEs

If you want to build a simple DC/DC converter to lighten up your NIXIEs and you don't care to much about the conversion efficiency, even if it means a (small) heatsink for the power transistor, then the boost converter is the best choice. But even if you think of building a real fly-back converter than it is a good idea to start with a simple boost converter. The boost converter only requires an "of the shelf" inductor and when you have it working it is easily converted into a fly-back converter by a few small modifications.





Figure 3 Simple 12-180V boost converter using the 555 as controller.

The circuit is very simple and closely follows the circuit topology of Fig. 2. For the transistor I have used a BUZ41A. This transistor is rated at a maximum Vds=500V and an on resistance of 1.5ohm at 4.5A. Equivalent or better types like the IRF730 will also perform well. The diode should be a fast switching type like the BYW95C or better. An old (computer) power supply will yield you most of these components. The inductor I picked from a catalogue and is 100µH with a few tenths of an ohm series resistance capable of handling several Amps of current.

The most interesting aspect of the circuit is how an ordinary 555 is used to regulate the output voltage. Now, there are hundreds of switched mode controllers ICs on the market which are all better suited for this job than the 555. The problem with all these ICs is that if you build a nice NIXIE clock using them, and at one moment in the future the IC breaks down, it is more than likely that it is already obsolete and out of production. The 555 is (very) cheap, performs well enough and most likely will remain in production forever.

To understand how the controller works it is best to first understand how the 555 functions. On the internet you may find a number of excellent 555 tutorials [1,2]. Without R3 and T1 the 555 is configured as a normal astable multivibrator running at a frequency of:





Figure 4 Testing the boost converter using a dummy load (and one NIXIE).

If you are in the testing phase, and do not want to connect the power supply to the NIXIEs yet, it is best to connect a dummy load to the output since the circuit is not designed to work without a load. I always first find out what the current is that I want to operate my NIXIEs on. I usually choose a value well below the operating condition specified in the datasheet. This will greatly extend the lifetime of the tubes. Using a high voltage supply I select the supply voltage and the load resistor in such a way that with a minimum of current the brightness of the tube is still good enough. Once the total current and the voltage are known an equivalent load resistor can be calculated from Rload=Vout/Itotal. During the testing phase this resistor connected to the output replaces the NIXIE tubes.

A few words about safety. Although the 180 Volts are generated starting with an innocent 12 Volt an accidental contact with the charged buffer capacitor will be a painful, possibly a lethal experience. Always be very careful ! I always place a small neon indicator lamp at the output of the converter (even in the final clock) to clearly indicate that a dangerous voltage is present at the output. Additionally during testing I permanently have a 20kohm/V multi-meter connected to the output so that I always know the output voltage. Finally, the advice of my father who was from the radio tube area: always keep one hand in your pocket when touching the circuit when it is switched on. In that way the current can never pass your heart.





An inductor test bench

When you want to start experimenting with boost or fly-back converters it is good idea to buy at least one inductor with known parameters that may act as a kind of reference device for the inductors or transformers that you make yourself. I use a 100µH inductor with about 0.2ohm series resistance capable of handling several Amps of current. It is especially designed for SMP applications. The circuit depicted in Fig. 5 allows you to compare "an unknown" inductor (or transformer) with the reference inductor.





Figure 5 Circuit diagram of the inductor test bench.

The circuit is designed to test the inductor as closely as possible under conditions that occur in the boost converter presented in the last section or in the fly-back converter to be presented in one of the next sections. Basically, the circuit is little more than the inductor which is connected to the 12V power supply by transistor T1. The current through the inductor is measured by the small series resistor R4. A voltage drop of 100mV over R4 corresponds to a current of approximately 1A. When the transistor is opened, the inductor can dump its energy in diode D3. Since the voltage drop over the diode is only 0.6V, it will take about 12/0.6=20 times as long for the current to drop to zero (remember I=(V.t)/L). This is the reason why the gate of the transistor is driven with a highly asymmetric signal generated by the oscillator around N1-N6. The transistor on-time is determined by C1 and R1+R2. R2 is set so that the transistor on-time is equal to the transistor on-time in the converter under normal load. The transistor off-time is determined by C1 and R3 and about a factor 20 longer than the on-time.





Figure 6 The inductor test bench circuit (left) and a measurement off the reference inductor (right).

In Fig. 6 (right) you find a measurement of the reference inductor. We find that with a supply voltage of 12V the current through the inductor reaches a value of I=V/R=0.361/0.11=3.28A in 27.1µs. Since I=(V/L)t we find for the inductance L=(V/I)t=(12/3.28)27.1=97.6µH. Not bad! At a little bit higher current we observe a sharp increase in the current through the inductor. This is the point where the ferrite saturates. The inductor should not be used beyond this point.

You may now want to try different inductors e.g. inductors salvaged from old (computer) power supplies. Switch S1 make it easy to compare these inductors with the reference inductor. Another important parameter to watch is the current consumption of the test-bench. An increase in switching losses in the inductor core is reflected by an increase in power consumption.

An alternative simple and quick way to measure the inductance

of an unknown inductor can be found here.

to top of page back to homepage

What you need to know about transformers This section deals with a few basic things you need to know about transformers in order to understand fly-back converters. In Fig. 7 I have tried to sketch an elementary inductor and its schematic equivalent. Note that both windings have a certain direction and that equal directions are indicated by a dot.





Figure 7 Basic transformer with open secondary windings

Figure 8 Basic transformer with closed secondary windings

Figure 9 The transformer in flyback

The flyback converter

Figure 10 depicts the basic elements from the flyback converter. Again all control circuitry is omitted, and the switching MOSFET is represented by an ideal switch.





Figure 10 Phase one, storing energy in the transformer.

Figure 11 Phase two, dumping the energy from the transformer into the buffer capacitor.

At a certain moment the switch will open (Fig. 11). Lets call the current that was flowing through the primary winding at the moment just before the switch was opened Ipeak. The energy then stored at the moment of opening is 0.5*L1*(Ipeak*Ipeak). The transformer wants to sustain the magnetic flux. Since the circuit at primary side is open the only way the inductor can do this is by inducing a voltage at the secondary side high enough (>Vout) to forward bias the diode. The initial value of the current will be I2=Ipeak/n. During the time that the diode is forward biased, the voltage over the secondary winding will equal Vout+0.8V. The 0.8V is the voltage drop over the diode and can for a high output voltage like in a NIXIE converter be neglected. The transformer will transform this voltage down to Vout/n. So the total voltage that the switch has to block in open position is 12+(Vout/n).

Actually this is the big advantage of a flyback converter over a boost converter. In a boost converter the switch (MOSFET) has to carry a large current during the on phase and a high voltage during the off phase. In the flyback converter the voltage during the off phase is transformed down to a value determined by the ratio in turns. This means that a MOSFET with a much lower Ron can be used (see section on the boostconverter). Similarly, in the boost converter the diode has to carry both the high on current and a high reverse voltage. In the flyback converter the diode at the secondary side only has to block a high voltage while the current is low (Ipeak/n). This makes it possible to select a diode with smaller capacitances and hence higher switching speed. All this results in reduced losses and an increased efficiency.





Figure 12 Phase three, energy dump completed discharge of drain-source capacitor

This continues until all energy stored in the transformer is dumped in the buffer capacitor. At that moment I2 becomes zero (Fig. 12). At that moment the e.m.f induced at the primary side (Vout/n) will vanish. However, the parasitic capacitance of the switch (source-drain capacitance of the MOSFET) will be charged to (Vout/n)+12 V. At the primary side now a series resonant tank is formed with a charged capacitor (Fig. 12 right). This will cause a dampened oscillation.





Figure 13 Voltage over the switch during all three phases

Figure 13 schematically shows the drain-source voltage (the voltage over the switch) during all the phases of the converter just described. During phase the switch is closed. What we see is the voltage drop over the switch caused by the non-zero on resistance. During this phase the current will increase linearly, so also the voltage drop over Ron will increase linearly. At point b the switch opens. The secondary current will start to flow and the output voltage wil appear down transformed over the primary winding. The total blocking voltage over the switch will be 12+(Vout/n) (Fig 13c). At point d all the energy is dumped in the capacitor and the secondary current drops to zero causing the induced e.m.f. at primary side to vanish. The charged drain-source capacitor, now suddenly connected in series with the inductance of the primary winding will result in a dampened oscillation (Fig. 12e). At point f the switch closes again, and any remaining energy in the LC tank will be dissipated in the transistor.





Figure 14 Stray inductance.

Figure 15 High frequency oscillations due to energy stored in the stray inductance.

Finally you can check for yourself the equation derived for the output voltage of the boost converter also holds for the flyback converter. This is not really surprising, like in the boost converter the flyback converter is based on the dumping of the energy from an inductor or the primary winding of a tranformer in the load. The transformer just serves to lower the voltage over the switch.





A flyback converter high voltage supply for NIXIEs.

After all what has been said so far, the circuit diagram of the flyback converter will hold no surprises (Fig.16). Literally the only difference with the boost converter is that the inductor is replaced by a transformer, and that the transistor has been replaced for a BUZ21. The BUZ21 has a much lower on resistance (Ron=0.085 ohm) as compared to the BUZ41A (Ron=1.5 ohm) but also a lower drain-source breakdown voltage (100V versus 500V).





Figure 16 Circuit diagram of the Flyback converter.

Figure 17 The ferrite core that I use (20x20x5 mm).

So what is the strategy for finding the number of turns you need on the ferrite core that you have? Well first of all I always start with my inductor test-bench so that I can compare what I have made with the reference 100 µH inductor. If this is your first fly-back converter it might be illustrative to first try the ferrite core without an airgap. Mind everybody always says airgap, but what they actually mean is a spacer, often made from plastic (cellotape). So start with say 10 or 20 windings without an airgap. What you probably will see in the test-bench is a too high inductance (slower increase of current as compared to the 100 µH inductor). At the same time you will find the ferrite saturating at a low current. It is now time to include the spacer. Attach a peace of cello tape and cut the excess amount of tape with a razor blade so that only the touching surfaces of the ferrite are covered with tape. If you try the inductor now you will find a much lower inductance and a higher saturation current. Probably you will need to add or remove some turns to get an inductance of 100 µH (same slope). For the primary winding I use 0.4 (or 0.5) mm diameter insulated copper wire. When you have determined the proper number of primary turns, the secondary winding consists of ten times that number of turns. For the secondary windings I use something like 0.1-0.15 mm diameter wire. I always include a layer of tape in between two layers of secondary windings to prevent arcing. The transformers that I use have 22 primary turns and 220 secondary turns.







Figure 18 Two examples of the Flyback converter built on a peace of breadboard.

Figure 19 shows the drain-source voltage of power MOSFET measured with a 1:10 reduction probe. The 1- on the left axis marks the 0 V input level. The image is not very sharp due to some trigger jitter caused by a 50Hz ripple on the power supply. Nevertheless, several features from Fig. 15 can be recognized. The repetition frequency is 32 kHz and the maximum blocking voltage of the transistor is about 31 V according to theory. The voltage over the transistor almost swings for two full periods until the transistor switches on again. The high frequency oscillations due to the stray inductance are there, but difficult to see on the photograph. The increasing voltage drop over Ron during the on phase is clearly visible.





Figure 19 Drain-source voltage of power MOSFET measured with a 1:10 reduction probe.

The total converter can easily be built in an area of less than 4x4 cm. To increase the lifetime of my tubes I usually run them on as low as current as possible. Typically 1-1.5 mA. This means that the converter has to generate for 6 digits about 6 to 7 watts. The efficiency is ca. 80%. This is not spectacular but good enough for such a simple circuit. If you decide to built one: have fun, be careful and good luck!

Web links