Solution Finder Get Tech Support

Transformer construction for a SMPS with TNY288DG: Gap length too big

Posted by: CircuitDesigner on 04/07/2023

Hello, I am designing a power supply (flyback topology). For this I use Pi Expert (online version). At the moment I get the following message: Gap length too big. Decrease transformer size, decrease secondary turns (NS), decrease KP.

What if I can't take a smaller transformer? Can I just reduce the number of secondary turns? And if yes, then how would I calculate correct number of secondary turns? Also, I have a hunch that Pi Expert is not calculating the Air Gap correctly. In the "Transformer construction" window I have the following information Core: EF16 (B66307), 3F3, gapped for ALG of 53 nH/T². 

Why does it say "3F3"? In Pi Expert I have explicitly set that I use the core made of the material N87. 
More precisely, I use B66307G0240X187 (N87) from TDK EPCOS (for the bobbin E16/8/5). Here is the datasheet:

I also don't quite understand what the information "...gapped for ALG of 53 nH/T² " does mean.
When I use my N87 core, for one half of the core the Air Gap is about 0.24mm (from the datasheet). This corresponds to the Al value of about 110 nH (also from the datasheet). Then, when I take two halves, I have the Air Gap of 0.48mm and Al value of 220 nH. Is then this value of 220nH directly comparable with the value of 53 nH/T²? Or can I not compare these values?

I attached the .uds file from the Pi Expert with my current design.

Kind regards


Attachment Size
Flyback_TNY288DG_Ver2.uds 2.54 MB


Submitted by PI-Wrench on 04/08/2023

In order for me to see exactly what you're doing, you need to export your spreadsheet as a PDF and post it here. The file extension you are using just shows up as a bunch of random symbols here when I try to open it.

It shouldn't make much difference whether you use 3F3.or N87 material - that will show up in a minor way in the core loss calculations.  What PI Expert is trying to tell you is that you are using too large a core size for your intended output power. As it has told you, you can run that particular core size with fewer turns by reducing the number of secondary turns. Since you have fixed the value of reflected voltage in the spreadsheet, this will also scale the number of primary turns accordingly, and reduce the gap size.

The spreadsheet assumes that you are gapping just the center leg of your E core. If you are gapping the outer legs as well, you are using 2X the gap value as called out in the spreadsheet, as you are breaking the magnetic path in 2 places.

Submitted by CircuitDesigner on 04/09/2023

Thank you for you answer. I attached the PDF file with the circuit to this message.

I ran the optimization process twice and for the second time Pi Expert gave different values for the "Transformer Construction", namely I now have a different number of turns in the primary and secondary windings and a different diameter of the primary winding (originally the diameter was 0.2 mm, now it has become 0.28mm). WIth that said, I think that my original problem with the air gap has been solved. I also attached a picture with "Transformer construction" page from Pi Expert after optimization.

The only thing I still don't completely understand: If I will now take my bobbin and my cores from above (B66307G0240X187), costruct the transformer, then everything will work as Pi Expert calculated? (On the premise that I have routed PCB sufficiently well).

Pi Expert says: Core: EF16 (B66307), 3F3, gapped for ALG of 174 nH/T²
The documentation for B66307G0240X187 says: AL value (approx.) for only center leg gapped cores is 110nH/T² for air gap 0.24mm.
However, the documentation also has the following note: The AL value in the table applies to a core set comprising one ungapped core (dimension g = 0 mm) and one gapped core (dimension g > 0 mm).
Does this mean that if I put two halves together, they will have the air gap between center legs of 0.24mm + 0.24mm = 0.48mm? And that the AL value decreases to the value 110(nH/T²) / 2 = 55nH/T²?

If everything is as I understood, then I can't use my cores, because the ALG value calculated by Pi Expert is significantly larger than the value will get (174 nH/T² > 55 nH//T²).

Kind regards

Attachment Size
Flyback_Schm.pdf 441.97 KB
Screenshot_1410.jpg 462.16 KB
Submitted by PI-Wrench on 04/10/2023

It sounds to me like you want to use a pre-gapped EE16 with AL of 110 nH/T^2. To use this core, some turns manipulation (secondary turns and VOR) will be needed to get a design that can properly employ this pre-gapped core. I have run a PIXLS spreadsheet  (the easiest way to make the needed manipulations), and can post this as a PDF at your request.

Generally, we work with high-volume customers that have their cores pre-ground at the factory (or at an outside grinding service) for a custom AL in order to optimize their designs. 

I ran the original specs in PIXLS, with core optimization starting and ending at EE16, and got results somewhat different than the ones you obtained - I can also post those files in PDF format at request. However, if I understand you correctly, the design will call out a core AL value different from the one you actually want to use.


Correct me if I'm wrong, but it sounds like you want to use a pre-gapped core from a distributor. If so, I can post the design manipulated as needed to use a core with 110 nH/T^2.

Submitted by CircuitDesigner on 04/10/2023

This is correct: I want to use two pre-gapped EE16 core parts (two "E" cores) with the number B66307G0240X187 from EPCOS TDK, gapped only in the middle (0.24 +- 0.02mm) with the AL value of approximately 110nH from the page number 2 in this document.

Please post PIXIs spreadsheet as PDFs. Would be very interesting to see what the differences are.

I have never used PIXI's Desginer, only Pi Expert (although you wrote PIXLS, but I think you meant PIXIS). I tried to start PIXI's Designer and the program hung up, restarting doesn't help either. I will see this week what the reason is (maybe it is trivial... I have PIXIs Designer 10.3 installed, my operating system is Windows 10 Pro).

Thank you very much!

Submitted by PI-Wrench on 04/10/2023

I meant PIXLS -  that is the appropriate tool for the types of turns manipulations I did to get proper results with the 110 AL core of your preference. With PIXLS, you have direct control over the ins and immediate feedback on the outs.. With PIExpert  you post the inputs and have no direct control over what comes out, though there are some ways to force the issue.

PIExpert is a good tool for the relatively inexperienced designer to get something that will work (if the PCB layout is decent)..It was not a good fit for your particular situation, as you needed to force the the design to conform to a core with a particular AL value, and PIExpert chooses whatever AL it thinks will result in an optimized design.

Attached is a PDF of a  PIXLS file I ran to get results that will work with the 110 AL core. Since you are running a 10W design, I would suggest splitting the primary winding into two halves (with secondary winding in between the two secondary halves) to reduce the transformer leakage inductance and burn less power in the primary snubber.

Since I pushed the VOR value up to 104V to get the primary turns needed for your design, I would suggest  using a 130V TVS in your primary snubber. This will reset the primary leakage inductance faster and result in less magnetizing energy being diverted into the snubber instead of to the secondary (where it belongs).

Attachment Size
TinySwitch-4 Design1_0.pdf 782.5 KB
Submitted by CircuitDesigner on 04/10/2023

Thanks, I'll take a look.

Something about PIXLS - I confused I with l (L capitalized). May I ask which version of the program do you use and with which operating system?

Submitted by PI-Wrench on 04/10/2023

I ran it with version 10.3, and with Windows OS..

Submitted by CircuitDesigner on 04/11/2023

I have looked at the PDF document and now I have the following question: In the design it says that I should use a wire with AWG 28 (I looked it up, this corresponds to approx. 0.3211mm). I live in the metric world and have only found the wires with the diameter 0.31 mm and 0.33 mm. Which wire should I rather use? With the diameter 0.31mm or 0.33mm? Or is the difference so small that it does not matter?

I also struggled for hours with correct installation of PIXLs Designer on my machine, but couldn't get the program to work. Installed all possible distributables, analyzed dependencies of the program with DependencyWalker, but all that didn't help me unfortunately.
On my second machine (also Windows 10 Pro) the program runs without any problems. At least that.

Submitted by PI-Wrench on 04/11/2023

The document I appended also says you can use a smaller wire gauge (if you look closely), so I would go for 0.31mm -  the difference is miniscule compared to diameter of the recommended 28 AWG, and should make little difference in the operation of the transformer. Use double -coated wire if you can - the coating stands up better to the handling involved in winding a transformer.

If you expect to meet safety standards with your transformer, you will need to wind the secondary with triple insulated wire and use flying leads to space the secondary connections away from the bobbin to get the required creepage distance to meet safety. 

Another problem, I just looked at the core you really want to use, and it is an EF16, not an EE16. I will re-run the PIXLS spreadsheet for the design, as I believe the effective core area is a little larger for the EF16 vs. the EE16 (Euro vs, Asian lamination standard).

I have appended the new file. The difference is mostly due to the EF16 having a wider bobbin width than the EE16. Choose a mm wire size close to that of the recommended AWG size, and it should work out fine. However, my comments re safety still apply.

Attachment Size
TinySwitch-4 Design_EF16.pdf 783.64 KB