• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Hire Me | Contact | Calculators-online
You are here: Home / SMPS and Converters / 220V SMPS Cell Phone Charger Circuit

220V SMPS Cell Phone Charger Circuit

Last Updated on June 10, 2026 by Swagatam 221 Comments

In this post I have explained how to make a simple, cheap yet extremely reliable smps based 220V/120V mains operated cell phone charger circuit.

Table of Contents
  • Why TNYxxx Tiny Switch is Used
  • Audio/Video Representation
    • How the SMPS Circuit Works
    • How to wind the ferrite transformer
    • Transformer Winding Calculations

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.

Audio/Video Representation

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 5 V range just suitable for charging any attached cell phone.

220V AC to 5V DC SMPS mobile charger circuit for all smartphones

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.

Transformer Winding Calculations

We can use the following standard formula for calculating the transformer primary and secondary turns:

B = Vin * Dmax / (Np * Ae * f)

Assuming the core is EE19, then Ae can be taken as 30 mm2 and Bmax = 0.25 Tesla...

Substituting in the above equation gives:

0.25 = 310 * 0.45 / (Np * 30 * 10⁻⁶ * 132000)

Np = 140 turns

Secondary Turn formula is:

Vout = (Ns/Np) * Vreflected

Assuming reflected voltage as 80V, then

5 = (Ns/140) * 80

Ns = 8 turns

220V Mobile Charger Circuit diagram using Viper22E IC

DATASHEET

You'll also like:

  • How to Add Adjustable Current and Voltage feedback Control to SG3525 Inverters
  • 220V AC to 12V DC Flyback SMPS Circuit using IC 555 (7555)
  • 110 V to 220 V converter device110 V to 310 V Converter Circuit
  • DC to DC converter12 V to 30 V High Current Boost Converter Circuit [Variable]

Filed Under: SMPS and Converters Tagged With: 220V, Cell, Charger, Phone, SMPS

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!



Previous Post: « Making a Flynn Motor
Next Post: SMPS 50 watt LED Street Light Driver Circuit »

Reader Interactions

Questions & Answers

Total Posts: 221
Newest Oldest
joshua richard
March 13, 2014 • 12 years ago #20498

Sir
pleas discribe the diameter of the copper wire in terms of mm

Reply
SwagatamAdmin
March 17, 2014 • 12 years ago #20585

joshua, you can try any online calculator chart for the conversions.

Reply
Token
April 29, 2014 • 12 years ago #21919

dear Sir,
How to increase the output voltage (say 12) and current (say 500mA)

Reply
SwagatamAdmin
April 30, 2014 • 12 years ago #21931

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.

Reply
franco rossi
May 3, 2014 • 12 years ago #22073

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
regards
andrea

Reply
SwagatamAdmin
May 4, 2014 • 12 years ago #22094

yes that's correct, connect the copper tape with the cold end of the primary, meaning with the line which connects with 180V zener anode.

Reply
Syed Arham
September 12, 2014 • 12 years ago #25607

Sir i have a ready-made mobile smps circuit.
its output is 5v with 500mA.
Can i increase its rating upto 1A and 12v by altering the secondary winding.?

Reply
SwagatamAdmin
September 13, 2014 • 12 years ago #25622

Syed, yes it can be done, if there's a corresponding zener at the output that will also need to be modified accordingly.

Reply
aravind
February 19, 2015 • 11 years ago #28904

hai swagatam,
I have doubt that does this circuit can be enhance to 5v 1.5 amps

Reply
SwagatamAdmin
February 20, 2015 • 11 years ago #28918

hi arvind, yes it can be possibly done by using bifilar or trifilar winding over the transformer

Reply
Naresh Jain
February 21, 2015 • 11 years ago #28953

sir can be use this circuit as constant current,if yes then please tell me the modification.

Reply
SwagatamAdmin
February 22, 2015 • 11 years ago #28959

Naresh, the circuit will require some modification for implementing this, which can be slightly complex, it's better to add a LM317 current controller at the output for controlling current.

The first circuit from the following article can be tried:

https://www.homemade-circuits.com/2013/06/universal-high-watt-led-current-limiter.html

Reply
Naresh Jain
February 23, 2015 • 11 years ago #28967

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

Reply
SwagatamAdmin
February 23, 2015 • 11 years ago #28977

OK, in that case you may include the circuit shown in the following link:

https://www.homemade-circuits.com/2011/12/make-hundred-watt-led-floodlight.html

T1/T2 may be any NPN rated to handle the desired voltage and current specs

Reply
Naresh Jain
February 24, 2015 • 11 years ago #28993

Thank you for your quick response

Reply
kernelExploit
March 22, 2015 • 11 years ago #29483

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.

Thanks

Reply
SwagatamAdmin
March 22, 2015 • 11 years ago #29496

Thanks very much Kernel,

I think you should try the following design instead, as its much sophisticated and will suit your application need quite well:

https://www.homemade-circuits.com/2012/03/how-to-make-simple-12-v-1-amp-switch.html

the amp rating can be slightly increased by increasing the SWG of the secondary winding

Reply
Sumit Bose
April 28, 2015 • 11 years ago #30446

sir can you please mention what will be the primary and secondary inductances for the transformer?

Reply
SwagatamAdmin
April 28, 2015 • 11 years ago #30452

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

Reply
Sumit Bose
April 28, 2015 • 11 years ago #30456

Sir, didn't fully understand the last part. should the two E cores facing each other need to be insulated from one another?

Reply
SwagatamAdmin
April 28, 2015 • 11 years ago #30466

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.

Reply
Sumit Bose
April 29, 2015 • 11 years ago #30495

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.

Reply
SwagatamAdmin
April 29, 2015 • 11 years ago #30501

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

Reply
hkarya
May 10, 2015 • 11 years ago #30649

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.

Reply
SwagatamAdmin
May 10, 2015 • 11 years ago #30655

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.

Reply
SwagatamAdmin
May 10, 2015 • 11 years ago #30656

the opto now should be used for the 80V outputs, with the existing 5V zener replaced with a 80V zener diode

Reply
Rakesh Kumar
June 16, 2015 • 11 years ago #31561

I have a question that can I use tny266 or tny268 in place of tny267 and 4n35 in place of sfh6106 optocoupler.
Thanks.

Reply
SwagatamAdmin
June 16, 2015 • 11 years ago #31573

yes, you can use those instead of the indicated ones in the diagram

Reply
Anurag Gupta
June 19, 2015 • 11 years ago #31634

I could not find how much current it can supply at 5 volt.
Thanks,Anurag Gupta

Reply
SwagatamAdmin
June 19, 2015 • 11 years ago #31645

around 1 amp

Reply
Anurag Gupta
June 22, 2015 • 11 years ago #31680

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.

Reply
SwagatamAdmin
June 22, 2015 • 11 years ago #31684

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…

Reply
Anurag Gupta
June 22, 2015 • 11 years ago #31687

Do i have to buy separate lamination sheets for core or e19 ferrite core is available readymade?Actually i have never wound a transformer before.

Reply
SwagatamAdmin
June 23, 2015 • 11 years ago #31695

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.

Reply
Anurag Gupta
June 26, 2015 • 11 years ago #31767

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?

Reply
Anurag Gupta
June 26, 2015 • 11 years ago #31770

Also i am using sfh6106-2 its ctr is 63% to 125% whereas sfh6106-1 has 40-80% and a 100nf cap ceramic(not electrolytic at pin1 of ic) and a 6v zener diode at output.

Reply
SwagatamAdmin
June 26, 2015 • 11 years ago #31777

sorry troubleshooting will be difficult because I am don't know how you have built the transformer which is the most critical component in the design and requires experienced hands in order to create a perfect trafo, anyway you can try the following design also…this IC is much reliable than the TNY, and will give guaranteed results

https://www.homemade-circuits.com/2012/03/how-to-make-simple-12-v-1-amp-switch.html

Reply
Anurag Gupta
June 28, 2015 • 11 years ago #31825

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.

Reply
SwagatamAdmin
June 28, 2015 • 11 years ago #31830

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

http://www.mouser.com/ds/2/328/tny263_268-8433.pdf

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

Reply
Anurag Gupta
June 28, 2015 • 11 years ago #31836

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?

Reply
SwagatamAdmin
June 29, 2015 • 11 years ago #31846

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

http://www.mouser.com/ds/2/328/tny263_268-8433.pdf

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.

Reply
SwagatamAdmin
June 29, 2015 • 11 years ago #31847

…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.

Reply
Anurag Gupta
June 29, 2015 • 11 years ago #31858

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.

Reply
SwagatamAdmin
June 30, 2015 • 11 years ago #31867

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.

Reply
Anurag Gupta
July 1, 2015 • 11 years ago #31906

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.
Thanks

Reply
Anurag Gupta
June 19, 2015 • 11 years ago #31635

iI could not find how much current it can supply at 5volt output.
Thanks.

Reply
SwagatamAdmin
June 27, 2015 • 11 years ago #31793

it should be around 1 amp

Reply
PK
July 1, 2015 • 11 years ago #31887

Hi Dear Swagatam, how can a charge complete indication be implemented with this circuit?

thanks and warm regards,
Prashant

Reply
SwagatamAdmin
July 1, 2015 • 11 years ago #31898

Dear prashant, it can be achieved by adding another circuit at the output…such as this:

https://www.homemade-circuits.com/2011/12/how-to-make-simple-low-battery-voltage.html

Reply
Greifrutas
July 1, 2015 • 11 years ago #31901

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.

Reply
View Older Comments

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (103)
  • Battery Charger Circuits (89)
  • Datasheets and Components (109)
  • Electronics Theory (150)
  • Energy from Magnets and Earth (40)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (100)
  • Lamps and Lights (163)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (30)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (46)
  • Solar Controller Circuits (61)
  • Temperature Controllers (43)
  • Timer and Delay Relay (50)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)



Circuit Simulator

circuit simulator image



Subscribe to get New Circuits in your Email



Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |



Recent Comments

  • Swagatam on Ultrasonic Pest Repellent Circuit
  • Swagatam on Real MPPT Solar Charger Circuit Using Arduino, LCD, and Manual/Auto Switch
  • Swagatam on Universal H-Bridge Circuit Module
  • Swagatam on Programmable 35238-MP Timer Module? How to Use it
  • Swagatam on Simple FM Radio Circuit Using a Single Transistor

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

© 2026 · Swagatam Innovations