How to Make a Simple 12 V, 1 Amp Switch Mode Power Supply (SMPS) Circuit

The following content explains a simple 12V, 1 Amp switch mode power supply (SMPS) circuit using the very reliable VIPerXX IC from ST microelectronics.

Introduction

With the advent of modern ICs and circuits, the age old iron transformer type of power supply are surely becoming obsolete. Today power supplies are much compact, smaller and efficient with their functioning. Here we discuss one outstanding switch mode power supply circuit which can be easily built at home for deriving clean, ripple free 12 V DC.

Thanks to ST Microelectronics IC, the VIPer22A, which has made the construction of truly efficient and compact SMPS power supply unit possible that too by using a very few number of electronic parts.As can be seen in the picture, the circuit is indeed very small, compared to the power that is available from it. It's just 50 by 40 mm in its dimensions.The circuit diagram is very easy to understand, let's study it with the following points:

How the SMPS Circuit is Designed to Work

Looking at the figure we can easily see that the configuration does not involve too many stages or parts.

The input mains AC, as usual is first rectified using ordinary 1N4007 diodes which is fixed in the bridge network mode.

The rectified high voltage DC is filtered using the high voltage capacitor.

The next stage is the crucial one which incorporates the outstanding chip VIPer 22A manufactured by ST Microelectronics.

The IC alone functions as the oscillator and induces a frequency of around 100 KHz into the primary winding of the ferrite E core transformer.

The IC is absolutely rugged and is internally protected from sudden voltage in rush and other voltage related component hazards.

The IC also incorporates built in over heat protection which makes the IC virtually indestructible.
The voltage induced at the input is effectively stepped down at the output winding, due to low eddy current losses, about 1 amp current becomes available from a relatively tiny ferrite transformer.

With the coil specs shown the voltage is around 12 and the current is around 1amp.

A special feedback circuitry is also included in the circuit for maintaining high degree of protection and power saving features.

The feedback loop is implemented via an opto-coupler which becomes active during abnormal circuit conditions.

When the output voltage tends to rise beyond the set threshold the feed back loop becomes operative and feeds an error signal to the IC FB input.

The IC instantly comes into an corrective mode and switches off the input to the primary winding until the output returns to the normal range.

Circuit Diagram

 

PCB Layout

Transformer Data



210 thoughts on “How to Make a Simple 12 V, 1 Amp Switch Mode Power Supply (SMPS) Circuit

  1. Have questions? Please feel free to post them through comments! Comments will be moderated and solved ASAP.
  2. Nice one sir,
    can we use ordinary transformer for this circuit…? 2.what formulae can be use in other to have other voltages as our output…..regards

  3. hi sir ,
    i want to ask you one question that i heard about "transformer less inverter ". so which one is best transformer used inverter or without transformer ? and please give me one simple circuit of Transformer less 500 watt inverter
    thanks
    Pankaj Pandey

    • Hi Pankaj,

      Both are one and the same, the difference is that transformerless inverters use high input voltage concept which eliminates the need of the usual step-up transformer, while transformer type inverter use low input voltage concept which require stepping up of the input voltage and hence the need of a transformer.

      I will be publishing one related article very soon…stay tuned.

  4. hi sir ,
    some day before i watch a vedio on you tube based on the same topic on

    http://www.youtube.com/watch?v=uHmR6pFI7uA

    in this vedio both of the inverter were compared , and according to the performance , and the size the transformer less inverter is looking great .but the input power was same of 12 volt in both cases.
    Thanks
    pankaj pandey

  5. sir this information is not available in the vedio ….but i think it may be 50 htz because in this perticular vedio a energy saver cfl and after it a 500 watt drill was working by the help of a very small transformer less inverter and a small ups battery
    .

  6. Hi sir ,
    sir before 1 month I asked about a simple transformer less inverter circuit to you…sir is there any circuit you have designed …if yes please give me the link
    Thanks
    Pankaj pandey

  7. sir ,
    this is my another query –
    I have two inverters 300 watt and 500 watt. so can I get one output of 800 (300+500) watt by running both the inverter at a time .
    if possible then plese tell me
    Thanks.
    pankaj pandey

    • NO, you shouldn't make the outputs parallel, that can be dangerous, it's better to terminate the outputs separately and share the desired appliances over the outlets separately.

  8. Sir ,
    sorry because I am presenting another query in front of you..sir one of my electrician friend told me that- " Amps = Watts/Volts "…..so according to this formula The max watt which I want not to use is above than 1400 watt and the volts = 220 volt. So required amp= 1400/ 220 = 6.36 amp…I used a 6 AMP MCB but it did not trip even in 2000 watt also…sir Please guide me about it .
    Thanks a lot
    P.Pandey

  9. ok sir I want to explain you that why do I need this Knowledge-
    Few days before I bought an Induction cooker from the market…the maximum wattage of this cooker is 2000 watt…but I am afraid that this high wattage can damage my house wiring..So I want a suitable MCB or a overlode circuit for it..I used 3 overlode protecter of mixer grinder( 2 AMP each ) in parallel …in 1000 watt lode this protecter tripped after 5 minutes.. than I used a 6 AMP MCB ..but it was tripp after the lode of 2500 watt..Thats Why I am asking you that if you have any idea regarding this or IF YOU CAN DESIGN ANY OVERLODE CIRCUIT OF 1200 WATT .
    please guide me .
    Thanks a lot
    P.Pandey

    • Hi P Pandey,

      Sorry for the late reply, I have noted down your request, I'll try to design the requested circuit, if I succeed I'll posts it here and let you know.

      Thanks and Regards

    • Hi sir,
      This is P Pandey…Sir I am here with another request..Sir have you any idea regarding the power banks for smart phone…I have a smart phone of 2000 mah battery and I want to make a power bank for it…Please give me some ideas / circuits that how can I charge my smartphone ) with the help of a 6 volt 5 AH battery..( it needs 5volt 500 mah charging current )
      Thanks
      P Pandey

    • Hi sir,
      This is P Pandey…Sir I am here with another request..Sir have you any idea regarding the power banks for smart phone…I have a smart phone of 2000 mah battery and I want to make a power bank for it…Please give me some ideas / circuits that how can I charge my smartphone ) with the help of a 6 volt 5 AH battery..( it needs 5volt 500 mah charging current )
      Thanks
      P Pandey

    • Hi P Pandey,

      You can either connect three 1N5402 diodes in series with the battery and directly connect it with your phone, it will hopefully start charging it.
      Alternatively you can just include a 4 ohm, 2 watt resistor in series with the battery positive and connect it directly with the cell phone for initiating charging of the phone.

  10. hi sir,
    this is what i have been waiting for a long time in your hobby circuits. s.m.p.s that you use to say it is too complicated.yes it is, but the answer is not to run from it rather to face it in other to progress.
    but sir, i have been making these circuits for a long time changing different i.cs but the fault is always the same frequency not more than 30khz with the lowest ct and rt.pls can you tell me why, or is it because i have been using china i.cs,pls i need your help.thanks and nice to meet you again.

    • Hi Micaiah,

      Welcome to my blog.

      The original datasheet says that the frequency of the above circuit is 60kHz.

      I have provided the link of the original website just under the last image, you can check it out there for further details.

      Regards

    • Dear Sir,

      Greetings, this is Partha, I intend to build the smps by ST as mentioned by you but I have no experience in constructing ferrite transformers. Therefore Sir, may I request for the wire guages that are to be used.

      Also what does the figures for the term 'coil' means in the transformer specification sheet?

      And at last, what changes need to be made to get 3 separate and isolated output voltages of 12v, 5v, 5v and each of current rating 100mA

      Please help me on these Sir

      With best regards

    • Dear Partha,

      Actually i too don't have any experience with winding ferrite transformers, so can't say much about them.

      Please click the last figure, you will find all the required details about the transformer.

      Best Regards.

  11. dear sir, in smps mobile charge i find a resistor use in ac line before converting to dc line the resistor coding shows red, black, black, gold black or orange black, gold, gold black. all these resistors are with five band gold. can you let me know what its value in oms and ratting. how to red five band coding when we have gold in forth place

  12. sir, a project is given 2 me design a smps wit any values, i m a 2nd year student of ECE, i hav jus entered electronis world, & i donno mch abt smps, can u plz send me a ckt wit an xplanation..
    thank u..

    • by connecting the required current rated load and then measuring the voltage, if the voltage does not drop then it means it is capable of delivering that much current.

  13. Dear Mr. Swagatam,

    Thank you for your constant effort. Can I use this circuit for higher current requirement,say 2-3A? If not,please suggest or give a 12V/3A SMPS circuit for driving LED.

  14. Dear Sir,

    I am student of B.tech ECE.. I was trying to make SMPS of 150W (of voltage range 60 – 210 Volts DC & about 1 Amp. current). You are kindly requested to guide me for the same & oblige. My main problem is which transformer is to be used & the feedback circuit. I shall really appreciate if you could give me entire circuit.

    Thanks & Regards,
    Aseem Mittal (09417753155)
    aseem.mittal19@gmail.com

    • Dear Aseem,

      I don't have much idea about the transformer winding details, so I am sorry I won't be able to help with the project.

      By the way what is the output voltage of the design?

  15. Hello sir,
    this is Pankaj Pandey with another querry ….Sir can you design any 4 way electric chaser circuit by the help of transisters only …because 555 ic is not available now a days .. As I found " two transister based Led switching " in your blog and I also tried by two transister but I am unable to decrease and increase its ON/OFF (switching) timing ..
    thanks a lot
    P. Pandey

    • Hello Pankaj,

      555 is an evergreen versatile IC and will be there for at least another 50 years…may be its not available in your area.

      Anyway, in your transistor circuit you can add a 100k pot in series with one of the transistor base resistors, this will give you an option for the required adjustments.

  16. sir i have an ic cd6283cs audio amplifier circuit. i give 12v to use this circuit it gets heated up if input is more. and in datasheet it is given that it can handle upto 171v and utput 1500watts. it will be like that? on 12v only it gets heated then how come it will survive on 171v?

    • Rushi, the datasheet which you have referred to is of a TAZ (transient absorption zener) not your amplifier IC…..

      the datasheet for your IC is probably not available on the net, so can't suggest much about it.

  17. Dear Mr. Majumdar, Thanks for the wonderful design. Can you give some information about the filter choke L2 (47mico Henry). How to design it? what is the ferrite core for the same?
    SP Arya

    • Dear Mr. Arya, it's not so critical, you can make it by winding a reasonably thick magnet wire over any type of ferrite core. Through some trial and error make the number match the shown value approximately….I think about 50 turns using 25SWG wire on any ferrite core would be good enough

    • 1N4007 is not a fast switching diode, BA159 is a fast switching diode.

      But I have seen many SMPS use ordinary diodes such as 1N5408 etc at the output so you can try a 1N5408 which is same as a1N4007 but much higher in amps.

  18. hello sir,
    i have design same circuit 12v,1 Amp SMPS. But the problem is when i connect the load and it will consume more then 100mA current then voltage get drop to 11 volt.so could i maintain constant voltage 12 volt along with the load. or if voltage drop does it effect on stability.

    • hello shaikh,

      that should not happen, if you have made it exactly as explained above then the smps should be able to withstand full 1 amp current… at 100mA the voltage should not drop…

      the wire gauge determines the amp capacity of the smps, are you sure you used the specified wire dimensions?

  19. hi sir,
    i m facing problems in calculating primary , secondary and auxiliary winding's.please help me to calculation of exact winding's.

    Kindly reply as soon as possible.

    thank you

    • Hi Shaikh,

      all the details regarding the trafo winding are furnished at the bottom of the article, please click on the last diagram, you'll find all the required data and the related layout diagram.

  20. Hello Sir

    I have implemented same design on PCB. I'm facing some problem. Like 5 V are coming perfectly on controller board, but when I connect relay board with it, and switch any two relay even, power supply is getting restart. Why this is happening so, i did't got any reason, can you pl help us?

    Kindly reply as soon as possible.

    • Hello Bharat,

      check the current consumption of the relay coil, by connecting a DC ammeter in series with the relay coil.

      or may be you have not made the circuit correctly as per the given instructions.

    • that's equal to 350 mA which is perfectly within the range of the design…it would be difficult for me to troubleshoot it from here…

      the winding has polarity (start/finish) and that can be crucial, please check it and also try rewinding the secondary by using two strands of wire in parallel instead of one.

  21. Hello Sir

    I got the current value by changing transformer winding's SWG, but one more problem has taken place, that SMPS is getting too hot, and after that it is restarting it self.

    What can be the problem?

    • Hello Bharat,

      I think the transformer is not wound correctly, please see the black dots those indicate the "start" of the winding….. did you follow those correctly?

      the IC will reset if it detects overload…. which could be either at the output in the form of an actual overload or a wrongly wound primary….

  22. hi sir,
    i m facing problems in calculating primary , secondary and auxiliary winding's.please help me to calculation of exact winding's for 5 V,1 A smps.

    Kindly reply as soon as possible.

    thank you

    • 2 amp cannot be achieved with this IC, because 1 amp is the maximum limit from this IC, still you try winding two strands of wire together in parallel for the secondary turns and check the response.

  23. Hey Swagatam,
    Really good Job, I really appreciate it.
    I am an electronics designer and was looking for such design. I really liked it.
    But can you please suggest me which transformer you had used for this. Is it ferrite transformer. Can you please tell me where can I buy this transformer or at least its part number.

    Thanks in advance.

    • Thanks Krunal,

      The circuit is by STmicroelectronics and indeed it looks superb.

      the transformer is built over ferrite cores since it's an SMPS design, however the transformer cannot be procured readymade, you will have to build it as per the shown data.

      The wire, bobbin and the cores can be easily procured from your local electronic spare part retailer….or if you are in Mumbai you can get these from Lamington Road.

  24. Ok. If possible please suggest any other IC for range 80-300 Volt AC.
    Also do you have any tutorials related to Photodiode Interfacing. I am facing a lot of fluctuations while designing Signal Conditioning Circuits for BPW34

  25. Hello Sir

    currently we are using original ST L7805, the issue with it is, we converting 12v DC to 5v DC for consumption of up to 50mA. After putting it on testing we come to know that L7805 is heating too much, temp is not being measured yet, but it is enough to burn up your finger, will it make any kind of damage to further circuitry or L7805 will burn out within small life time?

    • Hello Bharat, if it's getting hot at 50mA then either the IC is not original (faulty) or there's some mistake in the connections.

      Please measure the current using an DC ammeter in series with the load.

      78XX can never get burning hot since they all have an internal thermal protection facility which don't allow their case temp to go beyond 100 C

      when hot the IC will simply cut of the supply to the load and shut down itself until the heat reaches within the tolerable limits

  26. I am Office Automation Techi, I have a problem with one power supply SMPS, there is a 470 mfd 400v capacitor after bridge rectification on A/C side getting blown even after changing the MOSFET along with it. Its blown thrice even after checking the rest of circut. It is further found that MOSFET is not burning.

    • check the voltage across the capacitor points, if it's exceeding 400V then that might be causing the explosion….if voltage is not the issue then probably you can try a non-polar capacitor and see if it works…a bad quality capacitor can also be the culprit

  27. 3 pin triac is not IC . Any chip with 4 or more pins is called IC, this is what I learned. No intention of insult pl. But I like Ur up-frontness, pl never hesitate for what ever comes to ur mind, Love U !

    • sorry I am not sure to which comment you are addressing to?? but answering to your suggestion I must say that a 3-pin device can also be an IC….take for example 7805, 7812, TL431 these are all ICs.

  28. Hello sir plzz plzz do update same sort of post on FB.. Instead of here..
    in Fb we can comment and have ur reply notification here really feeling hectic to find reply or comments back..
    even for typing..
    since this method is not much user friendly and transparent. it my suggestion
    on behalf of everyone I am requesting u since some of my (electronic hobbyist) friends are having same opinion.. as most of us don't use Email and this website much compared to Fb and WhatsApp in there phone..

    I respect ur knowledge and patience so I wish its being utilised to everyone in proper way..
    i hope my msg convinced…
    seeking for your valuable reply. .

    Thank you regards your Fan Lokeshelectronic

    • Hello Lokesh, I appreciate your emotions, however since this is my site so I will want visitors to come to my site, not to some external site like facebook.

      moreover it's not at all difficult to comment and receive replies from my site…you just have to tick the "notify me" box and all my replies will reach straight to your email.

      even anonymous readers can post questions here

  29. Hi Swagatam,
    Thanks for great tutorial.
    I am trying this circuit and getting the result.
    Now I am drawing 80mA of current at 12V through this circuit and it works perfectly. But when I increase the load to 150mA, the ST Viper22A gets too hot and cuts the supply for some time so the output voltage falls from 12V to 2V. After sometime it again starts supplying 12V.
    The IC is getting overheated and it trips. Could you please suggest something.

    Thanks in anticipation.

    • Hi Krunal, this circuit is rated to handle upto 1 amp, so 150mA shoudn't be a problem at all, not sure what might be causing this, most probably if the transformer is not built correctly could cause the circuit to malfunction, so it could be your trafo that's not correctly wound, please check it again and if possible take the help of a professional winder.

      the above design is by STmicroelectronics so it should be perfectly correct with its data, for more info you can visit the original website from the given link in the article.

    • Hello,
      Thanks for the reply.
      I had given this transformer winding data to a professional manufacturer from Delhi and he has built it using the same data. Moreover the transformer is not at all heating up but its only the IC to heat up. I checked the voltage at Vdd of IC which I found to be -2V which seems to be wrong(still the output vtg is 12V), also the output of the rectifier is just 5V. All the components are cool while the IC is heated up.

      Any suggestions.

    • The transformer will not heat up, it is the fet inside the IC which will heat up if the winding are not correctly wound….especially theprimary winding is the one which will can make the IC hot if not wound correctly. According to the data the inductance of primary winding must be 3mH, please confirm this first…moreover all the winding has polarity which can also create an issue.

      I am not sure about the voltages at different points, and is basically not required to be checked, because if the winding is correct and the IC is genuine then the circuit should work at the first go….considering the connections are all OK.

    • Hi, Thanks for all your suggestions.
      Can I just reverse the primary winding and check? Will it cause any problem?
      Also I do not have any LCR meter to check inductance.

      I have ordered my components from element14 so IC should be genuine.
      Also I am getting 12V at the output upto 80mA, so I think the connections are also OK.

      Please suggest.

    • Hi, I think it can be tried, you can reverse the primary ends with the circuit and see the effect…however checking the inductance is more important as that would quickly help to solve the issue.

    • Hello, Good Morning.
      I checked by reversing the primary ends, but this time I was not getting any output voltage at the output.
      I have asked my friend to measure the inductance of it, and will update here after I get result.
      Also, I would like to know if the IC is only used for switching, can I replace it with another MOSFET or optocoupler and driving it with 60KHz using LM555.
      Also, I am not able to understand how the auxiliary winding is able to supply 12V to this IC.

      I would like to know your experienced suggestions.
      Thanks in advance.

    • Good morning, The above circuit cannot be modified in anyway and is not recommended, if you want to use discrete parts for the making the same design then you can try the following circuit:

      http://www.homemade-circuits.com/2013/10/12v-24v-1-amp-mosfet-smps-circuit.html

      the internal circuitry of the IC is initially switched ON through the drain connection, which internally applies a triggering voltage to the Vdd (@1mA), this action switches ON the mosfet which in turn causes the auxiliary winding to kick and apply a rising unregulated voltage to Vdd…when this voltage exceeds the internal limit, the internal regulator switches OFF, causing the mosfet and the IC to switch Off….the cycle now keeps repeating the sequence at around 60kHz

    • Hello, So I got the measured inductance and is only 0.046 mH.
      I don't understand why my manufacturer did not paid attention to this.
      What should I do now? Will it work just by adding an inductor in series?

    • Hi, you should get it done afresh and this time from a qualified winder who knows how to measure and assign the inductance values to the coils, because it seems this trandfrmer could have many winding errors .

      adding a series coil will not do.

      If you are in Mumbai get it done from Lamington road.

      or if you have the access to a hand winding machine you can try it yourself at home.

    • Ohh, I am overwhelmed with your detail description, Thanks.
      Yes, I think I have to look for another winder.
      I am working in very rural area of Rajasthan without any access to advanced things except internet (Thank GOD). Also I have never been to Mumbai before. Still I would try to do something.
      I am doing this as for my hobby. It would be really nice if you can suggest some winder.

      Thank You very much for all your help.
      Regards,
      Krunal

    • You are welcome Krunal, I hope you get the issue resolved as soon as possible.

      winders can be difficult to find online, alternatively you can try it winding by hand… with a lot of care and patience you could possibly succeed with it.

  30. hello sir,

    how are you sir…after a long time i am here again with my another quarry …dear sir I have a inverter and it is giving me some problems…the problem is regarding to its charging function…earlier it starts trickle charging to the battery..when voltage reaches to 14 volt..but now it does not cuts the power after full charging of the battery…when the battery fully charged …then inverter makes humming sound and burnt the ac fuse..
    So kindly help me about the problem..

    Thanks a lot
    Pankaj pandey

    • Hello Pankaj,

      it would be difficult to judge without a practical diagnosing. most probably the relay associated with the full charge cut off circuit is responsible for this….it could be correctly tripping at the full charge level but in the process shorting something through its other pair or contacts.

      check the response of the relay by supplying a varying voltage through a variable power supply across the battery points (without any batt connected)

  31. Hello Sir,

    I am new in SMPS design. I am facing a problem in this SMPS. SMPS remain ON for 15 second, after that it going to OFF for 7 second, again ON for 15 second and again OFF for 7 second. Such cycle continue. In ON condition, it giving 13.8V and in OFF condition it giving 0.8V. I apply 12V/100mA DC motor as a load. Kindly help me in this problem.

    Thank You,

    • Hello Sujit, It would be difficult to understand the issue precisely, but normally this would happen if the IC is going in the shutdown mode due to overheating or over current.

      This would most probably happen due to a wrongly configured transformer….check the inductance of the primary it should match the given specification.

      also add a small heatsink with the IC.

  32. hello sir,
    thank for the great sharing.
    from the circuit i see the out is 12V and another voltage regulator at 5V.
    what is the current for 5V?

    i want to build a PSU, for 12v 1amp and 5v 2amp. if i can combine the circuit. it will be superb.
    thank you in advance for guide.

  33. Good day to you sir..
    Can you pls help me design an smps for 12volts for an led with label dw-5630-6led-2b3c. With an LDR switch.
    Im a newbie on electronics and wanted to learn more.cheaper parts would be much appreciated.

  34. I gave up on modifing the already made smps and returned it to my friend.instead ill copy your design.

    http://www.homemade-circuits.com/2011/12/cheap-yet-useful-transformerless-power.html

    with 12v(load)led in series and ldr in the middle. I have some question.

    Do i need to adjust or raise the voltage so that the led would make its highest performance? My parts are

    Ldr
    Transistor npn
    100k variable resistor
    1k resistor

    Is it ok to add regulator ic.lm7812.i got some spare.just for added protection.

    • Sir. What does chassis ground mean and how is it different from ground symbol?
      N how should i connect the chassis ground terminals in practice connection?

    • chassis is supposed to be the metallic cabinet inside which the circuit is housed.

      the negative line of the circuit is supposed to be connected with this metallic cabinet, and the metallic cabinet in turn is supposed to be connected to the mains earth pin via the mains cord.

    • Hi Faiq, what is the voltage and current specs of the LED??
      Please note that the transformer is the cubical element in this design and in fact that's true in all SMPS designs….so make sure you have built the transformer with utmost accuracy….if possible please get it build from a professional winder…

  35. Hi, please tell me how to modify this circuit & transformer to make 24V DC/500mA output?
    1. Will it work if I double the secondary winding and primary & auxiliary remain the same as in above circuit?
    2. I'm planning to replace 7805 with 78L05 that will lower the output current to 5V/100mA, this will increase maximum current of 24V output. will this work?
    2. Should I need to change value of L2, R3 or any other discrete component?

    • Hi, yes that's possible, you can try increasing the secondary turns to around 30 turns and also tweak the R6/R7 values to get 24V…a 780L5 can be used for restricting current, but a better way would be to make sure that the load connected with 78L05 is itself not rated to consume more than 100mA…

  36. can you please understands me the feedback with voltage refrance how it works to regulate the voltage? also tell this topology is DCM or CCM .one more thing how this ic can use tfor both modes interchangeabily

  37. Hi sir.
    This blog make my problem easy. but i have a question. if i increase the winding turn in parallel for achieving high current at output i-e (7A-10A), while keeping remaining circuit unchanged. Is this is possible.?

    • Thanks Adrees, sorry that may not be possible because the mosfet inside the IC itself is not designed to deliver that much current, the maximum rating being just 1 amp



Leave a Comment