Designing and Building small transformer based flyback DC-DC converters
Non transformer based DC to DC converters using integrated circuits with a minimum of components are fairly easily designed. Many companies provide software tools and information on their websites for these kinds of power supplies.
This page will only deal with small transformer based flyback supplies.
Why use flyback topology?
Relatively easy to understand
Easy to build
Good for a large range of output voltages
Good for multiple outputs
Efficient
Why use a transformer design?
Isolation: The output supply can be isolated from the output
Output range: Can be above or below input
Multiple supplies: A transformer can easily supply multiple outputs of both polarities
The thing that mostly dissuades a student from attempting a transformer design is the mass of confusing information available for this task and the suspicion that you have to be a power supply design expert to get a working circuit.
As the subject of switch mode supplies can be rather daunting we we confine ourselves to the following limitations.
Output power below 10Watt
Input voltages relatively low. (< 60V)
Relatively low switching frequencies
The Basic Flyback Topology
Below is a simulated circuit of a basic flyback converter using SwitcherCad III (free from Linear).
Firstly a few notes about this circuit.
The input and output share a common ground. This has been done because SwitcherCad cannot handle two reference points. There are ways to overcome this but isolation is not important for this simulation.
The transformer has been simulated as 2 coupled inductors with a coupling factor of 0.9. This is not entirely accurate but does simulate the primary to a fair degree.
There has been no attempt at feedback regulation in this circuit.
No attempt has been made to predict the output voltage and the drive frequency of 10kHz has been chosen arbitrarily. The load of 100 Ohm is also arbitrary as is the filter capacitor

circuit 1. A basic flyback converter
How it works
When the transistor M1 turns on by the drive voltage (Light Blue trace below) a constant voltage is applied the the primary the current rises linearly. (RED trace). (see Farday's law)
There is no induced current in the secondary because the Shottky diode D1 is turn off due to the two windings being of opposite polarity. (Dark blue trace)
When the transistor is turned off there a current in the opposite direction is induced in the secondary due to the magnetic flux energy stored in the transformer.
This induced current flows out of the +ve input of the transformer because the diode is now turned on. The capacitor is charged and the load has a DC voltage across it (Green trace)
Continuous mode or Discontinuous mode?

figure 1. Flyback Converter currents and voltages in "Discontinuous Mode"

figure 2. Flyback Converter, secondary current in "Continuous Mode"
In a theoretically 100% efficient system the area under the primary current curve should be equal to the area under the secondary current curve demonstrating 100% energy transfer from the primary circuit to the secondary circuit. In reality the efficiency of energy transfer is more like 80%-90% due to losses. These losses are mainly due to the transformer exhibiting two kinds of loss. Copper losses and core losses. The core losses are mainly only affected by the choice of the transformer core but the copper losses can be minimized by careful transformer design.
Keep in mind that efficiency is the measure of a good design.
Transformer design
Transformer design for high powered converters or offline (powered from rectified mains voltage) can be quite complex as small inefficiencies can lead to a large energy loss, heat buildup and potential failure. High voltages also require careful insulation in the core. As we are dealing here with low power and low voltages these things should not be a big problem. The principles of the design however remain the same so attempting low power design first is often a good staring point. Instead of writing reams of theory and design notes a real life example may serve to get you going on your own design . Many approximations may be made along the way and an emphasis will be put on a non-mathematical approach.
1. Determine the mininum input voltage.
A SMPS can work over a range of input voltage. Determine the worst case input voltage at full load.
2. Decide on the required power in the load.
Simply, for a given output voltage, what is the highest current required and hence the maximum power? Let us say we need 18 Volts @ 1 Amp DC (max.) This is 18 Watt output power.
3. Choose an appropriate core.
Core choice depends on
Switching frequency:
Throughput power: If we assume 80% efficiency then we need a core somewhat larger than than 18 Watt.
Shape