Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Amateur 220 VAC - 9VDC SMPS design

Not open for further replies.

Prince Charming

Member level 1
Jul 10, 2022
Reaction score
Trophy points
Activity points
Hello, I've designed an SMPS to power an Arduino with few sensors. I aimed for 9V and 2A max. I thought the Arduino has its own regulator so I wasn't too nervous about my design. This is the first time got into a circuit that has closed loop control and transformers. That's why I wanted to get professional thoughts about my design before I buy the parts. The schematic is given below:


First of all, for the EMI design I followed the video:
and I found my max x caps as 327 nF and y caps as 1.4 nF. I chose a very popular choke (Uu9.8) but I am open to suggestions. My snubber circuit which consists of R9,C4 and D6 is a copy of another SMPS I found on internet. The target output wasn't the same but I ignorantly thought these values would do the job. Also I added the C12 capacitor to dampen the voltage spikes during switching but I chose the capacitance arbitrarily so I am open to suggestions.

The transformer was the most difficult one for me. It has 25:1 ratio and according to the design in this website: it has 8.18 Amps of secondary peak current, 13 uH secondary inductance, 8mH primary inductance, minimum 173 turns at primary and 7 turns at secondary. I have never bought a transformer before and they are hard to choose. I know that there must be some kind of an air gap in flyback transformers but I don't have access to many options so it would be great if you could give me some very popular transformers that I might have access to.

Also I added an inductor filter to the output contrary to the general structure of a flyback converter. I saw it at somebody else's design and I thought as long as the inductance isn't too large a current filter wouldn't harm. But I am open to suggestions on why that inductance should/shouldn't be there and how I should choose the value of it. (AS far as i know current ripple depends on transformer inductance so this inductance seems like an extra to me)

I've had hard time choosing the output capacitor values as the formula for the minimum C is: "C_min = D/((Vo_ripple/Vo)*R*f)" and the resistance of Arduino doesn't make sense. I would be glad if I could know how to chose output caps for this kind of loads.

I used an IC for PWM control and basically I supplied 5V to negative side and divided Vo to the positive side of the error amplifier of TL494 as the datasheet suggests –0.3 V to (VCC – 2V) input to error amplifiers. If my observation is correct the PWM comparator in TL494 has constant 0.7V at PWM comparator as below:

Screenshot 2022-07-15 230222.png

And the purpose of that constant voltage is to prevent instability that would occur when zero signal comes from error amplifier, basically creates an acceptable threshold for zero error. If I am mistaken I'd be glad to be corrected. I didn't use deadtime comparator as it is irrelevant to my design so I connected that leg to ground.

I chose to use one MOSFET at the converter and kept the D7 diode in my schematic to make the design simple that's why I didn't need two outputs from the IC and I shorted the emitters and collectors as well as I shorted pin13 to ground. I learned how this IC behaves from the datasheet and it doesn't explain fully so I hope I planned and connected the IC in the right way. However, if you claim that that diode would waste energy I can replace it with a MOSFET. I think Vforward * 2Amps is at most 2 Watts. So does it really matter?

The way I applied the control signal to the MOSFET is purely my idea and I am not too confident about it. Normally people use optocouplers to separate high and low voltage but I was scared of being faced with extra problems and I thought adding a protection diode would be sufficient. If not, I would like to know the reason.

The TL494 IC in my design is fed with 12V voltage. How can this supply voltage be obtained? There are numerous designs in the internet and everybody connects an 12V power supply to the IC. That is impossible if this is the only power supply in a device and nobody considers this possibility, I am very surprised.



My biggest concern is safety.
What you say about using a diode instead of an optocoupler worries me a lot.
..and your voltage feedback.

also there are a lot of other things that are not clear.

Thus my first recommendation is to use a ready to buy power supply. Just not to hurt/kill yourself or others.

If you urgently wnat to design it on your own, then I recommend to use an application note / design note with a complete design, including PCB layout example and part selection. With a lot of informations, not much to design on your own.

BTW: a strip board is an absoluto no go for a this type of circuits. And it needs a lot of PCB layout skills to do an SMPS design properly. (safety, EMI/EMC, stability ...)


the 100pF across the main fet is a bad idea as is the very slow diode D8 and 10M resistor R20 for the mosfet gate - this will just go bang - also D6 can not be a slow diode -> bang ---> go to - this will save you a lot of heart-ache ...

also - where is the 12V coming from to power the IC ... ? if you cannot design a startup 12V bias supply based on the startup consumption of the IC - then you are are a wee bit out of your depth here - respectfully.
Last edited:

This circuit is not appropriate to implement because it needs 2 voltage sources independent etc. Not a solution.
Let me give you a smarter idea. Go to
and search an appropriate reference design for you application and work on it.
Everything is ready, even PCB files, measurement reports, safety regulations etc.

Alright I updated the circuit as below, I replaced D6 diode with a fast diode, I added a MOSFET driver instead of a gate resistor. Also I edited the MOSFET snubber but I am ready to remove it if you don't like it again.


I checked but there are very modern and complex chips which I cant currently comprehend. Also hose IC's are not on sale in my country. I would like to build my own design even if it is going to burn. There is only one barrier between me and building the circuit. Please tell me how I can obtain the supply voltage for TL494. It doesn't have to be 12V, it can be 9V, the IC supports that. But I can't directly connect it to output because existence of the output voltage depends on the IC in the first place. Can I charge a capacitor when the circuit is connected and supply Vcc to TL494 for some time from the capacitor then switch to Vo with a relay?


then switch to Vo with a relay?
you still seem not to understand galvanic isolation. (In several parts of your circuit)
This is safety problem. Safety needs to be first.

You say "even if it burns", but I´m concerned about "if it kills".

I´m happy to give assistance, as soon as I see you know the rules about safety.
220V AC is dangerous.

And AC/DC SMPS is a rather complex application. Many amateurs tried it. Some failed, some failed to debug it (safe measurement with scopes on the AC side for example). Some made it running. But I think I´ve rarely seen an amateur to made it running:
* while keeping on safety regulations (every device needs to comply with)
* keeping on EMI/EMV regulations (every deevice needs to comply with)
* ... and reliably running (running at least for a year without part defect, explosion, fire .. because of wrong PCB layout)

Don´t get me wrong. I don´t want to discourage you from doing electronics. Please do it step by step: from simple circuits to complex circuits, form uncritical circuits to dangerous circuits. I´m concerened about health.


You need reinforced isolation between primary switcher circuit and output side, typically checked with a 3000 VAC Hipot test. Voltage feedback for the controller must be also isolated. Some flyback SMPS are using indirect feedback from an isolated auxiliary winding that can be also used to power the controller but it's relative inaccurate.

Flyback SMPS can be better controlled by a current mode controller, e.g. UC3842 rather than voltage mode controller like TL494.

Among my pastimes is to play with circuit simulations. Using your component values here's action in and around the transformer. Expected waveforms are shown in scope traces.

It shows your design is feasible. Transformer 8 Ampere capability is adequate.

70 kHz is a switching frequency that seems to work.
The DCR snubber network appears suitable.

flyback step-down 300VDC 70kHz ana-swi 11v 2A w snub.png

It shows your design is feasible.
Wow how nice :D

I had come to a problem where I thought I was going to control AC motor speed with triacs then I realized I have to make a frequency controller. So I don't want to get into an impasse. That's why I turned my focus into the frequency controller, for now. Maybe I will return to smps.


Not open for further replies.

Part and Inventory Search

Welcome to