220V SMPS Cell Phone Charger Circuit

The post explains how to make a simple, cheap yet extremely reliable smps based 220V/120V mains operated cell phone charger circuit.

Why TNYxxx Tiny Switch is Used

The TNY series of tiny switch ICs provide us with an option of making perhaps the smallest possible smps circuits with high reliability. The tiny switch series includes the following ICs: TNY267P, TNY263, TNY264, TNY265, TNY266, TNY267, TNY268, TNY280.

The above ICs have an integrated in-built mosfet switching control circuit, protection against over current and thermal overshoot, along with rugged voltage and current specifications.

The IC comes in a DIP8 package that's exactly how a 555 is enclosed. The maximum tolerable voltage limit of the TNY series ICs is a massive 700V, a margin that's way beyond our normal household AC specs. The operating frequency is at about 132kHz.

The IC is specifically designed and built for implementing compact and reliable 120/220V mains operated SMPS flyback converters.

Although the application of the proposed simplest SMPS design could be huge, it could be best used as a mains operated 5V cell phone charger circuit.

The proposed cell phone charger design using the IC TY 267 can be visualized in the below shown diagram.

How the SMPS Circuit Works

The circuit can be understood as follows:

The mains input which could be anywhere between 100 and 280V is half wave rectified and filtered through shown 1N4007 diode and 10uF/400V input rectifier stage.

The 10 ohm/1watt resistor is included to provide some sort of restriction against the surge current inrush during power switch ONs and also forms like a fuse in case of a catastrophic situation.
The switching voltage is acquired via the BA159 diode at pin5 of the IC.

The IC instantly locks into the specified 132kHz switching frequency when switched ON across the input winding of the switching ferrite transformer.

The 180V zener diode safeguards the IC from peak switching voltages.

The above switching generates the calculated stepped down low voltage across the output winding of the transformer.

The BA159 diode at the output rectifies the 132kz pulsed DC while the 220uF capacitor filters the high frequency ripples to produce a clean DC.

The optocoupler acts like a feedback link between the output and the IC in order to ensure that the output never exceeds a certain predetermined voltage level.

This feedback limit is decided by the adjoining 4.7V zener diode, which ensures that the output stays well within the 5V range just suitable for charging any attached cell phone.


How to wind the ferrite transformer

The shown ferrite transformer along with the IC forms the heart of the circuit, however due to its simple configuration winding this transformer is much easier compared to other mains operated cell phone charger circuit topologies.

The input primary winding consists of around 140 turns of 36 SWG, while the output secondary winding is made up of 8 turns of 27SWG super enameled copper wire turns.

The core used can be a small E19 type ferrite core with bobbin having a central core area section measuring 4.5 by 4.5mm.

The primary is wound first. After winding it, it must be covered with a layer of insulation before winding the 8 number of secondary turns on top of the primary layer.

A copper or aluminum tape layer should be preferably included in between the primary and the secondary winding and a wire connected with this tape with the "cold" end of the primary winding (see the trafo in the figure), this provides guaranteed isolation between the winding as well as guards against interference issues.

140 thoughts on “220V SMPS Cell Phone Charger Circuit

  1. Have questions? Please feel free to post them through comments! Comments will be moderated and solved ASAP.
    • dear token,
      each turn for the secondary winding will roughly add 1V at the output, so you can put about 16 turns for the secondary and also make sure ZD is selected with the same value

      the current can be increased by using bifilar winding for the secondary.

    • i have an question on the construction of the transformer.
      a copper or alluminium tape must be connected to the primary winding?
      then the sequence is:
      1) winding the primary
      2) isolation tape
      3) copper tape connected to primary winding
      4) isolation tape
      5) the secondary winding
      tell me please if this is correct.
      thank you so much

  2. sir your soggetion is very good,because LM317 is a very accurate to control ccurrent,but it's maximum output is around 35 volts, please suggest me another regulator whose output is around 60 to 70 volts.
    Again Thanks

  3. Swagatam,

    Firstly, Thank you for this great blog. I have really liked reading the posts since last couple of days. And it has given me knowledge and ideas to solve an SMPS design problem I have at hand for a project.

    I am not an electronics expert and have managed to acquire some basic knowledge only over the last 10 days. This post i think i find most closest to the problem i have.

    SMPS Design Requirement:

    Input: 90 – 230 V AC
    Output1: 5 V DC / 1.5 Amps (Max)
    Output2: 12 V DC / 1 Amps (Max)
    Output3: 5 V DC / 1 Amps (Max)

    Out1 and Out2 are for 2 different microprocessors.
    Out3 is for a switching and phase control of triacs for resistive and inductive loads both. This also needs a zero cross detector pulse coming from the SMPS to be used for phase control.

    All outputs must be regulated and shall provide isolation to the loads.

    Can this design be used for this requirement? say by modifying the transformer secondary windings as per the desired output voltages and current. May be with a few more components, for eg. each output will need error correction like the optocoupler and TNY267 in this design.

    So, Is this possible using the same design? With off course minor modifications but keeping the basic idea same. I like this idea for its small size, I want the SMPS PCB to be small, say a credit card size or smaller.

    Please advice.


    • Sumit, the inductance values are not important, if you wind the transformer as per the given data it will surely work, just make sure the E cores are separated by a paper gap or by inserting the insulating tape

    • The joining surfaces of the E cores must not touch directly with each other rather must be separated by sandwiching a piece of paper between the surfaces or by inserting the insulation tape itself which would be used to fasten the E cores around.

    • Thanks. And one more question, can the TNY series ICs be used for a 12V SMPS? Actually on a datasheet I came across, I found that the TNY267PN has an output voltage of 5V. Please suggest whether the information furnished is correct if so then what can I do. Thanks.

    • TNY is an oscillator IC it has no relation with the output voltage of the SMPS….the output is determined by the transformer secondary winding and the feed back zener value

    • Kudos for a great informative article, in fact the blog deserves applause. Swagatam sir, I am designing a project to control LED Bulb running off 220v with microcontroller @3.3v. Since bulb is constrained on space, a compact circuit like yours is suitable. But how can I get 80v 150ma constant current for LED and 3.3v 500mA for mc from same circuit? Your kind help Wii be greatly appreciated.

    • Thanks so much hkarya, since each turn corresponds to around 1V, so around 80 to 100 turns at the secondary side of the trafo would roughly provide you the required 80V. The 3.3V can be achieved by winding a separate 5 turns somewhere inside the transformer (secondary) and the terminals secured with a 7805 IC and a few 1N4007 diodes in series for generating 3.3V.

    • I am not able to understand why a dotted line is shown from the transformer winding,basically i want to know if there are any other additional tappings from the transformer for feedback,etc.Also i want to know if the tranformer requires lamination sheets? I have seen some transformers in battery charger which dont have a core of laminations around it.

    • It's a blank winding sandwiched between the primary and secondary winding, one end is pressed between the two winding and remain unused while the other end is soldered with the cold end of the trafo as shown…

    • ferrite cores are not made up of lamination, they are available readymade in the market as whole solid "E" shaped cores…so you can easily buy these from the market as per the required specification and size.

    • I have made the above circuit ,I have used 4 47v zener diode(=188v), the response is very random:
      voltage across 400v cap=450v
      across primary winding:870-880v(ac) i get voltage across primary sometimes ,sometimes not.this is bothering me, also it it is too high.
      across pins 5(drain) & 8(source)-370-380v(dc).
      once i got a voltage of 1.4-1.5v across the output cap without any voltage on the primary winding,i think. Its hard to say but i think the main problem is of switching of the tny267pn ic.
      Any suggestions for troubleshooting?

    • I wound the transformer again nicely and tightly first primary,then tape then cardboard then connected 36swg wire to the primary zener end and wound a turn of it and then Al or Cu tape then tape then secondary then tape again .Also provided a paper and tape gap between the cores.Then I noticed that i had not connected 8 th pin drain of ic to the negative of 400v cap or 100nf 25v cap so i connected it to the nearest 400v cap and tested it again and there was a spark in front of my eyes blowing up the tny ic especially at the 5th pin the ic package was blown off there.I think i did everything right. I also want to know how to check if the optoisolator is working properly i did with a multimeter and i found it wrong.

    • did you connect the output diode to the "start" pin of the secondary?…see the black dots on the transformer it indicates the start of the winding…so it must be followed in that way.

      you can go through the following datasheet for a detailed info regarding the circuit


      by the way don't bother about the central screening winding, remove it…and wind only the primary and the secondary with just a few turns of insulating tape between them.

      if the output stays controlled at the specified zener voltage value that will confirm the opto working

    • If you mean by start of the secondary that from where we start winding the transformer then no i did not connected it to the start of the secondary but do you think it can lead to blowing up of the ic which is protected by both optoisolator and zener diode of 180v.Also is there a way to check optoisolator ic off the circuit alone.I measured resistance across the diode ,it should have offered high resistance in one direction and low in other but it wasn't so i think the opto ic may be wrong too.
      Also can i use a zener of less than 180v if yes how low?

    • you must do exactly as indicated in the circuit diagram, the diode should be connected to the start pin of the secondary…you can consult a professional transformer designer to confirm the transformer polarity.

      the central screening winding can be eliminated it's not compulsory…and wind only the primary and the secondary with just a few turns of insulating tape between them.

      If you don't want the 180V zener, you can replace it with the set of components as shown in the second diagram of the following datasheet


      the TNY is not an optocoupler….it's an integrated circuit so you cannot check it the way you may check a normal 4 pin opto isolator.

    • …ignore the last sentience it's incorrect…I thought you were trying to the check the TNY….yes the optocoupler LED can be checked just as we check a normal LED for its polarity.

    • How do you check transformer polarity, can't i check it myself the polarity? I made a sine wave generator using wien bridge oscillator which generated 6v rms but when i connected it to the primary the voltage dropped to 0.2v then i measured the primary resistance which was 3ohm so (6v/3)2A current was required which could not be supplied by the battery ofcourse.

      Also i cant connect it to a dc source as it is designed for 130khz even if i use a function generator it cant supply 2A i think.Please tell me if i am wrong somewhere.Isn't there a simple way to check polarity?Can u give any link or tips for transformer design i want to test the circuit shown in tny datasheet which shows 5v 2A output plus 12v 20ma output.Also,in the circuit how much ac voltage is expected to be at the primary?

      And thanks a lot i have been bothering you for quite a bit now.

    • inductor polarity is determined by the start and finish pins of the winding. By marking the start and the finish pins you can confirm the connections with correct polarity.

      first try to complete the above design successfully then you can move on with other difficult versions.

      the best thing would be to use a bridge rectifier at the secondary this will ensure a fixed polarity across the output of the bridge regardless of the secondary winding connections.

    • Yeah i knew where i started and where i ended the winding and connected with correct polarity(if dot means the start of winding) and used the rcd snubber u mentioned with 1nf 1kv(i did not have 2.2nf) and thats why i used a 270k resistor in parallel instead of 200k and placed a 220 ohm in series with ba159 and used 4n35 optoisolator.
      But the ic blew off again at the 5th pin drain of tny and i think now the main problem is the voltage spike generated by the leakage inductance of the trafo.

      Now, i am going to use the clamp shown in at page 7. http://www.power.com/sites/default/files/PDFFiles/der228.pdf
      Capacitor 2.2nf 1kv and tvs diode p6ke150a 150v 600w tvs diode as shown in the pdf .
      I have only one tny ic left.. please tell if the above clamp would work fine or any other best alternative for the clamp to suppress voltage spikes at pin5.
      I am also going to use varistor on ac input for additional safety.

    • Also I forgot to mention that it was different from the last time,last time when i switched on the supply ,the spark was almost instantaneous but this time it was 2-3 seconds delayed and the voltage build up gradually from 1.5 to 3.6 v(i think i even saw it reach 4v in the multimeter but thats when the ic blew not too sure).1.5 v was there due to the diode and zener drop i think in the beginning.

      Also suggest should i test the above circuit without load or with load on the output side? If with load please tell what type of load can resistance be used a load for testing purposes?

    • whether with load or without load, it should not matter, under any condition the circuit should work normally.

      I think you should the try the second circuit that's explained in this article:


      for the transformer, primary is 140 to 150 turns using 36swg and secondary around 10 turns

      the IC is quite rugged and reliable, it will not blow unless something is significantly incorrect or mismatched in the assembly.

    • In the design 1n4007gp has been shown in the clamp but i think ba159 should be used as u have shown in the above because switching is done at high frequency and ba159 is a fast switching diode whereas 1n4005gp is not.I realised another mistake of mine that i did not change the cold end connection so i will rectify it too.

    • Yipee,the design worked after so much effort thank you so much.

      The output was between 3.6v to to 3.7 v should i wind more turns on secondary or do i need to consider other factors i mean do i have to change components like zener on the output too for 5v output or anything else or simply increasing the turns would do.

    • OK great, try increasing the value of the zener diode to 6V or 9V and see the response if still the voltage does not increase then you can add a few more turns to the secondary.

  4. so i dont have a second side of this circuit and osciloscope shows that ic doesnt even start oscilating what am i missing? part list: half wave rectifier diode 45uf filter cap pin 5 to tr and tr to +340 pin 5 diode to +340. first pin to ground via 0.1 uf and the rest to ground ? what can be wrong tr primary 100t secondary 10t for osciloscope ic blows like a match every time i conect it.

    • sorry no, it might be difficult to find a ready made one in the market, you can take the help of a professional transformer designer and get it made to order.

  5. Sir,
    I have made a mobile charger using 7805 and it is working fine but i have some issues with this
    1- heat skin become too much hot .( when using in car)
    2- the charging speed is too much low.

    Can you suggest me any circuit based charger which convert 12v to 5 v 2a .

    • Syed,

      the heatsink will become hot, you can try increasing the size of the heatsink….if the IC stays cooler the charging will be proportionately faster….so you can try using a larger heatsing for the IC, and make sure to apply heatsink paste or heatsink compound between the heatsink and the IC.

  6. Hello sir
    I m Rafiq Sherasia from Gujarat,
    I m belongs to a small village where 1000 population…
    In my village a big problem is getting very slow mobile signal…I am also electronic engineer.. And a shop of repairing AC/DC Drive in my nearest city…so my villagers told me that how to getting better mobile signal… I have many searching of this but not getting good answer…I told u that please help me to find out circuit for signal booster..wat to do for that…tell me any guidance… Me n my villagers are so thanx fully to u…
    U can mail me

    • Hi Rafiq,

      I don't think that would be feasible at our level, or at any level, if that would be possible you would have already seen such gadgets available in the market, but there's none so far.

  7. Dear swagatam sir, I have build this smps. But i use 150V zd/transil(Part No: P6KE150A) instead of 180V since i couldn't find 180V one. And optocuplar is SFH610A-3. Others are exactly same as your one. But it's not work. Is there any way to diagnose transformer is oscillating and feedback is coming?

    • Dear Hasitha, It would be difficult for me to diagnose your circuit because there's hardly anything in the design that might go wrong.

      I would suggest you to refer the datasheet of the IC there are a few good elaborate designs of the same in the datasheet with a few more components which might ensure a better chance of success.

    • Thanks sir, Now its work. It had a connection issue. Now the problem is as follows. I attached LED to the output. Its slowly blinking. Its light up and slowly go off and on again. Continuously this happen and no steady output. What would u think this issue?

    • It may be an indication that there's some kind of short circuit or overload in the secondary section, therefore the circuit is going in burst mode, that is the opto is trying to reset the primary repeatedly to correct the issue…not sure where the problem is, it could be in the secondary winding or the around the optocopler stage

    • I think i had transformer winding issue. I wound both primary and secondary same direction in clock wise. Do i need to wind secondary from other direction? like primary left to right then secondary right to left both clock wise. Can u please explain this.

    • the black "dots" near the winding indicate the start points of the relevant winding…you must follow these to get the correct results.

      the primary and the sec winding ends are normally terminated across the two sides of the trafo. for easier identification and polarity check.

      you can take the help of a professional winder for this.

  8. Thank you very much for this informative article on a difficult topic ! Would you be able to comment on where to get the E transformer used in this design?


  9. Sir, i need to charge a 2200 mAh mobile Battery will this circuit be enough. If not what are the changes to be done in this circuit. How to determine the output current for a specified mAh.

    • Nix, you can, but the charging will be a bit slower.

      the ideal charging current should be 1.5 amps for your batt, and this circuit is specified at 1 amp max

  10. I assembled the circuit.I made 16 turns as secondary winding and used pc 817 optocopler instead of sfh 6106, and a 12 v zenner in output feedback circuitry. But the result is blinking the led which I used in output as monitor led.When I shorted 12 v zenner with a jumper then it became steady but 3 volts observed in output with a DMM.Also 12 KHz was obtained with a frequency meter between transformer's secondary terminals .please help.

    • I updated my hardware according to your advice. The led stop blinking, DMM shows 12 volts in out put but voltage dropped as soon as I connect a load (12v relay)into out put. Also frequency meter
      shows around 14 KHz in transformer's secondary terminals.Sir do you think The ic does not oscillate at 132 KHz and as a result of that current capasity is so weak? Is it possible for the ic to be defective from the mamufacturar?

    • the primary winding is crucial and it determines the frequency as well as the correct functioning of the IC and the whole SMPS.

      I would recommend you to visit the datasheet of the IC where you will be able to find a comprehensive information regarding the circuit and other specs related to the IC functioning

    • Sir. I went through data sheet and rewind transformer repeatedly but no result. At an instant, I connected the transformer wrongly(primary to secondary and secondary to primary)Then to my surprise,I found The ic didn't blown and result is same.So I suspect the device.

    • yes it seems the IC is not good, however changing the polarity of the winding will not blow the IC according to me…you can replace the IC with a new one and see the response, because no other way to check the IC

    • Sir, I have changed the ic but no result. whenever I connect a relay to it's output, a tick tack sound is being observed and monitor led starts blinking. I measure frequency in secondary winding which is 10 khz without load and 2khz with load. I replaced 180v zenner with resistance capacitor combination according to data sheet but the same result is same. this time frequency increased to 90khz.

    • MD. the LED will start flashing if the IC detects an overload or malfunction at the output side….or may be within the transformer….did you use a paper gap for the E-cores? the problem is definitely in your transformer because there's no other part which can be suspected or affect the design

    • Yes sir, I made paper gap and winded the transformer repeatedly. when I winded the TF with proper isolation tape(metal)according to your advice, it does not work at all but removing isolation between primary and secondary it works but in said manner.

    • It's not the insulation between the winding, I was referring to the adding of a paper piece between the surfaces of the E-cores which join face to face with each other when mounted on the bobbin. I hope you understood what I mean.

    • hello sir , i have a project(pic16f+relais) which the circuit should be very small so i choose to work with your solution , i just worried about the efficacity of the circuit because the circuit should be working a long time , with this contraint , can you advise me to work with it ? also i don't find the core19 Can i work with core E16 ,thank you.

    • Hello, instead of building the above design you can simply use the circuit from your spare mobile charger and use it for powering the MCU, but make sure to use a 7805 IC in between for regulation..
      contrarily if you intend to build the circuit, do it only if you are well versed regarding switching circuits

    • the above circuit is extremely efficient, I am not very sure whether a bigger core would work or not, but you can try it with a fuse in series, in case if anything goes wrong.

  11. hello sir. your concept is really wonderful, but i have one doubt. instead of using 4.7V zener diode, if a use a simple resistor divider, will it effect the output voltage.

  12. hello sir. your circuit is really wonderful. i have one doubt. if we remove the zener diode and use a resistor divider, will the circuit work?
    actually i personally have designed a flyback converter with input range of 16V-220V (AC/DC) and output of 16V 2.5 Amps. i have used 15V zener as feedback feeding to PIC micrcontroller
    circuit works correctly for 30-220Volts but, as my transformer ratiois 2:1 the circuit is not working for below 30V. also output volatge starts to drop after 60Volts.
    can i replace my 15V zener to 5V zener so as to cover the whole range voltage ranging from 16V-220V ?
    how can i reduce my voltagedrop? (load is of 8ohms..actually a solenoid)

    • thanks Parth,

      Actually no SMPS are rated to work below 80V, so 30V is very low and is not supposed to be used.

      However you can use a lower value zener diode if the specifications suits your need, that is if you are looking for only 5V as the output then it is quite fine to use a 5V zener instead a 15v.

      A resistive network might not work since it would keep altering its output value in response to the input AC voltage variations.

      voltage drop can be increased by increasing current of the transformer

    • thanks sir.
      but what is the way below to make it work 80 Volts?
      can i make transformer ratio 1:1, so as to make it work?
      current can be increased by bifilar winding, as you have told in your previous comments.
      actually i am working on solenoid used in circuit breaker, so it is necessary for me to cover full voltage range. if not then the project will be useless to industry.

    • Parth, reducing the input below 80V can make the SMPS functioning abnormal because the frequency of operation could get affected.

      the output may be varied from 0 to 220V this option may be possible…but the input should be kept constant at around 200V preferably.

      sorry I am not sure how 1:1 can help the condition, it may help to achieve the variable function at the output side but for the input side

  13. okay sir.
    i just wanted to know that 1:1 ratio could be implemented or not.
    my application is only for 0.1 seconds only. this SMPS will actuate the solenoid. and i tested this circuit of mine up to 30 volts on load and it works. were as on no load, it works for the whole range.
    is there any way i can implement and get what i want?
    thanks again sir.

    • yes 1:1 ratio is possible, in fact any other ratio is also possible.

      sorry I do not have much idea regarding how to make an SMPS work with a 30V to 220V inputs.

      as an alternative approach you could try the triac dimmer option, it employs phase chopping, and also the peak voltage could be effectively cut and controlled through this concept and a solid state 30V could be achieved.

  14. Sir i am designing 12v dc to 320vdc using smps topology. i have an old etd core tranformer taking for homage ups cicuit. i give pulses to mosfet using sg33525 ic but when i connect the gate pulse my mosfet burn out. pls give me some suggestion why the mosfet burn out. is the tranformer rating is high.. or tranformer is short. i am using irf1010 mosfet

  15. Mr swagatam thanks very much for your efforts.
    Please sir how can I increase the output current from a power supply maybe charger.
    Thanks in advance.

  16. dear sir i want to modify this circuit replacing the 180V tran zener with capacitor and resistor what value should i use for C and R, also want to change the output voltage and current Vo = 12V , 2A what guage for primary and secondery can be use to obtain this output?

    • sir i made the smps circuit like the one you have presented in this artical exactly like that, also i have checked all filter capacitors and the bypass capacitor of TNY277, i have wind the transformer for 12v but and using TNY277 instead of TNY267, all connection with TNY277 are correct but voltage is not regulating but fluctuate sometime b/w 5v to 35v and then continously b/w 9v to 40v & 41v. i dont know where is the problem with in the circuit, i also try 7812 regulator to regulate the voltage but output is still not regulating?

      • Sheraz, connect a 1K 2 watt resistor dummy load across the output winding and check if that corrects the issue or not, it seems your circuit is going in the burst mode due to abnormal output voltage, this is usually corrected by putting some load at the output or through a dummy load resistance of 1K

      • sir! the output has regulated upto 13v to 14v but when i connect 12v led strip it continously on and off, indicating that the output fluctuate b/w max and min. how this problem can be corrected so that output may not fall to min. i also try 1k 2w resistor but output is not correcting.

        • Sheraz, the IC will start switching ON OFF when it senses a short circuit or an overload or absence of load at the output….this can also happen due to badly built transformer.

          make sure you have built the transformer correctly, or get it checked from a professional winder…because making ferrite core transformer needs special care, knowledge and good winding machine

Leave a Comment