# Design a transformer for flyback

Joined Aug 27, 2016
17
Hi
I have been designed a dc-dc fly back converter but I cant Calculate the number of winding wires. Can any body help me?
Vin=9-26 Dc
Vout=120, Iout=300ma
F=20KHz

#### tindel

Joined Sep 16, 2012
873
There's not near enough info to give you good advice. Typically your turns ratio should be the ratio of your input to output voltage i.e. 1:4.6 to 1:13.3. Probably need to split the difference and call it 1:9. I'd probably do 1:10 to keep the numbers easy. Honestly, the turns ratio should be the least of your concern. duty cycle, inductance, CCM vs DCM, wire gauges, stack-up, core material, core shape, gap width, saturation current, winding count, pin out, etc all need to be considered for a good transformer design.

And that's just the start.

With all due respect, if you can't calculate the turns ratio you need then you're really in trouble - particularly if you are successful outputting 100V.

#### ebp

Joined Feb 8, 2018
2,332
There's not near enough info to give you good advice. Typically your turns ratio should be the ratio of your input to output voltage i.e. 1:4.6 to 1:13.3. Probably need to split the difference and call it 1:9. I'd probably do 1:10 to keep the numbers easy. Honestly, the turns ratio should be the least of your concern. duty cycle, inductance, CCM vs DCM, wire gauges, stack-up, core material, core shape, gap width, saturation current, winding count, pin out, etc all need to be considered for a good transformer design.

And that's just the start.

With all due respect, if you can't calculate the turns ratio you need then you're really in trouble - particularly if you are successful outputting 100V.
Turns ratio in a flyback inductor is not directly dictated by the ratio of output voltage to input voltage. The component is not a transformer in the conventional sense. At no time does output current flow when input current is flowing by intent in a proper design. One winding stores energy in the inductor from the input supply and the other delivers it to the load. The ratio depends more on things like allowable reflected output voltage (when the inductor actually is behaving as a transformer) and what you chose to use as maximum duty cycle. You almost certainly would not "split the difference" but instead design to one or the other limit (generally the case with true transformers in other topologies). If you can't store the required energy in the allowable maximum duty cycle with the minimum input voltage you can't deliver the required output power.
You can produce 100 volts on the output with 10 volts on the input and a 1:1 ratio, if you so choose - it isn't sensible and it imposes limitations, but it can certainly be done.

Tweaking turns ratio has little to do with fitting things to superficially "nice" ratios. It is much more likely to be a function of fitting the turns in the bobbin. If a 3 turn input winding and a 14 turn output winding works in terms of fit, there is no reason whatever to change it to 3:15 unless something else makes that advantageous. If you fill the bobbin length with a single layer winding of 14 turns or 2 layers of 5, 15 turns would be highly undesirable. In my experience, flyback inductor design tends to be more iterative than transformer design - do a trial design, check how everything works together, make modifications, and check again. If you are doing low-volume production, you may let something like the gap you can achieve with available spacer thicknesses "dictate" other things, whereas with a high-volume design you decide on the gap you need and have the cores gapped to specification.

===
An input voltage ratio of nearly 3:1 (26:9) is by no means impossible, but does require some compromise in the inductor. 20 kHz is a very low frequency by today's standards (100 kHz or greater is more common), but if the output power must vary over a wide range and with consideration to the input voltage range, it may have some merit over higher frequency. This is especially true if for some reason you cannot tolerate pulse skipping at low output power. To some extent minimum duty cycle is a fraction of maximum with many controllers, but sometimes you can achieve lower min:max ratio by using a lower frequency. Certainly very high frequencies work against you if this is a concern because minimum ON time in any circumstances may be too long to avoid pulse skipping.

#### tindel

Joined Sep 16, 2012
873
Vout = Ns/Np * (D/(1-D)) * Vin

You're right - Not only is the turns ratio important, but also the duty cycle . 1:10 was a quick ballpark estimate. A first order answer to a first order question.

Thanks for reminding me why I took a long sabbatical from this place.