Home » Battery Chargers » 12V, 5 Amp SMPS Battery Charger Circuit
12V, 5 Amp SMPS Battery Charger Circuit

12V, 5 Amp SMPS Battery Charger Circuit

In this article we study a simple flyback based converter design which is implemented as an SMPS 12V, 5amp battery charger power supply, without using a iron core transformer.

How it Works

The proposed 12V, 5 amp smps battery charger circuit employs a flyback converter topology which results in the required smps based high current, compact, mains isolated converter design.

Here, the a high power mosfet becomes the main switching component and is used for triggering the ferrite primary winding with the set high frequency mains rectified Dc.

When switched ON, the 470k resistor charges the mosfet gate into conduction and initiates the switching action.

The above action induces a voltage across the auxiliary winding of the transformer which results in a feedback voltage to the mosfet gate via the 2n2/100V capacitor forcing the mosfet to conduct even harder.

As soon as this happens, the primary winding gets connected with the full 310V DC rectified voltage via the mosfet drain/source terminals.

During this process, the voltage across the 0.22 ohm resistor situated at the mosfet source tends to cross the 0.6V level, which instantly triggers the transistor BC546, which shorts the gate of the mosfet to ground, rendering it completely switched OFF.

This also ensures cutting-of the auxillary feedback voltage, restoring the entire primary section to its original switched OFF state.

The cycle now begins afresh and is switched continuously at around 60kHz rate which may be varied by increasing or decreasing the values of the 2n2 feed back capacitor and the 100pF base capacitor of BC546 NPN (it's not recommended though).

During the switched OFF periods of the primary winding, an induced equivalent back emf is transferred to the secondary winding which translates it into the specified stepped down low voltage, high current secondary output.

The above secondary output is appropriately rectified and filtered by the high current diode and a filter capacitor.

A feedback stage across the secondary and the primary stages is implemented via a optocoupler which determines the required fixed, regulated output voltage.

The zener associated with the optocoupler may be tweaked for getting different stabilized outputs for the desired applications.

Here it has been fixed to about 14.4V which becomes the optimal level for charging a 12V lead acid battery.

The current output of this transformerless 12V, 5 amp smps battery charger can also be changed by two methods.
Either by modifying the secondary wire thickness of the transformer or by tweaking the value of the 0.22 ohm resistor positioned across the source/ground terminals of the mosfet.

The input stage typically consists of a bridge rectifier stage, followed by an NTC and filter stage.

The input EMI coil is optional.

Recommended for you: 24watt, 12V, 2 amp SMPS using a single IC Must Read.

Circuit Diagram

How to Wind the ferrite transformer

The ferrite transformer is wound over a 15mm EE ferrite core compatible plastic bobbin.

The one half primary is wound first, using a 0.4mm super enamelled copper wire (15 turns).

Secure the end of this on one of the primary side pins of the bobbin. Cover the winding with a layer of insulation tape.

Next wind the secondary winding (5 turns) using 0.6mm wire over it.

Terminate the ends on the secondary pins of the bobbin.

Apply insulation tape over this winding.

On this wind 3 turns of 0.4mm auxiliary winding, cover it with insulation tape.

Finally continue from the secured end of the first primary winding and wind 15 more turns over the above auxiliary wind to finish of the ferrite transformer coils.

Put a few layers of insulation tape to finalize the winding insulation.

Fix the EE cores and tape it yet again along its periphery.

Make sure the EE core edges are separated with an air gap through a piece of insulation tape or a paper, this will prevent core saturation and stalling of the desired smps induction.



About the Author

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials. If you have any circuit related query, you may interact through comments, I'll be most happy to help!

319 thoughts on “12V, 5 Amp SMPS Battery Charger Circuit”

    • It is possible, by reducing the thickness of the transformer wire and dimension, and by adjusting the 0.22 resistor value

  1. Dear Sir,

    I am using same circuit for my 6 volts 1 amp smps power supply for small audio instrument. I myself assemble the smps including the ferrite transformer winding manually since few years. Only the components values and transformer no. of turns are different.

    For curiosity I assembled this project but it is not working. 100 watt incandescent lamp in series with the circuit as precaution for testing is lighting brightly and no out put voltage. I have wound the ferrite transformer correctly, as per your specification (15+15 turns primary-26 swg, 5 turns secondary-22 swg and 3 turns auxiliary-32 swg) following dot convention as I am very much used to it, on EE25 ferrite core, MBR20100CT double diode for secondary side rectification , EL817 opto-coupler and 220 ohm 2 watt resistor as dummy load. No components are getting hot or damaged but no output voltage.

    In my circuit it uses EE16 core with 55+55 turns primary(36 swg), 14 turns secondary(26 swg) and 14 turns auxiliary(36 swg), FQPF4N60 MOSFET and slight change in other resistors value which works fine.

    Can I check the voltages at primary side, like bias voltage, while the 100 watt bulb lighting brightly to find out the fault or will it damage the components if I run it for long in that condition.

    All that I am having is DMM only. Please inform me how to troubleshoot.

    With regards


    • Hi Raveesh,

      a flyback smps is a critical device and needs to be designed with calculations, it is not possible to change the parameters linearly to achieve a desired output result. So I think your circuit may be having discrepancies that’s why it’s not working.

      The bright 100 watt simply indicates that your circuit is not oscillating and it’s short circuiting the input supply through the mosfet.

      Since I am not an expert in smps calculations I cannot correctly suggest what may be causing the inaccuracy in your design.

      I have the following article in my website which shows how critical the parameters are in an SMPS circuit.


  2. Dear Swagatham,
    I request you to publish or send me a pcb layout for 60 vdc electric bike charger. Thanks for your technical support for the electronics community.

    • Dear Jayarajan, Presently i do not have the PCB design for a 60V charger. I can suggest a circuit diagram if you wish!

  3. Hi sir! dear sir i have design an smps with output of 5Amp & 14.5v, giving the output with no problem. but the smps chopper is making a small noise & also by connecting to 120AH-12v battery it show series light indication & also giving output. i don’t what’s the problem with the circuit how can i correct these problems?

    • Hi Sheraz, Which schematic did you use? Make sure the transformer winding is wound tightly without gaps and the working frequency is above 50kHz

      • i use a ready-made smps transformer for 10Amp-12v power supply. where in the circuit the uc3842 pwm controller was set a 54 KHz. i have use the same values of resistor and capacitor for frequencey it gives output but make a little chirping noise.

        • SMPS circuits are high-precision circuits, so little mismatch could make it inefficient and problematic, so it can be difficult to diagnose the fault verbally. Still you can try increasing the frequency a bit higher and see how it responds.

  4. Sir, If I need a 24volt 5apm smps, what changes need with the schmatic? I try to make a 14.4 volt 25.2 Ah NI-Mh battery pack charger. Plz help

    • Ajitkumar, for charging a 14.4V battery you will need around 17V as the input, 24V is not required. You can buy a laptop charger and use it for the same with a simply auto cut off circuit in the middle. Making an SMPS can be a complex task if you are not well versed with all the procedures

      • Sir
        I have prefered your LM338 based cut off circuit, thats why I ask for a 24 volt smps. However, I want to make this charger more than 50 ps quantity in low coast.Laptop charger will not be available in my budget. Thanks again for the valuable reply.

  5. hello swagatam, ive two questions
    1-Can i use mct2e optocoupler instead of 4n35 & also replace ba159 by fr107 ?
    2-I cant find .4mm wire from store so can i use those taken from cfl transformer which is generally available ?

  6. Good morning Sir!
    This time ,I want to try to make this Battery charger.As I look to the diagram,
    there is no value for the EMI PFC coil.Pls can you give me some hint how to difine the value and/or how to make it?

    • Shigida, the coil is not too critical for home use.

      you can use 20 turns of 0.5mm magnet wire on each side over a ferrite torroidal ring.

  7. i ve 3524 inverter if i apply feedback frm output secondary there is problem but without feedback no problems feedback is applied to pin1of 3524.what can i do

  8. Sir i have 12v 1amp powersupply led driver. Can i convert it into 14v 10 amp powersupply just by replacing the transformer with thicker wire and adding more winding and replacing the transistor with more powerful one.
    Thanks for the quick reply on other threads

  9. Mr. Swagatam, I am looking for a circuit that will take an input of 50v down to 12v with an output of 12v. Max current output around 5amps. The input voltage should be an automatic sense. Any help will be greatly and thankfully accepted. Thanks much, Joel

  10. Sir
    I need a 38 volt 9 amp Lead Acid automatic battery charger circuit for Three 12 volt battery charging in series.
    Do you have any suitable circuit diagram ? Please help.

  11. Hello Mr Swagatam, I have built the power supply as you have detailed. It will work at low (30V) but self destructs at mains (240Vac). Has the circuit been designed for 110V or 240V?
    I have found similar circuits, but they use a far larger number of turns on the primary winding. I am also concerned that the 0R22 resistor is too low a value to initiate oscillation.
    Any advice you can provide would be most useful.
    Regards Stewart.

  12. Hello dear sir,
    i need help sir can you explain this cct diagram with the help of block diagram on this schematic like driver section, oscillator section etc….
    Best Regards:

    • Hello Farooq, the stages can be easily visualized by looking at the diagram, there is bridge rectifier stage, after that there is a mosfet stage which acts like a driver stage as well as an oscillator stage. The BC547 stage forms the current control stage while the opto coupler forms the feedback control stage for stabilizing the output

  13. Dear sir! i am using pesim software for designing smps transformer but i dont understand about the wire guage let say AWG25.5 x 3, understand AWG25.5 but for what the x 3?

    • x 3 could mean 3 wires held together and wound together in a bifilar mode. 3 wire strands wind up simultaneously instead of one single thicker wire, this helps in getting better skin depth, higher amp efficiency, and compact winding

  14. sir,
    please publish pinout of 4N35 optocoupler to the board,there is no indication please update on circuit immediately.

  15. Hi sir, i made this circuit but it’s didn’t work
    The output voltage is 0v
    I used 1n4007(standard recovery rectifier) instead of ba159
    And 817 optocoupler
    I replace 10uf 400v with 100uf 400v
    And i remove NTC and EMI
    Can you help me to solve this problem?

    • Hi Zakie, It can be difficult to troubleshoot the fault because I cannot check what may be the problem in your circuit…the ferrite transformer is the crucial thing in the design, if it is not wound correctly then the circuit will simply not respond or even burn into flames…so check the transformer once again and also the other connections. the circuit should first oscillate to produce any form of result, so check whether your primary side is oscillating at a frequency higher than 20kHz or 40kHz

      • for experimenting you can try it…it should work with some unknown current output.

        always connect a 100 watt bulb in series with the input AC supply, in case if something goes wrong….

  16. hello sir nice day and thanks for the great job you do i appreciate. now sir i needed a simple personal multi output charger but using the same circuit. i want it at 5v 2amp,9v 2amps, 12v 5amps, 20v 3amps wat can i modify to get all those out puts thanks alot

  17. Sir hi again.We have discussed on comment section of your other smps homemade circuits. I want to ask you some questions to define some issues.
    First you mentione a 15mm EE compatible bobbin on the end. Is this an EE15 core? Cause i think that with a frequency of 60kHz the minimum ferrite core that can provide 60watt (assuming flyback topology-PC40 ferrite material-minimum air gap possible) is EE25.
    I will test your circuit using EE25 (salvaged from a HP inkjet supply) on 60 and 120 khz and keep you posted about the results.
    Nice simple and very educational self oscillating flyback operation explanation. If you try understand the same oscillating operation from the variou pdfs around the internet…good luck! Thank you!

    • Thank you S3nsit,

      the rule of the thumb is to use a ferrite core/bobbin that accommodates the specified winding data with minimum gaps, that is in the most optimal way, making sure that the winding is done using a winding machine not by hand.

      here we cannot use formulas or calculations for the transformer because the design has been thoroughly tested, and if everything is done exactly as per the given data the circuit has to work without fail… and moreover the winding details are not extremely critical, a little discrepancy will not cause any harm to the final output…

    • Ok in understand. By the way i think that most people complaining about mosfet overheating they used their EE cores as they came from factory. Ungapped. Zero gap as you mentione causes saturation, fall of inductance so the transformer primary coil becomes a short circuit thats why mosfets overheats.
      If people are reading this in order to add air gap, take on of the two EE halves and trim its center leg with no600 sand paper. Taking care not to damage the outer legs of EE half.

    • OK thanks for the updating the info, however I think inserting a paper between the outer arms of the E cores can be an easier option….

  18. Hi Sir. I want to salvage some components from an old ATX PC power supply so could this design be adapted to use a transformer with 20 + 20 turns primary winding?

    • Hi Gustava, No, the above smps circuit cannot be used with any other transformer except the one which has been specified in the article…

  19. Sir, i want to build a smps of television set using already existing transformer but i want to use uc3842n and 8n60 and i don't want to use optocoupler, please help me. I want variable volts of 110v – 135v. Please help me. I can't easily want transistor driver instead of ic but with no opto.

  20. Dear Sir
    Can you send me 12 volt 5 amp power supply i am in mumbai My address is PROX SYNERGY , b16,bharat market,subhash nagar,asalpha, ghatkopar west
    mumbai, 400084 and please tel me how to pay what is amount

    • Dear Rajan, if you are located in Ghatkopar then visiting Lamington road shouldn't be difficult for you?…you can go to Lamington road and get the desired SMPS of your choice from there at the most reasonable cost…

  21. Hi Swagatam Majumdar,
    Very good DIY instructions, What will it cost in INR? I am very lazy at the moment, can you quote for 9V 5 Amp with casing and deliver to Rourkela, Odisha? Vijay

    • Thank you Dubba, the final cost including shipping will be around 600/-INR…the actual cost could be anywhere near 300/- INR

    • Do you mean both 12V5A psu and 9V5A costs the same? But you didn't mention that you can ship one 9V5A converter to my address, via courier? I am actually in need of one of 9v5A and 12v5A each ASAP & and can't afford to divert attn. (lazy) in scrounge parts for DIY of above.

    • 12V will be costlier….however sorry I may not be able to send it due to my busy schedule, initially I thought that I should start selling items in my site but for the moment I have decided not to go ahead with it due to lack of time…

  22. Hello
    Thanks for posting nice SMPS circuit!

    I have a small query

    0.4mm is used for primary and auxiliary winding
    and 0.7mm copper is used for secondary winding

    is there will be any problem if we will use all windings with 0.7mm?

  23. Sir,
    could you please tell me what exactly is the function of EMI PFC coil.
    If my input is 230V,30A what value of PFC coil should i use?

  24. Sir,
    How should i change the circuit to get an output of 110V and 60A
    If the output is given to a battery of 100V and 96Ah could you suggest me some method to reduce the current(60A to 5/10 A) to the battery once 80%of the battery is reached.

    • Ajay, I would advise you to first try the shown 5 amp basic design, if you succeed then you can try upgrading it for higher amps…

  25. Can i increase the diameter of the winding both in the primary and secondary to increase the power rating. I'm using 13nm60 mosfet will it do the trick.

    • yes you can, but not by increasing the diameter of the winding, rather the diameter of the wire cross section….this can be alternatively done by using many thin strands of wires in parallel instead of using a single thick wire

      I am not sure about this mosfet equivalent.

  26. dear sir, we are making 12v 1 amp power supply from your circuits. It is giving us 12.5 V output but after few minutes all diodes in bridge , both ba159 and diodes 6a4 in output 18V zener and mosfet is blown(shorted). It happened 3 times same. Circuit is taking 0.2A at its input 230 V and we are applying load of 50ohm.

    can tell us the reason why it is happennig

    • Devendra, the transformer is quite critical here and will need to be correctly optimized, or else the devices will keep blowing of.

      at 0.2A x 220V input the 12.5V would be accompanied with 44/12 = 3.6 amps

      and with 50 ohms the output consumption would be

      I = V/R = 12.5/50 = 0.25 amps which looks fine to me.

      you should measure the output current also using a DMM while testing the unit with a 40 watt bulb at the input to prevent further blowing of the parts.

      the output current reading will identify the actual reason of the issue.

  27. Sir i want 5V 7Amp smps with 3843IC. there is some problem in my design which is already mailed to you.
    how to set hiccup mode in this? I error amplifier is disabled by grounding the pin 2.is it or some other problem?

    Thanks in advance

    • Nivas, it will be difficult for me to troubleshoot the deign because I have not yet studied about this IC and it might take quite some time for me to go through and understand the datasheets and specifications in detail

    • Владимир, you can try MJE13005, and replace its collector, emitter, base with the mosfets drain, source, gate respectively.

      I guess no other changes would be required

  28. Dear sir, Can I use this circuit as a 12V DC power supply with battery backup for my CCTV system.I have 4 CCTV cameras and one 4 channel DVR.

    Arun Vijayan

    • Dear Arjun, yes you can use the above SMPS for the mentioned required!

      but only if the total requirement of all the units is within 4 amps

  29. Hello Sir
    Hope so you are doing well.
    Sir i have made this circuit. At no load output is perfect. But problem is that when i applied a load the voltage goes to drop to 5,6 Volt. Please help me to overcome this problem

    Best Regards

  30. Hello Sir
    Hope so you are doing well.
    I have made this SMPS according to your circuit. Its giving exactly 12 Volt output without load. Problem is that when i apply a load voltage became decreasing. please help me how can i overcome this problem.


    • Hello Muhammad, the heart of the circuit is its transformer, it needs to be built correctly, if any of the standard rules are ignored then the transformer could behave inefficiently,so please make sure that you have built it as per the standard rules that apply to SMpS ferrite transformers, or may be you can take the help of a professional experienced ferrite trafo winder for getting a perfectly built transformer….

    • Dear Sanjeev, I do not have the exact data, you can try 50 turns of 26SWG magnet wire for each side, over a ferrite ring core

  31. Good evening Mr. Swagatam , greetings from Mexico , I am doing the switched 12V supply 5Amp , I have doubts as to the meaning of the windings , since I'm using a transformer ferrite core , and so far have had failures, burning fuses , diodes 1N4007 stop working and have come to bust a zener diode, the MOSFET is burned me , and continued doing the circuit, any recommendations? Thank you so much.
    Alan Santos.

    • Good evening Santos, the ferrite transformer is the heart of the circuit, everything depends on its correctness…the transformer must not saturate while operating, and this could happen due to wrong winding configuration or if the two E-core touching surfaces are not separated with a paper or plastic.

      so make sure the transformer is correctly wound as per the given data or better take the help of a professional winder.

  32. Instead of the 4n35 what else can i use? The voltage i want is 35volts.What type of transistor is connected to the 1k ? Instead of the irf840 im planing on using irf640. Its going to be connect to 110 a.c

  33. Hi, Sir. Since there are several ferrite cores, I'll appreciate more info about the ferrite core. Like the measures. Thanks! Excellent job.

    • Hi Ezequiel, thanks, the best way to select the E core is to find the one which accommodates the winding most optimally, a qualified winder will be able to suggest correctly by referring to the number of turns data

  34. D.Sir, kindly tell me how to make an adapter that( shuld be 13.5 volts with 5 amp) from smps? I need this adapter Creative 5 in 1 speaker, as i've lost the original adapter.

  35. yes it was tested successfully by one of my friends a long time ago, the mosfet will heat up only when the transformer has some problems. You must get it checked from an expert who knows all about switching circuits.

    The 3amp should be at the secondary side not at the primary side, the primary side should not consume more than 0.3 to 0.5 amps…if it's exceeding this value then your transformer could be malfunctioning.

  36. Hi, thanks….here "transformer-less" refers to the elimination of the big bulky iron core transformer, and the "compact feature"….and "not isolated from mains" refers to the circuit as a whole, which is dangerous to touch while experimenting in an unenclosed condition and switched ON

  37. Sir, wouldn't the mosfet fail against the emf generated at switching off .. I mean we're switching off ~ 5 Amps of the primary in a snupper of 10nf and 18kohm that will create almost 4kv at the drain !!

    • Hi Abobaker, the reverse EMF would pass through the diode and the 10nF, the mosfet will have no connection with this cycle

      by the way how can it be 4kV ???

    • if say the primary winding had 3 Amps peak current, when the MOSFET is switched off all 3 Amp would continue to flow through the diode into the 10nF so it'll be charged according to I=C*(delta V/delta t) for an average I of 1.5 Amps during the switch off time, so (I/C)*delta t = (1.5/10n)*(0.5/60k) = delta V = 1.25kV … this is for single cycle, but for steady state operation this will rise even more until the 18kohm can dissipate average current of 0.75 Amp during the full cycle time (delta t = 1/60000) this'll yield a huge number for steady state even more than 4kV => 0.75*18k … the 4kV i came up with it from the results of a simulation (not very accurate of course nor are my calculations but they both exceed the 500V by a far value) … I like your circuit very much and thank you for sharing it, I'm just trying to make sure it's safe before i plug that in my mains outlet

    • Thanks Abubaker, This is not my design, and sorry I am unable to verify your calculations due to lack of time, but sorry I think interpretation may not be correct….the voltage and current in an inductor solely depends on the inductance (number of turns) and the switching duty cycle, both these parameters in this circuit are adjusted in such a way that the current can never exceed a few 100 mA, and the voltage can never reach to kV…the secondary can have higher amps but the primary will be able deliver just a few 100mA because of the high frequency switching which could be well over 100 or 150kHz

    • although this circuit is not mine, it is a well tested circuit, so if you do everything correctly there's little chance of things going in smokes…preferably connect a 200 watt bulb in series with the input to avoid a possible blown fuse etc..

  38. Hello Sir,
    In the winding procedure,Why didn't you coil the 2x 15 as 30 turns first, then proceeding to the 3 turns beneath, before adding the secondary 5turns, or is there a laid down rule? Thanks in advance

    • Hello Aghos, there are no laid down rules as such….but doing the way it's explained in the article will help to produce a better response from the winding due to their layered kind of nature

  39. check this link

    I dont know if your aware of this method of making a dual polarity power supply I need to make an amplifier circuit but my transformer isnt center tapped I was wondering if this method would be ok it looks ok to me.

    If its ok say I wanted 1500 watts from this would how would I arrange this they dont really stock high wattage zener diodes in my country would I need higher wattage zener and would I need to change or add anthing else for powering an amplifier

    • this will work for low current applications, for a 1500 watt load the zeners will need to be 1500 watt each….not a feasible idea

  40. hello sir,

    in the above ckt is mosfet based regultor/ic is suitable for nonstop continous operation ? what precuations should be taken care if using for continous nonstop usage. Secondly i have seen some smps design using pulse transformer.. Can u explain me th role and functionality of pulse transformer in the smps..?


    • Hello Avinash, I would recommend you to check the waveform of this circuit, so that you can confirm how much the current may be dropping in the continuous mode, and then alter the output capacitor accordingly.

      This is not my design so I cannot confirm the waveform just by looking the configuration.

      to learn more you can refer PAGE 5 from this pdf article:


      you can also refer to page 7 for the design considerations and PRECAUTIONS while selecting the components.

      Pulse transformers are mainly used for providing galvanic isolation to the primary SMPS stage and for ensuring a safer operating environment to the vulnerable electronics from the high mains input…. quite like an optocoupler

  41. thank you for your reply sir
    one another quistion is that i can make this ckt as smps not as battery charger.
    Please also give me ckt diafram for 12v 2amp.

  42. Dear sir, i have a 12v 5amp smps adopter but during charging a battery it is short circuit due to wrong polarity connected to battery…and i found that the IC is damage, the problem is that IC details is not given on it for replacing…plz help…

    • Dear Rahul, That can be extremely difficult to judge, sorry I can't specify without practically seeing the entire schematic.

  43. I have done this circuit severally. i got some and some failed. and the section of the failure is the mosfet. it damages the mosfet. what is the cause.

    • afam, use a 100 watt bulb in series with the input while testing the circuit, and then you can troubleshoot the issue in a stepwise manner without damaging the mosfet.


  45. hi Mr.. may i replaced the opto with pc817 since i dont have opto as specified on the schematic.. ? i have trafo ETD53 .. it can be used in this smps ??

  46. SIR,
    T2,5 A MEAN AND
    0R22, AND DOES 22R MEAN 220 OHM

  47. hello sir!
    i need to produce the output of 30-0-30 (with a center tape) how can I achieve that, and how am I suppose to configure the coppler and the zener diode.
    and lastly, can I use a power transistor insteady of a mosfet?
    thanks in advance, be well sir.

    • Hello Raymond, you can wind the secondary with 24 number of turns with a center tap at the 12th winding, and change the output zener with a 60V zener.

      I am not sure whether the mosfet can be replaced with a BJT or not

  48. sir, how can i reduce current to 3 amps ??
    and how i can increase voltage to 36 volts and make a range 30-36volts??

  49. Hi, I'm building this power supply for 12V 20A and I find the problem that in my city there are no copper wire diameters requested. I got a few meters in diameter 0.6mm and 1.16mm for the primary and the secondary. it operates the same way? can i use a toroidal core? Greetings!

  50. Sir, i decided to make this circuit produce 24V 10A at the output. It mean that i must change the value of the zener diode to the optocoupler… What value should i change for the zener diode?

    • yes, the zener diode can be changed to a 30V zener for increasing the voltage, and also use more number of wires in parallel for winding the secondary of the transformer for enabling 10amp output

  51. Thanks Swagatam for creating the site and maintaining this blog. I am an electronics enthusiast from my school days. I need a solution from you regarding 48v 18AH lead acid batttery charger for my battery bike. Two of my early smps based chargers broke down and nobody even agreed to repair it. Please suggest me a circuit which I can make for charging the 48v 18AH batteries.Thanks in advance.

  52. hello Swagatam, I went to the shop today , I had a very bad day!!! I got everything as required in the circuit except for 3 components ; IRF840 , BA159 and 2n2/100v,

    I have everything done here except for those items, what can I do is there an replacement I can look for????
    Thanks a lot for your help

    • hello Raymond,

      for the mosfet you can try any 700V/5amp mosfet….2n2 can be replaced with any nearby value, such as 3.3nF, or two 1nF in parallel etc.

      BA159 can also be replaced with any 1amp/300V fast recovery diode…

    • Thanks for the help sir!
      I have a stupid idea here, I want to produce dual 130ac ( 130 – 0 – 130) from the magic transformerless circuit of yours, what am I suppose to do to make it, the current can be 30A or even higher.
      I am waiting for your reply sir.
      My regards to U.

      ""Life is too short, cherish the you have by doing what you love and enjoy the most, provided NOBODY GETS HURT""

    • Hi Swagatam
      Thanks for sharing this circuit
      I have one question
      Does the mosfet even get warm and does it need a heatsink at all?

  53. Can i keep auxillary winding 3 turns 0.4mm wire as it is (or)
    Can i change turns and parallel wires with respect to primary & secondary
    What is the use of auxillary winding?

    • auxiliary winding needs to be kept fixed as per the shown data regardless of any change on the other winding…it's only for triggering for the mosfet and for sustaining the osciilations

    • thanks for ur kind response
      i want to design a 70volt 15amps dc output smps (by refering to ur design)
      can i connect three sets of above mentioned smps rating in parallel to get a
      70volt 45amps output

    • For making 70v 15a smps

      Planned -> 310vdc 8a at input (after rectification)
      Doubt -> Can i change any rating of these devices.
      (470k 1W,2n2,1k,18k 1W,10n 500v)

      Planned ->Just put POT in output side for adjusting voltage instead of zener &
      use 4N35 as it is.
      Doubt ->Can i use 4n35 for this proposal

      Final doubt
      In ur design 2.5A for 1Adc input
      for 8Adc input which AC rated fuse can i use

    • for upgrading amp at the input you'll need to make sure that only the mosfet is rated accordingly, other components might not any change. the trafo wire might also need an upgrade, more parallel strands should be tried over the existing winding.

      in order to make the SMPS variable, you can try the instructions provided in the following article:


      any 4 pin opto can be used, that's not critical.

      for 8amp current you must use an 8amp to 10amp fuse.

  54. Thanks in advance, I would like to know about design of ferrite core transformer (ferrite core size), please help me sir.

  55. what is meant by 6A4 * 2 diodes in parallel ? do i need to make a bridge or can i use a single diode? please help sir….

  56. what is meant by 6A4*2 diodes? do i need to make diode bridge or can i use single diode?please help sir….

  57. Hi Swagatam!

    I have viewed your articles about smps, and i am so proud to find your site;
    the reason I was so fascinated by your designs is because I want to build a simple inverter which can give 300Watts to power my ceiling fan, small radio, light and charging phone.

    I have tried one and it produces 203ACV from 12dcv supply just by increasing the secondary turns, I only tested it to power two 100W filament bulbs (not too bright) and two 18Watts energy server light. and it was working great without heating plus its not heavy at all !!!!

    But some thing come up, that those smps are operated by using high frequency, how can I get 220ACV 50-60Hz?

    Thanks again, and I am only waiting for you to inbox or if it happen you make an article about that please notiffy me.
    thanks again

  58. Hello Swagatam, i need you to explain why the primary winding turns is as low as 15T.

    i understand the formula N= V * 10^8 / 4 * f * B * A is normally use to determine ferrite core winding. Is the this applicable here too? Because i use the specification of ETD39 to calculate the primary winding as per the circuit above. i got a primary turn of 103 @ 40kz.
    But you recommended 30 turn be use for primary. Am i getting something wrong with my calculation? Also i though the turn ratio of the transformer is always close to the vin/vout ratio. looking at the circuit we are converting mains voltage(310dc) down to 12vdc. the voltage ratio in this case is not close to the turn ratio of 30/5. please can you educate me on this?

    • Hello TonyBen,

      The above circuit was not designed by me. Your assumption appears to be valid, however the relatively lower of number of turns in the design could be to allow higher current because as we all know that as the number of turns in a winding increases its ability to pass current decreases, so that could be one good reason of using lower number of turns.

      Another factor could be the use of higher frequencies, because higher frequencies will allow lower number of turns to be used, and vice versa.

      I would suggest you to go ahead according to your suggested formula results, and in order to increase current you can use many number of parallel strands for the primary winding, let's see how it performs

  59. I have a smps from a vcr which gives 5v and 12v but I don't know the ampere . I connected the 330v dc output to the smps wrongly suddenly my switching transistor blasted . Since the vcr was made in 1995 now I couldn't get that transistor. The transistor was TOP201Y and I checked for an equivalent that was TOP223Y but all were discontinued so I couldn't get it in any shops but data sheet says it's a 50w switching transistor so can u suggest me any switching transistor for this purpose

    • It's not a transistor actually, it's an IC, and I am afraid there's no direct replacement for this switching feedback IC. There's one alternative in the form of TNY tiny switch but the configuration for this IC is different to the TOP IC in terms of their connections with the opto coupler…so it won't be of any good either.

  60. Hello Sir, Could you help me design a power supply circuit with output voltage varying from 3V to -3V and current varying from 2A to -2A?
    Thank you

  61. hello sir , i want to make a 8v,500ma & 5v ,300ma power supply in a 8051 ckt, in my opinion for this i should use double winding in secondary & reduce the thickness in secondary winding & change the zener.
    sir plz guide me

    • hello anutosh, you can at the most reduce the secondary wire gauge suitably, and change the zener to 8V or 5V that's all, no other changes would be required

    • hello sir, in my previous question i want to make both o/p in single supply ,for it in can i use double winding togather & apply zener on 5 v supply only

    • ashutosh, you don't have to put two winding, simply calculate it for 8V out and then add a 7805 IC with the output, so from the same winding you can achieve 8V and 5v together

  62. Irf840 mosfet cannot be used in flyback like u sugested, it has vds=500v(max), a flyback mosfet must be rated @ 2 x bus voltage + marging. that is 2 x 311v = 622v. Dat means a 700v mosfet and above is going to be used.

  63. Hello Swagatam
    Some of your readers may not have understood that the little dots indicate polarity of the windings on the transformer. Get them wrong and you have a fried Mosfet! BY 199 and UF5404 can be used to replace the BA157

    • Hello Xavier, thanks for your concern, but it may not be so critical…one has to simply follow the connection pattern of the winding exactly as given in the diagram for the primary,,,,if the lower auxiliary winding is connected wrongly by mistake would not do any harm to the devices, the system will not function that's the only thing that may possibly happen…but no mosfet will burn or get damaged.

      The secondary is irrelevant, since it has only a single start to end winding.

    • Hello Swagatam
      Secondary polarity does make a difference, in my experience. If you scope the secondary AC output, you will see that it is asymmetric (eg more negative-going than positive). So if it is connected with wrong polarity, the SMPS has to work harder for the same output.

    • Thanks Xavier, the diode and the capacitor polarity must be done according to the "dot" for the secondary, that's correct, but suppose if it's done the wrong way, in that case the output will simply show no voltage according to my simulation…because the output from secondary are ordinary rectangular waves, with positive peaks at the "dot" side of the winding.

    • sir
      Generally all 12v /5 amp smps consist min 47 mfd or 68mfd/400v as a input bulk capacitor .so in this ckt 10mfd/400v bulk capacitor for capable for handle full load?
      i want to use this ckt as cctv smps.12v /5 amp
      kindly inform me core grade, value & make I mean which AL value of core i used? & primary inductance also?
      does 2 nos of 6A4 handle min 4.5 amp? Or any heating issue?if u run this smps constant up to long time min 12 hours?

    • Nitesh, the AC input filtration is not so crucial, a 10uF is OK considering the fact that the output of the transformer has a much larger filter capacitor in the form of 2200uF capacitor

    • the transformer can be built on any suitable EE core and bobbin, the winding details are provided in the article, I have no idea about the inductance values.

      actually a high speed diode must be used in place of the 6A4 diodes, but you can go with the 6A4 diodes also, a single 6A4 will also work.

    • thanks sir
      but i want to place preset for selection of voltage range from 11.5 to 14.5vdc?
      kindly suggest me preset value with connection.May i connect 22 ohm preset in series with zener 15v?

    • remove the zener and put a 1K preset there….connect its one lead to ground, one lead to 22 ohm and the center lead to the opto LED anode

    • Respected sir
      i want to buy 02 complete ckt with preset.kindly help me , If u have ready then give me your contact detail & id.

    • Dear Nitesh, I don't manufacture electronic circuits so I won't be able to provide to you, you can easily buy it from your local electronic market, these units have become very common nowadays.

  64. Hello Sir
    I have done only calcultion sir.still everything is in paper only.i dont know how to order raw material.Definitely I will give all detail … How to load complete detail can you tell me,actually its quite long,including gauge table and cross section table.or can I put directly into comment column?

  65. Hello sir,
    You have any idea in transformer winding. I am assembling 55-0-55 with 12 amps.. I am doing E I lamination .I calculated all specification like No. Of turn,Gauge etc. I want to buy EI lamination stamping. Wat detail or specification I have to give
    to shop owner.
    Thanks and regards

    • Sorry, I have no idea regarding the lamination data….so I won't be able to provide any help.

      However, if you happen to build it successfully feel free to shear your experience and data regarding the same, will appreciate it a lot.

  66. Dear sir,
    What do you mean by "EE core have air gap in end " . if I apply varnish coat on single E E core . Would that gap be enough.
    Thanks and regards

    • air gap refers to the small gap made by inserting paper or a layer insulation between the end surfaces of the two E core where they merge together.

  67. Hai…I'am Lalar…

    How do you determine Freq Switchingnya?
    And how many Switching Freq and Freq Osc you use on this circuit?
    if I can replace the transformer with ETD49 order to get the V out and I out more by scematic this? and how comparisons Primary Coil and Secundernya?

    • Syed, if the fuse is blowing it could be due to some other fault in the circuit, not because of the diode….you may have to seek help from an expert for troubleshooting the actual fault.

  68. sir i want to make power supply for 1watt LED drive. I want 24 – 36 volt dc supply at 5amp. because i m not electronics knowledge i am not understand coil turn even i don't see what are the material. please can you design another circuit if possible or please guide me or send me video on ashokagreatking06@gmail.com please help me. I already search in your blog also post comment in another post regarding LED drive for ceiling lights.

    • Ashok, you don't need to make the power supply, you need to buy it from the market. Your main project is LED lighting not the power supply, so please buy it for the market and use it for your purpose.

    • can we use computer SMPS for supply as i check out SMPS 450watt it gives 12volt 20A. Is it useful as it gives warranty? Is it useful for LED driver?

    • yes will do, and now since the LEDs are connected in series, parallel mode the 1.5meter distances will have no effect or minimal effect.

    • ok so sir can now we can connect LED in grid of 0.5m X 0.5m using any computer SMPS. right sir? Thank you for guidance.

  69. HI! Sir, tell me please number of turns for the primary and secondary auxiliary transformer ETD 29. Wire diameters of bobbin.Not have EE core 15mm

  70. Diode Type Standard
    Voltage – DC Reverse (Vr) (Max) 600V
    Current – Average Rectified (Io) 2A
    Voltage – Forward (Vf) (Max) @ If 1.1V @ 2A
    Current – Reverse Leakage @ Vr 5µA @ 600V
    Speed Standard Recovery >500ns,>200mA (Io)
    Does it work here, It is standard recovery diode??????

  71. Sir can you suggest me any diode instead of ba159 or otherwise i will try other fast rectifier diode..
    I have seen a NTC in the ballast circuit of 25 watt CFL ..Can i use that one..
    I am waiting for your reply

  72. Sir BA159 is not available in my city. I have checked all the shops.
    can i use any 1000v , fast recovery diode

    • Syed, use more number of wires in parallel while winding the secondary turns, this will proportionately double or triple the current rating of the system.

  73. Sir,
    the size of the transformer is standard or the transfo which can hold these no. of winding can be used?

  74. Hello,

    is there any way to make this to be variable power supply?

    And yes this is one of the best blogs I found for electronic projects!

    Best regards.

    • Hi, thanks!!

      You can try replacing the zener diode with a 4k7 pot and 22 ohm resistor with a 1K resistor, the pot could be used to vary the intensity of the opto LED allowing desired voltages at the output.

      The LED anode will go to the center of the pot, the remaining free ends of the pot will connect with 1K and ground.

    • Sorry for disturbing again,

      but is this transistor near ZD 16-18V in schematic actually part of 4N35?

    • It's inside the 4n35, an inside view of the opto.

      check the datasheet of 4n35 for getting an exact idea about it.

    • it's for dissipating excess power and for aiding the zener stage, it may be removed though, since the inclusion is not crucial.

  75. Hi,

    Nice blog and circuits!

    I'm trying to drive a 1/4 hp three-phase motor with an atmega, for which I'll be using this setup:


    The author told me I'd need 4 separate 12v supplies (3 for the high-side bridges, 1 for all low-side bridges would be fine).

    Would it be too complex to split your 12V single-output 5A into 4x12V outputs? It seems I'd need 2A to switch my mosfets, though, being such a design also useful for using igbt's instead in a future.


    • Hi Thanks! Saw this just now, so replying you rightaway!.

      I can't suggest actually until I see the entire circuit diagram, because high/low side configurations could be crucial designs and need special care.
      it's always better to go for the extreme safety measures, as much as possible, so using separate power supplies could be preferred

  76. dear sir i want to build the smps. i want to know what is Th-NTC used in this circuit?is it possible to use IRF640, or IRF Z44N mosfet in this circuit? can i change the value of the capacitor 10uf 400v with 3.3uf or 100uf…..just i want to know….please reply.

    • Dear Skl,
      Th-NTC is a 350V NTC thermister.

      Only those mosfets which ca handle in excess of 400V will work here, the ones you have suggested won't work

      The input filter capacitor voltage should be rate at 400V, anything less will be unsafe.

  77. ok sir but if eliminate the EMI coil that mean it should connect straight to the A/C plug? sir i went to electronic shop i asked them to give me ba159 diode but they said it not available only they have does not have a number but it a shape diode can it be use?.

    • biannz, you can connect the input directly without the EMI coil, it's there only for suppressing noise.

      do not use anything that's not verified or is without a number…..I think your shop keeper sells old used parts ..is it?

  78. Hi
    Is there any reason why this kind is switched topology can't be used as a (constant voltage) power supply rather than a charger?

    • Hi,
      a charger is also a kind of power supply so definitely smps circuits can be used as DC power suppies.
      in fact smps itself stands for "switch mode power supply"

Leave a Comment