Compact 12V 2 Amp SMPS - Step Wise Tutorial

In this post we comprehensively discuss a simple 12V 2 amp SMPS circuit using the IC UC2842. We study a 2 amp flyback design by evaluating various formulas, which provides the exact selection details for the transformer winding and the parts specifications

Let’s try to understand the functions and criticalities of a few of the main components used in this 12V 2 amp SMPS circuit:

Cin Input Bulk capacitor and minimum bulk voltage:

The shown bulk capacitor Cin may be incorporated using a single or a few capacitors in parallel, possibly by using an inductor across them to eliminate noise generated due to differential-mode conduction. The value of this capacitor decides the level of minimum bulk voltage.

If a lower value Cin is used to reduce minimum bulk voltage, might result in raised primary peak current overloading the switching mosfets and also the transformer.

On the contrary keeping the value larger might result in higher peak current on the mosfet and the trafo, which is also not acceptable, therefore a reasonable value as indicated in the diagram should be chosen.
It may be done by using the following formula:

Here Vin(min) indicate the RMS value of the minimum AC input voltage which is around 85 V RMS.

fLINE(min)denotes the frequency of the above RMS value which may be assumed to be 47Hz.

With reference to the above equation, in order to achieve a minimum of 75V bulk voltage value, at 85% efficiency, the Cin value will need to be around 126uF, in our prototype 180uF was found to be just fine.

Calculating the Tansformer turn ratios:

To begin with the transformer turn calculation, the most favorable switching frequency needs to be found out.

Although the IC UC2842 is specified to produce a maximum frequency of 500kHz, considering all the feasible and efficiency related parameters it was decided to select and set the device at around 110kHz.

This allowed the design to be reasonably well balanced in terms of the transformer size, EMI filter dimension and still keep the operations within the tolerable losses.

The term Nps refers to the primary of the transformer and this may be determined depending upon the rating of the driver mosfet used along with the rating of the secondary rectifier diode specifications.

For an optimal mosfet rating we first need to calculate the peak bulk voltage with reference to the maximum RMS voltage value which is 265V input AC in our case. Therefore we have:

For the sake of simplicity and cost effectiveness, a 650V rated mosfet IRFB9N65A was selected for this 12V 2 amp smps circuit prototype.

If we consider the maximum voltage stress on the mosfet drain to be around 80% of its specifications, and taking 30%  as the permissible voltage spike from the maximum bulk input supply, the resultant reflected output voltage can be expected to be lower than 130V as expressed in the following equation:

Therefore for a 12V output the maximum primary/secondary transformer turn ratio or the NPS may be calculated as indicated in the following equation:

In our design a turn ratio of Nps = 10 has been incorporated.

This winding must calculated in such a way that it is able to produce a voltage that may be a little higher than the minimum Vcc specification of the IC, so that the IC is able to operate under optimal conditions and stability is maintained throughout the circuit.

The auxiliary winding Npa can be calculated as shown in the following formula:

The auxiliary winding in the transformer is used for biasing and providing the operating supply to the IC.

Now for the output diode, the voltage stress on it may be equivalent to the output voltage and the reflected input supply, as given below:

In order to counter the voltage spikes due to “ringing” phenomenon, a Schottky diode rated with a blocking voltage of 60V or higher was felt necessary and employed in this design.

Also to keep away high voltage current spike factor, this flyback converter is designed to work with a continuous conduction mode (CCM).

Calculating the Maximum Duty Cycle:

As discussed in the above paragraph, once we calculate the NPS of the transformer, the required maximum duty cycle Dmax can be calculated through the transfer function as allocated for CCM based converters, the details can eb witnessed below:

Transformer Inductance and Peak Current

In our discussed 12V 2 amp smps circuit the transformer magnetizing inductance Lp was determined as per the CCM parameters. In this example the inductance was chosen such that the converter is able to get into the CCM working zone with around 10% load and using minimum bulk voltage in order to keep the output ripple to the lowest.

For more details regarding the various technical specifications and formulas you can study the original datasheet here

Need Help? Please send your queries through Comments for quick replies!


john kg said…
good day sir
which diode used in mosfet (flyback )

Swagatam said…
John, it is internally connected with the mosfet
Rahul anymation said…
Does this ckt gives shock at output?
Swagatam said…
No it doesn't...
shreyansh said…
Hi sir,
Could i use laptop 15v 3.5a charger for circuit includes: Nema 17,graphic tft lcd,arduino uno, arduino mega board, esp 8266 wifi, 11.1v 4400mah li ion battery,rehostate 5k, force sensor,relay 12v 10a.
Swag said…
Hi Shreyansh, you can use a 7812 IC in the middle for powering the Arduino boards and the relay circuit, another 7812 circuit for the W-Fi and for charging the 11.1 cell.
Sheraz said…
Hello sir! Dear sir i have design 12v power supply with TNY277 used 12v zener diode for output voltage regulation but the voltage continously change b/w 12v-35v mean does not show regulation, i have used bypass capacitor with C = 104pf and output filter capacitor C = 330uf what should i do to regulate the voltage fixed at 12v?
Swag said…
Sheraz, you will also have to adjust the Resistors RFbu RFbb correctly to keep the output stable.
sheraz said…
sir i have remove 12v zener diode and add tl431 feedback block with pc817 but ouput voltage still does not regulate but continously fluctuate? will the output can be regulated to add both zener and tl431 feedback block. i have made the circuit just like the circuit you have posted in 220v smps cell phone charger tutorial, but wind the transformer for 12v , how to regulate output?
Swag said…
Hi Sheraz, I think I have already replied to your question yesterday...please refer to the previous answer

by the way which circuit diagram are you exactly referring to, please show me the link???
Sheraz said…
Hello Sir! Dear sir if we buy an already builtin switch mode transformer for specific rating, how will we can determine the primary, secondry and feedback winding of the transformer and the polarity(which winding is clockwise and anti clockwise) mean how to determine the start and end of each winding along with polarity?
Swag said…
Sheraz, that can be difficult, because we normally design the transformer as per the circuit specifications, doing the opposite can be risky and unpredictable. I am not sure about it...
It might require going through many formulas and calculations
Ajitkumar said…
This time I ask to you about a SMPS Transformer specification which is two tapping;
Primary voltage -325 volt Dc. 2A
Secondary voltage (1) -28.1v .15A
Secondary voltage (2)-16v. 15A .
Sir can you suggest a proper core for this switching transformer?
ETD44 is sufficient ?
please tell about the turns also.
Swag said…

it can be difficult to estimate the size of the core, so I won't be able to suggest much, as far as I know from practical experience, the core which will allow you to accommodate the winding perfectly without cramming or without leaving large amount of space will work the best. The winding accommodation within the cores should be just perfect...
Ajitkumar said…
Akshay said…
Hi sir,
I want to build 5V 2A SMPS... using your this circuit... please let me know if i can surely increase current to 2A by reducing secondary turns to 5turns.. and also can BA159 diode handle 2A at the ouput of ferrite transformer...?

please reply..Thanking in advance..
Swag said…
Hi Akshay,

I think it may be possible by decreasing the output or secondary turns to a proportional lower number, but BA159 will not handle anything more than 1amp if at all it is mounted on a heatsink.
Akshay said…
what are modifications i need to do for that circuits then...FR107 diode can be used as replacement for BA159...what else...
Swag said…
you can use 3nos of BA159 or FR107 in parallel such that they are tightly assembled together and their bodies are pressed with each other, and their common leads are filled with a good amount of solder
Akshay said…
ok thanks.. That part is fine but what about rest of the circuit...any more changes needed..?
Swag said…
for the secondary winding use bifilar enameled wire, meaning use many thin copper enameled wires in parallel while winding the turns, you can use 10 numbers of 30 SWG wires in parallel for the winding, no more changes may be required as far as I think
Akshay said…
Thanks a lot Sir.. You are doing great job.. Best blog for learning...!!
Swag said…
It's my pleasure Akshay, keep up the good work
Akshay said…
hi.. can you suggest any other replacement optocoupler for SFH6106-1..?
Swag said…
Hi, you can search for "4 pin optocoupler", any one from them will work... Just make sure the diagram shows an LED and transistor inside the package.

Contact me for Customized Circuits


Email *

Message *

 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+