# How to calculate primary current in an smps transformer?

#### Younes Thabet

Joined Jan 9, 2019
53
Hello all,

I have the following 12V center-tap transformer with below number of turns, I used (Np/Ns = Vp/Vs) to calculate output but i didn't get 12V although transformer specification says it's 12V.
Can someone point out where I have mistaken?
Also How can I calculate primary current given that this 325V is rectified?

Thanks,

#### Bordodynov

Joined May 20, 2015
2,843

#### Younes Thabet

Joined Jan 9, 2019
53
Eff=82%
so my primary current will be:
Icc=12/325/0.82*0.625=~28mA (too small) !!!!

also: why I am not getting Vs=12V when using Np/Ns = Vp/Vs ==> 325*(5+12)/118=46.8V !!!?

#### Veracohr

Joined Jan 3, 2011
750
You have to factor in the duty cycle of the converter, which will lower the effective primary voltage in the calculation.

#### Bordodynov

Joined May 20, 2015
2,843
For example:

#### crutschow

Joined Mar 14, 2008
27,017
Can you post the rest of the circuit?

#### Papabravo

Joined Feb 24, 2006
15,800
Hello all,

I have the following 12V center-tap transformer with below number of turns, I used (Np/Ns = Vp/Vs) to calculate output but i didn't get 12V although transformer specification says it's 12V.
Can someone point out where I have mistaken?
Also How can I calculate primary current given that this 325V is rectified?
View attachment 231849

Thanks,
The traditional rules for transformers are for sinusoidal inputs. What you are dealing with here is another animal entirely. If you want to get deep in the weeds you can consider the PWM waveform to be composed of a sum of sinusoids and work out what should be happening -- but that seems like a lotta work compared to running a simulation.

Another thing to remember is that traditional AC power transformers are really rotten at handling high frequency PWM signals.

#### Bordodynov

Joined May 20, 2015
2,843
A more accurate calculation.

#### Younes Thabet

Joined Jan 9, 2019
53

#### Attachments

• 57.2 KB Views: 12

#### crutschow

Joined Mar 14, 2008
27,017
Okay, that's a flyback converter.
There is a PKIC136 160V Zener/diode clamp circuit across the primary thus the peak primary voltage is 160V, not 325V
(Assuming that the device is shown incorrectly oriented. It should have the Zener facing down with the diode up)
The peak secondary voltage should thus be 160 * 17/118 = 23V, still near double of the stated output.

To determine the primary current we would need to know the duty-cycle of the drive, or the frequency and primary inductance of the transformer.

#### Younes Thabet

Joined Jan 9, 2019
53
Okay, that's a flyback converter.
There is a PKIC136 160V Zener/diode clamp circuit across the primary thus the peak primary voltage is 160V, not 325V
(Assuming that the device is shown incorrectly oriented. It should have the Zener facing down with the diode up)
The peak secondary voltage should thus be 160 * 17/118 = 23V, still near double of the stated output.

To determine the primary current we would need to know the duty-cycle of the drive, or the frequency and primary inductance of the transformer.
To get a secondary voltage of 12V, primary voltage need to be around 83V !!!
the primary inductance of transformer is 1.6mH (+/- 10%) in 1kHz-1V conditions .. this is what i could get from datasheet of transformer..
Maximum duty-cycle of the TNY276P is 65%..

#### Bordodynov

Joined May 20, 2015
2,843
Younes Thabet
The circuit contains an error! Look carefully at how the circuit should be constructed correctly:

#### Bordodynov

Joined May 20, 2015
2,843
You may be wondering:

#### Younes Thabet

Joined Jan 9, 2019
53
Thank you very much for taking the time to do all these simulations..much appreciated.
I can't say that i fully understand you did there!!
why you used 3.15A fuse !!
although TNY280 is same family as 276P but their differences might affect simulation results!
FYI transformer core is E16.
PLoud =12.1!!! should be 7.5W ..

Anyway thank you very much for your help..

#### Bordodynov

Joined May 20, 2015
2,843
I took the demonstration circuit from the datasheet. I wanted to get 12V and 1A. At the same time these parameters are provided in the universal range of input voltages, namely at American and European standard. I will simulate your circuit with your core. But you will help me if you tell me which winding (what wire diameters). And even better if you tell me the resistance of the windings (especially the primary). If you have a finished transformer and the ability to measure the inductance of the primary and also the primary with a closed secondary. Then I will calculate the real gap in the core. That will be the most accurate calculation. If the clearance is known, it will also be. In the datasheet in the demonstration circuit was the same chip as you use. I have a ready-made spice model similar to your chip, but of an older generation. I think it will do fine since the load characteristics are almost identical.

#### Younes Thabet

Joined Jan 9, 2019
53
I took the demonstration circuit from the datasheet. I wanted to get 12V and 1A. At the same time these parameters are provided in the universal range of input voltages, namely at American and European standard. I will simulate your circuit with your core. But you will help me if you tell me which winding (what wire diameters). And even better if you tell me the resistance of the windings (especially the primary). If you have a finished transformer and the ability to measure the inductance of the primary and also the primary with a closed secondary. Then I will calculate the real gap in the core. That will be the most accurate calculation. If the clearance is known, it will also be. In the datasheet in the demonstration circuit was the same chip as you use. I have a ready-made spice model similar to your chip, but of an older generation. I think it will do fine since the load characteristics are almost identical.
Resistance (mΩ): P = 2200 max | Aux. = 480 max. | S1 = 33 max | S2 = 72 max
Inductance (mH): P = 1.6 mH +/- 10 % at 1 kHz - 1 V
High Potential (kV) at 50Hz: P / Aux =1.5 | P + Aux. / S = 4.0 | P + Aux. / Core= 1.5 | S / Core= 4.0

#### Bordodynov

Joined May 20, 2015
2,843
See

#### Bordodynov

Joined May 20, 2015
2,843
@Bordodynov

Can you share the simulation file (.asc) from post #8?
I couldn't find it on my home computer. I'll look on my office computer on Monday. If I don't find it, I'll restore it.