Design a switch mode power supply using an isolated flyback topology

6 mins read

Here, Rich Miron, Applications Engineer at Digi-Key Electronics explores the operation of switch mode power supplies and explores make Vs. buy decision process for power supplies. Miron also investigates the design of a single output supply utilising flyback topology and provides a sample design using readily available parts and components.

As all electronic systems require some kind of power, power supplies are well characterised and understood. Still, power supply design and selection continues to challenge engineers, due to the trend toward smaller size; higher efficiency; higher reliability; and greater power integrity in applications from mobile devices to line powered hardware.

With high-speed data communications systems like 5G emerging, the timing and noise margin requirements become quite extreme. To solve the problem of efficient and reliable power delivery in a small form factor, power supply designers are using switch mode power supplies (SMPS) with a flyback topology. This topology, useful to power levels of up to 150 Watts, offers designs with low component count for small size and low cost. It also offers input/output isolation, and good efficiency.

Switch mode power supplies

An SMPS, or switcher, is a power source that uses a switching regulator to maintain stable output voltage(s) from an AC or DC source. The switching regulator uses one or more semiconductor devices, such as a bipolar junction transistor, MOSFET or IGBT, switching between ‘On’ and ‘Off’ states to maintain output voltage regulation. These devices can operate with fixed ‘On’ time and variable frequency, or more commonly, at a fixed frequency and variable duty cycle. High efficiency results from the low power dissipation of the switching device when it is either ‘On’ or ‘Off’. The device dissipates power only during the transitions between states. Also, because the switching frequency is generally in the tens of kHz, transformers, inductors and capacitors can be much smaller, giving high volumetric efficiency.

The advantages of the SMPS are countered by the potential for electromagnetic interference (EMI). This is due to the switching transients and can be ameliorated by careful component selection, layout and shielding. As a result, the SMPS’s advantages far exceed its drawbacks, making them the most commonly used power supply, with linear supplies relegated to only the most sensitive electronic applications.

SMPS topology

SMPS can be realised in a large variety of circuit designs or topologies. There are over a dozen commonly used topologies (table 1).

Below, table 1: The 10 most commonly used switch mode power supply topologies (Data source: Digi-Key Electronics)

Flyback topology

The flyback converter is the most commonly used SMPS circuit (figure 1).

Below, figure 1: Functional diagram of a flyback converter using a single MOSFET switch and a flyback transformer. (Image source: Digi-Key Electronics)

The chief advantage of the flyback topology is its simplicity. At any given power level, it has the lowest component count of the SMPS topologies. The supply can be powered from a DC or an AC source. When configured to operate from the AC line (mains), the line is generally full wave rectified. The input source (Vi) is DC.

The heart of the circuit is the flyback transformer. Unlike conventional transformer windings, the primary and secondary winding of the flyback transformer do not carry current at the same time. This is due to the winding phase being reversed, as indicated by the dot notation on the windings and the series diode on the secondary side.

The use of the flyback transformer offers several benefits. The first is that the primary and secondary sides of the supply are electrically isolated. Isolation reduces the coupling of transients from the primary side, removes ground loops, and offers greater flexibility in the supply’s output polarity.

The transformer allows multiple output voltages to be generated in the supply. Additional windings for each voltage are added to the transformer. Regulation is based on only a single output and the secondary outputs are generally regulated locally.

The circuit operation begins with the switch (such as a MOSFET) being turned on (figure 2).

Below, figure 2: The operation of the flyback supply showing the principle waveforms for each of the two operating modes. (Image source: Digi-Key Electronics)

When the switch is on, VDRAIN is near zero volts and the current, IP, flows through the primary winding of the transformer. Energy is stored in the magnetising inductance of the transformer. This current rises linearly with time. On the secondary side, the series diode is reversed biased and no current flows in the secondary. Energy stored in the output capacitor supplies current to the output.

When the MOSFET switch is turned off, the energy stored in the transformer is output through the diode into the output capacitor and the output load. The secondary current starts at a high value and ramps down linearly. If the secondary current drops to zero before the switch is again turned on, the supply is referred to as a discontinuous current mode (DCM) supply. If the secondary current does not fall to zero, then the supply is called a continuous current mode (CCM) supply. As the energy stored in the inductor is fully discharged on each switching cycle, the DCM supply can use a smaller transformer. Additionally, the supply is generally more stable and produces lower EMI.

The energy stored in the transformer’s leakage inductance flows in the primary when the switch turns off and is absorbed by the input clamp or ‘snubber’ circuit, the function of which is to protect the semiconductor switch from high inductive voltages. Power is dissipated only during the switch’s transitions between the ‘ON’ and ‘OFF’ states (figure 3).

Below, figure 3: Measurement of a flyback supply showing the voltage and current waveforms at the MOSFET switch, along with the instantaneous power dissipation. (Image source: Digi-Key Electronics)

The top trace in figure 3 is the voltage across the MOSFET switch in a flyback power supply. The coloured overlays indicate the state of the MOSFET. The blue overlay indicates that the device is conducting, while the red areas indicate that the device is OFF. The centre trace is the current through the device. The bottom trace shows the instantaneous power computed as the product of applied voltage and resultant current. Observe that power dissipation is most significant during the switching transitions. The readouts below the trace display show (left to right): power losses during turn on, conduction, turn off, during the off state, and the sum power losses for all zones.


The switching device, such as the MOSFET in the diagram (figure 2), is driven by a controller or switch mode regulator. In most cases, the controller applies a pulse width modulated (PWM) waveform to the control element of the switch, which for MOSFETs is the gate. The output of the supply is coupled back to the controller, which varies the duty cycle of the gate drive signal to maintain a constant output voltage. As such, the controller forms a closed-loop control system about the flyback converter.

Controllers may also handle several auxiliary functions, such as protecting the supply from overloads, over voltage, or low line conditions. It may also manage the startup of the supply to insure a well-controlled (‘soft’) startup, minimising initial current and voltage transients.

SMPS design

Several semiconductor component suppliers offer design tools to help design switch mode power supplies, such as WEBENCH Power Designer from Texas Instruments (figure 4).

Below, figure 4: The opening page of the Texas Instruments WEBENCH Power Design Center shows the basic specification for an SMPS design of a 25 Watt 5 volt flyback power supply. (Image source: Digi-Key Electronics)

The design starts with user entered power specifications of supply voltage range, desired output voltage and current. In this case, the desired design was for a 5volt, 5amp supply operating from AC with an isolated topology. For more complex, multi-output supplies, there is an advanced Power Architect design tool.

From this point, the software initiates a series of designs and prompts for the user’s choice of the controller. The user can review each design to see the schematic, bill of material (BOM) costs, efficiency, and a dozen related circuit specifications.

In this example, the Texas Instruments’ UCC28740 flyback converter was selected and the design schematic was displayed (figure 5).

Below, figure 5: Schematic of the 25 watt AC SMPS using optically isolated feedback suggested by WEBENCH. (Image source: Digi-Key Electronics)

Pointing at any component on the schematic brings up a detailed part description and the opportunity to select an alternative component. The controller (U1) receives feedback from the output via a CELPS2811-1-F3-A optoisolator. This method of feedback maintains the electrical isolation between the primary and secondary sections of the circuit. The controller provides the PWM drive signal to the power switch M1, STMicroelectronicsSTB21N90K5900volt, 18.5amp, MOSFET. The design tool also helps select or design the flyback transformer.

A design summary page provides an overview of the key design elements (figure 6).

Below figure 6: The design summary consolidates all the elements of the suggested design. (Image source: Digi-Key Electronics)

The optimiser Tuning section allows the user to optimise the design for lowest BOM cost, smallest footprint or the highest efficiency. Using this tool permits inexperienced designers to gain experience by reviewing multiple designs and seeing the effects component changes produce.

Make or buy?

There is no doubt that unless an engineer has experience with SMPSs, there will be a learning curve. If time to market is a big concern, then it is best to buy a standard supply or contract for a custom power supply design. Having the time and the technical staff, especially if multiple projects need supplies, then designing a supply would be worthwhile. That said, repeated exposure to SMPS design will add needed expertise to the design staff.


Switch mode power supplies offer high efficiency and small size. For power levels under 150watts, the flyback topology supplies pose the advantages of multiple outputs, low component count and line isolation.

About the author:

Rich Miron, Applications Engineer at Digi-Key Electronics, has been in the Technical Content group since 2007, with primary responsibility for writing and editing articles, blogs and product training modules. Prior to Digi-Key, he tested and qualified instrumentation and control systems for nuclear submarines. Miron holds a degree in electrical and electronics engineering from North Dakota State University in Fargo, ND.

For more information about Digi-Key, click here.